** Also affects: linuxptp (Ubuntu Noble)
   Importance: Undecided
       Status: New

** Also affects: linuxptp (Ubuntu Jammy)
   Importance: Undecided
       Status: New

** Also affects: linuxptp (Ubuntu Resolute)
   Importance: Undecided
       Status: New

** Changed in: linuxptp (Ubuntu)
     Assignee: (unassigned) => Maizi Liao (liaomaizi)

** Changed in: linuxptp (Ubuntu Jammy)
     Assignee: (unassigned) => Maizi Liao (liaomaizi)

** Changed in: linuxptp (Ubuntu Noble)
     Assignee: (unassigned) => Maizi Liao (liaomaizi)

** Changed in: linuxptp (Ubuntu Resolute)
     Assignee: (unassigned) => Maizi Liao (liaomaizi)

** Changed in: linuxptp (Ubuntu)
       Status: New => In Progress

** Changed in: linuxptp (Ubuntu Jammy)
       Status: New => In Progress

** Changed in: linuxptp (Ubuntu Noble)
       Status: New => In Progress

** Changed in: linuxptp (Ubuntu Resolute)
       Status: New => In Progress

** Description changed:

  [ Impact ]
  
  This bug affects Unicast PTP setups where the ptp4l service fails to
  properly recover and resume tracking the master clock following a
  network interruption or fault. When a master recovers from a FAULTY
  state back to MASTER, it correctly grants the unicast lease renewal from
  existing clients but fails to actually send the requested Announce
  messages. The client, on the other hand, fails to promptly renegotiate
  its subscriptions if its existing foreign master record becomes
  unqualified during the outage, waiting instead for the original grant's
  renewal deadline (which could be up to 45 minutes for a 3600-second
  grant). This results in a total loss of synchronization after a link
  flap.
  
  This update backports two complementary fixes:
  
  The upstream server fix clears the stale unicast state on the master
  during fault recovery, ensuring that when the client requests a renewal
  with the exact same parameters, the master properly processes it and
  resumes sending the Announce stream.
  
  
https://github.com/nwtime/linuxptp/commit/dbc9e7792793600bb94003aa2ae9dba84a37a7bd
  
  The client fix (pending upstream, adapted from StarlingX) forces the
  client to immediately renew its Announce subscription if the cached
  foreign master record falls below the qualification threshold, rather
  than silently waiting in the UC_WAIT state until the long-term lease
  expires.
  
  https://lists.nwtime.org/sympa/arc/linuxptp-devel/2026-10/msg00048.html
- Patch: 
+ Patch:
  
https://lists.nwtime.org/sympa/arc/linuxptp-devel/2026-10/msg00048/binpkiVvQBmTe.bin
  
  [ Reproducer ]
  
  Since a full manual PTP configuration is complex to set up, a script
  will be provided to reproduce the issue by simulating the raw ptp
  packets.
  
+ [ Where problems could occur ]
+ 
+ When the master runs the patched ptp4l and a client still runs an
+ unpatched version, a master port fault can leave the client
+ unsynchronized until its grant renewal deadline arrives.
+ 
+ When the master port faults, port_disable() calls
+ unicast_service_clear_clients() to drain p->unicast_service->queue and
+ drop all active unicast grants. After the master recovers, it waits for
+ clients to request new grants before it restarts FD_UNICAST_SRV_TIMER
+ and sends Announce and Sync messages again.
+ 
+ An unpatched client keeps its existing UC_HAVE_ANN or UC_HAVE_SYDY state
+ and waits for master->renewal_tmo to expire before sending a renewal
+ request. With a 3600-second grant duration, the client does not renew
+ for up to 2700 seconds (45 minutes), so it receives no Announce or Sync
+ traffic during that window.
+ 
+ To avoid this delay, update both the master and its unicast clients, or
+ restart ptp4l on unpatched clients after a master fault.
+ 
  [ Additional Info ]
  
- This was verified to affect resolute and noble, and might after other
- versions as well.
+ This was verified to affect resolute, noble and jammy.
  
  The server fix (commit dbc9e7792793600bb94003aa2ae9dba84a37a7bd) is
  already merged into the upstream linuxptp repository.
  
  The client fix (https://lists.nwtime.org/sympa/arc/linuxptp-
  devel/2026-10/msg00048/binpkiVvQBmTe.bin) was proposed on the linuxptp-
  devel mailing list and is based on a patch from the StarlingX project,
  but has not yet been accepted upstream.
  
- Both patches apply cleanly to the Resolute package.
+ Both patches apply cleanly to the Resolute and the Noble package. For
+ Jammy, fixed a minor context-only conflict at the end of port.c and
+ port.h.

** Patch added: "lp2173661_resolute.debdiff"
   
https://bugs.launchpad.net/ubuntu/+source/linuxptp/+bug/2173661/+attachment/6021193/+files/lp2173661_resolute.debdiff

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2173661

Title:
  Fix delayed client recovery and missing Announce after master fault

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linuxptp/+bug/2173661/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to