Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9117320ybl; Fri, 17 Jan 2020 06:38:16 -0800 (PST) X-Google-Smtp-Source: APXvYqxCrOEf64bp8lfUzeprEaOr27cgCCsOK0Ov/buh/1zupxxu9v00eCLgM3UjKUhyOBiNko8i X-Received: by 2002:a9d:6f82:: with SMTP id h2mr6214247otq.69.1579271895699; Fri, 17 Jan 2020 06:38:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579271895; cv=none; d=google.com; s=arc-20160816; b=TFl6mrJJPBF89ciew6j1BgQ7qyjQ8WfOk5Vf6gHO89UK1w6HKYxbyHdoCR3U+H1nbY jmEqPpRzUBuX11u+qUfCfTwTWz+77Re5Dz7VhPI5LVQx41tIeChm/iSTVmsivgrizj8j pyipNYqk0MISmxSBVGmgJ54vaN3nt/E/mXFYIAxQMTNAGxBeCOIIjpBsSxZM/YOEIwuZ 8ioNRmpBxQmsOjdsYGFt8z3efbRU9dWgGKSSxQvI6OUOKyYkwASXBAdAzFpSFJi+nV4y Ns7E47loXk/RwuamndBgMT+mnhaQfyxCQyv3/mx8f3trNMGP1YWbuNpiH4Gzbt9SmrlU RHxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=lZFcJOkb9xFI3EaRgQob5TrRRWvhpKiRf5M/zbzi3CM=; b=dmf7LnjgvPL1EJ9768FNkFl7aqJa2axPhOKimRFAqQJx8al5/dmdiHPhs/+wnT3GPC xHivD8Yf30W20ZaNAW9YuAbmNtiaTkYrANPAnREJK/CFgVAjle1uFLsoUuxn/bGDwqej FnxMueNTbmrmPG0phK3CjkEmuoxRv0wX3kbUHb1kXReGzAmqJzHmHRRupRNVaY/4Jg1t i1vQesYN/pYfkoccijVSSKz41HFNmsAxkYu4hmVBdpfRMrl8aAckaFKZu2f6/WjtpAfD x96kMHrxB4bd6CobzPcXCdLsWmp/4J/MNdeyu/dfgrK61ZS9q5CtUPkBLcLR+/FVvIIm bZow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=oN+JegdN; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h64si13685855oif.215.2020.01.17.06.37.54; Fri, 17 Jan 2020 06:38:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=oN+JegdN; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726988AbgAQOgo (ORCPT + 99 others); Fri, 17 Jan 2020 09:36:44 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:37746 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726942AbgAQOgo (ORCPT ); Fri, 17 Jan 2020 09:36:44 -0500 Received: by mail-wr1-f67.google.com with SMTP id w15so22991620wru.4 for ; Fri, 17 Jan 2020 06:36:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silvair-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=lZFcJOkb9xFI3EaRgQob5TrRRWvhpKiRf5M/zbzi3CM=; b=oN+JegdN/E5hIuX55mZMy8h78WkCehD+H7A4FKmvZNeBd9N3fJB4MtJdeaCo0z46I5 L9Js+oCIoCWTPgU+EFTmsh99FLYGWoelO4uxccNxGQz/C+uGhER9OcSZ0N5t/ZrVkl+A vLjArY/XmWymid6yGTBEWBQdd3ypkQM7/ULqB+Nu34PamhTs8ZrGbyHOePsVZ59fJ9Nn BFJRxCy7g11ujB0XRnQrZbRNl2BhHEQGPcJmvl9Ob2sh2sX09ZYVpK6kpGqY9GXxYfJ8 Piwi7n4LXlMT0rZykWSmQhhX9x4Hb9KH/XtpLi44qPp0AY6V304iBuSqhBHmIjkVmQzm o6bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=lZFcJOkb9xFI3EaRgQob5TrRRWvhpKiRf5M/zbzi3CM=; b=IDoCon+W0QqALkO675YRHjVimGS/Mn6V1Pku1fywfGGKiXM/YSbWLuVVp0B1lX8DPQ nzU93wNmrMOKUYECETp8VvPExD5QeGjkMG49lNVCE2zJGvskrUW61XNkNLJ79DHY+j8a 0Da8IX20cQfX5EIVxjFWjXetlZIovGyHtvciSgWOm+7jnqsZr43gX3de8WvxpZ9l6iGp JyjtufzuLzem/3IDaIX6wTWvmPQPkc6GB9b/6B9TRAhbrabhTuA6EUnP7h3PezfOfaTr 87cpKu420aDm6qzyeQ3pZA7m1jL8cgtcAM4LSF3873iAHZ1M/U7j7dFsfhexgCcUv+2q vx+Q== X-Gm-Message-State: APjAAAU+6KLyeOpDlN73dMZIJiARjQVcLSec1UH+e7hVr/VmLQ07QipC OFcWtubrfO7i/2hhHgVj4EkJDw== X-Received: by 2002:a05:6000:118d:: with SMTP id g13mr3257847wrx.141.1579271802236; Fri, 17 Jan 2020 06:36:42 -0800 (PST) Received: from mlowasrzechonek2133 ([217.153.94.18]) by smtp.gmail.com with ESMTPSA id x16sm366671wmk.35.2020.01.17.06.36.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2020 06:36:41 -0800 (PST) Date: Fri, 17 Jan 2020 15:36:40 +0100 From: =?utf-8?Q?Micha=C5=82?= Lowas-Rzechonek To: "Gix, Brian" Cc: "linux-bluetooth@vger.kernel.org" , "Stotland, Inga" Subject: Re: [PATCH BlueZ] mesh: Offload loopback packets to l_idle_onshot() Message-ID: <20200117143640.7erexoeo6bsevnky@mlowasrzechonek2133> Mail-Followup-To: "Gix, Brian" , "linux-bluetooth@vger.kernel.org" , "Stotland, Inga" References: <20200117071604.20675-1-brian.gix@intel.com> <20200117133402.jvnrhoect6olamtk@mlowasrzechonek2133> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Brian, On 01/17, Gix, Brian wrote: > > Hm. I can't seem to wrap my head around this backtrace. Do you maybe > > have a reproduction path? > > The backtrace doesn’t really show what has gone wrong very well, > because what has happened is a heap corruption. The seg fault occurs > during a memory alloc sometime later. > > The physics of the problem, is best shown by local config client > requesting segmented composition data from a local config server. The > one request, all response segments, the return seg ACKs all happen on > the same C calling stack which gets *very* deep, and steps off the > end, since nothing goes OTA. It does *not* happen during OTA > operations because each discrete packet starts from a fresh C calling > stack from main(). Yeah, I got that part - l_idle unwinds the stack so that everything starts from the beginning, it'a pretty standard technique for main loops. What I couldn't find is the exact place where send_msg_pkt recurses, but I think I've found it now, e.g. in this call chain: send_msg_pkt net_rx packet_received seg_rxed send_net_ack mesh_net_transport_send send_msg_pkt <- here In the end: the patch is fine, but maybe change the commit log and/or a comment, since, as you remarked, the backtrace doesn't explain much? regards -- Michał Lowas-Rzechonek Silvair http://silvair.com Jasnogórska 44, 31-358 Krakow, POLAND