Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Data-UUID CPAN distribution.

Report information
The Basics
Id: 38504
Status: resolved
Priority: 0/
Queue: Data-UUID

People
Owner: Nobody in particular
Requestors: kdesjard [...] NRCan.gc.ca
Cc:
AdminCc:

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



Subject: Data::UUID not thread safe
Date: Fri, 15 Aug 2008 10:10:57 -0400
To: <bug-Data-UUID [...] rt.cpan.org>
From: "Desjardins, Kristian" <kdesjard [...] NRCan.gc.ca>
I have found that the Data::UUID module is not thread-safe. By using a simple example (from perlthrtut), loading the Data::UUID module, and creating a Data::UUID object will cause the program to crash. ----------------------- use threads; use Data::UUID; use strict; use warnings; my $ug = Data::UUID->new(); my ($thr) = threads->create(\&sub1); my @ReturnData = $thr->join(); print('Thread returned ', join(', ', @ReturnData), "\n"); sub sub1 { return ('Fifty-six', 'foo', 2); } ---------------------- Thread returned Fifty-six, foo, 2 *** glibc detected *** perl: corrupted double-linked list: 0x0935a770 *** ======= Backtrace: ========= /lib/libc.so.6[0x771106] /lib/libc.so.6[0x7728af] /lib/libc.so.6(cfree+0x90)[0x776070] perl(Perl_mg_free+0x28)[0x8097548] perl(Perl_sv_clear+0x2f2)[0x80c2642] perl(Perl_sv_free2+0x4a)[0x80c2cba] perl(Perl_gp_free+0x265)[0x813a885] perl(Perl_sv_clear+0x6fa)[0x80c2a4a] perl(Perl_sv_free2+0x4a)[0x80c2cba] perl[0x80b8932] perl(Perl_sv_clean_all+0x26)[0x80b89e6] perl(perl_destruct+0xf44)[0x80ad774] perl(main+0xc2)[0x805fb52] /lib/libc.so.6(__libc_start_main+0xdc)[0x71fdec] perl[0x805f9d1]
I've just hit this, too. The existence of a Data::UUID object will cause Perl to core when joining threads. use threads; my $UG = eval { require Data::UUID; Data::UUID->new; }; for(1..5) { threads->create(sub { }); } print "All threads started\n"; $_->join for threads->list; print "Done joining\n"; __END__ $ perl5.12.0 ~/tmp/test.plx All threads started Bus error (core dumped) Happens on 5.12.0 and 5.10.1 on OS X. Here's the stack trace, fwiw. #0 0x00021a8b in perl_destruct () #1 0x001be3de in S_ithread_clear () #2 0x001c3551 in XS_threads_join () #3 0x000ae82b in Perl_pp_entersub () #4 0x000a58db in Perl_runops_standard () #5 0x00026454 in perl_run () #6 0x00001881 in main ()
fixed in 1.215 -- rjbs