Hybrid Timing Troubleshooting

Hybrid Timing Approach

Work from the outside in: configuration accepted -> services running -> sources valid -> selection correct -> what is advertised and alarmed.

+------------------------------------------+
| 1. Configuration accepted?               |  no  --> issue 1: configuration rejected
| (apply and parameter-add succeed)        |
+------------------------------------------+
                     | yes
                     v
+------------------------------------------+
| 2. dpll-mgr active, status.json present? |  no  --> issue 2: not running or restarting
| (systemctl status dpll-mgr@<instance>)   |
+------------------------------------------+
                     | yes
                     v
+------------------------------------------+
| 3. Sources valid?                        |  GNSS no     --> issue 3: holdover / no GNSS lock
| GNSS pin ok; backhaul port ok            |  backhaul no --> issue 4: backhaul not locking
+------------------------------------------+
                     | yes
                     v
+------------------------------------------+
| 4. Selected master as intended?          |  no  --> other symptoms: dpll1 decides the master
| (current_master, gears, priorities)      |
+------------------------------------------+
                     | yes
                     v
+------------------------------------------+
| 5. Alarms and clockClass as expected?    |  no  --> issue 5: out of tolerance, or other symptoms: clockClass
| (fm alarm-list; pmc GM settings)         |
+------------------------------------------+

Figure 1. Troubleshooting flow.

Symptom Table

#

Symptom

Most likely cause

Go to

1

ptp-instance-apply or parameter-add is rejected

A validation rule (unknown key or pin, missing key, bad channel reference)

Issue 1

2

dpll-mgr is not running, restarts, or status.json is missing or stale

A ptp4l or ts2phc instance that dpll-mgr controls is not running, or a start-up problem

Issue 2

3

The node is in holdover, or never locks to GNSS

GNSS receiver or antenna, ts2phc stopped, or the GNSS pin is disconnected

Issue 3

4

The backhaul does not lock, or its port state flaps

Domain or message-rate mismatch, link or grandmaster absent, unicast table wrong

Issue 4

5

Out of tolerance alarm although the servo reports a perfect lock

The upstream grandmaster is on a different time base than GNSS

Issue 5

6

The fronthaul clockClass is not what you expect

Normal source-dependent behavior (clockClass on the Fronthaul)

Other Symptoms

7

PTP backhaul was configured as primary but GNSS is still selected

The inverted map was set on the frequency plane (dpll0)

Other Symptoms

8

The holdover alarm is still raised after the source returned

Normal alarm lag, or the DPLL is not actually locked

Other Symptoms

9

A GNSS signal loss alarm is raised while running on the backhaul

Expected after a failover (Scenarios A and B: GNSS Primary, PTP Backhaul Secondary, event 2)

Other Symptoms

10

Time offset is large after a long ts2phc outage

ts2phc was started instead of restarted

Issue 3

Top Issues in Detail

Issue 1: The Configuration Is Rejected

ptp-instance-apply validates the dpll-mgr configuration before it pushes anything, and parameter-add validates each key as you enter it. The message names the problem.

Message (abridged)

Cause

Fix

Bad PTP parameter keypair: <X>

config name=value was typed without the --section flag.

Use --section config <name=value> ....

Key '<X>' is not supported for dpll-mgr section=config. Supported: [...]

The key name is misspelled or is not one of the keys in dpll-mgr Configuration Reference.

Use a key from the table in dpll-mgr Configuration Reference.

Unknown dpll pin name '<X>'. Valid input pins: [...] (or aliases [...])

Typo in a priority map. The message lists every pin name the system knows; this release supports only the pins in dpll-mgr Configuration Reference.

Use a pin name or alias from dpll-mgr Configuration Reference.

Invalid priority '<N>' for pin '<X>' (must be integer 0-15; 15 disconnects the pin)

The priority is not an integer from 0 to 15.

Correct the value.

Malformed pin priority entry '<E>' (expected 'pin:priority')

A priority map entry is not in the form PIN:priority.

Write the map as "PIN:priority, PIN:priority".

Value for '<key>' must be an integer, got '<V>'

ho_0, ho_1, ho_2 or ptp_domain_number is not a number.

Correct the value.

dpll-mgr structured config missing required key(s): ...

At apply, phc_interface, channel_ptp_bh or channel_ts2_0 is missing.

Add the missing key.

Channel '<ch>' references instance '<X>' which does not exist on this host (<ch> is ptp_bh, ts2_0 or ts2_1)

The name is wrong, or the instance is not assigned to the same host as dpll-mgr.

Check names with system ptp-instance-list and the assignment with system host-ptp-instance-list <host>.

Channel '<ch>' requires a '<service>' instance but '<X>' is a '<other>' instance

A channel points at an instance of the wrong service.

channel_ptp_bh -> a ptp4l instance; channel_ts2_* -> ts2phc instances.

dpll-mgr ptp instance already exists on host

A second dpll-mgr instance was assigned to the host.

Keep one per host.

dpll-mgr instance does not support PTP interfaces

A PTP interface was created for dpll-mgr.

Remove it; dpll-mgr takes no interface.

A rejected apply changes nothing on the host: the running configuration stays as it was.

Issue 2: dpll-mgr Is Not Running, Restarts, or Its Status Is Missing

  1. Check the service and its restart count:

    systemctl status dpll-mgr@dpll-mgr1
    systemctl show dpll-mgr@dpll-mgr1 -p MainPID -p NRestarts
    
  2. Read its log: sudo grep dpll-mgr /var/log/user.log | tail -50.

  3. Check the rendered configuration is present and is valid JSON: python3 -m json.tool /etc/linuxptp/ptpinstance/dpll-mgr-dpll-mgr1.json. With the structured config section this is always complete.

  4. dpll-mgr waits for all the ptp4l and ts2phc instances it controls. Confirm they are running and that their sockets exist: ls /var/run/ptp4l-ptp01bh /var/run/ts2phc-ts1 /var/run/ts2phc-ts2.

  5. The platform restarts a crashed dpll-mgr after about 5 seconds, and a hung one after it stops responding for about 30 seconds, and raises a process alarm; the ptp4l/ts2phc/phc2sys services keep running meanwhile (they do not depend on dpll-mgr), so the clock is not disturbed.

status.json is only rewritten on a change. A file that is old but whose service is active is normal on a steady system; a file that is old and a stopped service is not.

Issue 3: Holdover, or the Node Never Locks to GNSS

  1. Read status.json: dpll_lock_status, current_master, holdover_level, and the GNSS_REF4P pin state.

  2. Read the hardware pin (dpll_pin_info.py, Quick Health Check). The GNSS pin should be selectable or connected. If it is disconnected, either the receiver/antenna is not delivering a 1PPS, or dpll-mgr disconnected it because ts2phc stopped (Lock States, Holdover, and Liveness).

  3. Check the ts2phc instance and its log for the GNSS fix: systemctl is-active ts2phc@ts1, sudo grep ts2phc /var/log/user.log | tail. See also Granite Rapids-D GNSS Monitoring and Quality Metrics.

  4. If ts2phc was stopped, restart it (do not just start it):

    sudo systemctl restart ts2phc@ts1
    

    A long outage lets the PHC drift beyond what a plain start can slew out; restart steps the PHC back to the correct time. dpll-mgr returns to GNSS automatically once ts2phc is running and the pin is valid.

  5. If the node has just started, allow the first lock: no holdover alarm is raised before the first lock, and the DPLL takes several seconds to acquire.

Issue 4: The Backhaul Does Not Lock, or Flaps

  1. Read the port state of the backhaul instance (Quick Health Check) and use this table. UNCALIBRATED is normal while GNSS is the active source (the instance is parked).

    Port state

    Meaning

    Check

    UNCALIBRATED (GNSS active) / SLAVE (backhaul active)

    Locked to the grandmaster

    Nothing to fix.

    LISTENING

    No grandmaster heard

    The grandmaster is running and reachable; the domain number matches (pmc ... 'GET DEFAULT_DATA_SET' shows domainNumber); for PTS, the unicast master table address is correct and the interface has inhibit_announce=1.

    FAULTY

    The port or link is down

    ip link show <port>, cabling, switch port.

    Repeating UNCALIBRATED <-> FAULTY

    Faults every few seconds

    Message rates (below), Announce timing, time base error.

  2. Message rates. Both the grandmaster and the backhaul instance must run logAnnounceInterval=-3, logSyncInterval=-4, logMinDelayReqInterval=-4. With slow rates the servo cannot hold against the adapter’s oscillator drift: the backhaul declares a synchronization fault, dpll-mgr drops to holdover and the cycle repeats. Fix the interval on both ends and re-apply.

  3. Domain. The upstream grandmaster, ptp01bh and (derived) dpll-mgr must all use the same domain.

  4. PTS (unicast). Confirm the address in unicast_master_table_1 (Scenario B: GNSS Primary, PTS (G.8275.2 Unicast) Backhaul Secondary) and that the interface has inhibit_announce=1.

  5. Time base. A large, varying master_offset points at the grandmaster, not the node (issue 5).

Issue 5: Out of Tolerance Alarm Although the Servo Reports a Perfect Lock

Symptom: master_offset of the backhaul instance is about 0 and ptp01bh is locked, yet the alarm PTP clocking is out of tolerance stays raised.

Cause: the node’s PHC is disciplined by GNSS, while the upstream grandmaster is not on the same absolute time base (for example the grandmaster is free-running, or it was synchronized to a different reference). The PTP servo is locked to the grandmaster correctly, but the node’s GNSS time and the grandmaster’s time differ by a fixed amount, and the platform detects it and raises the alarm.

Fix: bring the upstream grandmaster onto the GNSS time base (verify that it is GNSS-locked and re-synchronize it). Do not raise the alarm thresholds to hide it. The alarm clears when the offset returns within tolerance.

Other Symptoms

Fronthaul clockClass is not what I expect. The clockClass depends on the active source (clockClass on the Fronthaul): 6 on GNSS; the upstream grandmaster’s class while on the backhaul; in holdover, 135 then 165 or 7 then 140, depending on the node’s configuration and state; 248 when free-running or when holdover is unstable. Compare what the backhaul receives (GET PARENT_DATA_SET, field gm.ClockClass) with what the fronthaul advertises (GET GRANDMASTER_SETTINGS_NP), and allow a few minutes for the advertisement to settle after a change.

The backhaul is configured as primary but GNSS is still selected. The inverted priority was set on the frequency plane (dpll0_pin_priority_map). The selected master is decided on the phase plane: set dpll1_pin_priority_map="GNSS_REF4P:12, SDP0_REF0N:0" (Scenario C: PTP Backhaul Primary, GNSS Secondary).

The holdover alarm is still raised after the source returned. Alarms lag the DPLL by up to about 90 seconds. If it persists, check dpll_lock_status is locked or locked_ho_acq and in_holdover is false; if the DPLL is not locked, return to issue 3 or 4.

A GNSS signal-loss alarm is raised while the node runs on the backhaul. This is expected: the DPLL is locked to a non-GNSS source, so the GNSS source is reported as lost until it returns.

Collect Data for Support

Collect the following before you raise a service request: the output of the quick health check (Quick Health Check); the rendered /etc/linuxptp/ptpinstance/dpll-mgr-<instance>.json; /var/log/user.log and /var/log/collectd.log covering the event; and the platform log collection (collect). Note the exact time of the event and what was changed (cable, antenna, service, configuration).