Erlang/OTP Forums

Author Message

<  Open Telecom Platform (OTP)  ~  Mysterious error about timeout in gen_server

jwatte
Posted: Mon Oct 04, 2010 5:50 am Reply with quote
User Joined: 10 Feb 2010 Posts: 34
Why am I getting this crash report?
"bad receive timeout value in function gen_server:loop/6" doesn't sound like something I have much control over.
I'm using Ubuntu 10.04 with R13B03.

Code:
=CRASH REPORT==== 3-Oct-2010::22:42:29 ===
  crasher:
    initial call: roomdb_srv:init/1
    pid: <0.131.0>
    registered_name: roomdb_srv
    exception error: bad receive timeout value
      in function  gen_server:loop/6
    ancestors: [roomdb_sup,<0.122.0>]
    messages: []
    links: [<0.123.0>,<0.43.0>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 377
    stack_size: 24
    reductions: 144
  neighbours:

=ERROR REPORT==== 3-Oct-2010::22:42:29 ===
Supervisor received unexpected message: {'ETS-TRANSFER',roomdb_store,
                                         <0.131.0>,ok}



The 'ETS-TRANSFER' message is there because I make the arrangement that the supervisor is the heir of my ETS table, so I can reclaim it when the new gen_server starts, using ets:give_away() inside the gen_server start_link function that the supervisor calls.
View user's profile Send private message
jwatte
Posted: Mon Oct 04, 2010 6:02 am Reply with quote
User Joined: 10 Feb 2010 Posts: 34
True to form, I figured it out five minutes after posting. This forum is great :-)

The reason is that there are apparently two versions of {noreply, ...} that handle_cast can return. One is the regular one: {noreply, State}. The other apparently is a three-tuple that accepts a timeout.

I had copied-and-pasted some handle_call handlers {reply, some_data(State), State} into the handle_cast function, but forgotten to move the processing out of the return value.

This error message would have saved me a lot of time if it had said "bad timeout value returned from handle_cast" instead. Ideally, checking that the return value timeout field is int-or-float right away.
View user's profile Send private message
nike air max
Posted: Thu Jan 05, 2012 1:49 am Reply with quote
Guest
north face outlet there was something acutely abashed. cheap north face jackets at atomic let him blow agilely these times.

air max 90 can be described since newfangled revolution fashionable cushioning. nike air max the lace holes features a color gradient of a fruity rainbow as well.
wuji
Posted: Tue Aug 21, 2012 6:32 am Reply with quote
User Joined: 10 Aug 2012 Posts: 654
pleasure craft, but two UAE officials told ABC News it it cheap polo shirts it was a fishing boat with four Indians and two
on board. The UAE's official news agency identified an Indian Indian cheap replica *beep* Indian fisherman as the man who was killed.There doesn't appear
be any indication the incident was terror-related, one of the the red bottom shoes the UAE officials said.A Navy official said it's not uncommon
Iranian speed craft to harass U.S. ships in the region, region, [h4]discount designer *beep*[/h4] region, but in this case the boat wasn't Iranian."I can't
enough that this has nothing to do with Iran," the the replica designer *beep* the official said.Raelson said the small motor vessel that was
by gunfire from the Rappahannock was "approaching at a high high cheap replica *beep* high rate of speed" and "on a deliberate approach."Another Navy
said it was "on a course that would have caused caused cheap replica *beep* caused it to impact the Rappahanock... It wasn't just close,
was on a course that would have ultimately taken taken Cheap Ralph Lauren Shirts taken it to impact."American sailors are trained to take special
of any vessels that appear to be approaching their their replica designer bags for sale their warships. In 2000 the destroyer U.S.S. Cole was
View user's profile Send private message
trapples
Posted: Tue Aug 21, 2012 7:14 am Reply with quote
User Joined: 02 Apr 2012 Posts: 45
This error message would have saved me a lot of time if it had said "bad timeout value returned from handle_cast" instead.

_________________
music make our life sounds beautiful

View user's profile Send private message Visit poster's website

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum