Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp706042ybg; Wed, 3 Jun 2020 11:23:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsVIB1nLvI4BppdtNQ36hzuLFA1fuDFVMgmAvg7QbFTGG6KHnBV1RL/h76Fy7JssfnJ/V6 X-Received: by 2002:a17:906:c2c6:: with SMTP id ch6mr562745ejb.36.1591208634953; Wed, 03 Jun 2020 11:23:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591208634; cv=none; d=google.com; s=arc-20160816; b=cQKQFMKb/G+VATqp9TN/8a0l/zNohzzU8C5JB6j8Pasb5OL6LLPBt8ZA0KYMh+tzGD ivHHSTPWDjAHgTd4cCruNZ8sm46pvnbuiLTQL9pNOIGrCXfb1jDvolNkMeDQITPvmttB JOzzaRn47iecBqUf0lD3kEyUwclaQA+aIaCebg0MXMdEWaKSz6hGyJ5up9isJtHBffH+ 8j+sYv2cVMDNVSDxgTDQ7tSCQ73NocTIiUmyYmXLhlEgO4mgyfaWmGfxpWxK+Fk6Q3yG fUPrY+1I2MYvuFegYQ6TPh5UI9EOwcjNjxLenNZIXRLDlW5HgqR1pM4P+02hnQDFPU1P TuBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=qtk3d48GZKqQPiCGMf66/sanUiiyzy5OiciyHOy0SUU=; b=scgtOdJ/7ZmxCNrxFmxxdFuZ8QAniJaisPY7X+1wRSP8yDHPLd6HDI1npWmqSAEFC5 OtCrdf3bNSXz/NXlO2eXDn6kLojYtreosj4ikNIejmgi9h+HlsCPYtATwVUqmZOpeKUR zWi5mIU6qo8Z7U+lDz+xuO+69ZlnNzdkzq8h+IrPT5hjVX8Wn3w8Y/l0bhSs8RHzAMwB m9aGjgwx3DejaY9gg5LVItyu70o1Wec3ljRm7CKZFfl9ZM7IAVgXZxj9bTw/zSjrqbTm WgjYqMe1fGs0lacLMtUCb2diyI7G/T9v88BSnS+BoqCh79i+FklVeLrEzlk6W1p1WZSm +u0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VGSfLSh9; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k14si165099edq.542.2020.06.03.11.23.22; Wed, 03 Jun 2020 11:23:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VGSfLSh9; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726072AbgFCSWj (ORCPT + 99 others); Wed, 3 Jun 2020 14:22:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725821AbgFCSWi (ORCPT ); Wed, 3 Jun 2020 14:22:38 -0400 Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24CCFC08C5C0 for ; Wed, 3 Jun 2020 11:22:38 -0700 (PDT) Received: by mail-qt1-x82a.google.com with SMTP id g18so2869951qtu.13 for ; Wed, 03 Jun 2020 11:22:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qtk3d48GZKqQPiCGMf66/sanUiiyzy5OiciyHOy0SUU=; b=VGSfLSh9K71NZ5CAnTNhOnUm88A1gP5om7Au6ebzMIfkHFTxbkq4ITNWWt68CaCsiu u6VPzeG0wsrTyYICiv1L9kYvE9lUzv/JqvyYCIWf/KuMGgxfbeedg57yNXwaXrbjQMQT 4GpUmamIG7DCf/w/95kjoDchDmy8nh6PD3Mg4wcDVD11ABrvhzE9B2hMDhR/eIVK79fG GDxKmQZzXeVeNvEWr6kI/p/VfDLVngr0YeEVQOFl5sjdHHe9L/CEg4yKv+wrpLpbQAbK 3Kz1ti+2ETpKTKUU13w2bzeGuErXIU5Fk82FXlB+cFtSq21FG0/kFe0bAyhT/0ouquMI 46oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qtk3d48GZKqQPiCGMf66/sanUiiyzy5OiciyHOy0SUU=; b=kkN4C3+vFzjbl1gQmO5CALeEysiWN9bo7AhZHj/9wGRQe+xKZo8hnsSF1ojEUK8zbk 3JmP3GjcrfcI7BvTcNGmacicRlArMj4WF5PCVZdZm9V/jikekYnaFBKs9G97C3tQgJvH Bo4/VZ7oIT6kP1gFOy5zzjwB14j71l+Au79rMJESBl8UHgLCCW3AbVgeAUulR9mb9jHX 19zi97gPxO/9/KGnKNdgQdpOr/yHmTI71arxHCnx5cfH8vBKkbN4+LeqdryK4oz+UTnA 24UKzFG4lki2+WEaTIS5pnRBdZD/ot49/ceKSM32GX66wLDZiyLlPN6LtYl42ENpZkn0 2vMw== X-Gm-Message-State: AOAM530vr8Vxpmm4ThAtAuSJMMv0sKfhdR6M9X8Vzon15leH6MwFYueK 2FQY9f4cPeP/FlXDcVBBOc3hBiZnHhKzqSvaFmE= X-Received: by 2002:ac8:3f88:: with SMTP id d8mr691865qtk.164.1591208556444; Wed, 03 Jun 2020 11:22:36 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Arthur Lambert Date: Wed, 3 Jun 2020 20:22:25 +0200 Message-ID: Subject: Re: Segmentation fault in bluetoothd with btgatt-client To: Luiz Augusto von Dentz Cc: "linux-bluetooth@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Luiz, thanks for your reply! Sorry I am lazy and stupid. I know that your next question will be around symbol... After removing the binary strip option and enable debug symbol : bluetoothd[246]: src/device.c:device_svc_resolved() /org/bluez/hci0/dev_80_32_53_37_58_A6 err -5 bluetoothd[246]: src/device.c:gatt_debug() Read By Grp Type - start: 0x00bb end: 0xffff bluetoothd[246]: src/device.c:gatt_debug() Read By Grp Type - start: 0x0001 end: 0xffff bluetoothd[246]: src/device.c:gatt_debug() Read By Type - start: 0x0001 end: 0x00ba bluetoothd[246]: src/device.c:gatt_debug() Read By Type - start: 0x0001 end: 0x00ba bluetoothd[246]: src/device.c:gatt_debug() Read By Type - start: 0x002a end: 0x00ba bluetoothd[246]: src/device.c:gatt_debug() Read By Type - start: 0x0053 end: 0x00ba bluetoothd[246]: src/device.c:gatt_debug() Read By Type - start: 0x007a end: 0x00ba bluetoothd[246]: src/device.c:gatt_debug() Read By Type - start: 0x00a3 end: 0x00ba bluetoothd[246]: src/device.c:gatt_debug() Read By Type - start: 0x00ba end: 0x00ba bluetoothd[246]: src/device.c:gatt_debug() Read By Type - start: 0x0001 end: 0xffff bluetoothd[246]: src/gatt-database.c:db_hash_read_cb() Database Hash read ==246== Invalid read of size 1 ==246== at 0x4831BA4: memcpy (vg_replace_strmem.c:1035) ==246== by 0x87F3B: read_by_type_read_complete_cb (gatt-server.c:392) ==246== by 0x892AB: pending_read_result (gatt-db.c:145) ==246== by 0x8B2FB: gatt_db_attribute_read_result (gatt-db.c:1866) ==246== by 0x3AB0B: db_hash_read_cb (gatt-database.c:1156) ==246== by 0x8B1AB: gatt_db_attribute_read (gatt-db.c:1825) ==246== by 0x87DB7: process_read_by_type (gatt-server.c:482) ==246== by 0x8854F: read_by_type_cb (gatt-server.c:559) ==246== by 0x81727: handle_notify (att.c:966) ==246== by 0x81873: can_read_data (att.c:1057) ==246== by 0x8B91B: watch_callback (io-glib.c:170) ==246== by 0x488A413: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.5600.3) ==246== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==246== ==246== ==246== Process terminating with default action of signal 11 (SIGSEGV) ==246== Access not within mapped region at address 0x0 ==246== at 0x4831BA4: memcpy (vg_replace_strmem.c:1035) ==246== by 0x87F3B: read_by_type_read_complete_cb (gatt-server.c:392) ==246== by 0x892AB: pending_read_result (gatt-db.c:145) ==246== by 0x8B2FB: gatt_db_attribute_read_result (gatt-db.c:1866) ==246== by 0x3AB0B: db_hash_read_cb (gatt-database.c:1156) ==246== by 0x8B1AB: gatt_db_attribute_read (gatt-db.c:1825) ==246== by 0x87DB7: process_read_by_type (gatt-server.c:482) ==246== by 0x8854F: read_by_type_cb (gatt-server.c:559) ==246== by 0x81727: handle_notify (att.c:966) ==246== by 0x81873: can_read_data (att.c:1057) ==246== by 0x8B91B: watch_callback (io-glib.c:170) ==246== by 0x488A413: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.5600.3) ==246== If you believe this happened as a result of a stack ==246== overflow in your program's main thread (unlikely but ==246== possible), you can try to increase the size of the ==246== main thread stack using the --main-stacksize= flag. ==246== The main thread stack size used in this run was 8388608. /usr/bin/bluetoothd: can't resolve symbol '__libc_freeres' is it the crypto error that you expect? Could you share a sha1 commit or a link to the patch to test the potential fix? Thanks !