-
Notifications
You must be signed in to change notification settings - Fork 555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ithreads coredumps on join of joined thread #5850
Comments
From davem@fdgroup.co.ukCreated by davem@gizmo.fdgroup.co.ukthe following simple bit of code coredumps for me on Solaris: #!/usr/bin/perl -w my $t = threads->new(sub {}); What appears to be happing is that during the first call to join, sv_unmagic(SvRV(obj),PERL_MAGIC_shared_scalar); which appears to the free up the ithread structure associated This gdb stacktrace shows a watchpoint where thread->state changes Hardware watchpoint 3: ((ithread *) 2319872)->state Old value = 6 '\006' Perl Info
|
From @lizmatAt 10:46 AM 8/21/02 +0000, via RT wrote:
Under Linux I get: $ perl -Mthreads -e 'my $t = threads->new( sub {} ); $t->join; $t->join' Liz |
arthur@contiller.se - Status changed from 'new' to 'open' |
From arthur@contiller.seHi, Can you see if this still applies? I think I might have fixed it before Arthur |
From @iabynOn Sat, Jan 04, 2003 at 01:09:09AM -0000, Arthur Bergman wrote:
On a copy of 18378 I have lying around, I can get strange effects use threads; my $t = threads->new(sub {}); $t->join; [davem@percy 18378t]$ ./perl -Ilib /tmp/p So I guess the bug is still active :-( Summary of my perl5 (revision 5.0 version 9 subversion 0 patch 18378) configuration: Characteristics of this binary (from libperl): -- |
From arthur@contiller.seOn lördag, jan 4, 2003, at 02:22 Europe/Stockholm, Dave Mitchell wrote:
Gah, how annoying. Some seems very prematurely freed. Can someone run a memory verifier on this and see what is going on Thanks Arthur |
From arthur@contiller.seHi, Seems like substandard operating systems that actually free freed memory had a This patch fixes this since destroy works. Arthur |
From arthur@contiller.se19240.patch--- ext/threads/t/join.t-19239 Wed Apr 16 19:37:42 2003
+++ ext/threads/t/join.t Wed Apr 16 19:37:45 2003
@@ -10,7 +10,7 @@
use ExtUtils::testlib;
use strict;
-BEGIN { print "1..11\n" };
+BEGIN { print "1..12\n" };
use threads;
use threads::shared;
@@ -117,4 +117,17 @@
}
} else {
skip("\$0 check: only on Linux");
+}
+
+{
+ my $t = threads->new(sub {});
+ $t->join;
+ my $x = threads->new(sub {});
+ $x->join;
+ eval {
+ $t->join;
+ };
+ my $ok = 0;
+ $ok++ if($@ =~/Thread already joined/);
+ ok($ok, "Double join works");
}
--- ext/threads/threads.xs-19239 Wed Apr 16 19:37:51 2003
+++ ext/threads/threads.xs Wed Apr 16 19:37:53 2003
@@ -601,7 +601,7 @@
/* We have finished with it */
thread->state |= PERL_ITHR_JOINED;
MUTEX_UNLOCK(&thread->mutex);
- sv_unmagic(SvRV(obj),PERL_MAGIC_shared_scalar);
+
return retparam;
}
return (AV*)NULL;
|
arthur@contiller.se - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#16681 (status was 'resolved')
Searchable as RT16681$
The text was updated successfully, but these errors were encountered: