Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  07 Aug 2019, Paolo Baesso, Bug Report, ROOTANA bug? 
    Reply  07 Aug 2019, Thomas Lindner, Bug Report, ROOTANA bug? 
       Reply  08 Aug 2019, Lauren Manton, Bug Report, ROOTANA bug? 
       Reply  08 Aug 2019, Konstantin Olchanski, Bug Report, ROOTANA bug? 
       Reply  14 Aug 2019, Konstantin Olchanski, Bug Report, ROOTANA bug? 
Message ID: 1664     Entry time: 14 Aug 2019     In reply to: 1646
Author: Konstantin Olchanski 
Topic: Bug Report 
Subject: ROOTANA bug? 
> -  ss_suspend_set_dispatch_ipc(NULL);
> +  //  ss_suspend_set_dispatch_ipc(NULL);
> 
> This compiles and at least runs for me; so maybe that is helpful for you.  But Konstantin will provide a longer term solution.

I now understand why this fix worked. Around December 2018 timeframe, I reworked the MIDAS event buffer code
and one improvement was to only send UDP buffer notifications if somebody is waiting for them. This probably
reduced to zero the probability of recursive calls to the user event handler - the problem originally fixed by the monkey
work against the midas ipc handler.

After looking at it, I now understand that the correct solution is to call ss_suspend(MSG_BM), but it turns out
inside MIDAS, handling of MSG_BM was incomplete and recursive calls to the user event handler were still
possible. (but most likely not actually happening anymore because of those changes to the event buffer code).

So.

a) ss_suspend(MSG_BM) inside midas now works correctly, recursive call to the user event handler will not happen.
b) TMidasOnline::sleep() now calls ss_suspend(MSG_BM), monkey business with ss_suspend_set_dispatch_ipc() is removed.

The problem of recursive call to the analyzer event handler is now fixed, both rootana and manalyzer (both use the same TMidasOnline code).

Read more about this here:
https://midas.triumf.ca/elog/Midas/1663

K.O.
ELOG V3.1.4-2e1708b5