From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <dev-bounces@dpdk.org> Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1624C41E99; Wed, 15 Mar 2023 07:54:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E9CF840A7A; Wed, 15 Mar 2023 07:54:43 +0100 (CET) Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178]) by mails.dpdk.org (Postfix) with ESMTP id CE4B8400EF for <dev@dpdk.org>; Wed, 15 Mar 2023 07:54:41 +0100 (CET) Received: by inbox.dpdk.org (Postfix, from userid 33) id BA37341E9A; Wed, 15 Mar 2023 07:54:41 +0100 (CET) From: bugzilla@dpdk.org To: dev@dpdk.org Subject: [Bug 1184] [dpdk-23.03] [asan]asan_smoke/rxtx_with_ASan_enable : launch testpmd as global-buffer-overflow error. Date: Wed, 15 Mar 2023 06:54:41 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: meson X-Bugzilla-Version: 23.03 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dukaix.yuan@intel.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: <bug-1184-3@http.bugs.dpdk.org/> Content-Type: multipart/alternative; boundary=16788632810.Fa4AAD7.246910 Content-Transfer-Encoding: 7bit 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 <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org --16788632810.Fa4AAD7.246910 Date: Wed, 15 Mar 2023 07:54:41 +0100 MIME-Version: 1.0 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 https://bugs.dpdk.org/show_bug.cgi?id=3D1184 Bug ID: 1184 Summary: [dpdk-23.03] [asan]asan_smoke/rxtx_with_ASan_enable : launch testpmd as global-buffer-overflow error. Product: DPDK Version: 23.03 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: Normal Component: meson Assignee: dev@dpdk.org Reporter: dukaix.yuan@intel.com Target Milestone: --- [Environment] DPDK version:=20 dpdk 23.03 baf13c3135d0c59 Other software versions: N/A. OS: Ubuntu20.04.5/5.15.0-57-generic Compiler: clang version 10.0.0-4ubuntu1 Hardware platform: Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz NIC hardware: I40E_10G-10G_BASE_T_X722 NIC driver: i40e-2.22.8 NIC firmware: 6.20 0x80003d3e 1.2935.0 [Test Setup] Steps to reproduce 1. Use the following command to bind 1 NIC port to DPDK driver: dpdk-devbind.py -b vfio-pci 3d:00.0 2. Use the following command to build DPDK with clang compiler:=20 rm -rf x86_64-native-linuxapp-clang=20 CC=3Dclang meson -Denable_kmods=3DTrue -Dlibdir=3Dlib -Dbuildtype=3Ddebug -Db_lundef=3Dfalse - Db_sanitize=3Daddress --default-library=3Dstatic x86_64-native-linuxapp-clang ninja -C x86_64-native-linuxapp-clang 3. Execute the following command in the dpdk directory: x86_64-native-linuxapp-clang/app/dpdk-testpmd -l 1-5 -n 4 -a 0000:3d:00.0 -= - -i [Show the output from the previous commands.] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D1284426=3D=3DERROR: AddressSanitizer: global-buffer-overflow on addre= ss 0x000014e26808 at pc 0x000001734724 bp 0x7ffce1ebb6a0 sp 0x7ffce1ebb698 READ of size 8 at 0x000014e26808 thread T0 #0 0x1734723 in rte_eth_trace_iterator_next /root/dpdk/x86_64-native-linuxapp-clang/../lib/ethdev/ethdev_trace.h:98:1 #1 0x193b346 in __rte_trace_point_register /root/dpdk/x86_64-native-linuxapp-clang/../lib/eal/common/eal_common_trace.= c:477:2 #2 0x1734660 in rte_eth_trace_iterator_next_init /root/dpdk/x86_64-native-linuxapp-clang/../lib/ethdev/ethdev_trace_points.c= :43:1 #3 0x13e14e1c in __libc_csu_init (/root/dpdk/x86_64-native-linuxapp-clang/app/dpdk-testpmd+0x13e14e1c) #4 0x7f801250100f in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:264:6 #5 0x5be51d in _start (/root/dpdk/x86_64-native-linuxapp-clang/app/dpdk-testpmd+0x5be51d)0x000014= e26808 is located 56 bytes to the left of global variable '__rte_eth_trace_iterator_cleanup' defined in '../lib/ethdev/ethdev_trace_points.c:46:1' (0x14e26840) of size 8 0x000014e26808 is located 0 bytes to the right of global variable '__rte_eth_trace_iterator_next' defined in '../lib/ethdev/ethdev_trace_points.c:43:1' (0x14e26800) of size 8 SUMMARY: AddressSanitizer: global-buffer-overflow /root/dpdk/x86_64-native-linuxapp-clang/../lib/ethdev/ethdev_trace.h:98:1 in rte_eth_trace_iterator_next Shadow bytes around the buggy address: 0x0000829bccb0: 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 0x0000829bccc0: 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 0x0000829bccd0: 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 0x0000829bcce0: 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 0x0000829bccf0: 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 =3D>0x0000829bcd00: 00[f9]f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 0x0000829bcd10: 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 0x0000829bcd20: 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 0x0000829bcd30: 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 0x0000829bcd40: 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 0x0000829bcd50: 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc =3D=3D1284426=3D=3DABORTING [Expected Result] Explain what is the expected result in text or as an example output: EAL: Detected CPU lcores: 112 EAL: Detected NUMA nodes: 2 EAL: Detected static linkage of DPDK EAL: Multi-process socket /var/run/dpdk/dpdk_2883_20230315110521/mp_socket EAL: Selected IOVA mode 'VA' EAL: VFIO support initialized EAL: Using IOMMU type 1 (Type 1) EAL: Probe PCI driver: net_i40e (8086:1583) device: 0000:b1:00.0 (socket 1) Interactive-mode selected testpmd: create a new mbuf pool <mb_pool_0>: n=3D179456, size=3D2176, socke= t=3D0 testpmd: preferred mempool ops selected: ring_mp_mc testpmd: create a new mbuf pool <mb_pool_1>: n=3D179456, size=3D2176, socke= t=3D1 testpmd: preferred mempool ops selected: ring_mp_mcWarning! port-topology=3Dpaired and odd forward ports number, the last port will pai= r with itself.Configuring Port 0 (socket 1) Port 0: 3C:FD:FE:C8:19:28 Checking link statuses... Done testpmd> [Regression] Is this issue a regression: (Y/N) Y Version the regression was introduced: Specify git id if known. 6679cf21d6083710bef2e5a4e4a7b42eee5be3aa is the first bad commit commit 6679cf21d6083710bef2e5a4e4a7b42eee5be3aa Author: Ankur Dwivedi <adwivedi@marvell.com> Date: Wed Feb 8 22:42:11 2023 +0530 ethdev: add trace points Adds trace points for ethdev functions. The rte_ethdev_trace.h is removed. The file ethdev_trace.h is added as an internal header. ethdev_trace.h contains internal slow path and fast path tracepoints. The public fast path tracepoints are present in rte_ethdev_trace_fp.h header. Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com> Acked-by: Sunil Kumar Kori <skori@marvell.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com> lib/ethdev/ethdev_private.c | 7 + lib/ethdev/ethdev_trace.h | 1512 ++++++++++++++++++++++++++++++++++= ++++ lib/ethdev/ethdev_trace_points.c | 447 ++++++++++- lib/ethdev/meson.build | 2 +- lib/ethdev/rte_ethdev.c | 872 ++++++++++++++++++---- lib/ethdev/rte_ethdev_cman.c | 29 +- lib/ethdev/rte_ethdev_trace.h | 95 =E2=80=94 lib/ethdev/rte_ethdev_trace_fp.h | 36 + 8 files changed, 2761 insertions, 239 deletions create mode 100644 lib/ethdev/ethdev_trace.h delete mode 100644 lib/ethdev/rte_ethdev_trace.h --=20 You are receiving this mail because: You are the assignee for the bug.= --16788632810.Fa4AAD7.246910 Date: Wed, 15 Mar 2023 07:54:41 +0100 MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All <html> <head> <base href=3D"https://bugs.dpdk.org/"> </head> <body><table border=3D"1" cellspacing=3D"0" cellpadding=3D"8" class=3D"= bz_new_table"> <tr> <th>Bug ID</th> <td><a class=3D"bz_bug_link=20 bz_status_UNCONFIRMED " title=3D"UNCONFIRMED - [dpdk-23.03] [asan]asan_smoke/rxtx_with_ASan_enab= le : launch testpmd as global-buffer-overflow error." href=3D"https://bugs.dpdk.org/show_bug.cgi?id=3D1184">1184</a> </td> </tr> <tr> <th>Summary</th> <td>[dpdk-23.03] [asan]asan_smoke/rxtx_with_ASan_enable : launch = testpmd as global-buffer-overflow error. </td> </tr> <tr> <th>Product</th> <td>DPDK </td> </tr> <tr> <th>Version</th> <td>23.03 </td> </tr> <tr> <th>Hardware</th> <td>x86 </td> </tr> <tr> <th>OS</th> <td>Linux </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>meson </td> </tr> <tr> <th>Assignee</th> <td>dev@dpdk.org </td> </tr> <tr> <th>Reporter</th> <td>dukaix.yuan@intel.com </td> </tr> <tr> <th>Target Milestone</th> <td>--- </td> </tr></table> <p> <div class=3D"bz_comment_block"> <pre class=3D"bz_comment_text">[Environment] DPDK version:=20 dpdk 23.03 baf13c3135d0c59 Other software versions: N/A. OS: Ubuntu20.04.5/5.15.0-57-generic Compiler: clang version 10.0.0-4ubuntu1 Hardware platform: Intel(R) Xeon(R) Platinum 8280M CPU @ 2.70GHz NIC hardware: I40E_10G-10G_BASE_T_X722 NIC driver: i40e-2.22.8 NIC firmware: 6.20 0x80003d3e 1.2935.0 [Test Setup] Steps to reproduce 1. Use the following command to bind 1 NIC port to DPDK driver: dpdk-devbind.py -b vfio-pci 3d:00.0 2. Use the following command to build DPDK with clang compiler:=20 rm -rf x86_64-native-linuxapp-clang=20 CC=3Dclang meson -Denable_kmods=3DTrue -Dlibdir=3Dlib -Dbuildtype=3Ddebug -Db_lundef=3Dfalse - Db_sanitize=3Daddress --default-library=3Dstatic x86_64-native-linuxapp-clang ninja -C x86_64-native-linuxapp-clang 3. Execute the following command in the dpdk directory: x86_64-native-linuxapp-clang/app/dpdk-testpmd -l 1-5 -n 4 -a 0000:3d:00.0 -= - -i [Show the output from the previous commands.] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D1284426=3D=3DERROR: AddressSanitizer: global-buffer-overflow on addre= ss 0x000014e26808 at pc 0x000001734724 bp 0x7ffce1ebb6a0 sp 0x7ffce1ebb698 READ of size 8 at 0x000014e26808 thread T0 #0 0x1734723 in rte_eth_trace_iterator_next /root/dpdk/x86_64-native-linuxapp-clang/../lib/ethdev/ethdev_trace.h:98:1 #1 0x193b346 in __rte_trace_point_register /root/dpdk/x86_64-native-linuxapp-clang/../lib/eal/common/eal_common_trace.= c:477:2 #2 0x1734660 in rte_eth_trace_iterator_next_init /root/dpdk/x86_64-native-linuxapp-clang/../lib/ethdev/ethdev_trace_points.c= :43:1 #3 0x13e14e1c in __libc_csu_init (/root/dpdk/x86_64-native-linuxapp-clang/app/dpdk-testpmd+0x13e14e1c) #4 0x7f801250100f in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:264:6 #5 0x5be51d in _start (/root/dpdk/x86_64-native-linuxapp-clang/app/dpdk-testpmd+0x5be51d)0x000014= e26808 is located 56 bytes to the left of global variable '__rte_eth_trace_iterator_cleanup' defined in '../lib/ethdev/ethdev_trace_points.c:46:1' (0x14e26840) of size 8 0x000014e26808 is located 0 bytes to the right of global variable '__rte_eth_trace_iterator_next' defined in '../lib/ethdev/ethdev_trace_points.c:43:1' (0x14e26800) of size 8 SUMMARY: AddressSanitizer: global-buffer-overflow /root/dpdk/x86_64-native-linuxapp-clang/../lib/ethdev/ethdev_trace.h:98:1 in rte_eth_trace_iterator_next Shadow bytes around the buggy address: 0x0000829bccb0: 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 0x0000829bccc0: 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 0x0000829bccd0: 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 0x0000829bcce0: 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 0x0000829bccf0: 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 =3D>0x0000829bcd00: 00[f9]f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 0x0000829bcd10: 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 0x0000829bcd20: 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 0x0000829bcd30: 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 0x0000829bcd40: 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 0x0000829bcd50: 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc =3D=3D1284426=3D=3DABORTING [Expected Result] Explain what is the expected result in text or as an example output: EAL: Detected CPU lcores: 112 EAL: Detected NUMA nodes: 2 EAL: Detected static linkage of DPDK EAL: Multi-process socket /var/run/dpdk/dpdk_2883_20230315110521/mp_socket EAL: Selected IOVA mode 'VA' EAL: VFIO support initialized EAL: Using IOMMU type 1 (Type 1) EAL: Probe PCI driver: net_i40e (8086:1583) device: 0000:b1:00.0 (socket 1) Interactive-mode selected testpmd: create a new mbuf pool <mb_pool_0>: n=3D179456, size=3D2176,= socket=3D0 testpmd: preferred mempool ops selected: ring_mp_mc testpmd: create a new mbuf pool <mb_pool_1>: n=3D179456, size=3D2176,= socket=3D1 testpmd: preferred mempool ops selected: ring_mp_mcWarning! port-topology=3Dpaired and odd forward ports number, the last port will pai= r with itself.Configuring Port 0 (socket 1) Port 0: 3C:FD:FE:C8:19:28 Checking link statuses... Done testpmd> [Regression] Is this issue a regression: (Y/N) Y Version the regression was introduced: Specify git id if known. 6679cf21d6083710bef2e5a4e4a7b42eee5be3aa is the first bad commit commit 6679cf21d6083710bef2e5a4e4a7b42eee5be3aa Author: Ankur Dwivedi <<a href=3D"mailto:adwivedi@marvell.com">adwiv= edi@marvell.com</a>> Date: Wed Feb 8 22:42:11 2023 +0530 ethdev: add trace points Adds trace points for ethdev functions. The rte_ethdev_trace.h is removed. The file ethdev_trace.h is added as an internal header. ethdev_trace.h contains internal slow path and fast path tracepoints. The public fast path tracepoints are present in rte_ethdev_trace_fp.h header. Signed-off-by: Ankur Dwivedi <<a href=3D"mailto:adwivedi@marvell= .com">adwivedi@marvell.com</a>> Acked-by: Sunil Kumar Kori <<a href=3D"mailto:skori@marvell.com"= >skori@marvell.com</a>> Reviewed-by: Ferruh Yigit <<a href=3D"mailto:ferruh.yigit@amd.co= m">ferruh.yigit@amd.com</a>> lib/ethdev/ethdev_private.c | 7 + lib/ethdev/ethdev_trace.h | 1512 ++++++++++++++++++++++++++++++++++= ++++ lib/ethdev/ethdev_trace_points.c | 447 ++++++++++- lib/ethdev/meson.build | 2 +- lib/ethdev/rte_ethdev.c | 872 ++++++++++++++++++---- lib/ethdev/rte_ethdev_cman.c | 29 +- lib/ethdev/rte_ethdev_trace.h | 95 =E2=80=94 lib/ethdev/rte_ethdev_trace_fp.h | 36 + 8 files changed, 2761 insertions, 239 deletions create mode 100644 lib/ethdev/ethdev_trace.h delete mode 100644 lib/ethdev/rte_ethdev_trace.h </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=3D"http://schema.org/EmailMessage"> <div itemprop=3D"action" itemscope itemtype=3D"http://schema.org/Vi= ewAction"> =20=20=20=20=20=20=20=20=20=20 <link itemprop=3D"url" href=3D"https://bugs.dpdk.org/show_bug.cgi= ?id=3D1184"> <meta itemprop=3D"name" content=3D"View bug"> </div> <meta itemprop=3D"description" content=3D"Bugzilla bug update notif= ication"> </div> </body> </html>= --16788632810.Fa4AAD7.246910--