lkml.org 
[lkml]   [2006]   [May]   [12]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 12 May 2006 14:24:13 +0200
FromEric Dumazet <>
SubjectRe: [RFC, PATCH] cond_resched() added to close_files()
Ingo Molnar a écrit :
> * Andrew Morton <akpm@osdl.org> wrote:
>
> 
>> Makes my machine hang early during the startup of init.
>>
>> The last process to pass through close_file() is `hostname', presuably 
>> parented by init.  `hostname' exits then everything stops.  init is 
>> left sleeping in select().
>>
>> All very strange.
>> 
>
> weird. This really shouldnt cause a hang - i think there must be a bug 
> hiding elsewhere, this cond_resched() ought to be fine.
>
> 	Ingo
>
> 
Maybe a process is now awaken because of a closed pipe, instead of a SIGCHLD

Process A, father/parent of process B. They share a pipe (A reads the 
pipe, B writes to)

Before

Process B exits, "atomically close all of its files and sending a SIGCLD 
to its parent"
Process A catch the SIGCLD.

After :
Process B exits "close its files (and the pipe), reschedule before final 
SIGCLD"
Process A gets the POLLIN/POLLHUP indication on the pipe -> Another code 
path is run and may trigger a user side bug ?


Eric




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-12 12:26    [from the cache]
©2003-2008