[sr-dev] [kamailio/kamailio] http_async_client: coredump on 5.0.5 (#1391)

Victor Seva notifications at github.com
Thu Jan 4 09:58:55 CET 2018


### Description

I'm having crashes on the Http worker process. I didn't find a way to reproduce the crash yet. Crashes are happening on two servers after a couple of days.

#### Debugging Data

Not very useful

```
Core was generated by `/usr/sbin/kamailio -f /etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __GI__IO_wfile_underflow (fp=0x7f45900008c0) at wfileops.c:280
280	wfileops.c: No such file or directory.
(gdb) bt
#0  __GI__IO_wfile_underflow (fp=0x7f45900008c0) at wfileops.c:280
#1  0x00000000000004b0 in ?? ()
#2  0x0000000000000428 in ?? ()
#3  0x00007f459d9e2640 in ?? ()
#4  0x0000000000000000 in ?? ()
(gdb)
```

#### Log Messages
I have debug enabled for http_async_client module, and this is the last messages before the crash
```
Jan  3 11:02:11 vox-kamailio-1887-0 kamailio[2685]: DEBUG: http_async_client [http_multi.c:67]: timer_cb(): timeout on socket -1
Jan  3 11:02:11 vox-kamailio-1887-0 kamailio[2685]: DEBUG: http_async_client [http_multi.c:53]: multi_timer_cb(): multi_timer_cb: Setting timeout to 1 ms
Jan  3 11:02:11 vox-kamailio-1887-0 kamailio[2685]: DEBUG: http_async_client [http_multi.c:561]: check_multi_info(): REMAINING: 2
[...]
Jan  3 11:02:15 vox-kamailio-1887-0 kamailio[2702]: CRITICAL: <core> [core/pass_fd.c:277]: receive_fd(): EOF on 89
Jan  3 11:02:15 vox-kamailio-1887-0 kamailio[2618]: ALERT: <core> [main.c:743]: handle_sigs(): child process 2685 exited by a signal 11
Jan  3 11:02:15 vox-kamailio-1887-0 kamailio[2618]: ALERT: <core> [main.c:746]: handle_sigs(): core was generated
```

### Additional Information

  * **Kamailio Version** - output of `kamailio -v`

```
version: kamailio 5.0.5 (x86_64/linux) 
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown 
compiled with gcc 4.8.2
```

This is 5.0.5 + https://github.com/kamailio/kamailio/pull/1386/commits/388ba3642338992a04ca1c98612aa4b58c9d9e91

Module parameters are:
```
modparam("http_async_client", "connection_timeout", 10000)
modparam("http_async_client", "tls_verify_host", 0)
modparam("http_async_client", "tls_verify_peer", 0)
modparam("http_async_client", "hash_size", 1024)
```

The use of the module is like this:
```
    $var(url) = $avp(s:deviceStateURL)+"ari/deviceStates/Custom:" +
        $avp(s:queueDevice);
    $http_req(timeout) = 100;
    $http_req(suspend) = 0;
    $http_req(authmethod) = 1;
    $http_req(username) = $sht(lcr=>ari_user);
    $http_req(password) = $sht(lcr=>ari_pass);
    http_async_query("$var(url)", "QUEUE_CHECK_STATUS_OR_SET");
```

* **Operating System**:

Ubuntu Trusty


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1391
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20180104/1f6a5208/attachment-0001.html>


More information about the sr-dev mailing list