Menu

ptpd2 running with 100% CPU on CentOS 7 machines

Help
2018-02-12
2018-02-13
  • Andy W. Clements

    I have a couple of x86_64 machines running CentOS 7 and ptpd2:

    > uname -a
    Linux <machinename> 3.10.0-693.11.6.el7.x86_64 #1 SMP Thu Jan 4 01:06:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
    >ptpd2 -v
    ptpd2 version 2.3.1-rc3
    

    After running for a day or two, the ptpd2 instance start pegging the CPU at about 100%. Via top:

      PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                             
     1580 root      20   0   14016   1052    820 R 100.0  0.0  60:02.27 ptpd2  
    

    Restarting them will have them go back to normal( < 1% CPU usage).

    Not sure what I am doing wrong to have this situation. Here's the config file:

    ptpengine:preset=slaveonly
    ptpengine:interface=enp3s0
    global:use_syslog=Y
    global:log_status=Y
    global:log_file="/var/log/ptpd2.log"
    global:log_file_max_size=1000
    global:log_file_max_files=5
    

    The status file shows nothing unusual:

    Interface          :  enp3s0
    Preset             :  slaveonly
    Transport          :  ipv4
    IP mode            :  multicast
    Delay mechanism    :  E2E
    Sync mode          :  ONE_STEP
    PTP domain         :  0
    Port state         :  PTP_SLAVE
    Local port ID      :  <hex value>(unknown)/01
    Best master ID     :  <hex value>(unknown)/01
    Best master IP     :  xxx.xxx.xxx.xxx
    GM info            :  Priority1 128, Priority2 128, clockClass 248
    Time properties    :  ARB timescale, traceable: time N, freq N
    UTC properties     :  UTC valid: N, UTC offset: 0
    Offset from Master : -0.000002447 s
    One-way delay      :  0.000070875 s
    Drift correction   :  43.420 ppm
    Message rates      :  1/s sync, 1/s delay, 1/2s announce
    
    Announce received  :  765
    Sync received      :  1528
    DelayReq sent      :  1607
    DelayResp received :  1607
    State transitions  :  3
    PTP Engine resets  :  1
    

    I can't see anything wrong in the log file either. Any ideas what is causing this run-away process?

    Thanks in advance for your help.

     
  • Wojciech Owczarek

    Hi - this was identified some time ago. PTPd is not maintained on SF anymore, pull the latest github source from https://github.com/ptpd/ptpd and you should not have this issue anymore.

    Thanks,
    Wojciech

     
  • Andy W. Clements

    Thanks Wojciech. I will give this a shot. You folks do good work. Thanks for all your efforts!

     

Log in to post a comment.