Bug 77335 - segfault in qmi-proxy
Summary: segfault in qmi-proxy
Alias: None
Product: libqmi
Classification: Unclassified
Component: libqmi (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Dan Williams
QA Contact:
Depends on:
Reported: 2014-04-11 15:50 UTC by Albert Diserholt
Modified: 2014-10-10 12:27 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

Quick fix. (1.60 KB, text/plain)
2014-04-11 15:50 UTC, Albert Diserholt

Description Albert Diserholt 2014-04-11 15:50:24 UTC
Created attachment 97226 [details]
Quick fix.

qmi-proxy can segfault due to a race condition when a new request has just been accepted, but the device not yet opened, and a device closing.

[10 Apr 2014, 08:53:05] [Debug] client connection open...
[10 Apr 2014, 08:53:05] [Debug] valid request to open connection to QMI device file: /dev/cdc-wdm1
[10 Apr 2014, 08:53:05] [Debug] client connection closed
[10 Apr 2014, 08:53:05] -Error ** qmi_device_get_path: assertion `QMI_IS_DEVICE (self)' failed

Program received signal SIGSEGV, Segmentation fault.
0xb7ab3724 in strcmp () from /lib/i386-linux-gnu/libc.so.6
(gdb) bt
#0  0xb7ab3724 in strcmp () from /lib/i386-linux-gnu/libc.so.6
#1  0xb7d648a3 in g_str_equal () from /lib/i386-linux-gnu/libglib-2.0.so.0
#2  0xb7bc8278 in get_n_clients_with_device (device=0x805ba58, self=0x8055000) at qmi-proxy.c:146
#3  connection_close (client=client@entry=0x80555a0) at qmi-proxy.c:168
#4  0xb7bc8977 in connection_readable_cb (socket=0x8060a88, condition=17, client=0x80555a0) at qmi-proxy.c:564
#5  0xb7ee630b in ?? () from /usr/lib/i386-linux-gnu/libgio-2.0.so.0
#6  0xb7d746d3 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#7  0xb7d74a70 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#8  0xb7d74ecb in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#9  0x08048e7b in main (argc=1, argv=0xbffffdd4) at qmi-proxy.c:212
Comment 1 Aleksander Morgado 2014-10-10 12:27:51 UTC
Sorry for the delay; not sure why I didn't remember about this.

Pushed now to git master and the stable qmi-1-10 branch.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.