From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F144A42DAA; Tue, 4 Jul 2023 16:10:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DEF1B40F18; Tue, 4 Jul 2023 16:10:29 +0200 (CEST) Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178]) by mails.dpdk.org (Postfix) with ESMTP id 5799540E03 for ; Tue, 4 Jul 2023 16:10:28 +0200 (CEST) Received: by inbox.dpdk.org (Postfix, from userid 33) id 4F67642DAB; Tue, 4 Jul 2023 16:10:28 +0200 (CEST) From: bugzilla@dpdk.org To: dev@dpdk.org Subject: [Bug 1260] Querying timer adapter events through dpdk-telemetry crashes DPDK applications Date: Tue, 04 Jul 2023 14:10:28 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: eventdev X-Bugzilla-Version: 22.11 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sismis@cesnet.cz X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: multipart/alternative; boundary=16884798280.DA9abd.794615 Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --16884798280.DA9abd.794615 Date: Tue, 4 Jul 2023 16:10:28 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All https://bugs.dpdk.org/show_bug.cgi?id=3D1260 Bug ID: 1260 Summary: Querying timer adapter events through dpdk-telemetry crashes DPDK applications Product: DPDK Version: 22.11 Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: Normal Component: eventdev Assignee: dev@dpdk.org Reporter: sismis@cesnet.cz Target Milestone: --- Running DPDK application (e.g. dpdk-testpmd) and not supporting DPDK Timer Events (or using a NIC that supports that) can lead to complete crash of bo= th the original DPDK application and dpdk-telemetry when the /eventdev/ta_info= or /eventdev/ta_stats are queried. Random other eventdev events are handled we= ll and do not crash neither the application nor the dpdk-telemetry script.=20 Steps to reproduce: 1) Run the dpdk-testpmd application (e.g. with i40e nic but other nics not supporting timer adapter events should work too) `sudo dpdk-testpmd -l 0,2 = -- -i` 2) Run dpdk-telemetry `sudo dpdk-telemetry` 3) Query `/eventdev/ta_info,1` dpdk-testpmd output: $ sudo dpdk-testpmd -l 0,2 -- -i EAL: Detected CPU lcores: 24 EAL: Detected NUMA nodes: 2 EAL: Detected static linkage of DPDK EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Selected IOVA mode 'PA' EAL: VFIO support initialized EAL: Using IOMMU type 8 (No-IOMMU) EAL: Probe PCI driver: net_i40e (8086:1572) device: 0000:43:00.0 (socket 1) EAL: Probe PCI driver: net_i40e (8086:1572) device: 0000:43:00.1 (socket 1) Interactive-mode selected testpmd: create a new mbuf pool : n=3D155456, size=3D2176, socke= t=3D0 testpmd: preferred mempool ops selected: ring_mp_mc testpmd: create a new mbuf pool : n=3D155456, size=3D2176, socke= t=3D1 testpmd: preferred mempool ops selected: ring_mp_mc Configuring Port 0 (socket 1) Port 0: 80:61:5F:07:FB:66 Configuring Port 1 (socket 1) Port 1: 80:61:5F:07:FB:67 Checking link statuses... Done testpmd> Segmentation fault dpdk-telemetry output: Connected to application: "dpdk-testpmd" --> /eventdev/ta_info,1 Error in reply: Traceback (most recent call last): File "/bin/dpdk-telemetry.py", line 183, in handle_socket(args, sock_path) File "/bin/dpdk-telemetry.py", line 147, in handle_socket read_socket(sock, output_buf_len, pretty=3Dprompt) File "/bin/dpdk-telemetry.py", line 30, in read_socket ret =3D json.loads(reply) File "/usr/lib64/python3.6/json/__init__.py", line 354, in loads return _default_decoder.decode(s) File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode obj, end =3D self.raw_decode(s, idx=3D_w(s, 0).end()) File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) Effective from the addition of Timer Adapter events until now (22.11+). Although one can argue that if the NIC does not support the Timer Adapters = then it is ok behavior however I believe the application should not crash and the query should only result in an error. --=20 You are receiving this mail because: You are the assignee for the bug.= --16884798280.DA9abd.794615 Date: Tue, 4 Jul 2023 16:10:28 +0200 MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All
Bug ID 1260
Summary Querying timer adapter events through dpdk-telemetry crashes = DPDK applications
Product DPDK
Version 22.11
Hardware All
OS All
Status UNCONFIRMED
Severity normal
Priority Normal
Component eventdev
Assignee dev@dpdk.org
Reporter sismis@cesnet.cz
Target Milestone ---

Running DPDK application (e.g. dpd=
k-testpmd) and not supporting DPDK Timer
Events (or using a NIC that supports that) can lead to complete crash of bo=
th
the original DPDK application and dpdk-telemetry when the /eventdev/ta_info=
 or
/eventdev/ta_stats are queried. Random other eventdev events are handled we=
ll
and do not crash neither the application nor the dpdk-telemetry script.=20

Steps to reproduce:
1) Run the dpdk-testpmd application (e.g. with i40e nic but other nics not
supporting timer adapter events should work too) `sudo dpdk-testpmd -l 0,2 =
--
-i`
2) Run dpdk-telemetry `sudo dpdk-telemetry`
3) Query `/eventdev/ta_info,1`

dpdk-testpmd output:
$ sudo dpdk-testpmd -l 0,2 -- -i
EAL: Detected CPU lcores: 24
EAL: Detected NUMA nodes: 2
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: VFIO support initialized
EAL: Using IOMMU type 8 (No-IOMMU)
EAL: Probe PCI driver: net_i40e (8086:1572) device: 0000:43:00.0 (socket 1)
EAL: Probe PCI driver: net_i40e (8086:1572) device: 0000:43:00.1 (socket 1)
Interactive-mode selected
testpmd: create a new mbuf pool <mb_pool_0>: n=3D155456, size=3D2176,=
 socket=3D0
testpmd: preferred mempool ops selected: ring_mp_mc
testpmd: create a new mbuf pool <mb_pool_1>: n=3D155456, size=3D2176,=
 socket=3D1
testpmd: preferred mempool ops selected: ring_mp_mc
Configuring Port 0 (socket 1)
Port 0: 80:61:5F:07:FB:66
Configuring Port 1 (socket 1)
Port 1: 80:61:5F:07:FB:67
Checking link statuses...
Done
testpmd> Segmentation fault


dpdk-telemetry output:
Connected to application: "dpdk-testpmd"
--> /eventdev/ta_info,1
Error in reply:
Traceback (most recent call last):
  File "/bin/dpdk-telemetry.py", line 183, in <module>
    handle_socket(args, sock_path)
  File "/bin/dpdk-telemetry.py", line 147, in handle_socket
    read_socket(sock, output_buf_len, pretty=3Dprompt)
  File "/bin/dpdk-telemetry.py", line 30, in read_socket
    ret =3D json.loads(reply)
  File "/usr/lib64/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
    obj, end =3D self.raw_decode(s, idx=3D_w(s, 0).end())
  File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_d=
ecode
    raise JSONDecodeError("Expecting value", s, err.value) from N=
one
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


Effective from the addition of Timer Adapter events until now (22.11+).
Although one can argue that if the NIC does not support the Timer Adapters =
then
it is ok behavior however I believe the application should not crash and the
query should only result in an error.
          


You are receiving this mail because:
  • You are the assignee for the bug.
=20=20=20=20=20=20=20=20=20=20
= --16884798280.DA9abd.794615--