[erlang-questions] timer server timeout
Ulf Wiger
ulf.wiger@REDACTED
Mon Apr 26 11:46:03 CEST 2010
Kenneth,
I think we could put this down as one of the things that
people at Ericsson have known for years but never formally
raised a complaint about. Mea Culpa, I've avoided the use
of the internal gen_server timeouts for at least a decade
for this reason, and have certainly advised others to do it
as well. I guess I assumed that it was common knowledge by
now and didn't reflect on whether or not it was in the docs.
I am almost sure that it has been mentioned a number of times
on the mailing list, but that's neither here nor there. It
should be documented.
It's not just debugging that can cause this. Code change and
stray messages can do it too. For the same reason that a
process should be prepared to throw away unrecognized
messages in some top-level state, it should not allow such
messages to interfere with timeout handling.
BR,
Ulf W
Kenneth Lundin wrote:
> This is not a known issue.
> After a quick glance I agree with you that a sys:get_status call to
> the timer_server or any other
> "gen_server" using the gen_server timeout feature can disturb the
> timing either by delaying
> the timeout message or by not letting any timeout message to be sent.
>
> I will put this on the list of things to look at.
>
> It is whoever very unlikely that this happens in normal operation
> since there is no reason to call
> sys:get_status other than for debugging purposes.
>
> I have never heard of any real problems caused by this.
>
> /Kenneth Erlang/OTP Ericsson
>
> On Wed, Apr 21, 2010 at 10:05 PM, johan munk <johanmunk@REDACTED> wrote:
>> Following the control flow in the gen_server, sys, and timer modules I see
>> this:
>> Calling sys:get_status(timer_server) will "reset" the "after time" in the
>> loop function of gen_server. As the timer server uses that time to get a
>> timeout if no other messages are received, one can potentially cause timers
>> to never trigger.
>> Is this a known issue/feature?
>>
>> /JM
>>
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>
--
Ulf Wiger
CTO, Erlang Solutions Ltd, formerly Erlang Training & Consulting Ltd
http://www.erlang-solutions.com
---------------------------------------------------
---------------------------------------------------
WE'VE CHANGED NAMES!
Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD.
www.erlang-solutions.com
More information about the erlang-questions
mailing list