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
segfault in perl_clone under ithreads and custom PerlIO layer #7805
Comments
From stas@stason.orgCreated by stas@rabbit.stason.orgThis is a bug report for perl from stas@rabbit.stason.org, ----------------------------------------------------------------- We have yet another chicken-n-egg problem with perl_clone. If you do a use threads; and STDOUT is opened to some PerlIO layer, an attempt to clone it will be perl-5.8.6/sv.c:10859: #ifdef PERLIO_LAYERS xx_dup() works for the core perl, but it doesn't #0 0x404c8a04 in Perl_gv_fetchpv (my_perl=0x85e6540, the segfault happens here: if (!stash) PL_defstash == 0xabababab here PerlIOApache_getarg happens to call gv_fetchpv which needs a valid How do we resolve this problem? This is not the first time we hit a segfault, due to Perl Info
|
From @iabynOn Sat, Feb 19, 2005 at 02:20:28AM -0000, Stas Bekman wrote:
do you have a complete script that reproduces this? something simple like -- |
The RT System itself - Status changed from 'new' to 'open' |
From stas@stason.orgDave Mitchell wrote:
Under mod_perl2 package My::Bug; use Apache2::RequestRec (); use Apache2::Const -compile => qw(OK); use threads; sub handler { my $thread = threads->create(sub {}, undef); $r->content_type('text/plain'); return Apache2::Const::OK; 1; and config: <Location /bug> I've attached a tarball that reproduces the problem. Assuming that you've perl Makefile.PL -httpd /home/stas/httpd/prefork/bin/httpd Thanks Dave. -- |
From stas@stason.orgA few other related things using APR::PerlIO which can be used outside #foo my $pool = APR::Pool->new; use threads; % perl-5.8.6-ithread /tmp/foo % perl-5.8.7-ithread /tmp/foo so it looks like it was fixed in 5.8.7. The following was also segfaulting with 5.8.6, but not with 5.8.7: use APR::Pool; my $pool = APR::Pool->new; use threads; Adding dup is still not good with 5.8.7: use APR::Pool; my $pool = APR::Pool->new; open OLDOUT, ">&STDOUT" or die $!; use threads; % perl-5.8.7-ithread /tmp/foo2 So this is stilll an issue. Do you think it's a bug in perl? -- |
From @dcollinsnUnder perl 5.22 (mod_perl from the debian packages), Stas' third test program still segfaults: leaked PerlIOAPR handle 0x70008a0 during global destruction. |
Migrated from rt.perl.org#34180 (status was 'open')
Searchable as RT34180$
The text was updated successfully, but these errors were encountered: