Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > problem using an external thread with ruby

Reply
Thread Tools

problem using an external thread with ruby

 
 
Andreas Otto
Guest
Posts: n/a
 
      10-14-2010
-----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=<value
optimized out>, mclass=6638120, scope=0) at ../proc.c:967
#8 0x00007ffff7b2c3ad in vm_call_cfunc (th=0x6039b0,
cfp=0x7ffff7fd7e00, num=<value optimized out>, blockptr=<value optimized
out>,
flag=<value optimized out>, id=<value optimized out>, me=0x6ffdb0,
recv=6319120) at ../vm_insnhelper.c:401
#9 vm_call_method (th=0x6039b0, cfp=0x7ffff7fd7e00, num=<value
optimized out>, blockptr=<value optimized out>,
flag=<value optimized out>, id=<value optimized out>, me=0x6ffdb0,
recv=6319120) at ../vm_insnhelper.c:523
#10 0x00007ffff7b20fc8 in vm_exec_core (th=<value optimized out>,
th=<value optimized out>) 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=<value optimized out>) at ../vm_eval.c:66
#13 0x00007ffff7a1bedb in rb_method_call (argc=0, argv=0x0,
method=<value optimized out>) at ../proc.c:1421
#14 0x00007ffff7a174cb in rb_rescue2 (b_proc=0x7ffff6565ca0
<ProcCallMethod>, data1=6319000, r_proc=0x7ffff6565cb0 <sRescueError>,


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++Opv3R NxTA+0+UMYy4dw
N+5bxnIsjEML8RKtxlmtbb6xaPJI/AFmoiELM4gohWsbdvmCR9Ic0WJq/gP9pJkQ
CRVgPHVlJl/bcArJP7w5zp8jaUUQ8hvgKvbd3UMRwYLZIi8buv6OfljePOoK+ GAz
kaOcWjCap3G/Tf2ymDPpuLCLw+S6Zabw+wLabBi++iN4vl5kR4qLt0BWKAfhp6 Sj
MPE6VKyHMPonYQ5QuJ6PHpuwmLwmG28YVL5J8Tr6xyLawAB8I+ DIgN5XYv4R7Dc=
=Tlka
-----END PGP SIGNATURE-----
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Waking ruby thread on external event Bill Kelly Ruby 5 03-01-2006 07:53 AM
waiting for external process to finish (using Runtime and Thread classes) brownjenkn@aol.com Java 1 04-22-2005 07:55 PM
"Thread was being aborted" error from WebApp using Thread.Sleep. Stephen Miller ASP .Net 3 07-01-2004 11:50 PM
signaling a ruby thread from a win32 native thread Vincenzo Piombo Ruby 1 05-21-2004 02:43 AM
unresolved external symbol/using an external dll Scott Allen C++ 8 05-02-2004 06:11 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57