ikkeniet has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks, I have an issue whereby Perl58.dll regularly crashes on Windows platforms resulting in following DrWatson error. Anyone any idea what the root cause may be (sleep function?) if so any suggestion (except from moving away from Win32 platforms :-) ? Thanks
*---- Stack Back Trace ----* WARNING: Stack unwind information not available. Following frames may +be wrong. ChildEBP RetAddr Args to Child 0bb5fdd8 7c802455 00000258 00000000 0bb5fe40 ntdll!KiFastSystemCallRet 0bb5fde8 02214f93 00000258 1835ccb4 1835c8dc kernel32!Sleep+0xf 0bb5fe +40 2805f7ec 0135c8dc 1835c8dc 28025f90 Win32+0x4f93 0bb5ff18 10002482 1835c8dc 190c3cbc 00000004 perl58!Perl_runops_standa +rd+0xc 0bb5ffb4 7c80b729 1835b4a4 7c9101db 183449e8 threads+0x2482 0bb5ffec 0 +0000000 100022e8 1835b4a4 00000000 kernel32!GetModuleFileNameA+0x1ba *---- Raw Stack Dump ----* 000000000bb5fd80 1a d2 90 7c f1 23 80 7c - 00 00 00 00 b0 fd b5 0b .. +.|.#.|........ 000000000bb5fd90 dc c8 35 18 08 00 00 00 - 02 00 00 00 14 00 00 00 .. +5............. 000000000bb5fda0 01 00 00 00 00 00 00 00 - 00 00 00 00 10 00 00 00 .. +.............. 000000000bb5fdb0 80 72 a4 ff ff ff ff ff - 94 5c c3 77 b0 fd b5 0b .r +.......\.w.... 000000000bb5fdc0 90 fd b5 0b c4 72 08 28 - dc ff b5 0b a8 9a 83 7c .. +...r.(.......| 000000000bb5fdd0 60 24 80 7c 00 00 00 00 - e8 fd b5 0 +b 55 24 80 7c `$.|........U$.| 000000000bb5fde0 58 02 00 00 00 00 00 + 00 - 40 fe b5 0b 93 4f 21 02 X.......@....O!. 000000000bb5fdf0 58 02 00 00 b4 cc 35 18 - dc c8 35 18 f4 19 36 18 X. +....5...5...6. 000000000bb5fe00 7e 1b 04 28 dc c8 35 18 - f4 19 36 18 dc c8 35 18 ~. +.(..5...6...5. 000000000bb5fe10 dc c8 35 18 00 00 00 00 - 0e 50 00 28 10 c9 35 18 .. +5......P.(..5. 000000000bb5fe20 01 00 00 00 88 f8 03 28 - dc c8 35 18 10 c9 35 18 .. +.....(..5...5. 000000000bb5fe30 80 00 00 00 dc 19 36 18 - dc c8 35 18 3c 59 cc 29 ......6...5.Y.) 000000000bb5fe40 18 ff b5 0b ec f7 05 28 - dc c8 35 01 dc c8 35 18 .. +.....(..5...5. 000000000bb5fe50 90 5f 02 28 dc c8 35 18 - dc c8 35 18 62 5e 02 28 ._ +.(..5...5.b^.( 000000000bb5fe60 dc c8 35 18 e0 fe b5 0b - 00 00 00 0 +0 dc c8 35 18 ..5...........5. 000000000bb5fe70 a4 b4 35 18 a8 6d 0c 19 - 38 ff b5 0b 18 ff b5 0b .. +5..m..8....... 000000000bb5fe80 00 00 00 00 dc c8 35 18 - dc c8 35 18 50 fe b5 0b .. +....5...5.P... 000000000bb5fe90 b5 5d 02 28 dc ff b5 0b - 00 00 00 00 30 32 43 56 .] +.(........02CV 000000000bb5fea0 00 00 00 00 54 65 0c 19 - 74 52 00 1 +0 11 00 00 00 ....Te..tR...... 000000000bb5feb0 a4 b4 35 18 30 00 00 00 - b4 b4 35 18 00 00 00 00 .. +5.0.....5..... *---- State Dump for Thread Id 0x9b4 ----* eax=19d2c66c ebx=00000002 ecx=01000806 edx=19e417e0 esi=00000000 edi=0 +bcefdb0 eip=7c90e514 esp=0bcefd80 ebp=0bcefdd8 iopl=0 nv up ei pl nz n +a pe nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000202 function: ntdll!KiFastSystemCallRet 7c90e4fa e829000000 call ntdll!RtlRaiseException (7c9 +0e528) 7c90e4ff 8b0424 mov eax,[esp] 7c90e502 8be5 mov esp,ebp 7c90e504 5d pop ebp 7c90e505 c3 ret 7c90e506 8da42400000000 lea esp,[esp] 7c90e50d 8d4900 lea ecx,[ecx] ntdll!KiFastSystemCall: 7c90e510 8bd4 mov edx,esp 7c90e512 0f34 sysenter ntdll!KiFastSystemCallRet: 7c90e514 c3 ret 7c90e515 8da42400000000 lea esp,[esp] 7c90e51c 8d642400 lea esp,[esp] ntdll!KiIntSystemCall: 7c90e520 8d542408 lea edx,[esp+0x8] 7c90e524 cd2e int 2e 7c90e526 c3 ret 7c90e527 90 nop ntdll!RtlRaiseException: 7c90e528 55 push ebp 7c90e529 8bec mov ebp,esp *---- Stack Back Trace ----* WARNING: Stack unwind information not available. Following frames may +be wrong. ChildEBP RetAddr Args to Child 0bcefdd8 7c802455 00000258 00000000 0bcefe40 ntdll!KiFastSystemCallRet 0bcefde8 02214f93 00000258 190dd3ec 190dd014 kernel32!Sleep+0xf 0bcefe +40 2805f7ec 010dd014 190dd014 28025f90 Win32+0x4f93 0bceff18 10002482 190dd014 19e41798 00000004 perl58!Perl_runops_standa +rd+0xc 0bceffb4 7c80b729 1835b5ac 7c9101db 17f01b40 threads+0x2482 0bceffec 0 +0000000 100022e8 1835b5ac 00000000 kernel32!GetModuleFileNameA+0x1ba *---- Raw Stack Dump ----* 000000000bcefd80 1a d2 90 7c f1 23 80 7c - 00 00 00 00 b0 fd ce 0b .. +.|.#.|........ 000000000bcefd90 14 d0 0d 19 08 00 00 00 - 02 00 00 00 14 00 00 00 .. +.............. 000000000bcefda0 01 00 00 00 00 00 00 00 - 00 00 00 00 10 00 00 00 .. +.............. 000000000bcefdb0 80 72 a4 ff ff ff ff ff - fc 56 21 01 b0 fd ce 0b .r +.......V!..... 000000000bcefdc0 90 fd ce 0b e8 fd ce 0b - dc ff ce 0b a8 9a 83 7c .. +.............| 000000000bcefdd0 60 24 80 7c 00 00 00 00 - e8 fd ce 0 +b 55 24 80 7c `$.|........U$.| 000000000bcefde0 58 02 00 00 00 00 00 + 00 - 40 fe ce 0b 93 4f 21 02 X.......@....O!. 000000000bcefdf0 58 02 00 00 ec d3 0d 19 - 14 d0 0d 19 fc 20 0e 19 X. +........... .. 000000000bcefe00 7e 1b 04 28 14 d0 0d 19 - fc 20 0e 19 14 d0 0d 19 ~. +.(..... ...... 000000000bcefe10 14 d0 0d 19 00 00 00 00 - 0e 50 00 28 48 d0 0d 19 .. +.......P.(H... 000000000bcefe20 01 00 00 00 88 f8 03 28 - 14 d0 0d 19 48 d0 0d 19 .. +.....(....H... 000000000bcefe30 80 00 00 00 e4 20 0e 19 - 14 d0 0d 19 54 4c e4 19 . +.... ......TL.. 000000000bcefe40 18 ff ce 0b ec f7 05 28 - 14 d0 0d 01 14 d0 0d 19 .. +.....(........ 000000000bcefe50 90 5f 02 28 14 d0 0d 19 - 14 d0 0d 19 62 5e 02 28 ._ +.(........b^.( 000000000bcefe60 14 d0 0d 19 e0 fe ce 0b - 00 00 00 0 +0 14 d0 0d 19 ................ 000000000bcefe70 ac b5 35 18 50 4c e4 19 - 38 ff ce 0b 18 ff ce 0b .. +5.PL..8....... 000000000bcefe80 00 00 00 00 14 d0 0d 19 - 14 d0 0d 19 50 fe ce 0b .. +..........P... 000000000bcefe90 b5 5d 02 28 dc ff ce 0b - 00 00 00 00 30 32 43 56 .] +.(........02CV 000000000bcefea0 00 00 00 00 fc 43 e4 19 - 74 52 00 1 +0 11 00 00 00 .....C..tR...... 000000000bcefeb0 ac b5 35 18 30 00 00 00 - bc b5 35 18 00 00 00 00 .. +5.0.....5..... *---- State Dump for Thread Id 0x9c8 ----* eax=1aaae2a4 ebx=00000002 ecx=01000806 edx=29fb0c80 esi=00000000 edi=0 +be7fdb0 eip=7c90e514 esp=0be7fd80 ebp=0be7fdd8 iopl=0 nv up ei pl nz n +a pe nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000202 function: ntdll!KiFastSystemCallRet 7c90e4fa e829000000 call ntdll!RtlRaiseException (7c9 +0e528) 7c90e4ff 8b0424 mov eax,[esp] 7c90e502 8be5 mov esp,ebp 7c90e504 5d pop ebp 7c90e505 c3 ret 7c90e506 8da42400000000 lea esp,[esp] 7c90e50d 8d4900 lea ecx,[ecx] ntdll!KiFastSystemCall: 7c90e510 8bd4 mov edx,esp 7c90e512 0f34 sysenter ntdll!KiFastSystemCallRet: 7c90e514 c3 ret 7c90e515 8da42400000000 lea esp,[esp] 7c90e51c 8d642400 lea esp,[esp] ntdll!KiIntSystemCall: 7c90e520 8d542408 lea edx,[esp+0x8] 7c90e524 cd2e int 2e 7c90e526 c3 ret 7c90e527 90 nop ntdll!RtlRaiseException: 7c90e528 55 push ebp 7c90e529 8bec mov ebp,esp *---- Stack Back Trace ----* WARNING: Stack unwind information not available. Following frames may +be wrong. ChildEBP RetAddr Args to Child 0be7fdd8 7c802455 00000258 00000000 0be7fe40 ntdll!KiFastSystemCallRet 0be7fde8 02214f93 00000258 19e58eac 19e58ad4 kernel32!Sleep+0xf 0be7fe +40 2805f7ec 01e58ad4 19e58ad4 28025f90 Win32+0x4f93 0be7ff18 10002482 19e58ad4 1abc1d68 00000004 perl58!Perl_runops_standa +rd+0xc 0be7ffb4 7c80b729 19a0162c 7c9101db 190c6008 threads+0x2482 0be7ffec 0 +0000000 100022e8 19a0162c 00000000 kernel32!GetModuleFileNameA+0x1ba *---- Raw Stack Dump ----* 000000000be7fd80 1a d2 90 7c f1 23 80 7c - 00 00 00 00 b0 fd e7 0b .. +.|.#.|........ 000000000be7fd90 d4 8a e5 19 08 00 00 00 - 02 00 00 00 14 00 00 00 .. +.............. 000000000be7fda0 01 00 00 00 00 00 00 00 - 00 00 00 00 10 00 00 00 .. +.............. 000000000be7fdb0 80 72 a4 ff ff ff ff ff - 94 5c c3 77 b0 fd e7 0b .r +.......\.w.... 000000000be7fdc0 90 fd e7 0b c4 72 08 28 - dc ff e7 0b a8 9a 83 7c .. +...r.(.......| 000000000be7fdd0 60 24 80 7c 00 00 00 00 - e8 fd e7 0 +b 55 24 80 7c `$.|........U$.| 000000000be7fde0 58 02 00 00 00 00 00 + 00 - 40 fe e7 0b 93 4f 21 02 X.......@....O!. 000000000be7fdf0 58 02 00 00 ac 8e e5 19 - d4 8a e5 19 9c db e5 19 X. +.............. 000000000be7fe00 7e 1b 04 28 d4 8a e5 19 - 9c db e5 19 d4 8a e5 19 ~. +.(............ 000000000be7fe10 d4 8a e5 19 00 00 00 00 - 0e 50 00 28 08 8b e5 19 .. +.......P.(.... 000000000be7fe20 01 00 00 00 88 f8 03 28 - d4 8a e5 19 08 8b e5 19 .. +.....(........ 000000000be7fe30 80 00 00 00 84 db e5 19 - d4 8a e5 19 ac e1 28 2a ..............(* 000000000be7fe40 18 ff e7 0b ec f7 05 28 - d4 8a e5 01 d4 8a e5 19 .. +.....(........ 000000000be7fe50 90 5f 02 28 d4 8a e5 19 - d4 8a e5 19 62 5e 02 28 ._ +.(........b^.( 000000000be7fe60 d4 8a e5 19 e0 fe e7 0b - 00 00 00 0 +0 d4 8a e5 19 ................ 000000000be7fe70 2c 16 a0 19 b8 4e bc 1a - 38 ff e7 0b 18 ff e7 0b ,. +...N..8....... 000000000be7fe80 00 00 00 00 d4 8a e5 19 - d4 8a e5 19 50 fe e7 0b .. +..........P... 000000000be7fe90 b5 5d 02 28 dc ff e7 0b - 00 00 00 00 30 32 43 56 .] +.(........02CV 000000000be7fea0 00 00 00 00 64 46 bc 1a - 74 52 00 1 +0 11 00 00 00 ....dF..tR...... 000000000be7feb0 2c 16 a0 19 30 00 00 00 - 3c 16 a0 19 00 00 00 00 ,. +..0.......... *---- State Dump for Thread Id 0x9cc ----* eax=1b854b4c ebx=00000002 ecx=01000806 edx=2a680d14 esi=00000000 edi=0 +c00fdb0 eip=7c90e514 esp=0c00fd80 ebp=0c00fdd8 iopl=0 nv up ei pl nz n +a pe nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000202 function: ntdll!KiFastSystemCallRet 7c90e4fa e829000000 call ntdll!RtlRaiseException (7c9 +0e528) 7c90e4ff 8b0424 mov eax,[esp] 7c90e502 8be5 mov esp,ebp 7c90e504 5d pop ebp 7c90e505 c3 ret 7c90e506 8da42400000000 lea esp,[esp] 7c90e50d 8d4900 lea ecx,[ecx] ntdll!KiFastSystemCall: 7c90e510 8bd4 mov edx,esp 7c90e512 0f34 sysenter ntdll!KiFastSystemCallRet: 7c90e514 c3 ret 7c90e515 8da42400000000 lea esp,[esp] 7c90e51c 8d642400 lea esp,[esp] ntdll!KiIntSystemCall: 7c90e520 8d542408 lea edx,[esp+0x8] 7c90e524 cd2e int 2e 7c90e526 c3 ret 7c90e527 90 nop ntdll!RtlRaiseException: 7c90e528 55 push ebp 7c90e529 8bec mov ebp,esp *---- Stack Back Trace ----* WARNING: Stack unwind information not available. Following frames may +be wrong. ChildEBP RetAddr Args to Child 0c00fdd8 7c802455 00000258 00000000 0c00fe40 ntdll!KiFastSystemCallRet 0c00fde8 02214f93 00000258 1abdabc4 1abda7ec kernel32!Sleep+0xf 0c00fe +40 2805f7ec 01bda7ec 1abda7ec 28025f90 Win32+0x4f93 0c00ff18 10002482 1abda7ec 1b9697c8 00000004 perl58!Perl_runops_standa +rd+0xc 0c00ffb4 7c80b729 19a01694 7c9101db 1abc4118 threads+0x2482 0c00ffec 0 +0000000 100022e8 19a01694 00000000 kernel32!GetModuleFileNameA+0x1ba

Replies are listed 'Best First'.
Re: Perl58.dll & nt.dll crashes
by BrowserUk (Patriarch) on Mar 10, 2010 at 09:35 UTC

    You're more likely to get useful help if you post the code, (reduced to the minimum), that reproduces the error.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      It is a code of 35000 lines... I was hoping that someone would be familiar with DrWatson errors. From what I read it refers to a sleep function error but not sure if I am reading it correctly.
        it refers to a sleep function error

        It does suggest that, but it is almost certainly wrong. The Win API sleep() is just about the simplest piece of code in the OS, and very well exercised. It takes one argument, a DWORD, which is treated as an unsigned 32-bit quantity of milliseconds. Even if it was passed a float or double or a memory address, it still wouldn't trap. It would just interpret the numeric value as a long sleep.

        What I'm saying is, it is really hard to see how a call to sleep could ever lead to a trap. The first line of what you've posted says: "WARNING: Stack unwind information not available. Following frames may be wrong." And it almost certainly is.

        The problem with Dr.Watson dumps, is that they try to produce a stack trace by "decompiling" the stack using limited (or no) symbolic debugger information.

        1. Perl doesn't use a conventional stack for a lot of its internal operations.
        2. The code it is trying to reverse engineer has been optimised, which makes it close to impossible to do properly.
        3. The core of the perl run loop doesn't follow 'normal' executable coding patterns.

        The net result is that the stack dumps produced are always confused and essentially useless. If you compile the Perl with optimisations disabled and full symbolic debug support enabled, you can sometimes follow it through, but even then not always.

        It is usually far easier to to track down the source of such traps at the Perl source level than at the binary level. If you need tips on how to do that, then try posting a high level overview of the structure of your code.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
        I believe there is a memory overlap at 8da42400000000 due to kernel32!Sleep+0xf raising a kernel exception while calling mov 7c90e4ff 8b0424 .

        You should modifiy HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4567D45F334-E45647-B1337}\001\KernelSleepStackId from 0x000001 to 0x00000A


        [ ok, sorry, i already left the room /o/

        You must have missed the "reduced to the minimum" part.

        If you trim and stub out chunks of your code, you will eventually have a very small set of code that replicates the issue, and the problem will usually become obvious.
        Most other times, you will realize what the problem is while you are still finding what can be trimmed or not, and can then you can fix the problem directly.
        In the rare cases where none of the above apply, you've still got a small chunk of code that you can ask for and actually receive useful help with.

        If you have no idea where in your code this error is being thrown, you can throw in some simple debug messages (not being able to see the code I have no idea how it's laid out)... if you put one every 1000 lines, you should easily be able to tell what chunk of code is causing the error, then narrow that down to 500, 200, 100, 50, etc. Then you'd have something you could post. Asking for help with code that you don't show is pointless.

        In my opinion, simple print("debug 1"); print("debug 2"); etc. messages are highly underrated. When your script pukes, you can easily tell where, if it doesn't give you a meaningful error message.

        /\ Sierpinski