Skip Menu |

This queue is for tickets about the Set-Object CPAN distribution.

Report information
The Basics
Id: 22760
Status: resolved
Worked: 1 hour (60 min)
Left: 3 hours (180 min)
Priority: 0/
Queue: Set-Object

People
Owner: SAMV [...] cpan.org
Requestors: gmlvsk [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in:
  • 1.00
  • 1.01
  • 1.02
  • 1.03
  • 1.03a
  • 1.04
  • 1.05
  • 1.06
  • 1.07
  • 1.08
  • 1.08_01
  • 1.08_02
  • 1.09
  • 1.10
  • 1.11
  • 1.11_01
  • 1.11_02
  • 1.12
  • 1.13
  • 1.14
  • 1.15
  • 1.16
  • 1.17
  • 1.18
Fixed in: (no value)



Subject: Please make module thread safe
Date: Thu, 2 Nov 2006 08:22:46 -0800 (PST)
To: bug-set-object [...] rt.cpan.org
From: Andy <gmlvsk [...] yahoo.com>
use strict; use threads; use threads::shared; use Set::Object; my $sh = new Set::Object(); share($sh); my $t1 = threads->new(\&f1); my $t2 = threads->new(\&f2); main(); $t1->join; $t2->join; sub f1{ foreach my $i (1..10000000){ my $d = $i % 10; $sh->remove($d) if $sh->element($d); } } sub f2{ foreach my $i (1..10000000){ my $d = $i % 10; $sh->remove($d); } } sub main{ my $d; foreach my $i (1..10000000){ my $d = $i % 10; $sh->insert($d); } } Attempt to free non-existent shared string '1', Perl interpreter: 0x9ab0518 at tmp.pl line 21. Attempt to free non-existent shared string '2', Perl interpreter: 0x9ab0518 at tmp.pl line 21. Attempt to free non-existent shared string '3', Perl interpreter: 0x9ab0518 at tmp.pl line 21. Attempt to free non-existent shared string '4', Perl interpreter: 0x9ab0518 at tmp.pl line 21. Attempt to free non-existent shared string '5', Perl interpreter: 0x9ab0518 at tmp.pl line 21. Attempt to free non-existent shared string '6', Perl interpreter: 0x9ab0518 at tmp.pl line 21. Attempt to free non-existent shared string '7', Perl interpreter: 0x9ab0518 at tmp.pl line 21. Attempt to free non-existent shared string '8', Perl interpreter: 0x9ab0518 at tmp.pl line 21. Attempt to free non-existent shared string '9', Perl interpreter: 0x9ab0518 at tmp.pl line 21. Attempt to free non-existent shared string '1', Perl interpreter: 0x9ab0518 at tmp.pl line 21. Attempt to free non-existent shared string '2', Perl interpreter: 0x9ab0518 at tmp.pl line 21. Attempt to free non-existent shared string '3', Perl interpreter: 0x9ab0518 at tmp.pl line 21. Attempt to free non-existent shared string '4', Perl interpreter: 0x9ab0518 at tmp.pl line 21. Attempt to free non-existent shared string '5', Perl interpreter: 0x9ab0518 at tmp.pl line 21. Attempt to free non-existent shared string '6', Perl interpreter: 0x9ab0518 at tmp.pl line 21. Attempt to free non-existent shared string '7', Perl interpreter: 0x9ab0518 at tmp.pl line 21. Attempt to free non-existent shared string '8', Perl interpreter: 0x9ab0518 at tmp.pl line 21. Attempt to free non-existent shared string '9', Perl interpreter: 0x9ab0518 at tmp.pl line 21. Attempt to free non-existent shared string '1', Perl interpreter: 0x9ab0518 at tmp.pl line 21. Attempt to free non-existent shared string '2', Perl interpreter: 0x9ab0518 at tmp.pl line 21. Attempt to free non-existent shared string '3', Perl interpreter: 0x9ab0518 at Show quoted text
____________________________________________________________________________________ Low, Low, Low Rates! Check out Yahoo! Messenger's cheap PC-to-Phone call rates (http://voice.yahoo.com)
From: SAMV [...] cpan.org
Thanks, added to test suite http://utsl.gen.nz/gitweb/?p=Set-Object;a=commit;h=fa6ccd5 Sam. On Thu Nov 02 11:23:45 2006, gmlvsk@gmail.com wrote: Show quoted text
> use strict; > [...]
If someone with threads know-how could send me a test case, I might be willing to tackle this. Until then it's a bit of a case of "patches welcome" and "scratch your own itch".
Done in the threads branch on my github. https://github.com/rurban/Set-Object/tree/threads But it looks still a bit fishy to me -- Reini Urban
This was fixed with 1.31 -- Reini Urban