# New Ticket Created by Robert Lemmen # Please include the string: [perl #129228] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=129228 >
this simple program: -----------------------8<------------------------------- use v6; use HTTP::Client; my $n = 4; my @promises; for 1..$n { push @promises, start { my $i = 0; # when increasing n above, the total runtime changes as expected # for 1..(5/$n) { # say $*THREAD.id; # sleep 1; # } # funkyly, it increases dramatically from n=1 to n=2 , and then # stays there for n=3 and n=4 my $client = HTTP::Client.new; for 1..100 { say sprintf("%2i %2i", $*THREAD.id, $i++) ~ ' ' ~ now; for 1..(100/$n) { my $response = $client.get('http://localhost:80/'); } } } } await Promise.allof(@promises) ----------------------->8------------------------------- segfaults for me every now and then if n>=2. core dumps show: Program terminated with signal SIGABRT, Aborted. #0 0x00007fa0e1435067 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x00007fa0e1435067 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x00007fa0e1436448 in __GI_abort () at abort.c:89 #2 0x00007fa0e14731b4 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7fa0e1568530 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175 #3 0x00007fa0e147898e in malloc_printerr (action=1, str=0x7fa0e1568718 "double free or corruption (fasttop)", ptr=<optimized out>) at malloc.c:4996 #4 0x00007fa0e1479696 in _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3840 #5 0x00007fa0e190eb42 in MVM_interp_run (tc=0x5e09, tc@entry=0x43b72e0, initial_invoke=0x0, invoke_data=0x6, invoke_data@entry=0x43dfde0) at src/core/interp.c:1601 #6 0x00007fa0e19238de in start_thread (data=0x43dfde0) at src/core/threads.c:77 #7 0x00007fa0e19ea267 in uv.thread_start () from //home/rlemmen/perl6env/rakudobrew/moar-nom/nqp/MoarVM/../../install/lib/libmoar.so #8 0x00007fa0e0eea0a4 in start_thread (arg=0x7fa0ddd36700) at pthread_create.c:309 #9 0x00007fa0e14e887d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 (perhaps)interestingly this program also hangs for a second or so every now and then please let me know how I can help debug this! regards robert