Dear Andrew, Did you happen to use this define _USE_32BIT_TIME_T? Hope it helps, Maurizio
-----Original Message----- From: Andrew Piskorski [mailto:a...@piskorski.com] Sent: 03 October 2014 14:49 To: naviserver-devel@lists.sourceforge.net Subject: [naviserver-devel] Naviserver hangs on Windows With my changes here, the core Naviserver compiles now on my Windows 7 64-bit machine: https://bitbucket.org/naviserver/naviserver/pull-requests https://bitbucket.org/apiskors/naviserver/commits/all However, it doesn't work at all. If I simply run "nsd -h", it hangs indefinitely, and locks up the Command Prompt window where I ran nsd. Control-c does not abort, I have to close the window. Note that I built Naviserver using ActiveTcl 8.5, I did not compile Tcl myself. I just started learning to use the WinDbg debugger. Below is a stack trace. This one is from attaching WinDbg to an already-running "nsd.exe -h" process, but it looks the same if I intead tell WinDbg to run nsd.exe itself (with no command line arguments) . >From the stack trace, Naviserver seems to be getting stuck when Ns_GetTime (line 69 of time.c) calls TclpGetDate. But, line 69 does not explicitly call TclpGetDate, it justs manipulates a Tcl_Time tbuf structure like so: timePtr->sec = tbuf.sec; In Tcl 8.5.x, TclpGetDate is in win/tclWinTime.c, but the string "TclpGetDate" does not occur anywhere in the Naviserver code, so I'm not sure how it manages to call it. A function pointer somewhere? Any ideas what might be wrong here, or what else I should do to debug this further? Here the initial WinDbg output when attaching to a running "nsd.exe -h" process, and then the stack trace (the "k" command): ------------------------------------------------------------ *** wait with pending attach Symbol search path is: C:\web\nsd-atp\lib;http://msdl.microsoft.com/download/symbols Executable search path is: ModLoad: 00000001`3f080000 00000001`3f0fe000 C:\web\nsd-atp\bin\nsd.exe ModLoad: 00000000`775e0000 00000000`77789000 C:\Windows\SYSTEM32\ntdll.dll ModLoad: 00000000`773c0000 00000000`774df000 C:\Windows\system32\kernel32.dll ModLoad: 000007fe`fd430000 000007fe`fd49c000 C:\Windows\system32\KERNELBASE.dll ModLoad: 000007fe`f0680000 000007fe`f0828000 C:\web\nsd-atp\bin\nsd.dll ModLoad: 000007fe`faab0000 000007fe`fab4e000 C:\web\nsd-atp\bin\nsthread.dll ModLoad: 00000000`10000000 00000000`100dc000 C:\P\Tcl85\bin\tcl85.dll ModLoad: 00000000`774e0000 00000000`775da000 C:\Windows\system32\USER32.dll ModLoad: 000007fe`fdd40000 000007fe`fdda7000 C:\Windows\system32\GDI32.dll ModLoad: 000007fe`ff8e0000 000007fe`ff8ee000 C:\Windows\system32\LPK.dll ModLoad: 000007fe`ff470000 000007fe`ff539000 C:\Windows\system32\USP10.dll ModLoad: 000007fe`ff2e0000 000007fe`ff37f000 C:\Windows\system32\msvcrt.dll ModLoad: 000007fe`ff380000 000007fe`ff45b000 C:\Windows\system32\ADVAPI32.dll ModLoad: 000007fe`fdad0000 000007fe`fdaef000 C:\Windows\SYSTEM32\sechost.dll ModLoad: 000007fe`ff780000 000007fe`ff8ad000 C:\Windows\system32\RPCRT4.dll ModLoad: 000007fe`fee00000 000007fe`fee4d000 C:\Windows\system32\WS2_32.dll ModLoad: 000007fe`ff460000 000007fe`ff468000 C:\Windows\system32\NSI.dll ModLoad: 000007fe`ff8b0000 000007fe`ff8de000 C:\Windows\system32\IMM32.DLL ModLoad: 000007fe`fd9c0000 000007fe`fdac9000 C:\Windows\system32\MSCTF.dll Break-in sent, waiting 30 seconds... WARNING: Break-in timed out, suspending. This is usually caused by another thread holding the loader lock (e98.12c): Wake debugger - code 80000007 (first chance) ntdll!ZwWaitForSingleObject+0xa: 00000000`776312fa c3 ret 0:000> kc Call Site ntdll!ZwWaitForSingleObject *** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\P\Tcl85\bin\tcl85.dll - KERNELBASE!WaitForSingleObjectEx *** WARNING: Unable to verify checksum for C:\web\nsd-atp\bin\nsthread.dll tcl85!TclpGetDate [...] 0:000> k Child-SP RetAddr Call Site 00000000`0027eeb8 000007fe`fd4310dc ntdll!ZwWaitForSingleObject+0xa 00000000`0027eec0 00000000`100a4766 KERNELBASE!WaitForSingleObjectEx+0x79 00000000`0027ef60 000007fe`faab4139 tcl85!TclpGetDate+0x5c2 00000000`0027efc0 000007fe`faab1bf6 nsthread!Ns_GetTime+0x29 [z:\web\ns-fork\naviserver\nsthread\time.c @ 69] 00000000`0027f010 000007fe`faab25f9 nsthread!Ns_MutexLock+0x76 [z:\web\ns-fork\naviserver\nsthread\mutex.c @ 210] 00000000`0027f0d0 000007fe`faab144a nsthread!Ns_CsEnter+0x69 [z:\web\ns-fork\naviserver\nsthread\cslock.c @ 172] 00000000`0027f110 000007fe`faab3db8 nsthread!Ns_MasterLock+0x2a [z:\web\ns-fork\naviserver\nsthread\master.c @ 71] 00000000`0027f140 000007fe`faab2c58 nsthread!Ns_TlsAlloc+0x28 [z:\web\ns-fork\naviserver\nsthread\tls.c @ 77] 00000000`0027f180 000007fe`faab33d2 nsthread!NsInitReentrant+0x28 [z:\web\ns-fork\naviserver\nsthread\reentrant.c @ 65] 00000000`0027f1b0 000007fe`faab4514 nsthread!NsInitThreads+0x32 [z:\web\ns-fork\naviserver\nsthread\thread.c @ 105] 00000000`0027f1e0 000007fe`faab457d nsthread!Nsthreads_LibInit+0x44 [z:\web\ns-fork\naviserver\nsthread\winthread.c @ 132] 00000000`0027f210 000007fe`faabddf0 nsthread!DllMain+0x5d [z:\web\ns-fork\naviserver\nsthread\winthread.c @ 164] 00000000`0027f250 000007fe`faabdd41 nsthread!__DllMainCRTStartup+0xa0 [f:\dd\vctools\crt_bld\self_64_amd64\crt\src\dllcrt0.c @ 330] 00000000`0027f2a0 00000000`7761b108 nsthread!_DllMainCRTStartup+0x31 [f:\dd\vctools\crt_bld\self_64_amd64\crt\src\dllcrt0.c @ 294] 00000000`0027f2d0 00000000`77621e5a ntdll!LdrpRunInitializeRoutines+0x1fe 00000000`0027f4a0 00000000`77621937 ntdll!LdrpInitializeProcess+0x1b8a 00000000`0027f990 00000000`7760c34e ntdll! ?? ::FNODOBFM::`string'+0x28ff0 00000000`0027fa00 00000000`00000000 ntdll!LdrInitializeThunk+0xe -- Andrew Piskorski <a...@piskorski.com> ---------------------------------------------------------------------------- -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel