Subject: Re: Unkillable process, stalled socket write()
To: Jorgen Lundman <lundman@lundman.net>
From: Christos Zoulas <christos@zoulas.com>
List: netbsd-users
Date: 03/10/2005 08:50:32
On Mar 10,  8:59pm, lundman@lundman.net (Jorgen Lundman) wrote:
-- Subject: Re: Unkillable process, stalled socket write()

| Thanks for the input.  I'm not concerned about the zombies, if the parent wasn't 
| locked in the write() call, they would have been wait4()ed on. But SIGCHLD, 
| heck, SIGKILL is just "ignored", so that isn't happening.
| 
| However, what is SOMAXKVA? We do moderate amount of traffic, but not enough to 
| justify it running out legitimately I think. If my program isn't cleaning up 
| after itself, what would that be? I do not leak fd's or memory according to 
| Purify etc.

It is either a kernel bug or something is consuming all the socket buffers
possibly by writing to sockets where the other side is not absorbing the
read?

| Just thinking that if I increase SOMAXKVA, all I do is delay the bug (which 
| could be ok, if it only happens every ~120days at the moment.

That would work.

| I was hunting a different bug in OpenSSL when this happened. (So I restarted my 
| application many times).
| 
| Anyone else come across the issue that SSL_write turns fds into blocking mode? 
| When I add printfs before and after the call, I confirm fd is nonblocking before 
| I call SSL_write(), but it is set to _blocking_ after the call! (repeatedly, but 
| only for one (very slow) user. but this is better asked on openssl mailinglists).

I don't know; ask them.

christos