Perl crashing, citing libmsql__.dll as culprit(?)

2015-12-07 Thread Meir Guttman
Dear DBI users,

I use Perl, DBI and DBD:mysql for years, without a problem. But working on
my latest project I encounter Perl often, but *not always(!) *crashing with
the Windows message "Perl interpreter has stopped working". As far as I can
tell the script runs to its natural end.I must add that together with this
phenomenon ("Poster hoc ergo prompter hoc...") I get, again some times but
not always, an out-of-the-blue Devel::Peek report and sometimes two or
rarely three of those. These I also don't know where did they come from.

   - Platform: Win-7 Pro
   - Perl: Strawberry Perl ver. 5.18.2.1.
   - DBI: 1.63
   - DBD::mysql 4.025

I extracted the crash report from the Windows Event log, below. If I
understand it correctly, the culprit is libmysql__.dll.
Can somebody give me directions as to how to narrow it down to the package
and line?

Thanks

==

Version=1
EventType=APPCRASH
EventTime=130938895829957599
ReportType=2
Consent=1
UploadTime=130938895830247616
ReportIdentifier=a2dd2066-9c2e-11e5-ba11-001a7d0abdaa
IntegratorReportIdentifier=a2dd2065-9c2e-11e5-ba11-001a7d0abdaa
Response.BucketId=104002335
Response.BucketTable=28
Response.type=4
Sig[0].Name=Application Name
Sig[0].Value=perl.exe
Sig[1].Name=Application Version
Sig[1].Value=5.18.2.1
Sig[2].Name=Application Timestamp
Sig[2].Value=52cc749d
Sig[3].Name=Fault Module Name
Sig[3].Value=libmysql__.dll
Sig[4].Name=Fault Module Version
Sig[4].Value=0.0.0.0
Sig[5].Name=Fault Module Timestamp
Sig[5].Value=4b6af33e
Sig[6].Name=Exception Code
Sig[6].Value=c005
Sig[7].Name=Exception Offset
Sig[7].Value=0002eeb0
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=6.1.7601.2.1.0.256.48
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=1037
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=cd6a
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=cd6adb9befadcc4226df25fe266210e5
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=7f20
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=7f20cb3cfd821c9b61802778e12b51a6
UI[2]=C:\strawberry\perl\bin\perl.exe
UI[3]=Perl interpreter has stopped working
UI[4]=Windows can check online for a solution to the problem.
UI[5]=Check online for a solution and close the program
UI[6]=Check online for a solution later and close the program
UI[7]=Close the program
LoadedModule[0]=C:\strawberry\perl\bin\perl.exe
LoadedModule[1]=C:\Windows\SYSTEM32\ntdll.dll
LoadedModule[2]=C:\Windows\system32\kernel32.dll
LoadedModule[3]=C:\Windows\system32\KERNELBASE.dll
LoadedModule[4]=C:\strawberry\perl\bin\perl518.dll
LoadedModule[5]=C:\Windows\system32\ADVAPI32.dll
LoadedModule[6]=C:\Windows\system32\msvcrt.dll
LoadedModule[7]=C:\Windows\SYSTEM32\sechost.dll
LoadedModule[8]=C:\Windows\system32\RPCRT4.dll
LoadedModule[9]=C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.18837_none_fa3b1e3d17594757\COMCTL32.dll
LoadedModule[10]=C:\Windows\system32\GDI32.dll
LoadedModule[11]=C:\Windows\system32\USER32.dll
LoadedModule[12]=C:\Windows\system32\LPK.dll
LoadedModule[13]=C:\Windows\system32\USP10.dll
LoadedModule[14]=C:\Windows\system32\SHLWAPI.dll
LoadedModule[15]=C:\Windows\system32\WS2_32.dll
LoadedModule[16]=C:\Windows\system32\NSI.dll
LoadedModule[17]=C:\strawberry\perl\bin\libgcc_s_sjlj-1.dll
LoadedModule[18]=C:\strawberry\perl\bin\libstdc++-6.dll
LoadedModule[19]=C:\Windows\system32\IMM32.DLL
LoadedModule[20]=C:\Windows\system32\MSCTF.dll
LoadedModule[21]=C:\Program Files (x86)\AVG\AVG2015\avghooka.dll
LoadedModule[22]=C:\strawberry\perl\lib\auto\Cwd\Cwd.dll
LoadedModule[23]=C:\strawberry\perl\lib\auto\Win32\Win32.dll
LoadedModule[24]=C:\Windows\system32\ole32.dll
LoadedModule[25]=C:\Windows\system32\VERSION.dll
LoadedModule[26]=C:\strawberry\perl\lib\auto\Time\HiRes\HiRes.dll
LoadedModule[27]=C:\strawberry\perl\lib\auto\Sys\Hostname\Hostname.dll
LoadedModule[28]=C:\Windows\system32\NLAapi.dll
LoadedModule[29]=C:\Windows\system32\napinsp.dll
LoadedModule[30]=C:\Windows\system32\pnrpnsp.dll
LoadedModule[31]=C:\Windows\System32\mswsock.dll
LoadedModule[32]=C:\Windows\system32\DNSAPI.dll
LoadedModule[33]=C:\Windows\System32\winrnr.dll
LoadedModule[34]=C:\Windows\system32\wshbth.dll
LoadedModule[35]=C:\strawberry\perl\vendor\lib\auto\Win32\Console\ANSI\ANSI.dll
LoadedModule[36]=C:\strawberry\perl\lib\auto\List\Util\Util.dll
LoadedModule[37]=C:\strawberry\perl\lib\auto\Fcntl\Fcntl.dll
LoadedModule[38]=C:\strawberry\perl\vendor\lib\auto\List\MoreUtils\MoreUtils.dll
LoadedModule[39]=C:\strawberry\perl\lib\auto\IO\IO.dll
LoadedModule[40]=C:\strawberry\perl\lib\auto\POSIX\POSIX.dll
LoadedModule[41]=C:\strawberry\perl\site\lib\auto\Compress\Raw\Zlib\Zlib.dll
LoadedModule[42]=C:\strawberry\perl\lib\auto\Encode\Encode.dll
LoadedModule[43]=C:\strawberry\perl\lib\auto\Data\Dumper\Dumper.dll
LoadedModule[44]=C:\strawberry\perl\site\lib\auto\Win32\Shortcut\Shortcut.dll
LoadedModule[45]=C:\Windows\system32\CRYPTBASE.dll
Load

Re: Perl crashing, citing libmsql__.dll as culprit(?)

2015-12-14 Thread Steven Lembark
On Mon, 7 Dec 2015 10:21:38 +0200
Meir Guttman  wrote:

> Dear DBI users,
> 
> I use Perl, DBI and DBD:mysql for years, without a problem. But working on
> my latest project I encounter Perl often, but *not always(!) *crashing with
> the Windows message "Perl interpreter has stopped working". As far as I can
> tell the script runs to its natural end.I must add that together with this
> phenomenon ("Poster hoc ergo prompter hoc...") I get, again some times but
> not always, an out-of-the-blue Devel::Peek report and sometimes two or
> rarely three of those. These I also don't know where did they come from.
> 
>- Platform: Win-7 Pro
>- Perl: Strawberry Perl ver. 5.18.2.1.
>- DBI: 1.63
>- DBD::mysql 4.025
> 
> I extracted the crash report from the Windows Event log, below. If I
> understand it correctly, the culprit is libmysql__.dll.
> Can somebody give me directions as to how to narrow it down to the package
> and line?

One approach is running the thing with "perl -d". The debugger
may give you a bit more information on where in the perl code
you are failing. 

That or start dumping progress statements to stderr before and 
after each block of DBI statements that access MySQL. This is
a rather nice example of somplace Log4Perl works nicely: put
"debug" logs with statements and args all over the place.

As a last resort you can use "perl -d" and set DB::Trace = 1.

The problem is that if you're croaking in mysql's dll then 
there may not be much you can do about it from Perl's side.
Might be worth checking (or re-installing) the MySQL lib's
and DBD::mysql to make sure they are in sync.

-- 
Steven Lembark 3646 Flora Pl
Workhorse Computing   St Louis, MO 63110
lemb...@wrkhors.com  +1 888 359 3508