[PATCH] Re: PANIC in bearerbox1.4.3 Urgent

Alexander Malysh <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hi,

first: many thanks for great bug report!
It should be in FAQ or Redmine how user can produce such great bug  
reports.

As to this bug: there seems to be issue when we try to send empty  
message body.
Could you please apply attached patch on top of 1.4.3 tree and retry?
Please let us know if this patch fixes issue for you.

Thanks,
Alex




Am 13.05.2009 um 08:17 schrieb Manoj Raul:

> Dear Sir
>
> we have found below PANIC at bearerbox1.4.3, reporting you the same  
> with addr2line and bearerbox_server.log
> kindly let me know the possible solution and reason
>
> regards
> Manoj Raul
>    addr2line -e bearerbox-1.4.3 0x47b5fb 0x47be79 0x4800c8 0x43fc09  
> 0x43ff22 0x41e9a2 0x415160 0x415f4d 0x472675 0x3315c062e7 0x33150ce3bd
>> /root/gateway-1.4.3/gwlib/log.c:541
>> /root/gateway-1.4.3/gwlib/octstr.c:2480
>> /root/gateway-1.4.3/gwlib/octstr.c:352
>> /root/gateway-1.4.3/gw/sms.c:261
>> /root/gateway-1.4.3/gw/sms.c:274
>> /root/gateway-1.4.3/gw/smscconn.c:519
>> /root/gateway-1.4.3/gw/bb_smscconn.c:1114
>> /root/gateway-1.4.3/gw/bb_smscconn.c:558
>> /root/gateway-1.4.3/gwlib/gwthread-pthread.c:135
>> ??:0
>> ??:0
>    2009-05-11 13:06:49 [16955] [16] DEBUG: sms_router: gwlist_len = 2
>> 2009-05-11 13:06:49 [16955] [16] DEBUG: sms_router: handling  
>> message (0x1f8bde90 vs 0x1f8bde90)
>> 2009-05-11 13:06:49 [16955] [16] DEBUG: Routing failed, re-queued.
>> 2009-05-11 13:06:49 [16955] [16] DEBUG: sms_router: handling  
>> message (0x1f8cfff0 vs 0x1f8bde90)
>> 2009-05-11 13:06:49 [16955] [16] DEBUG: Routing failed, re-queued.
>> 2009-05-11 13:06:49 [16955] [16] DEBUG: sms_router: handling  
>> message (0x1f8bde90 vs 0x1f8bde90)
>> 2009-05-11 13:06:49 [16955] [16] DEBUG: Routing failed, re-queued.
>> 2009-05-11 13:06:49 [16955] [16] DEBUG: sms_router: time to sleep  
>> 30.00 secs.
>> 2009-05-11 13:06:49 [16955] [6] DEBUG: Optional parameter tag  
>> (0x0210)
>> 2009-05-11 13:06:49 [16955] [6] DEBUG: Optional parameter length  
>> read as 1
>> 2009-05-11 13:06:49 [16955] [6] DEBUG: SMPP[smpp_Gateway21_2]: Got  
>> PDU:
>> 2009-05-11 13:06:49 [16955] [6] DEBUG: SMPP PDU 0x2aaaac000dd0 dump:
>> 2009-05-11 13:06:49 [16955] [6] DEBUG:   type_name:  
>> bind_transmitter_resp
>> 2009-05-11 13:06:49 [16955] [6] DEBUG:   command_id: 2147483650 =  
>> 0x80000002
>> 2009-05-11 13:06:49 [16955] [6] DEBUG:   command_status: 0 =  
>> 0x00000000
>> 2009-05-11 13:06:49 [16955] [6] DEBUG:   sequence_number: 1 =  
>> 0x00000001
>> 2009-05-11 13:06:49 [16955] [6] DEBUG:   system_id: "DOTGLO2"
>> 2009-05-11 13:06:49 [16955] [6] DEBUG:   sc_interface_version: 52 =  
>> 0x00000034
>> 2009-05-11 13:06:49 [16955] [6] DEBUG: SMPP PDU dump ends.
>> 2009-05-11 13:06:49 [16955] [16] DEBUG: sms_router: gwlist_len = 2
>> 2009-05-11 13:06:49 [16955] [16] DEBUG: sms_router: handling  
>> message (0x1f8cfff0 vs 0x1f8cfff0)
>> 2009-05-11 13:06:49 [16955] [16] DEBUG: Routing failed, re-queued.
>> 2009-05-11 13:06:49 [16955] [16] DEBUG: sms_router: handling  
>> message (0x1f8bde90 vs 0x1f8cfff0)
>> 2009-05-11 13:06:49 [16955] [16] DEBUG: Routing failed, re-queued.
>> 2009-05-11 13:06:49 [16955] [16] DEBUG: sms_router: handling  
>> message (0x1f8cfff0 vs 0x1f8cfff0)
>> 2009-05-11 13:06:49 [16955] [16] DEBUG: Routing failed, re-queued.
>> 2009-05-11 13:06:49 [16955] [16] DEBUG: sms_router: time to sleep  
>> 30.00 secs.2009-05-11 13:06:59 [16955] [12] DEBUG:    
>> sc_interface_version: 52 = 0x00000034
>> 2009-05-11 13:06:59 [16955] [12] DEBUG: SMPP PDU dump ends.
>> 2009-05-11 13:06:59 [16955] [16] DEBUG: sms_router: gwlist_len = 2
>> 2009-05-11 13:06:59 [16955] [16] DEBUG: sms_router: handling  
>> message (0x1f8bde90 vs 0x1f8bde90)
>> 2009-05-11 13:06:59 [16955] [16] PANIC: gwlib/octstr.c:2481:  
>> seems_valid_real: Assertion `ostr != NULL' failed. (Called from  
>> gwlib/octstr.c:351:octstr_copy_
>> real.)
>> 2009-05-11 13:06:59 [16955] [16] PANIC: /opt/smpf/sbin/ 
>> bearerbox(gw_panic+0x15b) [0x47b5fb]
>> 2009-05-11 13:06:59 [16955] [16] PANIC: /opt/smpf/sbin/bearerbox  
>> [0x47be79]
>> 2009-05-11 13:06:59 [16955] [16] PANIC: /opt/smpf/sbin/ 
>> bearerbox(octstr_copy_real+0x48) [0x4800c8]
>> 2009-05-11 13:06:59 [16955] [16] PANIC: /opt/smpf/sbin/bearerbox  
>> [0x43fc09]
>> 2009-05-11 13:06:59 [16955] [16] PANIC: /opt/smpf/sbin/ 
>> bearerbox(sms_split+0x2f2) [0x43ff22]
>> 2009-05-11 13:06:59 [16955] [16] PANIC: /opt/smpf/sbin/ 
>> bearerbox(smscconn_send+0x142) [0x41e9a2]
>> 2009-05-11 13:06:59 [16955] [16] PANIC: /opt/smpf/sbin/ 
>> bearerbox(smsc2_rout+0x370) [0x415160]
>> 2009-05-11 13:06:59 [16955] [16] PANIC: /opt/smpf/sbin/bearerbox  
>> [0x415f4d]
>> 2009-05-11 13:06:59 [16955] [16] PANIC: /opt/smpf/sbin/bearerbox  
>> [0x472675]
>> 2009-05-11 13:06:59 [16955] [16] PANIC: /lib64/libpthread.so.0  
>> [0x3315c062e7]
>> 2009-05-11 13:06:59 [16955] [16] PANIC: /lib64/libc.so.6(clone 
>> +0x6d) [0x33150ce3bd]
>> ~
>>
>>
>>
>>
>>
>>
octstr-return-empty.diff (application/octet-stream, 453 B)
diff --git a/gwlib/octstr.c b/gwlib/octstr.c
index 045f2a7..b164141 100644
--- a/gwlib/octstr.c
+++ b/gwlib/octstr.c
@@ -348,6 +348,9 @@ long octstr_len(const Octstr *ostr)
 Octstr *octstr_copy_real(const Octstr *ostr, long from, long len, const char *file, long line,
                          const char *func)
 {
+    if (ostr == NULL)
+        return octstr_create("");
+
     seems_valid(ostr);
     gw_assert(from >= 0);
     gw_assert(len >= 0);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.