Hello everyone,
I am adding some new features to our Kamailio server, one of them is sending HTTP POST request after calls end. We created simple route like this and we are calling it from event_route[dialog_end]:
route[HTTP_TEST_CALL_END] {

t_newtran();
$http_req(body) = "TEST";
http_async_query("http://192.168.6.23:2080/cdr_http", "HTTP_TEST_REPLY");
}

Problem is that Kamailio is crashing on line http_async_query, the log from crash:
Oct 3 16:13:37 sip_server /opt/ipgate/kamailio/sbin/kamailio[5331]: CRITICAL: <core> [core/mem/q_malloc.c:149]: qm_debug_check_frag(): BUG: qm: prev. fragm. tail overwritten(c0003032, abcdefed)[0x97a7ff3c:0x97a7ff58]! Memory allocator was called from http_async_client: hm_hash.c:82. Fragment marked by http_async_client: hm_hash.c:71. Exec from core/mem/q_malloc.c:384.

In older Kamailio 4.4 I am using http_async_query with no problems. I opened issue on GitHub:
https://github.com/kamailio/kamailio/issues/2091 I hope that is ok, more logs and core dump is in the issue.


Any help or suggestion is welcomed.
Sincerely Michal