Project

General

Profile

Bug #24589

Erlang sync library doesn't respond to CMTF clock.

Added by Dennis Nicklaus about 1 month ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Category:
Erlang client application
Target version:
-
Start date:
07/01/2020
Due date:
% Done:

0%

Estimated time:
Duration:

Description

Selecting the CMTF multicast clock results in a situation where the sync:on_event functions won't produce any notifications.
Tried all this on clx38:
This doesn't work:

    1> application:set_env(sync,mc_type,cmtf).     
    ok
    2>     
    2> application:ensure_all_started(sync).   
    =INFO REPORT==== 1-Jul-2020::14:37:59.640836 ===
    ALARM HANDLER: Starting ... reports occur every 360 minutes. Next report at 2020-07-01 19:00.
    {ok,[sasl,drf2,utillib,clock,fah,acnet,sync]}
    3>   
    3> sync:on_event(172).
    <0.112.0>
    4> sync:on_event(2). 
    <0.112.0>
 *waits more than 5 seconds*
    5> flush(),                                    
    5> flush(),
    5>
    *crickets*

But this does
    1> application:set_env(sync,mc_type,nml).
    ok
    2> application:ensure_all_started(sync).   
    =INFO REPORT==== 1-Jul-2020::14:39:57.143104 ===
    ALARM HANDLER: Starting ... reports occur every 360 minutes. Next report at 2020-07-01 19:00.
    {ok,[sasl,drf2,utillib,clock,fah,acnet,sync]}
    3>   
    3> sync:on_event(2). 
    <0.112.0>
    4> 
    4> flush().
    Shell got {sync_event,{1593,632405,681398},{clock,2,2678437}}
    ok

and the default does (no set_env).
    1> application:ensure_all_started(sync).   
    =INFO REPORT==== 1-Jul-2020::14:35:54.990853 ===
    ALARM HANDLER: Starting ... reports occur every 360 minutes. Next report at 2020-07-01 19:00.
    {ok,[sasl,drf2,utillib,clock,fah,acnet,sync]}
    2>   
    2> sync:on_event(2).
    <0.111.0>
    3> flush().
    Shell got {sync_event,{1593,632160,681399},{clock,2,4356392}}
    8> sync:on_event(172).
    <0.111.0>
    9> flush().          
    Shell got {sync_event,{1593,632230,681366},{clock,2,4356406}}
    ok
    10> flush().
    Shell got {sync_event,{1593,632235,681364},{clock,2,4356407}}
    Shell got {sync_event,{1593,632237,45146},{clock,172,8068785}}

So cmtf clock isn't very functional for erlang.

History

#1 Updated by Richard Neswold about 1 month ago

I was about to respond that it works for me, but then my example stopped working, too! I instrumented the sync library and it's not seeing the $02 events in the stream (the machine is receiving the multicasts, though!) I have some debugging to do ...

#2 Updated by Richard Neswold about 1 month ago

  • Status changed from New to Closed

Slight workaround: erl-client|d65d3c3f

The system clock for ucdhin.fnal.gov is off which affects when these events get delivered. The workaround lets clock events get immediately delivered when the delay is zero (however, the timestamp delivered with the event will be the incorrect one from the UCD front-end.)

#3 Updated by Dennis Nicklaus about 1 month ago

I confirm that the above initial test works fine after ucdhin got rebooted 7/7/20.

#4 Updated by Richard Neswold about 1 month ago

Also, the sync library logs the fact that the timestamp is bad but many of our users turn off the logging (or route the email to other people.)



Also available in: Atom PDF