Bug 573756
| Summary: | segfaults in re-entrant gettext code | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 4 | Reporter: | Jeff Bastian <jbastian> | ||||||||
| Component: | glibc | Assignee: | Andreas Schwab <schwab> | ||||||||
| Status: | CLOSED ERRATA | QA Contact: | qe-baseos-tools-bugs | ||||||||
| Severity: | high | Docs Contact: | |||||||||
| Priority: | high | ||||||||||
| Version: | 4.8 | CC: | ebachalo, fweimer, jakub, moshiro, pmuller, tao | ||||||||
| Target Milestone: | rc | Keywords: | ZStream | ||||||||
| Target Release: | --- | ||||||||||
| Hardware: | All | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | glibc-2.3.4-2.48 | Doc Type: | Bug Fix | ||||||||
| Doc Text: |
Due to insufficient locking, the use of the strerror() function in a multi-threaded application could cause the application to terminate unexpectedly with a segmentation fault in the gettext subsystem. This update includes backported patches that add the necessary locks to glibc, resolving this issue.
|
Story Points: | --- | ||||||||
| Clone Of: | 439486 | Environment: | |||||||||
| Last Closed: | 2011-02-16 14:29:36 UTC | Type: | --- | ||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||
| Embargoed: | |||||||||||
| Bug Depends On: | |||||||||||
| Bug Blocks: | 485811, 593290 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Jeff Bastian
2010-03-15 17:49:01 UTC
Created attachment 400279 [details]
alternate test case
On a multi-CPU/multi-core system:
1. tar xzf strerror_r.tar.gz
2. cd strerror_r
3. make
4. ./test.sh
Occasionally you'll see an error message:
./test.sh: line 10: 29993 Segmentation fault ./strerror_r
Created attachment 405622 [details] backport of glibc-rh439486.patch Attached is an attempt to backport glibc-rh439486.patch from RHEL 5 glibc. This patch definitely should be reviewed because I had to backport some other very large changes to get it to compile. These include: - a large portion of _nl_find_msg() in intl/dcigettext.c was re-written - _nl_init_domain_conv() and _nl_free_domain_conv() removed from intl/loadmsgcat.c - added struct converted_domain to gettextP.h - updated struct loaded_domain to use the struct converted_domain - added get_output_charset() internal function to dcigettext.c - included some more headers in gconv_int.h to clear some compiler warnings In my testing with this patch, the test program in comment 0 succeeds every time. I ran it in a loop 100 times and without the patch, it would fail approximately 50/100 times. With the patch, it's successful all the time. let f=0 for i in $(seq 1 100); do echo -n "$i : " if ./test ; then echo Passed else echo let f=f+1 fi done echo echo "Failed $f times out of 100"
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
Due to insufficient locking, the use of the strerror() function in a multi-threaded application could cause the application to terminate unexpectedly with a segmentation fault in the gettext subsystem. This update includes backported patches that add the necessary locks to glibc, resolving this issue.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0248.html |