Date: Fri, 29 Sep 2000 07:28:54 -0400 (EDT) From: Daniel Eischen <eischen@vigrid.com> To: Alfred Perlstein <bright@wintelcom.net> Cc: Roman Shterenzon <roman@harmonic.co.il>, freebsd-stable@FreeBSD.ORG Subject: Re: pthreads bug? Message-ID: <Pine.SUN.3.91.1000929072626.7930A-100000@pcnet1.pcnet.com> In-Reply-To: <20000929013521.C27736@fw.wintelcom.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 29 Sep 2000, Alfred Perlstein wrote: > * Roman Shterenzon <roman@harmonic.co.il> [000929 01:23] wrote: > > Hello, > > I noticed some strange behavior in pthreads applications, > > close on socket which is in accept() will be blocked untill there's a connection > > to port and accept returns. > > It's observed on 4.0 - 4.1-STABLE, perhaps 4.1.1-STABLE as well, but I didn't > > try it. I don't have 3.5.1-STABLE system to test it there. > > It affects, for example, openldap - start it , then kill -15 it. > > It won't die (and it should). Now, try to telnet localhost 389 ; now it died. > > The same behavior is a program we're writing right now, it's very annoying, in > > fact we don't know how to deal with it. It works on solaris and linux. > > btw, linux doesn't dump core on threaded application, how one's supposed to > > debug it? > > No clue on that one. :( > > > I attach example program, which, when receives SIGUSR1 should close the socket, > > but, in fact gets blocked in the close() function. > > Obviously it's waiting to acquire some lock. > > Does anyone have an idea? > > Yes, I have an idea and an idea how to fix it, I'm wondering what > the thread in accept() sees after this happens? I don't think it should be fixed unless we decide to remove the automatic locking of file descriptors. But if you do come up with a clean solution, please run it by me. I have some massive changes to the threads library that are currently under review. -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.1000929072626.7930A-100000>