Bug 1260 - Querying timer adapter events through dpdk-telemetry crashes DPDK applications
Summary: Querying timer adapter events through dpdk-telemetry crashes DPDK applications
Status: UNCONFIRMED
Alias: None
Product: DPDK
Classification: Unclassified
Component: eventdev (show other bugs)
Version: 22.11
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: dev
URL:
Depends on:
Blocks:
 
Reported: 2023-07-04 16:10 CEST by Lukas Sismis
Modified: 2023-07-04 16:10 CEST (History)
0 users



Attachments

Description Lukas Sismis 2023-07-04 16:10:28 CEST
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 both the original DPDK application and dpdk-telemetry when the /eventdev/ta_info or /eventdev/ta_stats are queried. Random other eventdev events are handled well and do not crash neither the application nor the dpdk-telemetry script. 

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=155456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
testpmd: create a new mbuf pool <mb_pool_1>: n=155456, size=2176, socket=1
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=prompt)
  File "/bin/dpdk-telemetry.py", line 30, in read_socket
    ret = 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 = self.raw_decode(s, idx=_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.

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