tried doing a post on a https URL and kamailio crashes as soon as it receives a 200 response. Kamailio continues processing the response is error but on a successful response it crashes. Here's the backtrace from the core: 0x00007f62f2bf8e38 in ?? () #1 0x00007f62ea22251b in http_query (_m=0x7f62f2c3a038, _url=0x7f62f2bf3548 "\330\064\277\362b\177", _dst=0x7f62f2bf9250 "\030\215\277\362b\177", _post=0x7f62f2bf35c8 "\200r\277\362b\177", _hdr=0x7f62f2bf91d0 "h\221\277\362b\177") at functions.c:226 #2 0x00007f62ea229e0b in w_http_query_post_hdr (_m=0x7f62f2c3a038, _url=0x7f62f2bf3548 "\330\064\277\362b\177", _post=0x7f62f2bf35c8 "\200r\277\362b\177", _hdr=0x7f62f2bf91d0 "h\221\277\362b\177", _result=0x7f62f2bf9250 "\030\215\277\362b\177") at utils.c:483 #3 0x000000000041f6b5 in do_action (h=0x7ffeb128c8c0, a=0x7f62f2bf8a58, msg=0x7f62f2c3a038) at action.c:1079 #4 0x000000000042c2ea in run_actions (h=0x7ffeb128c8c0, a=0x7f62f2bf6fc0, msg=0x7f62f2c3a038) at action.c:1549 #5 0x000000000041f3ce in do_action (h=0x7ffeb128c8c0, a=0x7f62f2bfb9b0, msg=0x7f62f2c3a038) at action.c:1045 #6 0x000000000042c2ea in run_actions (h=0x7ffeb128c8c0, a=0x7f62f2bb9388, msg=0x7f62f2c3a038) at action.c:1549 #7 0x000000000041bc28 in do_action (h=0x7ffeb128c8c0, a=0x7f62f2b8f248, msg=0x7f62f2c3a038) at action.c:678 #8 0x000000000042c2ea in run_actions (h=0x7ffeb128c8c0, a=0x7f62f2b8e268, msg=0x7f62f2c3a038) at action.c:1549 #9 0x000000000041f3ce in do_action (h=0x7ffeb128c8c0, a=0x7f62f2b91040, msg=0x7f62f2c3a038) at action.c:1045 #10 0x000000000042c2ea in run_actions (h=0x7ffeb128c8c0, a=0x7f62f2b8b7a8, msg=0x7f62f2c3a038) at action.c:1549 #11 0x000000000041bc28 in do_action (h=0x7ffeb128c8c0, a=0x7f62f2b3a2c0, msg=0x7f62f2c3a038) at action.c:678 #12 0x000000000042c2ea in run_actions (h=0x7ffeb128c8c0, a=0x7f62f2b3a2c0, msg=0x7f62f2c3a038) at action.c:1549 #13 0x000000000041f3ce in do_action (h=0x7ffeb128c8c0, a=0x7f62f2b47f00, msg=0x7f62f2c3a038) at action.c:1045 #14 0x000000000042c2ea in run_actions (h=0x7ffeb128c8c0, a=0x7f62f2b37e80, msg=0x7f62f2c3a038) at action.c:1549 #15 0x000000000041bc28 in do_action (h=0x7ffeb128c8c0, a=0x7f62f2b1c9c8, msg=0x7f62f2c3a038) at action.c:678 #16 0x000000000042c2ea in run_actions (h=0x7ffeb128c8c0, a=0x7f62f2b1c9c8, msg=0x7f62f2c3a038) at action.c:1549 #17 0x000000000041f3ce in do_action (h=0x7ffeb128c8c0, a=0x7f62f2b1cc28, msg=0x7f62f2c3a038) at action.c:1045 #18 0x000000000042c2ea in run_actions (h=0x7ffeb128c8c0, a=0x7f62f2b170a0, msg=0x7f62f2c3a038) at action.c:1549 #19 0x000000000042ca93 in run_top_route (a=0x7f62f2b170a0, msg=0x7f62f2c3a038, c=0x0) at action.c:1635 #20 0x000000000051c115 in receive_msg ( buf=0xab7520 <buf> "INVITE sip:bdbbf600000001b5b919d0 at devsip.abcd.com:8321 SIP/2.0\r\nRecord-Route: sip:203.153.53.145:8300;r2=on;lr=on\r\nRecord-Route: sip:203.153.53.145:8321;transport=tcp;r2=on;lr=on\r\nVia: SIP/2.0/UDP"..., len=1901, rcv_info=0x7ffeb128cc10) at receive.c:196 #21 0x000000000062d427 in udp_rcv_loop () at udp_server.c:495 #22 0x00000000004b28c1 in main_loop () at main.c:1593 #23 0x00000000004b9aa5 in main (argc=5, argv=0x7ffeb128d118) at main.c:2597
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/432
@jayesh1017 please use markdown format in order not to mess with github issue markers
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/432#issuecomment-162601802
@jayesh1017 actually, adding the kamailio version you are using to the report will help too
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/432#issuecomment-162602185
I'm using the updated devel version from GIT to test.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/432#issuecomment-162634774
The most important part of the backtrace - frame 0 - is missing.
If you can reproduce it, is the new core printing the same kind of backtrace, with fame 0 not showing relevant information?
If yes, can you try with debug=3 in kamailio configuration file and paste here the logs message while executing the http query?
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/432#issuecomment-162669929
actually I tried the curl module with curl_connect function to do the same thing and it worked awesome. I'll still try to reproduce this with http_query and update. Thanks.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/432#issuecomment-162795371
#0 0x00007ffff6f107e8 in ?? ()
#1 0x00007fffe9b9151b in http_query (_m=0x7ffff6f451f0, _url=0x7ffff6ed6d38 "\310l\355\366\377\177", _dst=0x7ffff6ee8ae0 "\350\a\361\366\377\177", _post=0x7ffff6ed6db8 "\360j\355\366\377\177",
_hdr=0x7ffff6ed6e38 "") at functions.c:226
#2 0x00007fffe9b98e0b in w_http_query_post_hdr (_m=0x7ffff6f451f0, _url=0x7ffff6ed6d38 "\310l\355\366\377\177", _post=0x7ffff6ed6db8 "\360j\355\366\377\177", _hdr=0x7ffff6ed6e38 "",
_result=0x7ffff6ee8ae0 "\350\a\361\366\377\177") at utils.c:483
#3 0x00000000004248c9 in do_action (h=0x7fffffffde60, a=0x7ffff6efff00, msg=0x7ffff6f451f0) at action.c:1129
#4 0x000000000042c2ea in run_actions (h=0x7fffffffde60, a=0x7ffff6efec90, msg=0x7ffff6f451f0) at action.c:1549
#5 0x000000000041f3ce in do_action (h=0x7fffffffde60, a=0x7ffff6f06e70, msg=0x7ffff6f451f0) at action.c:1045
#6 0x000000000042c2ea in run_actions (h=0x7fffffffde60, a=0x7ffff6ec7698, msg=0x7ffff6f451f0) at action.c:1549
#7 0x000000000041bc28 in do_action (h=0x7fffffffde60, a=0x7ffff6e9d0f8, msg=0x7ffff6f451f0) at action.c:678
#8 0x000000000042c2ea in run_actions (h=0x7fffffffde60, a=0x7ffff6e9c118, msg=0x7ffff6f451f0) at action.c:1549
#9 0x000000000041f3ce in do_action (h=0x7fffffffde60, a=0x7ffff6e9eef0, msg=0x7ffff6f451f0) at action.c:1045
#10 0x000000000042c2ea in run_actions (h=0x7fffffffde60, a=0x7ffff6e99658, msg=0x7ffff6f451f0) at action.c:1549
#11 0x000000000041bc28 in do_action (h=0x7fffffffde60, a=0x7ffff6e530a0, msg=0x7ffff6f451f0) at action.c:678
#12 0x000000000042c2ea in run_actions (h=0x7fffffffde60, a=0x7ffff6e530a0, msg=0x7ffff6f451f0) at action.c:1549
#13 0x000000000041f3ce in do_action (h=0x7fffffffde60, a=0x7ffff6e568a8, msg=0x7ffff6f451f0) at action.c:1045
#14 0x000000000042c2ea in run_actions (h=0x7fffffffde60, a=0x7ffff6e503c8, msg=0x7ffff6f451f0) at action.c:1549
#15 0x000000000041bc28 in do_action (h=0x7fffffffde60, a=0x7ffff6e356e0, msg=0x7ffff6f451f0) at action.c:678
#16 0x000000000042c2ea in run_actions (h=0x7fffffffde60, a=0x7ffff6e356e0, msg=0x7ffff6f451f0) at action.c:1549
#17 0x000000000041f3ce in do_action (h=0x7fffffffde60, a=0x7ffff6e35940, msg=0x7ffff6f451f0) at action.c:1045
#18 0x000000000042c2ea in run_actions (h=0x7fffffffde60, a=0x7ffff6e2fd70, msg=0x7ffff6f451f0) at action.c:1549
#19 0x000000000042ca93 in run_top_route (a=0x7ffff6e2fd70, msg=0x7ffff6f451f0, c=0x0) at action.c:1635
#20 0x000000000051c115 in receive_msg (
buf=0xab7520 <buf> "INVITE sip:366af4b01886099e8d6212@devsip.abcd.com:8321 SIP/2.0\r\nRecord-Route: <sip:203.153.53.145:8300;r2=on;lr=on>\r\nRecord-Route: <sip:203.153.53.145:8321;transport=tcp;r2=on;lr=on>\r\nVia: SIP/2.0/UDP"..., len=1900, rcv_info=0x7fffffffe1b0) at receive.c:196
#21 0x000000000062d427 in udp_rcv_loop () at udp_server.c:495
#22 0x00000000004b11d8 in main_loop () at main.c:1397
#23 0x00000000004b9aa5 in main (argc=1, argv=0x7fffffffe6b8) at main.c:2597
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/432#issuecomment-163132315
I'm sorry for still not understanding on how to use the markdown format correctly. I'm learning !!
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/432#issuecomment-163132933
For markdown format, see:
* https://guides.github.com/features/mastering-markdown/
It is the same situation with the backtrace - frame 0 details missing. Did you grab the log messages with debug=3?
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/432#issuecomment-163144198
This backtrace is with debug level 3.
``` (gdb) backtrace #0 0x00007ffff6f12fb8 in ?? () #1 0x00007fffe9b9151b in http_query (_m=0x7ffff6f44750, _url=0x7ffff6ed6e18 "\250m\355\366\377\177", _dst=0x7ffff6eebc88 "\270/\361\366\377\177", _post=0x7ffff6ed6e98 "\320k\355\366\377\177", _hdr=0x7ffff6ed6f18 "\340\r\360\366\377\177") at functions.c:226 #2 0x00007fffe9b98e0b in w_http_query_post_hdr (_m=0x7ffff6f44750, _url=0x7ffff6ed6e18 "\250m\355\366\377\177", _post=0x7ffff6ed6e98 "\320k\355\366\377\177", _hdr=0x7ffff6ed6f18 "\340\r\360\366\377\177", _result=0x7ffff6eebc88 "\270/\361\366\377\177") at utils.c:483 #3 0x00000000004248c9 in do_action (h=0x7fffffffde60, a=0x7ffff6efffe0, msg=0x7ffff6f44750) at action.c:1129 #4 0x000000000042c2ea in run_actions (h=0x7fffffffde60, a=0x7ffff6efed70, msg=0x7ffff6f44750) at action.c:1549 #5 0x000000000041f3ce in do_action (h=0x7fffffffde60, a=0x7ffff6f06f50, msg=0x7ffff6f44750) at action.c:1045 #6 0x000000000042c2ea in run_actions (h=0x7fffffffde60, a=0x7ffff6ec7778, msg=0x7ffff6f44750) at action.c:1549 #7 0x000000000041bc28 in do_action (h=0x7fffffffde60, a=0x7ffff6e9d0f8, msg=0x7ffff6f44750) at action.c:678 #8 0x000000000042c2ea in run_actions (h=0x7fffffffde60, a=0x7ffff6e9c118, msg=0x7ffff6f44750) at action.c:1549 #9 0x000000000041f3ce in do_action (h=0x7fffffffde60, a=0x7ffff6e9eef0, msg=0x7ffff6f44750) at action.c:1045 #10 0x000000000042c2ea in run_actions (h=0x7fffffffde60, a=0x7ffff6e99658, msg=0x7ffff6f44750) at action.c:1549 #11 0x000000000041bc28 in do_action (h=0x7fffffffde60, a=0x7ffff6e530a0, msg=0x7ffff6f44750) at action.c:678 #12 0x000000000042c2ea in run_actions (h=0x7fffffffde60, a=0x7ffff6e530a0, msg=0x7ffff6f44750) at action.c:1549 #13 0x000000000041f3ce in do_action (h=0x7fffffffde60, a=0x7ffff6e568a8, msg=0x7ffff6f44750) at action.c:1045 #14 0x000000000042c2ea in run_actions (h=0x7fffffffde60, a=0x7ffff6e503c8, msg=0x7ffff6f44750) at action.c:1549 #15 0x000000000041bc28 in do_action (h=0x7fffffffde60, a=0x7ffff6e356e0, msg=0x7ffff6f44750) at action.c:678 #16 0x000000000042c2ea in run_actions (h=0x7fffffffde60, a=0x7ffff6e356e0, msg=0x7ffff6f44750) at action.c:1549 #17 0x000000000041f3ce in do_action (h=0x7fffffffde60, a=0x7ffff6e35940, msg=0x7ffff6f44750) at action.c:1045 #18 0x000000000042c2ea in run_actions (h=0x7fffffffde60, a=0x7ffff6e2fd70, msg=0x7ffff6f44750) at action.c:1549 #19 0x000000000042ca93 in run_top_route (a=0x7ffff6e2fd70, msg=0x7ffff6f44750, c=0x0) at action.c:1635 #20 0x000000000051c115 in receive_msg ( buf=0xab7520 <buf> "INVITE sip:366af4b01886099e8d6212@devsip.abcd.com:8321 SIP/2.0\r\nRecord-Route: sip:203.153.53.145:8300;r2=on;lr=on\r\nRecord-Route: sip:203.153.53.145:8321;transport=tcp;r2=on;lr=on\r\nVia: SIP/2.0/UDP"..., len=1899, rcv_info=0x7fffffffe1b0) at receive.c:196 #21 0x000000000062d427 in udp_rcv_loop () at udp_server.c:495 #22 0x00000000004b11d8 in main_loop () at main.c:1397 #23 0x00000000004b9aa5 in main (argc=1, argv=0x7fffffffe6b8) at main.c:2597 ```
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/432#issuecomment-163238565
I have reproduced this issue and found the issue. Patch is incoming.
The cause is in the fixup function which is incorrectly running the wrong fixup function.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/432#issuecomment-163248861
Hi @jayesh1017 Please retry with the latest on git master (after commit 3b6d7a28ea0b053f27cb169ac31259e20ef4ece0).
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/432#issuecomment-163257873
Thanks. I'll try it but I think I'll go ahead with the curl module which is similar and gives more control over secure networks. I believe the http_query function in utils then anyways becomes redundant.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/432#issuecomment-163437499
Closing this one as it seems to be fixed. If still an issue, reopen with new details.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/432#issuecomment-164469465
Closed #432.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/432#event-491103533