On Wed, Oct 15, 2014 at 8:24 PM, Andrew Piskorski <a...@piskorski.com> wrote: > > On Wed, Oct 15, 2014 at 03:45:59AM -0400, Andrew Piskorski wrote: > > > In my own application on Windows, my connection thread tells a worker > > thread to do something using nsv, mutexes, and a condition variable. > > > > This is old code that works fine on AOLserver 4.0.x (on a different > > older Windows XP box), but now with Naviserver on Windows 7, the > > worker thread seems to never wake up, and never do anything at all. > > There is definitely a real problem. For debugging purposes in my > application, I replaced that one use of ns_cond (there are others) > with a simpler sleep-and-poll arrangement. That works - the submit > thread wakes up after sleeping, sees the data waiting for it in its > nsv queue, and does its job. > > So I don't know what exactly, but something is seriously broken with > ns_cond and/or ns_mutex in Naviserver, at least on Windows, possibly > on Linux as well. > > Btw, for those who haven't used ns_cond before, it is a low-level > wrapper around standard POSIX condition variable semantics. By design > it MUST be used in conjunction with ns_mutex. > > Thus I'm extra interested in the way nsthreadtest crashes, which I > don't understand. But failing feedback on that, next I'll probably > try and write some simpler stand-alone Tcl code to reproduce the "My > thread waiting on ns_cond never wakes up" behavior I'm seeing with > Naviserver.
You have a known good revision: aolserver-4.0.10, a known bad: tip, and an automated test to distinguish between the two states: nsthreadtest. Try 'hg bisect ...' to figure out where the error was introduced. ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho _______________________________________________ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel