Thoughts on what happens when qmi-proxy dies ?

Aleksander Morgado aleksander at aleksander.es
Fri May 1 10:40:39 PDT 2015


Hey,

>
> I have been trying to reproduce as problem here that sees a modem get stuck
> "disabling".  While I haven't managed to force that state to happen
> I did manage to cause qmi-proxy to crash and ModemManager is unable
> to recover.
>
> I thought that once comms to qmi-proxy failed MM might start a new one or
> recover (obviously,  qmi-proxy should not crash either).  Perhaps its a
> libqmi issue ? Thoughts ?
>
> Code is fairly recent:
>
>     libqmi version: 739fc4f183c18d7d8b3158a0843046ad2d2edd4f
>     ModemManager version: 3b2ed15abdb12a1a55404897dcffb447ac035d87
>
> I am not really after a solution here,  just was to pass this on and see
> what the general opinion of the situation was.  If anyone has seen the
> "stuvk disabling" problem I would be interested in that also :-)
>
> The test I was running was basically this:
>
>     while :; do
>         mmcli -m 0 -e
>         sleep 60
>         mmcli -m 0 -d
>     done
>
> There was another daemon doing similar things at the same time (not normal
> operation but I am trying to get something weird to happen).
>
> The crash I got from qmi-proxy looks like this.  I don't have a core
> as its an embedded system with a Sierra Wireless 7354 modem:
>
>     qmi-proxy[208] killed because of sig - 11
>     STACK DUMP:
>     0xbe834c20: 0001f948 0001f948 000177a0 b6bc5ec4 0001f948 0001f948 000177a0
>     0xbe834c3c: b6d3d8d0 be834c78 0001f948 00000000 b6d3cb8c 00019a90 b6aedff8
>     0xbe834c58: b6aedfec 00019a90 be834c78 00000000 be834c74 be834c70 0002a5b8
>     0xbe834c74: b6bc5eb0 0001f948 00000000 00000000 00000001 00019a90 00027b88
>     0xbe834c90: 00000116 b6d4c414 be834cb8 00000008 00000001 b6d3cebc 00000007
>     0xbe834cac: b6e0b9ac b6e0b9ac 00000001 00000116 7fffffff 00000000 0001ea58
>     0xbe834cc8: 00000001 0001b0a0 0001ea60 00000000 00000000 b6f96f74 00000000
>     0xbe834ce4: b6d3d43c 00000000 b6f8e204 0001ea58 00000000 00011448 be834e58
>     0xbe834d00: 00008938 00008f94 00000000 00000000 be834ee4 00000001 be834d40
>     0xbe834d1c: 00000000 00011254 be834fa8 00000008 b6b73ad4 b6b82000 be834ee4
>     CPU: 0 PID: 208 Comm: qmi-proxy Tainted: G           O   3.18.0-uc0 #84
>     task: c7089500 ti: c71be000 task.ti: c71be000
>     PC is at 0xb6bc45d8
>     LR is at 0xb6bc5ec4
>     pc : [<b6bc45d8>]    lr : [<b6bc5ec4>]    psr: a0000010
>     sp : be834c20  ip : b6e0b498  fp : 00019a90
>     r10: b6d3d898  r9 : 00029e68  r8 : 00000000
>     r7 : b6e0b7f8  r6 : 000177a0  r5 : 00000000  r4 : 0002a848
>     r3 : 00000000  r2 : 0002a5b8  r1 : 00000000  r0 : 0002a848
>     Flags: NzCv  IRQs on  FIQs on  Mode USER_32  ISA ARM  Segment user
>     Control: 10c5387d  Table: 07124019  DAC: 00000015
>     CPU: 0 PID: 208 Comm: qmi-proxy Tainted: G           O   3.18.0-uc0 #84
>     [<c0013830>] (unwind_backtrace) from [<c0010e7c>] (show_stack+0x10/0x14)
>     [<c0010e7c>] (show_stack) from [<c00cf108>] (do_coredump+0xe4/0x10d8)
>     [<c00cf108>] (do_coredump) from [<c00279c4>] (get_signal+0x160/0x4d4)
>     [<c00279c4>] (get_signal) from [<c0010720>] (do_signal+0x18c/0x3d0)
>     [<c0010720>] (do_signal) from [<c0010ae0>] (do_work_pending+0x88/0xc8)
>     [<c0010ae0>] (do_work_pending) from [<c000e200>] (work_pending+0xc/0x20)
>     00008000-0000a000 r-xp 00000000 1f:05 981 /libexec/qmi-proxy
>     00011000-00012000 rw-p 00001000 1f:05 981 /libexec/qmi-proxy
>     00012000-0002b000 rw-p 00012000 1f:05 981
>     b5ac6000-b5ac7000 ---p b5ac6000 1f:05 981
>     b5ac7000-b62c6000 rw-p b5ac7000 1f:05 981
>     b62c6000-b62c7000 ---p b62c6000 1f:05 981
>     b62c7000-b6ac6000 rw-p b62c7000 1f:05 981
>     b6ac6000-b6ad7000 r-xp 00000000 1f:05 492 /lib/libz.so.1.2.3
>     b6ad7000-b6ade000 ---p b6ad7000 1f:05 492
>     b6ade000-b6adf000 rw-p 00010000 1f:05 492 /lib/libz.so.1.2.3
>     b6adf000-b6af1000 r-xp 00000000 1f:05 484 /lib/libpthread-0.9.33.2.so
>     b6af1000-b6af8000 ---p b6af1000 1f:05 484
>     b6af8000-b6af9000 r--p 00011000 1f:05 484 /lib/libpthread-0.9.33.2.so
>     b6af9000-b6afa000 rw-p 00012000 1f:05 484 /lib/libpthread-0.9.33.2.so
>     b6afa000-b6afc000 rw-p b6afa000 1f:05 484
>     b6afc000-b6aff000 r-xp 00000000 1f:05 712 /lib/libdl-0.9.33.2.so
>     b6aff000-b6b06000 ---p b6aff000 1f:05 712
>     b6b06000-b6b07000 r--p 00002000 1f:05 712 /lib/libdl-0.9.33.2.so
>     b6b07000-b6b08000 rw-p 00003000 1f:05 712 /lib/libdl-0.9.33.2.so
>     b6b08000-b6b0a000 r-xp 00000000 1f:05 323 /lib/libgmodule-2.0.so.0.3503.0
>     b6b0a000-b6b12000 ---p b6b0a000 1f:05 323
>     b6b12000-b6b13000 rw-p 00002000 1f:05 323 /lib/libgmodule-2.0.so.0.3503.0
>     b6b13000-b6b1a000 r-xp 00000000 1f:05 620 /lib/libffi.so.6.0.1
>     b6b1a000-b6b21000 ---p b6b1a000 1f:05 620
>     b6b21000-b6b22000 rw-p 00006000 1f:05 620 /lib/libffi.so.6.0.1
>     b6b22000-b6b7a000 r-xp 00000000 1f:05 619 /lib/libuClibc-0.9.33.2.so
>     b6b7a000-b6b81000 ---p b6b7a000 1f:05 619
>     b6b81000-b6b82000 r--p 00057000 1f:05 619 /lib/libuClibc-0.9.33.2.so
>     b6b82000-b6b83000 rw-p 00058000 1f:05 619 /lib/libuClibc-0.9.33.2.so
>     b6b83000-b6b8a000 rw-p b6b83000 1f:05 619
>     b6b8a000-b6ce1000 r-xp 00000000 1f:05 598 /lib/libqmi-glib.so.1.2.0
>     b6ce1000-b6ce8000 ---p b6ce1000 1f:05 598
>     b6ce8000-b6cef000 rw-p 00156000 1f:05 598 /lib/libqmi-glib.so.1.2.0
>     b6cef000-b6cf7000 r-xp 00000000 1f:05 430 /lib/libintl.so.8.0.1
>     b6cf7000-b6cf8000 rw-p 00008000 1f:05 430 /lib/libintl.so.8.0.1
>     b6cf8000-b6e03000 r-xp 00000000 1f:05 668 /lib/libglib-2.0.so.0.3503.0
>     b6e03000-b6e0b000 ---p b6e03000 1f:05 668
>     b6e0b000-b6e0c000 rw-p 0010b000 1f:05 668 /lib/libglib-2.0.so.0.3503.0
>     b6e0c000-b6e53000 r-xp 00000000 1f:05 443 /lib/libgobject-2.0.so.0.3503.0
>     b6e53000-b6e5a000 ---p b6e53000 1f:05 443
>     b6e5a000-b6e5c000 rw-p 00046000 1f:05 443 /lib/libgobject-2.0.so.0.3503.0
>     b6e5c000-b6f7d000 r-xp 00000000 1f:05 691 /lib/libgio-2.0.so.0.3503.0
>     b6f7d000-b6f84000 ---p b6f7d000 1f:05 691
>     b6f84000-b6f87000 rw-p 00120000 1f:05 691 /lib/libgio-2.0.so.0.3503.0
>     b6f87000-b6f88000 rw-p b6f87000 1f:05 691
>     b6f88000-b6f8f000 r-xp 00000000 1f:05 477 /lib/ld-uClibc-0.9.33.2.so
>     b6f93000-b6f96000 rw-p b6f93000 1f:05 477
>     b6f96000-b6f97000 r--p 00006000 1f:05 477 /lib/ld-uClibc-0.9.33.2.so
>     b6f97000-b6f98000 rw-p 00007000 1f:05 477 /lib/ld-uClibc-0.9.33.2.so
>     be813000-be835000 rw-p befde000 1f:05 477
>     be86b000-be86c000 r-xp be86b000 1f:05 477
>
> After this running mmcli to enable teh modem results in:
>
>     # mmcli -m 0 -e
>     error: couldn't enable the modem: 'GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code44: QMI operation failed: Cannot write message: Error sending data: Broken pipe'
>     #
>

Here's what I think the logic should look like:
 * First, of course qmi-proxy shouldn't die :) Whatever the bug was,
it should get fixed. Hard to guess without a backtrace, though...
 * Second, if qmi-proxy dies libqmi-glib should notify the users (e.g.
ModemManager) that the device should be re-probed from scratch. We
cannot transparently recreate the proxy and go on as if nothing had
happened because we no longer know which clients the dead proxy had
allocated or which was the ongoing transaction id in each client. Of
course, this step is not very clean, but this should really be a
fallback in case the proxy dies, which shouldn't happen itself.
libmbim already has the "device-removed" signal which IIRC could
notify this situation, we should do something similar in libqmi.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list