Re: [ROOT] Signal handlers and the like

From: Konstantin Olchanski (olchansk@sam.triumf.ca)
Date: Sat Jan 10 2004 - 05:42:34 MET


On Sat, Jan 10, 2004 at 01:50:27AM -0100, Fons Rademakers wrote:
> PS: in some cases ROOT ends up in a situation where ctrl-c does nothing
> and one has to kill the ROOT session from another shell. This happens
> when ROOT ends up in a situation where the SIGINT had been set to be
> ignored. This is not desired and we are investigating the issue.

Or Ctrl-c comes at the "wrong" time, for example, when we are inside
malloc() or free(). Then, after longjump() to the ROOT prompt, the malloc
arena is in an inconsistent state because malloc() was interrputed half way
doing it's thing, and the first attempt to allocate anything would seg
fault (or corrupt memory even more, leading to a seg fault somewhen later).

Then, we add insult to injury, and catch the SIGSEGV and try
to run the stack trace code. By now, memory is likely so currupted that
the stack tracer would seg fault (and we recatch SIGSEGV, ad infinitum),
or deadlocks, or simply goes into an infinite loop with SIGINT disabled.

Howzat?

-- 
Konstantin Olchanski
Data Acquisition Systems: The Bytes Must Flow!
Email: olchansk-at-triumf-dot-ca
Snail mail: 4004 Wesbrook Mall, TRIUMF, Vancouver, B.C., V6T 2A3, Canada



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:05 MET