[sr-dev] pua_rpc crash

Daniel-Constantin Mierla miconda at gmail.com
Mon Nov 24 17:42:21 CET 2014


Hello,

in this particular case, it crashed because the ctx parameter is null
for rpc_add() and fix_delayed_reply_ctx() functions as noted in frame 1
and 0.

Can you check if the afferent field is not null in your function
publish() after the call of pua_send_publish()?

Also, can you check to see if the pointer to the delayed context is the
same in publish() as well as in publish_callback()?

Cheers,
Daniel

On 17/11/14 09:45, Juha Heinanen wrote:
> i have tried to implement pua_rpc module in order to get rid of pua_mi
> module.  unfortunately pua.publish crashes when it executes the callback
> function.  i have not been able to figure out why.  rpc callback system
> is heavily using void typed variables and parameters with casts, which
> means that compiler cannot help in finding the bug.
>
> my current code of the module is enclosed.  pua.publish causes this kind
> of crash during callback execution:
>
> (gdb) where
> #0  0xb3e9a513 in fix_delayed_reply_ctx (ctx=0x0) at xmlrpc.c:664
> #1  0xb3e9c3ff in rpc_add (ctx=0x0, fmt=0xb3944868 "dS") at xmlrpc.c:1095
> #2  0xb393c6ce in publish_callback (hentity=0xb48e0db8, reply=0xffffffff) at pua_rpc.c:98
> #3  0xb397fc82 in run_pua_callbacks (hentity=0xb48e0db8, msg=0xffffffff) at pua_callback.h:72
> #4  0xb3984074 in publ_cback_func (t=0xb48e0fb4, type=1024, ps=0xbfbaa85c) at send_publish.c:436
> #5  0xb69cfc09 in run_trans_callbacks_internal (cb_lst=0xb48e0ff4, type=1024, trans=0xb48e0fb4, 
>     params=0xbfbaa85c) at t_hooks.c:290
> #6  0xb69cfd1a in run_trans_callbacks (type=1024, trans=0xb48e0fb4, req=0x0, rpl=0xffffffff, 
>     code=408) at t_hooks.c:317
> #7  0xb6a0815e in local_reply (t=0xb48e0fb4, p_msg=0xffffffff, branch=0, msg_status=408, 
>     cancel_data=0xbfbaa958) at t_reply.c:2120
> #8  0xb6a1ca05 in fake_reply (t=0xb48e0fb4, branch=0, code=408) at timer.c:350
> #9  0xb6a1ce61 in final_response_handler (r_buf=0xb48e1110, t=0xb48e0fb4) at timer.c:527
> #10 0xb6a1cefa in retr_buf_handler (ticks=98494515, tl=0xb48e1124, p=0x1f40) at timer.c:585
> #11 0x08216c78 in slow_timer_main () at timer.c:1145
> #12 0x080df91b in main_loop () at main.c:1687
> #13 0x080e4956 in main (argc=17, argv=0xbfbaae14) at main.c:2568
>
> what should i do with the code?  commit it to git in case someone would
> later be able to figure out where the bug is or just through it to
> waste bin?
>
> -- juha
>
>
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20141124/9ed508fa/attachment.html>


More information about the sr-dev mailing list