<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello -<div class=""><br class=""></div><div class="">We are _sometimes_ seeing cases where a state_timeout in a gen_statem results in the timeout reaching the callback module as info {timeout, Ref, Name} with OTP 21.2.</div><div class=""><br class=""></div><div class=""><div class="">The crash looks like:</div></div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">=ERROR REPORT==== 8-Apr-2019::23:37:19.035346 === <0.969.0> gen_statem:error_info/5:1895</span></div><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">** State machine {kafire_fetcher,<<“abc">>,<<“def">>,0} terminating</span></div><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">** Last event = {info,{timeout,#Ref<0.2399112782.889192450.118024>,fetch}}</span></div></div><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><div style="font-size: 12px; font-family: Helvetica;" class="">We crash because we are not expecting info messages - interestingly the following messages are in the queue for the crashed process:</div><div style="font-size: 12px; font-family: Helvetica;" class=""><br class=""></div><div style="font-size: 12px; font-family: Helvetica;" class=""><br class=""></div><div style="font-family: Helvetica;" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; font-size: 15px;" class=""> message_queue_len: 279</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; font-size: 15px;" class=""> messages: [{timeout,#Ref<0.2399112782.903610369.70160>,fetch},</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; font-size: 15px;" class=""> {cancel_timer,#Ref<0.2399112782.903610369.70160>,false},</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; font-size: 15px;" class=""> {cancel_timer,#Ref<0.2399112782.903610369.70168>,4},</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; font-size: 15px;" class=""> {cancel_timer,#Ref<0.2399112782.889192450.118038>,5},</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; font-size: 15px;" class=""> {cancel_timer,#Ref<0.2399112782.889192450.118039>,5},</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; font-size: 15px;" class=""> {cancel_timer,#Ref<0.2399112782.889192450.118043>,5},</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; font-size: 15px;" class=""> {cancel_timer,#Ref<0.2399112782.889192450.118044>,4},</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; font-size: 15px;" class=""> {cancel_timer,#Ref<0.2399112782.889192450.118045>,5},</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; font-size: 15px;" class=""> {cancel_timer,#Ref<0.2399112782.889192450.118049>,5},</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; font-size: 15px;" class=""> {cancel_timer,#Ref<0.2399112782.889192450.118050>,5},</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; font-size: 15px;" class=""> {cancel_timer,#Ref<0.2399112782.889192450.118051>,4},</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; font-size: 15px;" class=""> {cancel_timer,#Ref<0.2399112782.889192450.118052>,5},</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; font-size: 15px;" class=""> {cancel_timer,#Ref<0.2399112782.889192450.118053>,5},</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; font-size: 15px;" class=""> {cancel_timer,#Ref<0.2399112782.889192450.118054>,5},</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; font-size: 15px;" class=""> {cancel_timer,#Ref<0.2399112782.889192450.118055>,4},</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; font-size: 15px;" class=""> {cancel_timer,#Ref<0.2399112782.889192450.118056>,5},</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; font-size: 15px;" class=""> {cancel_timer,#Ref<0.2399112782.889192450.118060>,5},</span></div><div style="font-size: 12px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="font-size: 12px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Followed by lots more cancel_timer messages (200ish!). Our gen_statem does use {state_timeout, 500, fetch} so we are expecting a “fetch” timeout to happen, and we use repeat_state_and_data to requeue the state timeout (and also transition to other states). Is it possible that timeouts in gen_statem can be delivered as an info message?</span></div><div style="font-size: 12px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="font-size: 12px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Thanks</span></div><div style="font-size: 12px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Peter.</span></div></div><div style="font-size: 15px;" class=""><br class=""></div></div></body></html>