Bug 32344 - crash with EH on multiprocessor machines
Summary: crash with EH on multiprocessor machines
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-14 16:23 UTC by Andrew Sveikauskas
Modified: 2024-01-09 10:15 UTC (History)
2 users (show)

See Also:
Host: sparc-sun-solaris2.*
Target: sparc-sun-solaris2.*
Build: sparc-sun-solaris2.*
Known to work:
Known to fail:
Last reconfirmed: 2009-11-16 17:51:47


Attachments
Code that reproduces the problem (522 bytes, text/plain)
2007-06-14 16:25 UTC, Andrew Sveikauskas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Sveikauskas 2007-06-14 16:23:12 UTC
On multiprocessor Solaris Sparc machines, if multiple threads are concurrently throwing exceptions, and another thread is calling exit() or returning from main(), there are messages such as:

   terminate called recursively
   terminate called after throwing an instance of '

And sometimes core is dumped with an abort signal.

I have been able to reproduce this on a number of different gcc versions (4.2.0, 4.1.2, 2.95.2).  You can find the code I use to reproduce it at: http://www.csug.rochester.edu/users/ugrads/asveikau/exception_bug.cc  Note that running it once without incident does not mean the system is unaffected by the bug; keep running it until it dumps core.

The code runs file on: SunPRO C++ on the affected systems, gcc 4.1.1 on i386 linux, and gcc 3.2.3 on i386 linux.  This is why I concluded that the issue is specific to either gcc on Solaris or gcc on Sparc.  Since it works fine on Sun's compiler, I don't think it is Solaris's fault.  I don't have access to sparc linux or x86 solaris, so I couldn't narrow it down beyond that.
Comment 1 Andrew Sveikauskas 2007-06-14 16:25:19 UTC
Created attachment 13703 [details]
Code that reproduces the problem
Comment 2 Andrew Pinski 2008-12-01 00:10:35 UTC
Hmm, shouldn't the unwinder using pthreads mutex's already?

What is the output of "gcc -v" is the thread model set to single?
Comment 3 Eric Botcazou 2009-11-16 17:51:47 UTC
I can reproduce with mainline on a bi-processor machine (Sun-Fire-V240) running Solaris 10 but neither on a bi-processor machine (Sun-Fire-V240) runnning Solaris 9 nor on a quadri-processor machine (Sun-Fire-V440) running Solaris 8.