ZTE MF683

Shawn J. Goff shawn7400 at gmail.com
Fri Sep 21 12:15:47 PDT 2012


Here are my CLFAGS; it has -O0, -ggdb, and -DMESSAGE_ENABLE_TRACE.

CFLAGS = -DMESSAGE_ENABLE_TRACE -Wall -std=gnu89  -pipe -ggdb -O0
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-Wmissing-declarations -Wmissing-prototypes
-Wdeclaration-after-statement -Wstrict-prototypes -fno-strict-aliasing
-Wno-deprecated-declarations -Wint-to-pointer-cast -Wfloat-equal
-Wno-unused-parameter -Wno-sign-compare -Wundef
-Wimplicit-function-declaration -Wpointer-arith -Winit-self -Wshadow
-Wmissing-include-dirs -Waggregate-return -Werror


Below is another session. First, I tried looking at buffer_size so I
could run a backtrace before the assersion failed; that didn't work.
Somehow the assersion failed even when buffer_size was >=1. Then I
just ran a backtrace every time that function was called.


If it is preferable, I can lend out the modem (and possibly other ZTE
and Huawei modems in our stash). I could also set this box up with
remote access. If there is a libqmi-dev chat room where you guys hang
out, I can get on there to me more interactive and maybe not clutter
up the mailing list.


(gdb) start
Temporary breakpoint 1 at 0x14650: file qmicli.c, line 470.
Starting program: /usr/bin/qmicli --nas-get-signal-strength -d /dev/cdc-wdm1
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".

Temporary breakpoint 1, main (argc=4, argv=0xbed36d74) at qmicli.c:470
470     qmicli.c: No such file or directory.
(gdb) break qmi_utils_read_guint8_from_buffer
Breakpoint 2 at 0x401635f8: file qmi-utils.c, line 69.
(gdb) start
The program being debugged has been started already.
Start it from the beginning? (y or n) n
Program not restarted.
(gdb) continue
Continuing.
[New Thread 0x40ddb470 (LWP 472)]

Breakpoint 2, qmi_utils_read_guint8_from_buffer (buffer=0xbed36ae5,
    buffer_size=0xbed36ae5, out=0xbed36ae6 "\002") at qmi-utils.c:69
69      qmi-utils.c: No such file or directory.
(gdb) print *buffer_size
$1 = 512
(gdb) continue
Continuing.

Breakpoint 2, qmi_utils_read_guint8_from_buffer (buffer=0xbed36ae8,
    buffer_size=0xbed36ae6, out=0xbed36ae5 "\003\001") at qmi-utils.c:69
69      in qmi-utils.c
(gdb) print *buffer_size
$2 = 1
(gdb) continue
Continuing.

Breakpoint 2, qmi_utils_read_guint8_from_buffer (buffer=0x39ac0,
    buffer_size=0x40388, out=0x40376000 "\260N\021") at qmi-utils.c:69
69      in qmi-utils.c
(gdb) print *buffer_size
$3 = 65232
(gdb) continue
Continuing.

Breakpoint 2, qmi_utils_read_guint8_from_buffer (buffer=0x39ac0,
    buffer_size=0x40388, out=0x40376000 "\260N\021") at qmi-utils.c:69
69      in qmi-utils.c
(gdb) print *buffer_size
$4 = 65232
(gdb) continue
Continuing.
**
ERROR:qmi-utils.c:72:qmi_utils_read_guint8_from_buffer: assertion
failed: (*buffer_size >= 1)
[Thread 0x40ddb470 (LWP 472) exited]

Program received signal SIGABRT, Aborted.
0x4049c7cc in raise () from /lib/libc.so.6
(gdb) continue
Continuing.

Program terminated with signal SIGABRT, Aborted.
The program no longer exists.
(gdb) start
Temporary breakpoint 3 at 0x14650: file qmicli.c, line 470.
Starting program: /usr/bin/qmicli --nas-get-signal-strength -d /dev/cdc-wdm1
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".

Temporary breakpoint 3, main (argc=4, argv=0xbeff2d74) at qmicli.c:470
470     qmicli.c: No such file or directory.
(gdb) continue
Continuing.
[New Thread 0x40e66470 (LWP 474)]

Breakpoint 2, qmi_utils_read_guint8_from_buffer (buffer=0xbeff2ae5,
    buffer_size=0xbeff2ae5, out=0xbeff2ae6 "\002") at qmi-utils.c:69
69      qmi-utils.c: No such file or directory.
(gdb) bt
#0  qmi_utils_read_guint8_from_buffer (buffer=0xbeff2ae5,
    buffer_size=0xbeff2ae5, out=0xbeff2ae6 "\002") at qmi-utils.c:69
#1  0x40235a10 in qmi_message_ctl_allocate_cid_response_parse (
    message=0x35e70, error=0xbeff2b1c) at qmi-ctl.c:1641
#2  0x40239790 in allocate_cid_ready (device=0x32208, res=0x32480,
    simple=0x32448) at qmi-ctl.c:3939
#3  0x4038c1d4 in g_simple_async_result_complete ()
   from /usr/lib/libgio-2.0.so.0
#4  0x4038c220 in ?? () from /usr/lib/libgio-2.0.so.0
Cannot access memory at address 0x0
#5  0x4038c220 in ?? () from /usr/lib/libgio-2.0.so.0
Cannot access memory at address 0x0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) continue
Continuing.

Breakpoint 2, qmi_utils_read_guint8_from_buffer (buffer=0xbeff2ae8,
    buffer_size=0xbeff2ae6, out=0xbeff2ae5 "\003\001") at qmi-utils.c:69
69      in qmi-utils.c
(gdb) bt
#0  qmi_utils_read_guint8_from_buffer (buffer=0xbeff2ae8,
    buffer_size=0xbeff2ae6, out=0xbeff2ae5 "\003\001") at qmi-utils.c:69
#1  0x40235a3c in qmi_message_ctl_allocate_cid_response_parse (
    message=0x35e70, error=0xbeff2b1c) at qmi-ctl.c:1648
#2  0x40239790 in allocate_cid_ready (device=0x32208, res=0x32480,
    simple=0x32448) at qmi-ctl.c:3939
#3  0x4038c1d4 in g_simple_async_result_complete ()
   from /usr/lib/libgio-2.0.so.0
#4  0x4038c220 in ?? () from /usr/lib/libgio-2.0.so.0
Cannot access memory at address 0x0
#5  0x4038c220 in ?? () from /usr/lib/libgio-2.0.so.0
Cannot access memory at address 0x0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) continue
Continuing.

Breakpoint 2, qmi_utils_read_guint8_from_buffer (buffer=0x39ac0,
    buffer_size=0x40320, out=0x4043c000 "\260N\021") at qmi-utils.c:69
69      in qmi-utils.c
(gdb) bt
#0  qmi_utils_read_guint8_from_buffer (buffer=0x39ac0, buffer_size=0x40320,
    out=0x4043c000 "\260N\021") at qmi-utils.c:69
#1  0x40287910 in qmi_message_nas_get_signal_strength_response_parse (
    message=0x35db0, error=0xbeff2b1c) at qmi-nas.c:7848
#2  0x402bf7b0 in get_signal_strength_ready (device=0x32208, res=0x32528,
    simple=0x324f0) at qmi-nas.c:44350
#3  0x4038c1d4 in g_simple_async_result_complete ()
   from /usr/lib/libgio-2.0.so.0
#4  0x4038c220 in ?? () from /usr/lib/libgio-2.0.so.0
Cannot access memory at address 0x0
#5  0x4038c220 in ?? () from /usr/lib/libgio-2.0.so.0
Cannot access memory at address 0x0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) continue
Continuing.

Breakpoint 2, qmi_utils_read_guint8_from_buffer (buffer=0x39ac0,
    buffer_size=0x40320, out=0x4043c000 "\260N\021") at qmi-utils.c:69
69      in qmi-utils.c
(gdb) bt
#0  qmi_utils_read_guint8_from_buffer (buffer=0x39ac0, buffer_size=0x40320,
    out=0x4043c000 "\260N\021") at qmi-utils.c:69
#1  0x40287910 in qmi_message_nas_get_signal_strength_response_parse (
    message=0x35db0, error=0xbeff2b1c) at qmi-nas.c:7848
#2  0x402bf7b0 in get_signal_strength_ready (device=0x32208, res=0x32528,
    simple=0x324f0) at qmi-nas.c:44350
#3  0x4038c1d4 in g_simple_async_result_complete ()
   from /usr/lib/libgio-2.0.so.0
#4  0x4038c220 in ?? () from /usr/lib/libgio-2.0.so.0
Cannot access memory at address 0x0
#5  0x4038c220 in ?? () from /usr/lib/libgio-2.0.so.0
Cannot access memory at address 0x0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) continue
Continuing.
**
ERROR:qmi-utils.c:72:qmi_utils_read_guint8_from_buffer: assertion
failed: (*buffer_size >= 1)

Program received signal SIGABRT, Aborted.
0x405627cc in raise () from /lib/libc.so.6
(gdb) bt
#0  0x405627cc in raise () from /lib/libc.so.6
#1  0x40563c54 in abort () from /lib/libc.so.6
#2  0x40563c54 in abort () from /lib/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) continue
Continuing.
[Thread 0x40e66470 (LWP 474) exited]

Program terminated with signal SIGABRT, Aborted.
The program no longer exists.
(gdb)



On Fri, Sep 21, 2012 at 3:51 AM, Bjørn Mork <bjorn at mork.no> wrote:
> Aleksander Morgado <aleksander at lanedo.com> writes:
>
>> Are you able to compile it with -DMESSAGE_ENABLE_TRACE passed in CFLAGS
>> during configure? Like:
>> ./configure CFLAGS="-ggdb -O0 -DMESSAGE_ENABLE_TRACE"
>>
>> And re-run?
>>
>> It's as if we didn't read the whole message before starting to process
>> it, but cannot really tell without the full message traces.
>>
>> BTW, I should make that a --enable-message-traces instead...
>
> You already did :-)
>
> bjorn at nemi:/usr/local/src/git/libqmi$ ./configure --help|grep trace
>   --with-traces           Enable protocol debugging traces
>
>
>
> Bjørn


More information about the libqmi-devel mailing list