develooper Front page | perl.perl5.porters | Postings from May 2019

[perl #75972] op/threads.t segfaults with threads and mymalloc

From:
James E Keenan via RT
Date:
May 22, 2019 18:55
Subject:
[perl #75972] op/threads.t segfaults with threads and mymalloc
Message ID:
rt-4.0.24-32310-1558551317-906.75972-15-0@perl.org
On Thu, 12 Dec 2013 03:18:20 GMT, jkeenan wrote:
> On Wed Dec 11 19:05:02 2013, jkeenan wrote:
> 
> > This problem appears to still be present in blead.
> >
> > At commit 4b76cb9db827e0f9f047de33ae98ca8b86be8260, I configured as
> > follows:
> >
> > #####
> > sh ./Configure -des -Dusedevel -Doptimize=-g3 -DDEBUGGING
> > -Dusethreads
> > -Dusemmorebits -Dusemymalloc
> > #####
> >
> > ... which was as close to the OP's configuration as I could
> > understand.  I built perl successfully.  All tests in t/op/threads.t
> > passed.  However, I also tried a script based on the OP's script; see
> > attached.
> >
> > At 1000 repetitions, the program completed successfully.  However at
> > 5000 reps I got a seg fault and at 10000 I got something like the
> > weird results the OP posted.
> >
> > #####
> > [perl] 1011 $ ./perl -Ilib ../p5p/75972-threads.pl 5000
> > Segmentation fault
> > [perl] 1012 $ ./perl -Ilib ../p5p/75972-threads.pl 10000
> > assertion botched (assertion botched (free()ed/realloc()ed-away
> > memory
> > was overwrittenfree()ed/realloc()ed-away memory was overwritten?):
> > ?):
> > !(MallocCfg[MallocCfg_filldead] && MallocCfg[MallocCfg_fillcheck]) ||
> > !cmp_pat_4bytes((unsigned char*)(p + 1), (((1 << ((bucket) >> 0)) +
> > ((bucket >= 15 * 1) ? 4096 : 0)) - (sizeof(union overhead) + sizeof
> > (unsigned int))) + sizeof (unsigned int),
> > fill_deadbeef)!(MallocCfg[MallocCfg_filldead] &&
> > MallocCfg[MallocCfg_fillcheck]) || !cmp_pat_4bytes((unsigned char*)(p
> > + 1), (((1 << ((bucket) >> 0)) + ((bucket >= 15 * 1) ? 4096 : 0)) -
> > (sizeof(union overhead) + sizeof (unsigned int))) + sizeof (unsigned
> > int), fill_deadbeef) ( (malloc.cmalloc.c::13451345)
> > )
> > Aborted
> > #####
> >
> 
> I next configured the same way except omitting the '-mymalloc':
> 

Should have typed: "except omitting the '-Dusemymalloc':"

> #####
> sh ./Configure -des -Dusedevel -Doptimize=-g3 -DDEBUGGING -Dusethreads
> -Dusemmorebits
> #####
> 
> This time, my test script completed successfully at each of 1000,
> 5000, and 10000 reps.  (The 10,000 rep case took 2:48 to run on
> dromedary.)
> 
> So '-Dmymalloc' appears to be the most problematic argument.
> 

Should have typed: "So '-Dusemymalloc' appears to be the most problematic argument."

> Thank you very much.
> Jim Keenan


-- 
James E Keenan (jkeenan@cpan.org)

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=75972



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About