Bjørn Mork <bj...@mork.no> writes:

> Or give me a few days and I might be able to bisect the problem.

A few meetings helps a lot with time for robotic work like bisecting :-)

The winner is:

commit ec375bd959f071ce01533d50a2775e8a6f69607b
Author: Andrew Lassalle <andrewlassa...@chromium.org>
Date:   Wed Nov 25 13:14:35 2020 -0800

    port-qmi: add support for QRTR
    
    Extend mm-port-qmi to accept a QRTR node to work with modems using the
    QRTR protocol.

:040000 040000 973a59e3f3652ccf07b9909820238279d9efbbc9 
80418a9b0c5af26898d7a6b53e16cd4d720a93e9 M      src

Log:

git bisect start
# bad: [e57c59bf88615129efc0241957749102ea8af90d] qmi: Increase qmi_device_open 
timeout
git bisect bad e57c59bf88615129efc0241957749102ea8af90d
# good: [7a5a49b75301b38c2bac6a94de5afb2f9930cf4e] release: bump version to 
1.16.0
git bisect good 7a5a49b75301b38c2bac6a94de5afb2f9930cf4e
# good: [bb5bc9c8c560a24ef2951bdb9e1da18dedd7c5b0] shared-qmi: process all 
feature checks in SSP response together
git bisect good bb5bc9c8c560a24ef2951bdb9e1da18dedd7c5b0
# good: [7dfe6198e1015c3fcc875d7be17e6b1a925c8e00] iface-modem: publish helper 
to abort invocation if state not reached
git bisect good 7dfe6198e1015c3fcc875d7be17e6b1a925c8e00
# good: [bf519fcc1b591a1435b727e38ef4a108219bd28b] port-qmi: avoid using 
QmiDeviceExpectedDataFormat in the port setup
git bisect good bf519fcc1b591a1435b727e38ef4a108219bd28b
# bad: [f7ec13deb88e9bd292d69ec7442dc892e51f3c52] sim-mbim: increase the 
timeout for the MBIM_CID_HOME_PROVIDER query
git bisect bad f7ec13deb88e9bd292d69ec7442dc892e51f3c52
# bad: [f82f50fb13aa5d0dd85b0b06948cf1a3b1190c66] base-modem: create modem for 
QRTR subsystem
git bisect bad f82f50fb13aa5d0dd85b0b06948cf1a3b1190c66
# bad: [ec375bd959f071ce01533d50a2775e8a6f69607b] port-qmi: add support for QRTR
git bisect bad ec375bd959f071ce01533d50a2775e8a6f69607b
# good: [312f753046b4ceaddef7b45a676a8880bfc9d89d] port-qmi: initialize 
endpoint info for all backends
git bisect good 312f753046b4ceaddef7b45a676a8880bfc9d89d
# first bad commit: [ec375bd959f071ce01533d50a2775e8a6f69607b] port-qmi: add 
support for QRTR


Note that 7dfe6198e1015c3fcc875d7be17e6b1a925c8e00 failed a bit later
with

[10227]: <debug> [1619071156.121734] [qmimux0] preloading contents and 
properties...
[10227]: <warn>  [1619071156.122082] [qmimux0] invalid sysfs path read for 
net/qmimux0
**
ERROR:kerneldevice/mm-kernel-device-generic.c:235:ptr_array_add_sysfs_attribute_link_basename:
 assertion failed: (array && sysfs_path && attribute)
Bail out! 
ERROR:kerneldevice/mm-kernel-device-generic.c:235:ptr_array_add_sysfs_attribute_link_basename:
 assertion failed: (array && sysfs_path && attribute)
Aborted


but that's another temporary problem, so it's therefore noted as
"good".  Thanks for keeping this code bisectable, BTW.  Really great to
be able to build and run arbitrary commits in the middle of a series
like this.


I was pessimistic about my ability to fix or revert what I found, but
looking at the failing commit it turned out to be rather obvious and
easy to fix:

@@ -32,6 +33,16 @@
 
 G_DEFINE_TYPE (MMPortQmi, mm_port_qmi, MM_TYPE_PORT)
 
+enum {
+    PROP_0,
+#if WITH_QMI
+    PROP_NODE,
+#endif
+    PROP_LAST
+};
+
+static GParamSpec *properties[PROP_LAST];
+
 typedef struct {
     QmiService     service;
     QmiClient     *client;
@@ -43,6 +54,10 @@ struct _MMPortQmiPrivate {
     QmiDevice *qmi_device;
     GList     *services;
     gchar     *net_driver;
+#if defined WITH_QRTR
+    QrtrNode  *node;
+#endif
+



There's a bit of inconsistency between WITH_QRTR and WITH_QMI there...

Verified fix attached


Bjørn

>From faaa2b18bbaddbcf4c22512b6c3db6d55104572b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bj...@mork.no>
Date: Thu, 22 Apr 2021 08:47:07 +0200
Subject: [PATCH] port-qmi: fix crash when QRTR is disabled
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fix typo causing crash when WITH_QRTR is undefined:

 [6596]: <debug> [1619029470.854688] [cdc-wdm0/probe] probing QMI...

 Thread 1 "ModemManager" received signal SIGSEGV, Segmentation fault.
 0x77a7310f in install_property_internal () from /usr/lib/libgobject-2.0.so.0
 (gdb) bt
 #0  0x77a7310f in install_property_internal () from /usr/lib/libgobject-2.0.so.0
 #1  0x77a731db in validate_and_install_class_property () from /usr/lib/libgobject-2.0.so.0
 Backtrace stopped: frame did not save the PC

Fixes: ec375bd959f0 ("port-qmi: add support for QRTR")
Signed-off-by: Bjørn Mork <bj...@mork.no>
---
 src/mm-port-qmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mm-port-qmi.c b/src/mm-port-qmi.c
index c74a87b5dc68..51f7153613ee 100644
--- a/src/mm-port-qmi.c
+++ b/src/mm-port-qmi.c
@@ -35,7 +35,7 @@ G_DEFINE_TYPE (MMPortQmi, mm_port_qmi, MM_TYPE_PORT)
 
 enum {
     PROP_0,
-#if WITH_QMI
+#if WITH_QRTR
     PROP_NODE,
 #endif
     PROP_LAST
-- 
2.20.1

_______________________________________________
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Reply via email to