lkml.org 
[lkml]   [2007]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -v2] fix for futex_wait signal stack corruption
Linus Torvalds said the following on  5/12/07 01:41 PM:
> So here's a question for David Holmes: What caused you to actually notice
> this behaviour? Can this actually be seen in real life usage?

We observed an application "hang" that turned out to be caused by a
clock mismatch between that used with the pthread_cond_t and that used
to convert a relative wait time to an absolute one. When the program ran
in the foreground and hung I used ctrl-Z to suspend it then "bg" to
background it. As soon as I did that the application became unstuck.

While this was observed with process control signals, my concern was
that other signals might cause pthread_cond_timedwait to return
immediately in the same way. The test program allows for SIGUSR1 and
SIGRTMIN testing as well, but these other signals did not cause the
immediate return. But it would seem from Steven's analysis that this is
just a fortuitous result. If I understand things correctly, any
interruption of pthread_cond_timedwait by a signal, could result in
waiting until an arbitrary time - depending on how the stack value was
corrupted. Is that correct?

Thanks,
David Holmes
Senior Java Technologist
Java SE VM Real-time and Embedded Group
---------------------------------------


\
 
 \ /
  Last update: 2007-12-05 06:57    [W:0.056 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site