Bug 1901200 - linuxptp-daemon crash when enable debug log level
Summary: linuxptp-daemon crash when enable debug log level
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.7
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.7.0
Assignee: Sebastian Scheinkman
QA Contact: Nikita
URL:
Whiteboard:
Depends On:
Blocks: 1901877
TreeView+ depends on / blocked
 
Reported: 2020-11-24 17:44 UTC by Sebastian Scheinkman
Modified: 2021-02-24 15:36 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1901877 (view as bug list)
Environment:
Last Closed: 2021-02-24 15:35:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift linuxptp-daemon pull 28 0 None closed Bug 1901200: Fix metrics expose on debug level 2020-12-14 05:46:01 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:36:17 UTC

Description Sebastian Scheinkman 2020-11-24 17:44:10 UTC
Description of problem:
when applying a ptp4l policy that request the loggin_level to be 7 (debug) the linuxptp-daemon pod crash with the following error


ptp4l[76012.431]: [ens5f0] config item (null).free_running is 0
ptp4l[76012.431]: [ens5f0] config item (null).freq_est_interval is 1
ptp4l[76012.431]: [ens5f0] config item (null).gmCapable is 1
ptp4l[76012.432]: [ens5f0] config item (null).kernel_leap is 1
ptp4l[76012.432]: [ens5f0] config item (null).utc_offset is 37
E1124 15:48:57.058232 3935542 metrics.go:157] ptp4l failed to parse output offset is 37: unexpected number of fields
ptp4l[76012.432]: [ens5f0] config item (null).timeSource is 160
ptp4l[76012.432]: [ens5f0] config item (null).pi_proportional_const is 0.000000
ptp4l[76012.432]: [ens5f0] config item (null).pi_integral_const is 0.000000
ptp4l[76012.432]: [ens5f0] config item (null).pi_proportional_scale is 0.000000
ptp4l[76012.432]: [ens5f0] config item (null).pi_proportional_exponent is -0.300000
ptp4l[76012.432]: [ens5f0] config item (null).pi_proportional_norm_max is 0.700000
panic: runtime error: slice bounds out of range [-1:]

goroutine 161 [running]:
github.com/openshift/linuxptp-daemon/pkg/daemon.extractSummaryMetrics(0x13ea89e, 0x5, 0xc00008a900, 0x52, 0x43, 0x0, 0xc0002491e0, 0x0)
	/go/src/github.com/openshift/linuxptp-daemon/pkg/daemon/metrics.go:112 +0x895
github.com/openshift/linuxptp-daemon/pkg/daemon.extractMetrics(0x13ea89e, 0x5, 0xc000305930, 0x6, 0xc00008a900, 0x52)
	/go/src/github.com/openshift/linuxptp-daemon/pkg/daemon/metrics.go:100 +0x85
github.com/openshift/linuxptp-daemon/pkg/daemon.cmdRun.func2(0xc0002def80, 0xc000201db0, 0xc00008aea0)
	/go/src/github.com/openshift/linuxptp-daemon/pkg/daemon/daemon.go:260 +0x11e
created by github.com/openshift/linuxptp-daemon/pkg/daemon.cmdRun
	/go/src/github.com/openshift/linuxptp-daemon/pkg/daemon/daemon.go:256 +0x3b6

Comment 2 elevin 2020-11-26 15:15:44 UTC
PTP Image: origin-ptp:v4.7
Registry: quay.io/schseba
Client Version: 4.6.0-202005061824-29e9a33
Server Version: 4.6.5
Kubernetes Version: v1.19.0+9f84db

========================================================

apiVersion: ptp.openshift.io/v1
kind: PtpConfig
metadata:
  name: slave
  namespace: openshift-ptp
spec:
  profile:
  - name: "slave"
    interface: "ens1f0"
    ptp4lOpts: "-2 -s --summary_interval -4"
    phc2sysOpts: "-a -r -n 24"
    ptp4lConf: |
      [global]
      #
      # Default Data Set
      #
      twoStepFlag		1
      slaveOnly		0
      priority1		128
      priority2		128
      domainNumber		24
      #utc_offset		37
      clockClass		248
      clockAccuracy		0xFE
      offsetScaledLogVariance	0xFFFF
      free_running		0
      freq_est_interval	1
      dscp_event		0
      dscp_general		0
      dataset_comparison	ieee1588
      G.8275.defaultDS.localPriority	128
      #
      # Port Data Set
      #
      logAnnounceInterval	-3
      logSyncInterval		-4
      logMinDelayReqInterval	-4
      logMinPdelayReqInterval	-4
      announceReceiptTimeout	3
      syncReceiptTimeout	0
      delayAsymmetry		0
      fault_reset_interval	4
      neighborPropDelayThresh	20000000
      masterOnly		0
      G.8275.portDS.localPriority	128
      #
      # Run time options
      #
      assume_two_step		0
      logging_level		7
      path_trace_enabled	0
      follow_up_info		0
      hybrid_e2e		0
      inhibit_multicast_service	0
      net_sync_monitor	0
      tc_spanning_tree	0
      tx_timestamp_timeout	1
      unicast_listen		0
      unicast_master_table	0
      unicast_req_duration	3600
      use_syslog		1
      verbose			0
      summary_interval	0
      kernel_leap		1
      check_fup_sync		0
      #
      # Servo Options
      #
      pi_proportional_const	0.0
      pi_integral_const	0.0
      pi_proportional_scale	0.0
      pi_proportional_exponent	-0.3
      pi_proportional_norm_max	0.7
      pi_integral_scale	0.0
      pi_integral_exponent	0.4
      pi_integral_norm_max	0.3
      step_threshold		0.0
      first_step_threshold	0.00002
      max_frequency		900000000
      clock_servo		pi
      sanity_freq_limit	200000000
      ntpshm_segment		0
      #
      # Transport options
      #
      transportSpecific	0x0
      ptp_dst_mac		01:1B:19:00:00:00
      p2p_dst_mac		01:80:C2:00:00:0E
      udp_ttl			1
      udp6_scope		0x0E
      uds_address		/var/run/ptp4l
      #
      # Default interface options
      #
      clock_type		OC
      network_transport	UDPv4
      delay_mechanism		E2E
      time_stamping		hardware
      tsproc_mode		filter
      delay_filter		moving_median
      delay_filter_length	10
      egressLatency		0
      ingressLatency		0
      boundary_clock_jbod	0
      #
      # Clock description
      #
      productDescription	;;
      revisionData		;;
      manufacturerIdentity	00:00:00
      userDescription		;
      timeSource		0xA0
  recommend:
  - profile: "slave"
    priority: 4
    match:
    - nodeLabel: "ptp/slave"

========================================================================

NAME                           READY   STATUS    RESTARTS   AGE
linuxptp-daemon-8r4fb          2/2     Running   0          20m
linuxptp-daemon-9lj7m          2/2     Running   0          22m
linuxptp-daemon-f4s5l          2/2     Running   0          22m
linuxptp-daemon-szq5b          2/2     Running   0          21m
linuxptp-daemon-xz2td          2/2     Running   0          21m
linuxptp-daemon-zv8ll          2/2     Running   0          20m
ptp-operator-bdf66d685-crnrr   1/1     Running   0          23m

Comment 3 elevin 2020-11-26 16:13:00 UTC
ptp4l[174201.279]: [eno1] config item (null).free_running is 0
ptp4l[174201.279]: [eno1] config item (null).freq_est_interval is 1
ptp4l[174201.279]: [eno1] config item (null).gmCapable is 1
ptp4l[174201.279]: [eno1] config item (null).kernel_leap is 1
ptp4l[174201.279]: [eno1] config item (null).utc_offset is 37
ptp4l[174201.279]: [eno1] config item (null).timeSource is 160
ptp4l[174201.279]: [eno1] config item (null).pi_proportional_const is 0.000000
ptp4l[174201.279]: [eno1] config item (null).pi_integral_const is 0.000000
ptp4l[174201.280]: [eno1] config item (null).pi_proportional_scale is 0.000000
ptp4l[174201.280]: [eno1] config item (null).pi_proportional_exponent is -0.300000
ptp4l[174201.280]: [eno1] config item (null).pi_proportional_norm_max is 0.700000
ptp4l[174201.280]: [eno1] config item (null).pi_integral_scale is 0.000000
ptp4l[174201.280]: [eno1] config item (null).pi_integral_exponent is 0.400000
ptp4l[174201.280]: [eno1] config item (null).pi_integral_norm_max is 0.300000
ptp4l[174201.280]: [eno1] config item (null).step_threshold is 0.000000
ptp4l[174201.280]: [eno1] config item (null).first_step_threshold is 0.000020
ptp4l[174201.280]: [eno1] config item (null).max_frequency is 900000000
ptp4l[174201.280]: [eno1] config item (null).dataset_comparison is 0
ptp4l[174201.280]: [eno1] config item (null).delay_filter_length is 10
ptp4l[174201.280]: [eno1] config item (null).delay_filter is 1
ptp4l[174201.280]: [eno1] config item (null).tsproc_mode is 0

Comment 6 errata-xmlrpc 2021-02-24 15:35:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:5633


Note You need to log in before you can comment on or make changes to this bug.