From owner-freebsd-net@freebsd.org Fri Dec 1 14:21:38 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97CBAE574C6 for ; Fri, 1 Dec 2017 14:21:38 +0000 (UTC) (envelope-from balint.martina@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 72B9C633FB for ; Fri, 1 Dec 2017 14:21:38 +0000 (UTC) (envelope-from balint.martina@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 6E0A1E574C5; Fri, 1 Dec 2017 14:21:38 +0000 (UTC) Delivered-To: net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DB18E574C4 for ; Fri, 1 Dec 2017 14:21:38 +0000 (UTC) (envelope-from balint.martina@gmail.com) Received: from mail-pg0-x235.google.com (mail-pg0-x235.google.com [IPv6:2607:f8b0:400e:c05::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D170633F9 for ; Fri, 1 Dec 2017 14:21:38 +0000 (UTC) (envelope-from balint.martina@gmail.com) Received: by mail-pg0-x235.google.com with SMTP id m25so4534593pgv.12 for ; Fri, 01 Dec 2017 06:21:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=B8dkqxopCAmLDh8EC5pVrXw3PkdTq4SvBsaLwwHyetE=; b=Rf+aV5tTjLsbyq/a7C1SdXeD1O/UC3DFFAG38B14Dpe/RC+EznpN8G3jZi/PJrP7ww c6bME+ftnntjOCvyBMHXi8R+vYFZAaTSTBnPdzc0dqu/qzj00kxH5fRkT7OusqpoB1rZ dK2+CpzfpFz83h6hocX0xsnj1dwKvkTq87864D42lCk5ofv2gOjHKGFDJjSEBAtYnX2K ofbQsD7D/C50w3RoyKwWZYm6UGJO3MSPKCYEHPvGml//gbWCEcliugfViWD298anRO4A 9B+f/qImFpze081y2T5ud9n5G4NGMLNLwCRRnjGVcGFYcqiJ3AKlPIpT0ItC109JhtaP xG8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=B8dkqxopCAmLDh8EC5pVrXw3PkdTq4SvBsaLwwHyetE=; b=qs2ZF7v2pLTvIcek+E/uPx4VM+c4mWWBb/C/1nQEiBbjQ6HwfgVocaekoXoEqN9jMg bQiQHsdR3IGA9uKjhXzg+yyTSvWAqB2Gz5Y03E/umM0mUSK75zeEpzo3DDyp8u6U9F1K R1al3f0UIetGMSEpN67lFgoR++f3vEtAFesAIQMLfRLw0PZWkjghODd5OKqWUlO1TJYg DMhIyUQ+gw4At1PxrzImXP7g6+yN9CDAqiT3E8VND+5Yn7+Zs36FS568lVfIbn3XFs4L yu3PXUuyRyqC1dsdINb2uJCDDmxJd7h4PyW3cQ9rR4YFF4/7oKePfcOjdG9YGNTcmoQX Wirg== X-Gm-Message-State: AJaThX7HPn+2OKw0O1tPuWwtxpKQiThWHljzdSGli8p7Pcj7cbh6yQgj y4iIlzG7GLrS/ojYfQ1rHPAGJ/7bPbREfQWGZOQ= X-Google-Smtp-Source: AGs4zMZQj7YgcYRg4uyZDtX/0gxGWBnIvUmFFXKOgo4dBkTaHBZ/Kkh1mc6uSBEDtsGNOe9IcnOrNuSFJVI+mY6N36o= X-Received: by 10.98.178.137 with SMTP id z9mr10537650pfl.114.1512138097584; Fri, 01 Dec 2017 06:21:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.236.167.142 with HTTP; Fri, 1 Dec 2017 06:21:36 -0800 (PST) Received: by 10.236.167.142 with HTTP; Fri, 1 Dec 2017 06:21:36 -0800 (PST) In-Reply-To: References: From: Martina Balintova Date: Fri, 1 Dec 2017 14:21:36 +0000 Message-ID: Subject: Netmap ouch double free To: net@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Dec 2017 14:21:38 -0000 Hi, I am currently playing with lb app in netmap. Every time I kill/close it, the app hangs for some time and does not end immediately. In syslogs I am getting: ' Netmap_do_unregif deleting last instance for myapp{1 Netmap_do_deref active=5 Netnap_obj_free ouch, double free on buffer 27777 Netmap_extra_free freed 0 buffers ' This happens when I have some consumer on the pipe and at some point during whole lb lifetime, it did not consume all packets (resulting in oq being filled or packets being dropped). If the pipe did not ever have a consumer, then it will not end up in the double free. I am finding it quite hard to debug in gdb, as this is happening at the shutdown. Could someone pls point me to reason? I am running lb with one interface and 2 groups, different numb of pipes per group and this happens even with no extra buffers. Martina