From: Andreas Otto Date: 2010-10-14T15:00:11+09:00 Subject: problem using an external thread with ruby -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I have an problem .... I create an external thread with pthread_create and create new ruby objects in this thread. it seems to work until the GC is running. #0 mark_locations_array (objspace=0x603d30, th=0x6039b0) at ../gc.c:1315 #1 gc_mark_locations (objspace=0x603d30, th=0x6039b0) at ../gc.c:1331 #2 mark_current_machine_context (objspace=0x603d30, th=0x6039b0) at ../gc.c:2128 #3 0x00007ffff7a2b665 in garbage_collect (objspace=0x603d30) at ../gc.c:2177 #4 0x00007ffff7a2c247 in rb_newobj_from_heap () at ../gc.c:1014 #5 rb_newobj () at ../gc.c:1097 #6 0x00007ffff7a2c306 in rb_data_typed_object_alloc (klass=6638120, datap=0x808040, type=0x7ffff7dbf200) at ../gc.c:1132 #7 0x00007ffff7a1c5a8 in mnew (klass=6363200, obj=6319120, id=, mclass=6638120, scope=0) at ../proc.c:967 #8 0x00007ffff7b2c3ad in vm_call_cfunc (th=0x6039b0, cfp=0x7ffff7fd7e00, num=, blockptr=, flag=, id=, me=0x6ffdb0, recv=6319120) at ../vm_insnhelper.c:401 #9 vm_call_method (th=0x6039b0, cfp=0x7ffff7fd7e00, num=, blockptr=, flag=, id=, me=0x6ffdb0, recv=6319120) at ../vm_insnhelper.c:523 #10 0x00007ffff7b20fc8 in vm_exec_core (th=, th=) at insns.def:1006 #11 0x00007ffff7b26951 in vm_exec (th=0x6039b0) at ../vm.c:1145 #12 0x00007ffff7b27c54 in vm_call0 (th=0x6039b0, recv=6319120, id=12565, argc=0, argv=0x0, me=) at ../vm_eval.c:66 #13 0x00007ffff7a1bedb in rb_method_call (argc=0, argv=0x0, method=) at ../proc.c:1421 #14 0x00007ffff7a174cb in rb_rescue2 (b_proc=0x7ffff6565ca0 , data1=6319000, r_proc=0x7ffff6565cb0 , the debugger display an extremely high stack-end in the thread struct: machine_stack_start -> 8 machine_stack_end -> 140737348020529 machine_stack_maxsize -> 7340032 - -> well it seems that a "initialization" have to run first - -> is a hint available? thanks for help, Andreas Otto -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJMtprdAAoJEGTcPijNG3/ATG0IAJBdgdnptf8LfUIQDmW1jJp5 pnmf8cYOSwh1HCI7+7iYYo90QUU5u1BNVwDXC4v7NwP++Opv3RNxTA+0+UMYy4dw N+5bxnIsjEML8RKtxlmtbb6xaPJI/AFmoiELM4gohWsbdvmCR9Ic0WJq/gP9pJkQ CRVgPHVlJl/bcArJP7w5zp8jaUUQ8hvgKvbd3UMRwYLZIi8buv6OfljePOoK+GAz kaOcWjCap3G/Tf2ymDPpuLCLw+S6Zabw+wLabBi++iN4vl5kR4qLt0BWKAfhp6Sj MPE6VKyHMPonYQ5QuJ6PHpuwmLwmG28YVL5J8Tr6xyLawAB8I+DIgN5XYv4R7Dc= =Tlka -----END PGP SIGNATURE-----