Steffen Mueller schrieb:
Any ideas why this is happening?
With much, much help from Yves and Nicholas on #p5p, I (or rather Yves)
tracked this down to Autoloader::AUTOLOAD being called in an infinite
loop during global destruction with the $AUTLOAD being "DBI::DESTROY".
Adding a "sub DESTROY {}" to DBI.pm "cures" this problem: AUTOLOAD is
never called for DESTROY. On the other hand, this skips any destruction
work DBI does on its objects, so it probably leaks memory. That wouldn't
be *so* bad during global destruction, but it might happen whenever a
DBI object is destroyed if a long-running program does that repeatedly.
Question is: What causes this weird behavior? It must be related to PAR
because otherwise it would manifest also when the system's DBI is used.
(Putting that same DBI from the system into a .par yields the problem
again.)
Steffen
P.S.: For reference, I'll include the stack trace Yves produced.
> perl58.dll!Perl_runops_standard(interpreter * my_perl=0x01a43d6c)
Line 38 + 0x2d C
perl58.dll!S_call_body(interpreter * my_perl=0x01a43d6c, const op *
myop=0x0140fd20, char is_eval=0) Line 2734 + 0x7 C
perl58.dll!Perl_call_sv(interpreter * my_perl=0x01a43d6c, sv *
sv=0x01bcd6f0, long flags=0x00000096) Line 2670 + 0xc C
perl58.dll!Perl_sv_clear(interpreter * my_perl=0x01a43d6c, sv *
sv=0x0237fb1c) Line 5178 C
perl58.dll!Perl_sv_free(interpreter * my_perl=0x01a43d6c, sv *
sv=0x02356774) Line 5430 C
perl58.dll!do_clean_objs(interpreter * my_perl=0x01a43d6c, sv *
sv=0x023b824c) Line 422 + 0x15 C
perl58.dll!S_visit(interpreter * my_perl=0x00000001, void
(interpreter *, sv *)* f=0x280603fc, unsigned long flags=0x00080000,
unsigned long mask=0x00080000) Line 369 C
perl58.dll!Perl_sv_clean_objs(interpreter * my_perl=0x01a43d6c)
Line 469 C
perl58.dll!perl_destruct(interpreter * my_perl=0x01a43d6c) Line 846
C
perl58.dll!RunPerl(int argc=0x00000002, char * * argv=0x015d2c38,
char * * env=0x015d2f68) Line 216 C++
perl.exe!mainCRTStartup() Line 400 + 0xe C
KERNEL32.DLL!7c5989a5()
and we seem to end up here over and over:
> perl58.dll!win32_stat(const char * path=0x023e376c, _stati64 *
sbuf=0x01a43dfc) Line 1198 C
perl58.dll!PerlLIONameStat(IPerlLIO * piPerl=0x015d3d24, const char *
path=0x023e376c, _stati64 * buffer=0x01a43dfc) Line 1046 + 0xd C++
perl58.dll!PerlLIONameStat(IPerlLIO * piPerl=0x015d3d24, const char *
path=0x023e376c, _stati64 * buffer=0x01a43dfc) Line 1046 + 0xd C++
perl58.dll!Perl_my_stat(interpreter * my_perl=0x0000006a) Line
1406 + 0x1c C
perl58.dll!Perl_pp_fteread(interpreter * my_perl=0x01a43d6c) Line 2998
C
perl58.dll!Perl_runops_standard(interpreter * my_perl=0x01a43d6c)
Line 38 + 0x2d C
perl58.dll!S_call_body(interpreter * my_perl=0x01a43d6c, const op *
myop=0x0140fd20, char is_eval=0) Line 2734 + 0x7 C
perl58.dll!Perl_call_sv(interpreter * my_perl=0x02466538, sv *
sv=0x025b6a14, long flags=0x0140fd24) Line 2670 + 0xc C
perl58.dll!Perl_sv_clear(interpreter * my_perl=0x01a43d6c, sv *
sv=0x0237fb1c) Line 5178 C
perl58.dll!Perl_sv_free(interpreter * my_perl=0x01a43d6c, sv *
sv=0x02356774) Line 5430 C
perl58.dll!do_clean_objs(interpreter * my_perl=0x01a43d6c, sv *
sv=0x023b824c) Line 422 + 0x15 C
perl58.dll!S_visit(interpreter * my_perl=0x00000001, void
(interpreter *, sv *)* f=0x280603fc, unsigned long flags=0x00080000,
unsigned long mask=0x00080000) Line 369 C
perl58.dll!Perl_sv_clean_objs(interpreter * my_perl=0x01a43d6c)
Line 469 C
perl58.dll!perl_destruct(interpreter * my_perl=0x01a43d6c) Line 846
C
perl58.dll!RunPerl(int argc=0x00000002, char * * argv=0x015d2c38,
char * * env=0x015d2f68) Line 216 C++
perl.exe!mainCRTStartup() Line 400 + 0xe C
with the following value for path:
+ path 0x023e376c
"C:\DOCUME~1\demerphq\LOCALS~1\Temp\par-demerphq\cache-21a35dffaa5715ba9b961ca8648615e1c6e50f42\bfced259.pm"
const char *
judging from the opcodes and the stacktrace its doing a regex then some
logic then a stat in an infinite loop during destruction.
---------------------
That regex is on line 59 of Autoloader. I tried to use "cluck()" to
print a backtrace from Perl, but that just gives 'eval at line 0'.
Perhaps that's because we're in global destruction phase...