SIGBUS in One Thread. Can Other Threads Continue?

SIGBUS in One Thread. Can Other Threads Continue?

Post by annamala » Sun, 09 Mar 2008 04:26:57



What if the thread that received the SIGBUS catches it and does
some clean up activity and gracefully shuts down. Will this affect
other threads?

Rgds,
anna
 
 
 

SIGBUS in One Thread. Can Other Threads Continue?

Post by James Carl » Sun, 09 Mar 2008 05:24:37

annamalai < XXXX@XXXXX.COM > writes:



If it calls exit() in some way, then the whole process exits.

If it doesn't do that, and just the one thread terminates, then the
rest of the process ought to continue running. Whether that'd
actually be a reasonable thing to do or not as a matter of good
software design is probably a separate consideration.

--
James Carlson, Solaris Networking < XXXX@XXXXX.COM >
Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677

 
 
 

SIGBUS in One Thread. Can Other Threads Continue?

Post by Thomas Deh » Sun, 09 Mar 2008 05:36:59


It is possible to write a signal handler that gracefully handles
the SIGBUS and lets the overall application continue.
Having such a signal handler might be misguided - figuring
out why you got a SIGBUS and properly resolving
such conditions at the application level is hard.


Thomas
 
 
 

SIGBUS in One Thread. Can Other Threads Continue?

Post by Ian Collin » Sun, 09 Mar 2008 05:46:07


Agreed, some signals simply should not be caught, at least not during
development and testing. Too much useful information will be lost.

Are there ever sound reasons to expect SIGBUS?

--
Ian Collins.
 
 
 

SIGBUS in One Thread. Can Other Threads Continue?

Post by ddunha » Sun, 09 Mar 2008 07:48:01


BUS is common for memory alignment issues. Requesting a 'long' that is
not aligned on a 4byte boundary (at least on SPARC, not sure about x86).
Of course if you're in a position to catch that, you're probably in a
position to prevent the call in the first place....

--
Darren Dunham XXXX@XXXXX.COM
Senior Technical Consultant TAOS http://www.yqcomputer.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
 
 
 

SIGBUS in One Thread. Can Other Threads Continue?

Post by Ian Collin » Sun, 09 Mar 2008 08:02:09


I know what its, thats' why I asked. I can't see any sound reason to
catch SIGBUS.

--
Ian Collins.
 
 
 

SIGBUS in One Thread. Can Other Threads Continue?

Post by Ian Collin » Sun, 09 Mar 2008 08:03:22


Please excuse the terrible grammar above.....

--
Ian Collins.
 
 
 

SIGBUS in One Thread. Can Other Threads Continue?

Post by Thomas Deh » Sun, 09 Mar 2008 08:26:45


Yes, but I won't post about them because 99%
of the time catching SIGBUS is a bad idea, and
I don't want to obscure that.


Thomas
 
 
 

SIGBUS in One Thread. Can Other Threads Continue?

Post by Chris Matt » Sun, 09 Mar 2008 23:46:24


x86 instructions don't fail on data alignment errors. However, a
memory fetch can only retrieve a whole word when it's aligned,
so issuing an instruction with a misaligned operand will result
in two memory fetches to get all the data, so screwing up your
data alignments results in a *** performance penalty.


--
Christopher Mattern

NOTICE
Thank you for noticing this new notice
Your noticing it has been noted
And will be reported to the authorities