<html>
    <head>
      <base href="https://bugs.dpdk.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8" class="bz_new_table">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Querying timer adapter events through dpdk-telemetry crashes DPDK applications"
   href="https://bugs.dpdk.org/show_bug.cgi?id=1260">1260</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Querying timer adapter events through dpdk-telemetry crashes DPDK applications
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>DPDK
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>22.11
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>eventdev
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dev@dpdk.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sismis@cesnet.cz
          </td>
        </tr>

        <tr>
          <th>Target Milestone</th>
          <td>---
          </td>
        </tr></table>
      <p>
        <div class="bz_comment_block">
          <pre class="bz_comment_text">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.
          </pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
      <div itemscope itemtype="http://schema.org/EmailMessage">
        <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
          
          <link itemprop="url" href="https://bugs.dpdk.org/show_bug.cgi?id=1260">
          <meta itemprop="name" content="View bug">
        </div>
        <meta itemprop="description" content="Bugzilla bug update notification">
      </div>
    </body>
</html>