gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with gnokii 0.6.31git, smsd segmentation fault


From: Daniele Forsi
Subject: Re: Problem with gnokii 0.6.31git, smsd segmentation fault
Date: Mon, 6 Jun 2011 22:23:49 +0200

2011/6/6 Pawel Kot:

> But from backtrace provided by João it looks that it reconnect
> procedure is what segfaults and not sens sms actually.

you're right, however I may be running with a different memory layout
than João (static build of libgnokii with not all optional libraries)

I paste here my output:

Inserting sms from gnokii successful.
Inserting Event: 1
Processing Event: 0
=====> ENTER gn_sms_send()
enc_chars: 4
ext_chars: 0
total: 4
size of the input string: 4 bytes
number of characters in the input string: 4 chars
=====> ENTER sms_send_single()
General Data Coding
Default Alphabet
        size: 4
        offset: 0
        encoded size: 4
        rawsms length: 4
        rawsms user data length: 4
dcs: 0x00
Length: 0x04
user_data_length: 0x04
ValidityIndicator: 2
user_data: F4F29C0E
Input is 4 bytes long
SMS is 4 octets long
Sending
Address: 1
Text: test
Sending to 1 unsuccessful. Error: Command timed out.
Event 0 failed with return code 11!
Processing Event: 5399544
Processing Event: 1
Deleting SMS 5
gn_sms_delete returned error 0: No error.
Processing Event: 1
Deleting SMS 4
gn_sms_delete returned error 0: No error.
Processing Event: 1
Deleting SMS 3
gn_sms_delete returned error 0: No error.
Processing Event: 1
Deleting SMS 2
gn_sms_delete returned error 0: No error.
Processing Event: 1
Deleting SMS 1
gn_sms_delete returned error 0: No error.
GN_OP_GetSMSStatus returned (number, unread) 1, 1
phoneMonitor.sms.number 1
Inserting Event: 0
Processing Event: 0
=====> ENTER gn_sms_send()
*** glibc detected *** /home/daniele/static/smsd/smsd: malloc():
smallbin double linked list corrupted: 0x00526410 ***
======= Backtrace: =========
/lib/libc.so.6(+0x6c501)[0x438501]
/lib/libc.so.6(+0x6f679)[0x43b679]
/lib/libc.so.6(__libc_malloc+0x63)[0x43cf33]
/lib/libglib-2.0.so.0(g_malloc+0x34)[0x343704]
/lib/libglib-2.0.so.0(g_convert_with_iconv+0x4e)[0x31f0de]
/lib/libglib-2.0.so.0(g_convert+0x74)[0x31f3f4]
/lib/libglib-2.0.so.0(g_locale_to_utf8+0x61)[0x31f7f1]
/home/daniele/static/smsd/smsd(gn_sms_send+0x1fc)[0x8057f0c]
/home/daniele/static/smsd/smsd[0x804db05]
/home/daniele/static/smsd/smsd[0x804e0d5]
/home/daniele/static/smsd/smsd[0x804e3c7]
/lib/libpthread.so.0(+0x5cc9)[0x2e4cc9]
/lib/libc.so.6(clone+0x5e)[0x49c69e]
======= Memory map: ========
[...]
Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb7fe3b70 (LWP 6979)]
0x0012e416 in __kernel_vsyscall ()
(gdb) bt
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x003f6941 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0x003f9e42 in abort () at abort.c:92
#3  0x0042e305 in __libc_message (do_abort=2, fmt=0x506280 "*** glibc
detected *** %s: %s: 0x%s ***\n") at
../sysdeps/unix/sysv/linux/libc_fatal.c:189
#4  0x00438501 in malloc_printerr (action=<value optimized out>,
str=0x6 <Address 0x6 out of bounds>, ptr=0x526410) at malloc.c:6283
#5  0x0043b679 in _int_malloc (av=<value optimized out>, bytes=<value
optimized out>) at malloc.c:4308
#6  0x0043cf33 in __libc_malloc (bytes=8) at malloc.c:3660
#7  0x00343704 in g_malloc () from /lib/libglib-2.0.so.0
#8  0x0031f0de in g_convert_with_iconv () from /lib/libglib-2.0.so.0
#9  0x0031f3f4 in g_convert () from /lib/libglib-2.0.so.0
#10 0x0031f7f1 in g_locale_to_utf8 () from /lib/libglib-2.0.so.0
#11 0x08057f0c in gn_sms_send (data=0x3caff4, state=0xb6f5f008) at
../../gnokii/common/gsm-sms.c:1614
#12 0x0804db05 in A_SendSMSMessage (data=0x8157930) at
../../gnokii/smsd/lowlevel.c:292
#13 0x0804e0d5 in RealConnect (phone=<value optimized out>) at
../../gnokii/smsd/lowlevel.c:396
#14 0x0804e3c7 in Connect (phone=0x81400e0) at ../../gnokii/smsd/lowlevel.c:477
#15 0x002e4cc9 in start_thread (arg=0xb7fe3b70) at pthread_create.c:304
#16 0x0049c69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
(gdb) quit

I made this change to make the fake driver to fail:

diff --git a/common/phones/fake.c b/common/phones/fake.c
index f4839a1..c971428 100644
--- a/common/phones/fake.c
+++ b/common/phones/fake.c
@@ -486,7 +486,7 @@ static gn_error fake_functions(gn_operation op,
gn_data *data, struct gn_statema
        case GN_OP_SaveSMS:
                return at_sms_write(data, state, "CMGW");
        case GN_OP_SendSMS:
-               return at_sms_write(data, state, "CMGS");
+               return GN_ERR_TIMEOUT;
        case GN_OP_GetSMS:
                return at_sms_get(data, state);
        case GN_OP_DeleteSMS:
-- 
Daniele Forsi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]