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 5B8C7A04A8; Mon, 27 Dec 2021 14:53:26 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E073540683; Mon, 27 Dec 2021 14:53:25 +0100 (CET) Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178]) by mails.dpdk.org (Postfix) with ESMTP id A8CBE4067B for ; Mon, 27 Dec 2021 14:53:24 +0100 (CET) Received: by inbox.dpdk.org (Postfix, from userid 33) id 24ECEA04A9; Mon, 27 Dec 2021 14:53:24 +0100 (CET) From: bugzilla@dpdk.org To: dev@dpdk.org Subject: [Bug 918] RTE EAL is unable to complete its work Date: Mon, 27 Dec 2021 13:53:23 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: core X-Bugzilla-Version: 20.11 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: interferation3@gmail.com 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: 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 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 https://bugs.dpdk.org/show_bug.cgi?id=3D918 Bug ID: 918 Summary: RTE EAL is unable to complete its work Product: DPDK Version: 20.11 Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: Normal Component: core Assignee: dev@dpdk.org Reporter: interferation3@gmail.com Target Milestone: --- Hi guys, I am one of two authors of Dataplane SDK, where a lot of C-based OOP module= s. Part of them is related to DPDK. For example: sb_class.dpdk.eal sb_class.dpdk.lpm sb_class.dpdk.mempool sb_class.dpdk.ring sb_class.netdev.dpdk sb_class.netdev.dpdk.eth sb_class.netdev.dpdk.eth.bonding sb_class.netdev.dpdk.pcap sb_class.netdev.dpdk.tap sb_class.task.node.group.dpdk.eth sb_class.task.node.group.dpdk.tap I also have a module sb_class.hal (Hardware Abstraction Layer) his object r= uns before sb_object.dpdk.eal and its task is to determine the hardware and initialize the synonym table between DPDK device number and SDK object name. Also sb_object.hal calls /usr/bin/dpdk-devbind.py script in order to connect network cards to the required drivers. that is, the order of initialization is as follows: sb_object.some_project - children initialization (they below) sb_object.hal - hardware detection, bind drivers sb_object.dpdk.eal - rte_eal_init sb_object.dpdk.mempool - rte_pktmbuf_pool_create sb_object.netdev.dpdk.eth - rte_eth_dev_configure queues etc sb_object.lcore.scheduler.roundrobin - sb_lcore_launch *** other objects *** the application terminates in reverse order and this is what I noticed when sb_object.dpdk.eal exits, I call the follow= ing code (on the lcore that started everything) void IMPLEMENTATION (object_free) ( sb_status_t * a_out_err, sb_class_t * a_class, sb_object_t * a_obj) { sb_object_dpdk_eal_t * obj =3D (sb_object_dpdk_eal_t *) a_obj; sb_object_super_class_free (a_out_err, a_class, a_obj); obj-> eal_cmd_line [0] =3D '\ 0'; #if RTE_VERSION_NUM (19, 2, 0, 0) <=3D RTE_VERSION { unsigned lcore_id; // wait for threads to stop // RTE_LCORE_FOREACH_WORKER (lcore_id) { RTE_LCORE_FOREACH (lcore_id) { rte_eal_wait_lcore (lcore_id); } // clean up the EAL rte_eal_cleanup (); } #endif } and in gdb I still see that DPDK has not finished working and its threads a= re still running. how can I stop DPDK completely? because when object_free of sb_object.hal is called, it attempts to bind network cards back to the kernel stack, but DPDK is still running and the parent would be killed as a result thole application would be marked as "defunct" and only hardware reboot can help Please tell me how to correctly shutdown DPDK so that: all DPDK resources were freed all threads created by DPDK were closed Regards, screenshots attached Hi guys, I am one of two authors of Dataplane SDK, where a lot of C-based OOP module= s. Part of them is related to DPDK. For example: sb_class.dpdk.eal sb_class.dpdk.lpm sb_class.dpdk.mempool sb_class.dpdk.ring sb_class.netdev.dpdk sb_class.netdev.dpdk.eth sb_class.netdev.dpdk.eth.bonding sb_class.netdev.dpdk.pcap sb_class.netdev.dpdk.tap sb_class.task.node.group.dpdk.eth sb_class.task.node.group.dpdk.tap I also have a module sb_class.hal (Hardware Abstraction Layer) his object r= uns before sb_object.dpdk.eal and its task is to determine the hardware and initialize the synonym table between DPDK device number and SDK object name. Also sb_object.hal calls /usr/bin/dpdk-devbind.py script in order to connect network cards to the required drivers. that is, the order of initialization is as follows: sb_object.some_project - children initialization (they below) sb_object.hal - hardware detection, bind drivers sb_object.dpdk.eal - rte_eal_init sb_object.dpdk.mempool - rte_pktmbuf_pool_create sb_object.netdev.dpdk.eth - rte_eth_dev_configure queues etc sb_object.lcore.scheduler.roundrobin - sb_lcore_launch *** other objects *** the application terminates in reverse order and this is what I noticed when sb_object.dpdk.eal exits, I call the follow= ing code (on the lcore that started everything) void IMPLEMENTATION (object_free) ( sb_status_t * a_out_err, sb_class_t * a_class, sb_object_t * a_obj) { sb_object_dpdk_eal_t * obj =3D (sb_object_dpdk_eal_t *) a_obj; sb_object_super_class_free (a_out_err, a_class, a_obj); obj-> eal_cmd_line [0] =3D '\ 0'; #if RTE_VERSION_NUM (19, 2, 0, 0) <=3D RTE_VERSION { unsigned lcore_id; // wait for threads to stop // RTE_LCORE_FOREACH_WORKER (lcore_id) { RTE_LCORE_FOREACH (lcore_id) { rte_eal_wait_lcore (lcore_id); } // clean up the EAL rte_eal_cleanup (); } #endif } and in gdb I still see that DPDK has not finished working and its threads a= re still running. how can I stop DPDK completely? because when object_free of sb_object.hal is called, it attempts to bind network cards back to the kernel stack, but DPDK is still running and the parent would be killed as a result thole application would be marked as "defunct" and only hardware reboot can help Please tell me how to correctly shutdown DPDK so that: all DPDK resources were freed all threads created by DPDK were closed Regards, screenshots attached --=20 You are receiving this mail because: You are the assignee for the bug.=