Skip to content

Instantly share code, notes, and snippets.

@tadzik
Created September 1, 2012 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tadzik/3580456 to your computer and use it in GitHub Desktop.
Save tadzik/3580456 to your computer and use it in GitHub Desktop.
┌─[tadzik@yavin4]─[~]
└─[%]─> cat threads.nqp
my $a := sub foo() {
say(5);
}
my $b := pir::new__PSP('Task', $a);
pir::schedule__0P($b);
pir::wait__0P($b);
┌─[tadzik@yavin4]─[~]
└─[%]─> parrot-nqp threads.nqp
5
┌─[tadzik@yavin4]─[~]
└─[%]─> nqp threads.nqp
zsh: segmentation fault nqp threads.nqp
┌─[tadzik@yavin4]─[~]
└─[%]─> gdb nqp
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/tadzik/src/parrot/install/bin/nqp...(no debugging symbols found)...done.
(gdb) run threads.nqp
Starting program: /home/tadzik/src/parrot/install/bin/nqp threads.nqp
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff423c700 (LWP 32706)]
[New Thread 0x7ffff270a700 (LWP 32707)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff270a700 (LWP 32707)]
0x00007ffff7a558f4 in Parrot_pmc_new ()
from /home/tadzik/src/parrot/install/lib/libparrot.so.4.7.0
(gdb) bt
#0 0x00007ffff7a558f4 in Parrot_pmc_new ()
from /home/tadzik/src/parrot/install/lib/libparrot.so.4.7.0
#1 0x00007ffff7a2e8ce in Parrot_ex_build_exception ()
from /home/tadzik/src/parrot/install/lib/libparrot.so.4.7.0
#2 0x00007ffff79fc45f in Parrot_ex_throw_from_c_args ()
from /home/tadzik/src/parrot/install/lib/libparrot.so.4.7.0
#3 0x00007ffff7a6fdab in cant_do_method ()
from /home/tadzik/src/parrot/install/lib/libparrot.so.4.7.0
#4 0x00007ffff7a6ffde in Parrot_default_exists_keyed_str ()
from /home/tadzik/src/parrot/install/lib/libparrot.so.4.7.0
#5 0x00007ffff7a5dde2 in Parrot_sub_find_pad ()
from /home/tadzik/src/parrot/install/lib/libparrot.so.4.7.0
#6 0x00007ffff7a44ff1 in Parrot_ns_find_named_item ()
from /home/tadzik/src/parrot/install/lib/libparrot.so.4.7.0
#7 0x00007ffff7a12e4e in Parrot_find_sub_not_null_p_sc ()
from /home/tadzik/src/parrot/install/lib/libparrot.so.4.7.0
#8 0x00007ffff7a56b85 in runops_fast_core ()
from /home/tadzik/src/parrot/install/lib/libparrot.so.4.7.0
#9 0x00007ffff7a567dd in runops_int ()
from /home/tadzik/src/parrot/install/lib/libparrot.so.4.7.0
#10 0x00007ffff7a3f84e in runops ()
from /home/tadzik/src/parrot/install/lib/libparrot.so.4.7.0
#11 0x00007ffff7a3b29e in Parrot_pcc_invoke_from_sig_object ()
from /home/tadzik/src/parrot/install/lib/libparrot.so.4.7.0
#12 0x00007ffff7a2f32c in Parrot_ext_call ()
from /home/tadzik/src/parrot/install/lib/libparrot.so.4.7.0
#13 0x00007ffff7b11b86 in Parrot_Task_invoke ()
from /home/tadzik/src/parrot/install/lib/libparrot.so.4.7.0
#14 0x00007ffff7a3b24a in Parrot_pcc_invoke_from_sig_object ()
from /home/tadzik/src/parrot/install/lib/libparrot.so.4.7.0
#15 0x00007ffff7a2f32c in Parrot_ext_call ()
from /home/tadzik/src/parrot/install/lib/libparrot.so.4.7.0
#16 0x00007ffff7a5b46e in Parrot_thread_outer_runloop ()
from /home/tadzik/src/parrot/install/lib/libparrot.so.4.7.0
#17 0x00007ffff6cbab50 in start_thread (arg=<optimized out>)
at pthread_create.c:304
#18 0x00007ffff4a5b70d in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#19 0x0000000000000000 in ?? ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment