[racket] Problem with places and sync/timeout

From: Kevin Tew (tewk at cs.utah.edu)
Date: Tue Mar 13 11:06:19 EDT 2012

Thanks for the problem report.
It appears to be a bug, I'm working on it.

Kevin

#0  0x00007ffff7265473 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x0000000000575a42 in default_sleep (v=<optimized out>, 
fds=0x7ffff4bc81b0) at ../../../src/racket/gc2/../src/port.c:9815
#2  0x00000000006104bd in check_sleep (need_activity=<optimized out>, 
sleep_now=1) at ../../../src/racket/gc2/../src/thread.c:3980
#3  0x000000000061e07b in scheme_thread_block (sleep_time=0) at 
../../../src/racket/gc2/../src/thread.c:4692
#4  0x0000000000620886 in scheme_out_of_fuel () at 
../../../src/racket/gc2/../src/thread.c:4034
#5  scheme_out_of_fuel () at ../../../src/racket/gc2/../src/thread.c:4030
#6  0x000000000056dc3e in places_deep_copy_worker (so=0x7ffff0db4058, 
ht=0x2, mode=2, gcable=1, can_raise_exn=1, master_chain=0x0, 
invalid_object=0x0) at ../../../src/racket/gc2/../src/place.c:1764
#7  0x000000000056de11 in do_places_deep_copy (so=<optimized out>, 
mode=<optimized out>, gcable=<optimized out>, master_chain=<optimized 
out>, invalid_object=<optimized out>) at 
../../../src/racket/gc2/../src/place.c:1098
#8  0x0000000000571582 in scheme_places_deserialize (so=0x7ffff0db4058, 
msg_memory=0xda1420) at ../../../src/racket/gc2/../src/place.c:2590
#9  0x000000000057171a in scheme_place_async_try_receive 
(ch=0x7ffff49dd088) at ../../../src/racket/gc2/../src/place.c:3117
#10 0x0000000000571781 in place_channel_ready (so=<optimized out>, 
sinfo=0x7fffffffcbd0) at ../../../src/racket/gc2/../src/place.c:3143
#11 0x000000000061eef6 in syncing_ready (s=0x7ffff4318668, 
sinfo=0x7fffffffcd30) at ../../../src/racket/gc2/../src/thread.c:6126
#12 0x000000000061df15 in scheme_thread_block 
(sleep_time=1.76330559e-06) at ../../../src/racket/gc2/../src/thread.c:4749
#13 0x000000000061eb0c in scheme_block_until (_f=0x61ed00 
<syncing_ready>, fdf=0x60e570 <syncing_needs_wakeup>, 
data=0x7ffff4318668, delay=<optimized out>) at 
../../../src/racket/gc2/../src/thread.c:4818
#14 0x000000000061ff50 in do_sync (name=0x6a7c6f "sync/timeout", 
argc=<optimized out>, argv=0x7ffff5ba9f10, with_break=0, with_timeout=1, 
_tailok=1) at ../../../src/racket/gc2/../src/thread.c:6486
#15 0x00007ffff7ff75d4 in ?? ()
#16 0x00007ffff5ba9ec8 in ?? ()
#17 0x00007ffff49bc36d in ?? ()
#18 0x00007fffffffd0f8 in ?? ()
#19 0x0000000000000002 in ?? ()
#20 0x0000000000000000 in ?? ()



On 03/13/2012 06:49 AM, Tim Brown wrote:
> Hello,
>
> I have written a number of programs that attempt to "farm" work out
> to a number of places... for example, the attached file which calculates
> the square of *ALL THE NUMBERS* between 0 and 99 inclusive!
>
> Intermittently, this pooling loop stops (usually at the last place)...
> e.g.
>
> 9999999999999999cpu time: 320 real time: 492 gc time: 44
> place finished work for 99
>
> It sits waiting forever... and certainly longer than my 1s timeout.
>
> In my defence of not paring the program down to its bare minimum; it
> seems to fail more often with the kind of IO stress I'm putting it
> under.
>
> I ^\ core the program (stack trace below).
>
> Linux XXXX 2.6.32-5-amd64 #1 SMP Mon Jan 16 16:22:28 UTC 2012 x86_64 
> GNU/Linux
>
> racket version 5.2, but this happens on any (many) combination of
> Windows amd64 (6 core)/Linux amd64 (4 core), racket, drracket, 5.2
> and 5.2.1
>
> First, is there anything wrong with my logic?
> (Happy to accept that as an option)
>
> Otherwise... what's up? Can I do owt to help?
>
> tim-brown on #racket, ping me if you need to know more
>
> Tim Brown
>
>
> (gdb) where
> #0  0x00007f78f77a90e3 in select () from /lib/libc.so.6
> #1  0x00007f78f84d59dc in default_sleep (v=<value optimized out>,
>      fds=0x7f78f8890008) at ./../src/port.c:9318
> #2  0x00007f78f8575dc8 in check_sleep (need_activity=<value optimized 
> out>,
>      sleep_now=1) at ./../src/thread.c:3523
> #3  0x00007f78f857da3d in scheme_thread_block (
>      sleep_time=<value optimized out>) at ./../src/thread.c:4205
> #4  0x00007f78f8580b2b in scheme_out_of_fuel () at ./../src/thread.c:3577
> #5  0x00007f78f84c6291 in places_deep_copy_worker (so=0x7f78f284c058,
>      ht=0x7fff75ad3448, mode=<value optimized out>,
>      gcable=<value optimized out>, can_raise_exn=<value optimized out>)
>      at ./../src/place.c:1657
> #6  0x00007f78f84c63ad in do_places_deep_copy (so=0x7f78f284c058, mode=2,
>      gcable=1) at ./../src/place.c:1058
> #7  0x00007f78f84c6486 in scheme_places_deserialize (so=0x7f78f284c058,
>      msg_memory=0x7f78e801fc60) at ./../src/place.c:2348
> #8  0x00007f78f84c6603 in scheme_place_async_try_receive 
> (ch=0x7f78efae6e98)
>      at ./../src/place.c:2823
> #9  0x00007f78f84c66af in place_channel_ready (so=0x7f78efad6438,
>      sinfo=0x7fff75ad3670) at ./../src/place.c:2849
> #10 0x00007f78f857e848 in syncing_ready (s=0x7f78f6494480,
>      sinfo=0x7fff75ad37e0) at ./../src/thread.c:5644
> #11 0x00007f78f857d839 in scheme_thread_block (
>      sleep_time=<value optimized out>) at ./../src/thread.c:4266
> #12 0x00007f78f857e47a in scheme_block_until (
>      _f=0x7f78f857e670 <syncing_ready>,
>      fdf=0x7f78f856fc10 <syncing_needs_wakeup>, data=0x7f78f6494480, 
> delay=0)
>      at ./../src/thread.c:4335
> #13 0x00007f78f857fa70 in do_sync (name=0x7f78f85d93a6 "sync/timeout",
>      argc=<value optimized out>, argv=0x7f78f6145ee0,
>      with_break=<value optimized out>, with_timeout=1974287344,
>      _tailok=<value optimized out>) at ./../src/thread.c:5961
> #14 0x00007f78f8a7d727 in ?? ()
> #15 0x00007f78f6145ef8 in ?? ()
> #16 0x00007f78f6510e9f in ?? ()
> #17 0x00007fff75ad3c10 in ?? ()
> #18 0x00007f78f5195f88 in ?? ()
> #19 0x0000000000000000 in ?? ()
>
>
>
>
> ____________________
>    Racket Users list:
>    http://lists.racket-lang.org/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120313/adf79feb/attachment.html>

Posted on the users mailing list.