<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 - [dpdk-24.07] virtio_smoke/test_virtio_loopback: Vhost or Virtio hang"
   href="https://bugs.dpdk.org/show_bug.cgi?id=1462">1462</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[dpdk-24.07] virtio_smoke/test_virtio_loopback: Vhost or Virtio hang
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>24.07
          </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>vhost/virtio
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>yux.jiang@intel.com
          </td>
        </tr>

        <tr>
          <th>Target Milestone</th>
          <td>---
          </td>
        </tr></table>
      <p>
        <div class="bz_comment_block">
          <pre class="bz_comment_text">[Environment]

DPDK version: 24.07.0-rc0
OS: Ubuntu 22.04.3 LTS; 5.15.0-82-generic
Compiler: gcc version 11.4.0
Hardware platform: Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz

[Test Setup]
Steps to reproduce
List the steps to reproduce the issue.

1.Build dpdk
rm -rf x86_64-native-linuxapp-gcc
CC=gcc meson -Denable_kmods=True -Dlibdir=lib  --default-library=static
x86_64-native-linuxapp-gcc
ninja -C x86_64-native-linuxapp-gcc

2.Launch vhost as client mode
x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-3 -n 4  --file-prefix=vhost
--no-pci --vdev 'eth_vhost0,iface=vhost-net,client=1,queues=8'   -- -i
--nb-cores=2 --rxq=2 --txq=2

3, Launch virtio-user as server mode
x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 4-6 -n 4  --file-prefix=virtio1
--no-pci --vdev
'net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,server=1,queues=8,mrg_rxbuf=1,in_order=1'
  --single-file-segments -- -i --tx-offloads=0x0 --enable-hw-vlan-strip
--rss-ip --nb-cores=2 --rxq=8 --txq=8

[Actual Result]
Vhost hang's log 
root@dut214:~/dpdk# x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-3 -n 4 
--file-prefix=vhost --no-pci --vdev
'eth_vhost0,iface=vhost-net,client=1,queues=8'   -- -i --nb-cores=2 --rxq=2
--txq=2
EAL: Detected CPU lcores: 112
EAL: Detected NUMA nodes: 2
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/vhost/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: VFIO support initialized
Interactive-mode selected
testpmd: create a new mbuf pool <mb_pool_0>: n=163456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc

Warning! port-topology=paired and odd forward ports number, the last port will
pair with itself.

Configuring Port 0 (socket 0)
VHOST_CONFIG: (vhost-net) vhost-user client: socket created, fd: 33
VHOST_CONFIG: (vhost-net) Setting max queue pairs to 8

Virtio-user hang, vhost's log:
root@dut214:~/dpdk# x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-3 -n 4 
--file-prefix=vhost --no-pci --vdev
'eth_vhost0,iface=vhost-net,client=1,queues=8'   -- -i --nb-cores=2 --rxq=2
--txq=2
EAL: Detected CPU lcores: 112
EAL: Detected NUMA nodes: 2
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/vhost/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: VFIO support initialized
Interactive-mode selected
testpmd: create a new mbuf pool <mb_pool_0>: n=163456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc

Warning! port-topology=paired and odd forward ports number, the last port will
pair with itself.

Configuring Port 0 (socket 0)
VHOST_CONFIG: (vhost-net) vhost-user client: socket created, fd: 33
VHOST_CONFIG: (vhost-net) Setting max queue pairs to 8
VHOST_CONFIG: (vhost-net) failed to connect: No such file or directory
VHOST_CONFIG: (vhost-net) reconnecting...
Port 0: 56:48:4F:53:54:00
Checking link statuses...
Done
testpmd> VHOST_CONFIG: (vhost-net) connected
VHOST_CONFIG: (vhost-net) new device, handle is 0

testpmd>



[Expected Result]
Not hang
root@dut214:~/dpdk# x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-3 -n 4 
--file-prefix=vhost --no-pci --vdev
'eth_vhost0,iface=vhost-net,client=1,queues=8'   -- -i --nb-cores=2 --rxq=2
--txq=2
EAL: Detected CPU lcores: 112
EAL: Detected NUMA nodes: 2
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/vhost/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: VFIO support initialized
Interactive-mode selected
testpmd: create a new mbuf pool <mb_pool_0>: n=163456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc

Warning! port-topology=paired and odd forward ports number, the last port will
pair with itself.

Configuring Port 0 (socket 0)
VHOST_CONFIG: (vhost-net) vhost-user client: socket created, fd: 33
VHOST_CONFIG: (vhost-net) Setting max queue pairs to 8
VHOST_CONFIG: (vhost-net) failed to connect: No such file or directory
VHOST_CONFIG: (vhost-net) reconnecting...
Port 0: 56:48:4F:53:54:00
Checking link statuses...
Done
testpmd> 


[Regression]
Is this issue a regression: (Y)
Bad commit id1: ///////Virtio hang
02a7ca5114 vhost: improve fdset initialization
Bad commit id2: ///////vhost hang
c23f6373c8 vhost: hide synchronization within FD manager
          </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=1462">
          <meta itemprop="name" content="View bug">
        </div>
        <meta itemprop="description" content="Bugzilla bug update notification">
      </div>
    </body>
</html>