Bug#723805: perl: Seg faults sometimes (presumably due to "use threads;")

Niels Thykier niels at thykier.net
Fri Sep 20 10:00:12 UTC 2013


On 2013-09-20 10:38, Niko Tyni wrote:
> On Fri, Sep 20, 2013 at 01:09:39AM +0200, Niels Thykier wrote:
>> Package: perl
>> Version: 5.18.1-3
>> Severity: normal
>  
>> I am experiencing a regular segmentation faul in perl when running the
>> Lintian test suite.  It appears to be our test runner that seg. faults
>> and does so only at the "end".
> 
> Thanks for the report. I can reproduce this.
> 
>> The test runner uses "threads", which is probably why it is the only
>> script in the Lintian code base that seems to make perl seg. fault.  Below
>> is the output from gdb and a back trace.
> 
>> $ gdb --args perl t/runtests --dump-logs -k -j 8 t /tmp/lintian-tests deb-format-wrong-order
> 
> (Somebody is going to have to distill a smaller test case from this.
>  Not sure when I have the time myself.)
> 
> [...]

hugmeir from #p5p suggested the following:

"""
use threads;
scalar glob("*");
threads->create(sub { glob("*") })->join();
"""

While the snippet above itself does not crash, it spews out warnings like:

"""
Unbalanced string table refcount: (1) for "I" during global destruction.
Attempt to free nonexistent shared string 'I', [...]
Attempt to free unreferenced scalar: SV 0x8c6a1fc, [...]
"""

And if I place our use of "glob" inside the thread (in our test runner)
the crash seems to go away.

I am not sure if this bug has been filed upstream yet (waiting for
hugmeir to get back to me on that).

~Niels




More information about the Perl-maintainers mailing list