在 2020/5/20 15:22, David Marchand 写道:
Hello,

On Wed, May 20, 2020 at 5:18 AM oulijun <ouli...@huawei.com> wrote:
     I am using 20.05-rc2 version to test based on HNS3 NIC hardware, and
found that after starting l3fwd-power,

using ctrl+c cannot force quit. But I revert the patch(33666b4 service:
fix crash on exit) and it is ok.

We had a fix in rc1 that is supposed to fix this.
https://git.dpdk.org/dpdk/commit?id=613ce6691c0d5ac0f99d7995f1e8e4ac86643882

Copying Anatoly and David H. too.

Hi, David Marchand
I am only merged the patch(examples/l3fwd-power: implement proper shutdown) based on 20.05-rc0 and test. the bug is not resolved. Can you provide me with complete solution? I want to understand the cause of the whole problem

The gdb print as follows:
[root@centos-C3 build]# ./l3fwd-power -w 0000:7d:00.1 -c 0xc000000 -n 4 -- -P -p 0x01 --config '(0,0,27)' --parse-ptype
EAL: Detected 128 lcore(s)
EAL: Detected 4 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: No available hugepages reported in hugepages-2048kB
EAL: No available hugepages reported in hugepages-32768kB
EAL: No available hugepages reported in hugepages-64kB
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:7d:00.1 on NUMA socket 0
EAL:   probe driver: 19e5:a221 net_hns3
Promiscuous mode selected
soft parse-ptype is enabled
POWER: Env isn't set yet!
POWER: Attempting to initialise ACPI cpufreq power management...
POWER: Power management governor of lcore 26 has been set to user space successfully
POWER: Initialized successfully for lcore 26 power management
POWER: Initialized successfully for lcore 27 power management
port 0 is not present on the board
EAL: Error - exiting with code: 1
  Cause: check_port_config failed
[root@centos-C3 build]# ./l3fwd-power -w 0000:7d:00.1 -c 0xc000000 -n 4 -- -P -p 0x01 --config '(0,0,27)' --parse-ptype
EAL: Detected 128 lcore(s)
EAL: Detected 4 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: No available hugepages reported in hugepages-2048kB
EAL: No available hugepages reported in hugepages-32768kB
EAL: No available hugepages reported in hugepages-64kB
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:7d:00.1 on NUMA socket 0
EAL:   probe driver: 19e5:a221 net_hns3
EAL:   using IOMMU type 1 (Type 1)
EAL: Ignore mapping IO port bar(1)
EAL: Ignore mapping IO port bar(3)
Promiscuous mode selected
soft parse-ptype is enabled
POWER: Env isn't set yet!
POWER: Attempting to initialise ACPI cpufreq power management...
POWER: Initialized successfully for lcore 26 power management
POWER: Initialized successfully for lcore 27 power management
Initializing port 0 ... Creating queues: nb_rxq=1 nb_txq=2... Port 0 modified RSS hash function based on hardware support,requested:0x20820 configured:0x820
 Address:00:18:2D:01:00:9E, Allocated mbuf pool on socket 0
LPM: Adding route 0x01010100 / 24 (0)
LPM: Adding route 0x02010100 / 24 (1)
LPM: Adding route 0x03010100 / 24 (2)
LPM: Adding route 0x04010100 / 24 (3)
LPM: Adding route 0x05010100 / 24 (4)
LPM: Adding route 0x06010100 / 24 (5)
LPM: Adding route 0x07010100 / 24 (6)
LPM: Adding route 0x08010100 / 24 (7)
txq=26,0,0 txq=27,1,0

Initializing rx queues on lcore 26 ...
Initializing rx queues on lcore 27 ... rxq=0,0,0 Port 0: softly parse packet type info


Checking link status...............0000:7d:00.1 hns3_update_link_status(): Link status change to up!
done
Port 0 Link Up - speed 25000 Mbps - full-duplex
L3FWD_POWER: entering main loop on lcore 27
L3FWD_POWER:  -- lcoreid=27 portid=0 rxqueueid=0
L3FWD_POWER: lcore 26 has nothing to do
L3FWD_POWER: lcore 27 sleeps until interrupt triggers
L3FWD_POWER: lcore 27 is waked up from rx interrupt on port 0 queue 0
L3FWD_POWER: lcore 27 sleeps until interrupt triggers
L3FWD_POWER: lcore 27 is waked up from rx interrupt on port 0 queue 0
L3FWD_POWER: lcore 27 sleeps until interrupt triggers
L3FWD_POWER: lcore 27 is waked up from rx interrupt on port 0 queue 0
L3FWD_POWER: lcore 27 sleeps until interrupt triggers
L3FWD_POWER: lcore 27 is waked up from rx interrupt on port 0 queue 0
L3FWD_POWER: lcore 27 sleeps until interrupt triggers
^C^C^C^C^C


Killed
[root@centos-C3 build]#
[root@centos-C3 build]#
[root@centos-C3 build]#
[root@centos-C3 build]# gdb
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-114.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "aarch64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) set args
(gdb)
(gdb)
(gdb) ./l3fwd-power -w 0000:7d:00.1 -c 0xc000000 -n 4 -- -P -p 0x01 --config '(0,0,27)' --parse-ptype
Undefined command: "".  Try "help".
(gdb) quit
[root@centos-C3 build]# gdb ./l3fwd-power
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-114.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "aarch64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /root/dpdk/examples/l3fwd-power/build/l3fwd-power...done.
(gdb) set args
(gdb) -w 0000:7d:00.1 -c 0xc000000 -n 4 -- -P -p 0x01 --config '(0,0,27)' --parse-ptype
Undefined command: "-w".  Try "help".
(gdb) -w 0000:7d:00.1 -c 0xc000000 -n 4 -- -P -p 0x01 --config '(0,0,27)' --parse-ptype
Undefined command: "-w".  Try "help".
(gdb) -w 0000:7d:00.1 -c 0xc000000 -n 4 -- -P -p 0x01 --config '(0,0,27)' --parse-ptype
Undefined command: "-w".  Try "help".
(gdb) set args -w 0000:7d:00.1 -c 0xc000000 -n 4 -- -P -p 0x01 --config '(0,0,27)' --parse-ptype
(gdb) r
Starting program: /root/dpdk/examples/l3fwd-power/build/./l3fwd-power -w 0000:7d:00.1 -c 0xc000000 -n 4 -- -P -p 0x01 --config '(0,0,27)' --parse-ptype
Missing separate debuginfo for /root/lib/libnuma.so.1
Try: yum --enablerepo='*debug*' install /usr/lib/debug/.build-id/ce/4eea0b0f2150f70a080bbd8835e43e78373096.debug
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
EAL: Detected 128 lcore(s)
EAL: Detected 4 NUMA nodes
[New Thread 0xfffff7ca8510 (LWP 87238)]
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
[New Thread 0xfffff74a7510 (LWP 87239)]
EAL: Selected IOVA mode 'PA'
EAL: No available hugepages reported in hugepages-2048kB
EAL: No available hugepages reported in hugepages-32768kB
EAL: No available hugepages reported in hugepages-64kB
EAL: Probing VFIO support...
EAL: VFIO support initialized
[New Thread 0xfffff6c86510 (LWP 87240)]
EAL: PCI device 0000:7d:00.1 on NUMA socket 0
EAL:   probe driver: 19e5:a221 net_hns3
EAL:   using IOMMU type 1 (Type 1)
EAL: Ignore mapping IO port bar(1)
EAL: Ignore mapping IO port bar(3)
Promiscuous mode selected
soft parse-ptype is enabled
POWER: Env isn't set yet!
POWER: Attempting to initialise ACPI cpufreq power management...
POWER: Initialized successfully for lcore 26 power management
POWER: Initialized successfully for lcore 27 power management
Initializing port 0 ... Creating queues: nb_rxq=1 nb_txq=2... Port 0 modified RSS hash function based on hardware support,requested:0x20820 configured:0x820
 Address:00:18:2D:01:00:9E, Allocated mbuf pool on socket 0
LPM: Adding route 0x01010100 / 24 (0)
LPM: Adding route 0x02010100 / 24 (1)
LPM: Adding route 0x03010100 / 24 (2)
LPM: Adding route 0x04010100 / 24 (3)
LPM: Adding route 0x05010100 / 24 (4)
LPM: Adding route 0x06010100 / 24 (5)
LPM: Adding route 0x07010100 / 24 (6)
LPM: Adding route 0x08010100 / 24 (7)
txq=26,0,0 txq=27,1,0

Initializing rx queues on lcore 26 ...
Initializing rx queues on lcore 27 ... rxq=0,0,0 Port 0: softly parse packet type info

0000:7d:00.1 hns3_update_link_status(): Link status change to up!

Checking link statusdone
Port 0 Link Up - speed 25000 Mbps - full-duplex
L3FWD_POWER: entering main loop on lcore 27
L3FWD_POWER:  -- lcoreid=27 portid=0 rxqueueid=0
L3FWD_POWER: lcore 26 has nothing to do
L3FWD_POWER: lcore 27 sleeps until interrupt triggers
^C
Program received signal SIGINT, Interrupt.
0x0000000000832bd0 in rte_eal_wait_lcore ()
Missing separate debuginfos, use: debuginfo-install glibc-2.17-260.el7.aarch64
(gdb) list
1       ../sysdeps/aarch64/crti.S: No such file or directory.
(gdb) l
1       in ../sysdeps/aarch64/crti.S
(gdb) ls
Undefined command: "ls".  Try "help".
(gdb) info threads
  Id   Target Id         Frame
4 Thread 0xfffff6c86510 (LWP 87240) "lcore-slave-27" 0x0000fffff7dc47d4 in epoll_pwait () from /lib64/libc.so.6 3 Thread 0xfffff74a7510 (LWP 87239) "rte_mp_handle" 0x0000fffff7e7a918 in recvmsg () from /lib64/libpthread.so.0 2 Thread 0xfffff7ca8510 (LWP 87238) "eal-intr-thread" 0x0000fffff7dc47d4 in epoll_pwait () from /lib64/libc.so.6 * 1 Thread 0xfffff7ce2110 (LWP 87235) "l3fwd-power" 0x0000000000832bd0 in rte_eal_wait_lcore ()
(gdb)

Thanks
Lijun Ou


the log as follows:

Initializing rx queues on lcore 26 ...
Initializing rx queues on lcore 27 ... rxq=0,0,0 Port 0: softly parse
packet type info


Checking link status...............0000:7d:00.1
hns3_update_link_status(): Link status change to up!
done
Port 0 Link Up - speed 25000 Mbps - full-duplex
L3FWD_POWER: entering main loop on lcore 27
L3FWD_POWER:  -- lcoreid=27 portid=0 rxqueueid=0
L3FWD_POWER: lcore 26 has nothing to do
L3FWD_POWER: lcore 27 sleeps until interrupt triggers
L3FWD_POWER: lcore 27 is waked up from rx interrupt on port 0 queue 0
L3FWD_POWER: lcore 27 sleeps until interrupt triggers
L3FWD_POWER: lcore 27 is waked up from rx interrupt on port 0 queue 0
L3FWD_POWER: lcore 27 sleeps until interrupt triggers
L3FWD_POWER: lcore 27 is waked up from rx interrupt on port 0 queue 0
L3FWD_POWER: lcore 27 sleeps until interrupt triggers
L3FWD_POWER: lcore 27 is waked up from rx interrupt on port 0 queue 0
L3FWD_POWER: lcore 27 sleeps until interrupt triggers
L3FWD_POWER: lcore 27 is waked up from rx interrupt on port 0 queue 0
L3FWD_POWER: lcore 27 sleeps until interrupt triggers
L3FWD_POWER: lcore 27 is waked up from rx interrupt on port 0 queue 0
L3FWD_POWER: lcore 27 sleeps until interrupt triggers
L3FWD_POWER: lcore 27 is waked up from rx interrupt on port 0 queue 0
L3FWD_POWER: lcore 27 sleeps until interrupt triggers
L3FWD_POWER: lcore 27 is waked up from rx interrupt on port 0 queue 0
L3FWD_POWER: lcore 27 sleeps until interrupt triggers
L3FWD_POWER: lcore 27 is waked up from rx interrupt on port 0 queue 0
L3FWD_POWER: lcore 27 sleeps until interrupt triggers
L3FWD_POWER: lcore 27 is waked up from rx interrupt on port 0 queue 0
L3FWD_POWER: lcore 27 sleeps until interrupt triggers
L3FWD_POWER: lcore 27 is waked up from rx interrupt on port 0 queue 0
L3FWD_POWER: lcore 27 sleeps until interrupt triggers
^CPOWER: Power management governor of lcore 26 has been set back to
successfully
POWER: Power management of lcore 26 has exited from 'userspace' mode and
been set back to the original
POWER: Power management governor of lcore 27 has been set back to
successfully
POWER: Power management of lcore 27 has exited from 'userspace' mode and
been set back to the original
0000:7d:00.1 hns3_dev_close(): Close port 0 finished
User forced exit
[root@centos-C3 build]#

So I understand those traces are for when it works.

What about the traces when it does not work?
Can you get a backtrace to know where the process is stuck?


Thanks for reporting.


Reply via email to