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 52FEE43C18 for ; Wed, 28 Feb 2024 05:32:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 303A5402C4; Wed, 28 Feb 2024 05:32:18 +0100 (CET) Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) by mails.dpdk.org (Postfix) with ESMTP id 0DDA04003C for ; Wed, 28 Feb 2024 05:32:17 +0100 (CET) Received: by mail-qt1-f178.google.com with SMTP id d75a77b69052e-4280f3ec702so13146601cf.0 for ; Tue, 27 Feb 2024 20:32:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709094736; x=1709699536; darn=dpdk.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=lFRwnJaR6PLStenX6pW94yez76q/kE3nW3ZzInq9yZc=; b=BlLz8LISw1ejd108VwSAPPCKkFE5lsLYCQkiOVXh88XvWqSU4Cgm7FKYbwKrVX+1GS w6on+N3OWYq7NhXhBOsDl9Ut45XtdS3ZAvzl0QAvxe4SnfEzUKcmhnlrh+czOMhmpXdi zvGIkB938Xl2mpXs/jp5znT9CqB8mXnToiISyKgkbLyAz9S1v84XTgRCYf1/Ru/ivAjV CCJGelao9pRgXsGa3zth0TGSx4VDbjIf6I/2mbytisIzoMSyCakce8pTTIOg9S57CAN8 uHlmc4cFkbX3t30IkuaeSfOLnk+qLiv1tAI40u6bNM/4ukAj9Lb8Yhw404svBqHEpUux XErA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709094736; x=1709699536; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=lFRwnJaR6PLStenX6pW94yez76q/kE3nW3ZzInq9yZc=; b=wRntk2h91Av1OpMPY2hIXyUg1wOVs5jHJVw191DZP6TTx7SIjVRaJAMjGT1O7MbjFS vBRfbe8TE/wP5KJjN/LtPuP7tgno5c71Rq2ufKoM2dGuFIHBPUuXJCcukG1S7u1pqWWn CsedG2KF6LdVrbqkS+7xCzA3JhfCMxf0MWgG2e7YLJuTp/gJEV14blp+hu6W5jdAaomL u8BTHMdDPcBl9iJ38sh/aWV7fVGsq+C5kw0nd6uswVlOxvubiPuF0QLF86Q8Z6znjIf7 A62V4bMBdkB7mMB7b/Teouj614aZtAbuzmsb2b0hQZtV8h2khde8zTGrCVP0oOxN3jfg jMWQ== X-Gm-Message-State: AOJu0YwkdHHQzXNEGJ8wU7FM+yvlxkvQ2jBSbRDqKWFDLRP0+1+I/gvd O7gTQf5RFAwwjDi6owl0hQlwIFG2OkSGpyQ10d8r/ZSmCTDWIDrGvopW48bjJKK+8BFrWrW+6SR HPR//EGl6gzqx9rCWi6ZepNbMAoaNTqrU3B8= X-Google-Smtp-Source: AGHT+IHa3xFWdDladLuUEybbtwBzglPWFZ3AXofCEimbtS1A2bKgpoSJP0bh1/sQ0jrygaQIxwW6WmMJST2F5WBuxFc= X-Received: by 2002:a05:622a:190a:b0:42e:7e8d:7d33 with SMTP id w10-20020a05622a190a00b0042e7e8d7d33mr9738817qtc.3.1709094736276; Tue, 27 Feb 2024 20:32:16 -0800 (PST) MIME-Version: 1.0 From: narsimharaj pentam Date: Wed, 28 Feb 2024 10:02:04 +0530 Message-ID: Subject: mlx5_stats_get reports crash: invalid ibv_context To: users@dpdk.org Content-Type: multipart/alternative; boundary="000000000000a4b144061269a0f2" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org --000000000000a4b144061269a0f2 Content-Type: text/plain; charset="UTF-8" Hi Team, A crash is observed on MLX5 device while fetching stats "mlx5_stats_get" , looks like *ibv_context* is getting corrupted ( ibctx=0x1ede838800001e) We do access the stats from multiple threads simultaneously , does this create any issue ? Platform details: Platform : VM Hypervisor : Linux KVM Cloud : None Application : 64-bit Datapath : DPDK DPDK : dpdk-22.11.1 Library : libmlx5-rdmav34.so Program terminated with signal 11, Segmentation fault. #0 0x00007ffff0114c83 in mlx5_get_dv_ops (ibctx=0x1ede838800001e) at ../providers/mlx5/mlx5.c:2734 2734 ../providers/mlx5/mlx5.c: No such file or directory. (gdb) bt #0 0x00007ffff0114c83 in mlx5_get_dv_ops (ibctx=0x1ede838800001e) at ../providers/mlx5/mlx5.c:2734 #1 0x00007ffff012f378 in mlx5dv_devx_obj_query (obj=0x27cabd0 , in=0x7fffa6badb20, inlen=32, out=0x7fffa6badb40, outlen=1024) at ../providers/mlx5/verbs.c:5808 #2 0x0000000004fc0eeb in mlx5_devx_cmd_queue_counter_query (dcs=0x31131be2b2c0, clear=clear@entry=0, out_of_buffers=out_of_buffers@entry=0x7fffa6bae010) at ../usbc_gnu_src/drivers/common/mlx5/mlx5_devx_cmds.c:2845 #3 0x00000000052ec96d in mlx5_os_read_dev_stat (priv=priv@entry=0x31131bf66400, ctr_name=, ctr_name@entry=0x5b6fcc2 "out_of_buffer", stat=stat@entry=0x7fffa6bae010) at ../usbc_gnu_src/drivers/net/mlx5/linux/mlx5_os.c:2684 #4 0x00000000053719e4 in mlx5_stats_get (dev=, stats=0x7fffa6bae690) at ../usbc_gnu_src/drivers/net/mlx5/mlx5_stats.c:155 #5 0x0000000005076873 in rte_eth_stats_get () at ../usbc_gnu_src/lib/ethdev/rte_ethdev.c:2733 BR Narsimha --000000000000a4b144061269a0f2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hi Team,


A crash is observed on =C2=A0MLX5 device =C2=A0while=C2=A0 fetching stats "mlx5_stats_get" =C2=A0, looks like ibv_context =C2=A0is getting corrupted=C2=A0 ( ibctx=3D0x1ede838800001e)

=C2=A0

We d= o access the stats from multiple threads =C2=A0simultaneously , does this create any issue ?

=C2=A0

Platform details:

=C2=A0

Platform=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 :=C2=A0=C2=A0=C2=A0=C2=A0 VM

Hypervisor=C2=A0=C2=A0=C2=A0 :=C2=A0=C2=A0=C2=A0=C2=A0 Linux KVM

Cloud=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 :=C2=A0=C2=A0=C2=A0=C2=A0 None

Application=C2=A0=C2=A0 :=C2=A0=C2=A0=C2=A0=C2=A0 64-bit

Datapath=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 :=C2=A0=C2=A0=C2=A0=C2=A0 DPDK

DPDK : dpdk-22.11.1

Library : libmlx5-rdmav34.so

=C2=A0

=C2=A0

Program terminated with signal 11, Segmentation fault.

#0=C2=A0 0x00007ffff0114c83 in mlx5_get_dv_ops (ibctx=3D0x1ede838800001e) at ../providers/mlx5/mlx5.c:2734

2734=C2=A0=C2=A0=C2=A0 ../providers/mlx5/mlx5.c: No such file or directory.

(gdb) bt

#0=C2=A0 0x00007ffff0114c83 in mlx5_get_dv_ops (ibctx=3D0x1ede838800001e) at ../providers/mlx5/mlx5.c:2734

#1=C2=A0 0x00007ffff012f378 in mlx5dv_devx_obj_query (obj=3D0x27cabd0 <SipMedia::SipMedia(SipMedia const&)+1120>, in=3D0x7fffa6badb20, inlen=3D32, out=3D0x7fffa6badb40, outlen=3D1024)

=C2=A0=C2=A0=C2=A0 at ../providers/mlx5/verbs.c:5808=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0

#2=C2=A0 0x0000000004fc0eeb in mlx5_devx_cmd_queue_counter_query (dcs=3D0x31131be2b2c0, clear=3Dclear@entr= y=3D0, out_of_buffers=3Dout_of_buffers@entry=3D0x7fffa6bae010)

=C2=A0=C2=A0=C2=A0 at ../usbc_gnu_src/drivers/common/mlx5/mlx5_devx_cmds.c:2845

#3=C2=A0 0x00000000052ec96d in mlx5_os_read_dev_stat (priv=3Dpriv@entry=3D0x31131bf66400, ctr_name=3D<optimized out>, ctr_name@entry=3D0x5b6fcc2 "out_of_buffer", stat=3Dstat@entry=3D0x7fffa6bae010)

=C2=A0=C2=A0=C2=A0 at ../usbc_gnu_src/drivers/net/mlx5/linux/mlx5_os.c:2684

#4=C2=A0 0x00000000053719e4 in mlx5_stats_get (dev=3D<optimized out>, stats=3D0x7fffa6bae690) at ../usbc_gnu_src/drivers/net/mlx5/mlx5_stats.c:155

#5=C2=A0 0x0000000005076873 in rte_eth_stats_get () at ../usbc_gnu_src/lib/ethdev/rte_ethdev.c:2733

=C2=A0

BR

Narsimha

--000000000000a4b144061269a0f2--