From: Stephen D. <sd...@gm...> - 2007-02-10 23:39:12
|
On 2/10/07, Michael A. Cleverly <cle...@gm...> wrote: > My adventures (with CVS HEAD) on OpenBSD/sparc64 continue. > > Unless I set: > > ns_section "ns/server/${servername}/module/nssock" > ns_param acceptsize 1 > > in my conf file then incoming an HTTP request never get serviced > promptly; I can't connect to the nscp control port, and I can't hit > CTRL-C to end the (foreground) nsd process. The control port uses the nsd/sockcallback.c mechanism to handle new connections, which runs in a seperate thread. So even if the driver thread was blocked, I would not expect that to prevent you from logging in via the control port. What threading library does OpenBSD have these days? I thought they had an option for real, 1-1 user-kernel threads. Maybe we need to link to the correct thread library? Still, the driver thread shouldn't be blocking... > If I set ns_param acceptsize to 2 then the first connection "hangs", > when a second one is made both are processed immediately. > > The default acceptsize is equal to the backlog setting, which defaults > to 256. I strongly suspect (but haven't had the patience to confirm) > that with no acceptsize setting I'd have to have 256 active HTTP > connections before any would be processed at all. > > I've sprinkled driver.c, binder.c, and sock.c with caveman debugging > Ns_Log() calls and it appears to block in the while loop attempting to > accept more when calling the final check of the four checks [in > DriverThread() in driver.c at line 1272]: > > (sockPtr = SockAccept(drvPtr)) != NULL > > which seems to end up waiting [in SockAccept() in driver.c at line 1635-6] on: > > sockPtr->sock = Ns_SockAccept(drvPtr->sock, > (struct sockaddr *) &sockPtr->sa, &slen); > > which in turn waits [in Ns_SockAccept() in sock.c at line 420] on: > > sock = accept(lsock, saPtr, (socklen_t *) lenPtr); > > which makes me think that the listening socket must not be set in > non-blocking mode(?). > > Suggestions? The same behavior does not occur on OpenBSD 3.8/macppc or > OpenBSD 3.9/amd64. (Everything works "out-of-the-box" as expected.) > > Michael > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier. > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > |