NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/50627: filemon can hang the process



The following reply was made to PR kern/50627; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/50627: filemon can hang the process
Date: Wed, 6 Jan 2016 11:26:38 +0100

 On Wed, Jan 06, 2016 at 06:40:01AM +0000, Robert Elz wrote:
 >  In-kernel atexit() could solve this problem, and could also potentially
 >  have uses for other problems, but when things get complex (I don't know
 >  if it is possible, but consider a process using filemon twice, where one
 >  of them is logging changes to a file monitored by the other) the atexit()
 >  order processing is just going to be the same problem all over again -
 >  something will need to make sure those get done in the correct order,
 >  which is not necessarily either establishment order, or the reverse of that.
 
 I haven't followed the details, so this may be a stupid suggestion: isn't
 it enough to do the closing loop several times, using cv_timedwait(.., 1)
 and ignoring the fds where it returns EWOULDBLOCK, untill we did not close
 any fds in one pass and then switch to cv_wait() in the next pass?
 
 Martin
 


Home | Main Index | Thread Index | Old Index