[sr-dev] [kamailio/kamailio] sqlops cause infinite loop if database server is unreachable (#1690)

David Minh Phan notifications at github.com
Thu Oct 25 14:31:08 CEST 2018


### Description

The sqlops module run into an infinite loop and print continously this line to the stderr (or stdout):

22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]

### Troubleshooting

#### Reproduction

Set log_stderror=yes
Load the sqlops module and configure it with a bad DB host. 

Example:
```
log_stderror=yes
loadmodule "sqlops.so"
modparam("sqlops","sqlcon","main=>postgres://abc:abc@INVALID_HOST/test")
```

#### Debugging Data


#### Log Messages

```
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
22(17903) ERROR: <core> [core/io_wait.h:1040]: io_wait_loop_epoll(): epoll_wait(10, 0x2ab72bb7b690, 0, 5000): Invalid argument [22]
...
```

#### SIP Traffic

<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->

```
(paste your sip traffic here)
```

### Possible Solutions

<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->

### Additional Information

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

```
5.1.6
```

* **Operating System**:

<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `uname -a`)
-->

```
Centos 7
Kernel: 3.10.0-514.26.1.el7.x86_64
```


-- 
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/1690
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20181025/9ec83f26/attachment.html>


More information about the sr-dev mailing list