Bug 852445
Summary: | gcc_assert failure in _Unwind_SetSpColumn() on ppc64 | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Jan Stancek <jstancek> | ||||||
Component: | glibc | Assignee: | Patsy Griffin <pfrankli> | ||||||
Status: | CLOSED ERRATA | QA Contact: | qe-baseos-tools-bugs | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 6.3 | CC: | czhang, fweimer, jburke, law, mfranc, spoyarek | ||||||
Target Milestone: | rc | ||||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: |
cause: The PPC specific pthread_once code did not correctly
publish changes it made. As a result, those changes were not visible to other threads at the proper time.
fix: release barriers were added to the appropriate PPC pthread code to ensure proper synchronization of data between multiple threads.
|
Story Points: | --- | ||||||
Clone Of: | |||||||||
: | 905941 1491968 (view as bug list) | Environment: | |||||||
Last Closed: | 2013-02-21 07:05:50 UTC | Type: | Bug | ||||||
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: | 905941, 906079, 1103874 | ||||||||
Attachments: |
|
Description
Jan Stancek
2012-08-28 14:02:16 UTC
Created attachment 607556 [details]
reproducer that can trigger the gcc_assert
As unprivileged user run on power7 host:
ulimit -c unlimited
gcc -g3 -O0 gcc_assert_dw2.c -lpthread
./a.out
Within few minutes it should hit gcc_aseert at:
#2 0x000000806687e504 in _Unwind_SetSpColumn (context=0xfff8070df58, outer_cfa=0xfff8070e610, outer_ra=0x8066548904) at ../../../gcc/unwind-dw2.c:1265
1265 gcc_assert (size == sizeof(_Unwind_Word));
From the PR that sounds like a libpthread bug. Agreed. Actually Alan M. posted a patch to the libc-alpha list in late July. Unfortunately that patch was reported to hang stuff on ppc32 and when I threw it into brew for fun, it hung builds for both ppc32 and ppc64. Somehow that last hunk munges things -- I'm not sure if it's the missing "memory" clobber in the asm, or using GENERAL_REGS instead of BASE_REGS for the address of once_control. AFAICT, that last hunk is just a slightly optimized read barrier + atomic_increment. So I've kept the atomic_increment and just added a call to atomic_read_barrier (and kept the other changes). Builds/testing in progress. Created attachment 608381 [details]
Potential fix from Alan Modra
16 parallel instances of the test just passed 100k iterations each without tripping a failure which is about 10x longer than they'd ever managed to go before without tripping. I'm going to let it run overnight, but I'm pretty sure we've got the right fix.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0279.html |