Subject: | Tie::Cache together with threads crashes perl |
Date: | Fri, 25 Jul 2014 18:15:06 +0000 |
To: | "bug-Tie-Cache [...] rt.cpan.org" <bug-Tie-Cache [...] rt.cpan.org> |
From: | "Neubauer, Ralf" <ralf.neubauer [...] wido.bv.aok.de> |
Hi.
This sometimes crashes perl under Linux (debian 7.6 i386, packages perl 5.14.2-21+deb7u1 and libtie-cache-perl 0.17-4):
perl -e "use threads; use Tie::Cache; tie %c, 'Tie::Cache', 100000; $c{$_} = 1 for 1..21825; (async { print 'Hallo' })->join;"
Speicherzugriffsfehler ("memory access error", may be the translation of "segmentation fault").
And this always crashes:
perl -e "use threads; use Tie::Cache; tie %c, 'Tie::Cache', 100000; $c{$_} = 1 for 1..30000; (async { print 'Hallo' })->join;"
This crashes perl under Windows 7 64bit (Tie::Cache 0.21 with the stable strawberry-perl-5.18.2.2-64bit.msi and Tie::Cache 0.19 with ActivePerl 32 bit v5.14.2 build 1402):
perl -e "use threads; use Tie::Cache; tie %c, 'Tie::Cache', 100000; $c{$_} = 1 for 1..4784; (async { print 'Hallo' })->join;"
Problemsignatur:
Problemereignisname: APPCRASH
Anwendungsname: perl.exe
Anwendungsversion: 5.18.2.2
Anwendungszeitstempel: 534d2a2b
Fehlermodulname: ntdll.dll
Fehlermodulversion: 6.1.7601.18247
Fehlermodulzeitstempel: 521eaf24
Ausnahmecode: c00000fd
Ausnahmeoffset: 0000000000026062
Betriebsystemversion: 6.1.7601.2.1.0.256.48
Gebietsschema-ID: 1031
Zusatzinformation 1: 87c3
Zusatzinformation 2: 87c3633f67ee1f0fe9a9859875d91123
Zusatzinformation 3: e9ed
Zusatzinformation 4: e9ed7338a06dde530f696acafd450751
But with one hash entry less it works:
perl -e "use threads; use Tie::Cache; tie %c, 'Tie::Cache', 100000; $c{$_} = 1 for 1..4783; (async { print 'Hallo' })->join;"
As Tie::Cache is pure perl, this may be a bug in perl's memory manager, but I only encountered it with Tie::Cache so far.
Ralf