Skip Menu |

This queue is for tickets about the threads CPAN distribution.

Report information
The Basics
Id: 97524
Status: rejected
Priority: 0/
Queue: threads

People
Owner: Nobody in particular
Requestors: ralf [...] strcmp.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: stack overflow with moderately complex data structures
Date: Sat, 26 Jul 2014 15:29:58 +0200
To: bug-Clone [...] rt.cpan.org, bug-Storable [...] rt.cpan.org, bug-threads [...] rt.cpan.org
From: Ralf Neubauer <ralf [...] strcmp.de>
This comes from the discussion of [rt.cpan.org #97508]: $ ulimit -s 8192 $ perl -e 'use Clone qw(clone); $t = [$t] for 1..30000; clone $t' $ perl -e 'use Clone qw(clone); $t = [$t] for 1..40000; clone $t' Segmentation fault (core dumped) $ ulimit -s 16348 $ perl -e 'use Clone qw(clone); $t = [$t] for 1..40000; clone $t' $ perl -e 'use Clone qw(clone); $t = [$t] for 1..60000; clone $t' $ perl -e 'use Clone qw(clone); $t = [$t] for 1..70000; clone $t' Segmentation fault (core dumped) $ dpkg -l perl libclone-perl | grep ii ii libclone-perl 0.36-1 amd64 module for recursively copying Perl datatypes ii perl 5.18.2-2ubuntu1 amd64 Larry Wall's Practical Extraction and Report Language The same happens with: $ perl -e 'use threads; $t = [$t] for 1..30000; (async {})->join' Segmentation fault (core dumped) $ perl -e 'use Storable qw(dclone); $t = [$t] for 1..30000; dclone $t' Segmentation fault (core dumped)
Confirmed with same stack size on $ perl -v This is perl 5, version 20, subversion 1 (v5.20.1) built for x86_64-linux-gnu-thread-multi (with 37 registered patches, see perl -V for more detail) $ dpkg -l perl libclone-perl | grep ii ii libclone-perl 0.37-1build1 amd64 module for recursively copying Perl datatypes ii perl 5.20.1-1 amd64 Larry Wall's Practical Extraction and Report Language $ pmv Clone Clone: 0.37 Produces segfault $ perl -e 'use threads; $t = [$t] for 1..30000; (async {})->join' fish: Job 1, “perl -e 'use threads; $t = [$t] for 1..30000; (async {})->join'” terminated by signal SIGSEGV (Address boundary error)
This is an issue with the memory management of the Perl system itself, and is not specific to the 'threads' module (i.e., there is no bug related to this in the 'threads' module code). On 2014-10-28 16:06:55, PWR wrote: Show quoted text
> Confirmed with same stack size on > > $ perl -v > This is perl 5, version 20, subversion 1 (v5.20.1) built for x86_64- > linux-gnu-thread-multi > (with 37 registered patches, see perl -V for more detail) > > $ dpkg -l perl libclone-perl | grep ii > ii libclone-perl 0.37-1build1 amd64 module for recursively > copying Perl datatypes > ii perl 5.20.1-1 amd64 Larry Wall's Practical > Extraction and Report Language > > $ pmv Clone > Clone: 0.37 > > Produces segfault > > $ perl -e 'use threads; $t = [$t] for 1..30000; (async {})->join' > fish: Job 1, “perl -e 'use threads; $t = [$t] for 1..30000; (async > {})->join'” terminated by signal SIGSEGV (Address boundary error)