From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5047FA04DD for ; Fri, 23 Oct 2020 16:38:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AD268A90A; Fri, 23 Oct 2020 16:38:41 +0200 (CEST) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by dpdk.org (Postfix) with ESMTP id 7A40CA909 for ; Fri, 23 Oct 2020 16:38:39 +0200 (CEST) Received: by mail-wr1-f42.google.com with SMTP id h5so2127073wrv.7 for ; Fri, 23 Oct 2020 07:38:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=1yW93syr9IDdjeczgXRYXZ7h4nWfEtwSHF+ApEceQ9A=; b=iNR3WZwze19uuLBZzJH2NaIMCrtUsbfuLGj57RSxx2mrNM1azVGJgntlo3CKTEBFzl 6oF2YjcZClf60v+Yrag3TB+Xc5cxLy20y4wSMrPApPgiHG9hEnXvl693oLWDFnoU3LAf xYe8cLH7heQ8W1aTn6M+cttR0hMtm7WPn3qO8LZS6tXYqQynuHyvcEQ48XqRhq+2bqDM +GEXZ4Iqu3V578HXG/Tk6/42x0fkYC9iNgD9FtQmQrgCIJF3tBVs/FagfkYE52N99kdG pjCBZmuRBjW07ujr02rnsZvD8jZdk0nLqxgjKk57uIVkgQF0AUusqL+dDN8pO9vZKcj7 qhdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=1yW93syr9IDdjeczgXRYXZ7h4nWfEtwSHF+ApEceQ9A=; b=Y6c4E/X4mfaHZsD4n/DmQI52APtixyZ2hrb9Vx56NxpqUB7nitDJP/G0Mz15wo51F4 sYwiEZpkl1A9mTlaPuh5ashDyTicbMjCXV8+/peRWiyNpa8z6HzegAoSNXiG5xSmDawa OSdcK+G94NEa/ucGSkKCDgduaWUTlSKsDiWrIYWBCUZAG7JXCADef5eQ/c2V/IfP84Tl iWW+hBVhLzZLkJK3Fe01x8WOmFH96ttdfiNOTw64QpZF35kUkFOM3GN/heUpqR5ZGC34 hoa6uw/a1RwxJBbKtWVo1BFSx/4YXpvb/q7sClBWEzdP5VpBX7Ri80sO3ESjcYVHvHS9 sVCw== X-Gm-Message-State: AOAM532z1fQ9qkXj/I3zZOAT+arS7k+wYL7USSyX10C9wXM4bnOsvdaP NOGkpxykdxdzsrOcrLje4HYKqjBgJ0ZN4A/p X-Google-Smtp-Source: ABdhPJy3jxIlsV4oIwWtM9odHPZoZjZZwle1McQMDCPq8pmSefJLzLFgGoOqXs7j4TmPWUSDpjaHlQ== X-Received: by 2002:adf:f289:: with SMTP id k9mr3216246wro.0.1603463918733; Fri, 23 Oct 2020 07:38:38 -0700 (PDT) Received: from [192.168.1.9] ([5.113.85.244]) by smtp.gmail.com with ESMTPSA id t12sm3799537wrm.25.2020.10.23.07.38.37 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Oct 2020 07:38:38 -0700 (PDT) To: users@dpdk.org From: Farbod Message-ID: <0123fbc4-ceda-e67f-dbef-959129a95303@gmail.com> Date: Fri, 23 Oct 2020 18:08:35 +0330 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Subject: [dpdk-users] Segfault while freeing mbuf in the primary process X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" Hi, I am using DPDK multi-processor mode for sending packets from one application (secondary) to another application (primary) using rings. The primary applications role is to just free the packet with `rte_pktmbuf_free()`. I encounter a SEGFAULT error in the line of `rte_pktmbuf_free()`. My DPDK version is 19.11.1. ``` Signal: 11 (Segmentation fault), si_code: 1 (SEGV_MAPERR: address not mapped to object) Backtrace (recent calls first) --- (0): (+0x81a1ee) [0x562d35df51ee]     bucket_enqueue_single at ---/dpdk-19.11.1/drivers/mempool/bucket/rte_mempool_bucket.c:111 (discriminator 3)          108:   addr &= bd->bucket_page_mask;          109:   hdr = (struct bucket_header *)addr; 110:       -> 111:   if (likely(hdr->lcore_id == lcore_id)) {          112:           if (hdr->fill_cnt < bd->obj_per_bucket - 1) {          113: hdr->fill_cnt++;          114:           } else {      (inlined by) bucket_enqueue at ---/dpdk-19.11.1/drivers/mempool/bucket/rte_mempool_bucket.c:148 (discriminator 3)          145:   int rc = 0; 146:          147:   for (i = 0; i < n; i++) {       -> 148:           rc = bucket_enqueue_single(bd, obj_table[i]);          149:           RTE_ASSERT(rc == 0);          150: } [0x562d35cd2f8c]     rte_mempool_ops_enqueue_bulk at ---/dpdk-19.11.1/build/include/rte_mempool.h:786       -> 786:   return ops->enqueue(mp, obj_table, n);      (inlined by) __mempool_generic_put at ---/dpdk-19.11.1/build/include/rte_mempool.h:1329       -> 1329:          rte_mempool_ops_enqueue_bulk(mp, &cache->objs[cache->size],      (inlined by) rte_mempool_generic_put at ---/dpdk-19.11.1/build/include/rte_mempool.h:1365       -> 1365:  __mempool_generic_put(mp, obj_table, n, cache);      (inlined by) rte_mempool_put_bulk at ---/dpdk-19.11.1/build/include/rte_mempool.h:1388       -> 1388:  rte_mempool_generic_put(mp, obj_table, n, cache);      (inlined by) rte_mempool_put at ---/dpdk-19.11.1/build/include/rte_mempool.h:1406       -> 1406:  rte_mempool_put_bulk(mp, &obj, 1);      (inlined by) rte_mbuf_raw_free at ---/dpdk-19.11.1/build/include/rte_mbuf.h:579       -> 579:   rte_mempool_put(m->pool, m);      (inlined by) rte_pktmbuf_free_seg at ---/dpdk-19.11.1/build/include/rte_mbuf.h:1223       -> 1223:          rte_mbuf_raw_free(m);         151:   if (local_stack->top > bd->bucket_stack_thresh) {        (inlined by) rte_pktmbuf_free at ---/rte_mbuf.h:1244       -> 1244: rte_pktmbuf_free_seg(m);      (inlined by) ?? at --- /packet.h:199       -> 199:     rte_pktmbuf_free(reinterpret_cast(pkt)); ``` I have made sure that primary and secondary process does not share any cpu in common. The packets received in the primary application are valid and the information inside them is readable. It only runs in to SEGFAULT when I am trying to free the mubf structures. I would like to mention that the applications are in two different projects and are built separately. Thank you