Hi Rahul,
These are great news - that you finda way to reproduce it. Let me do it
and start debugging.
I really do appreciate your effort in dealing with this error.
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 24.07.2015 00:19, Gupta, Rahul wrote:
Hi Bogdan,
Almost a month ago, I have raised the issue regarding the opensips log
file filling up with the following message
ERROR:core:io_watch_del: BUG - trying to del fd 38 with flags 2 1
Now I can reproduce it every time with the following scenario:
1)UAC and UAS are connected to opensips proxy with TCP transport
2)Connections looks good
3)Netstat shows the connection to UAC in ESTABLISHED state and the
tcp_conn_lists of opensips also looks fine for that UAC
4)Now unplug the Ethernet cable on UAC
5)After tcp connection timeout (set to 5 mins in opensips.cfg), the
tcp connection goes away from netstat as well as from tcp_conn_lists
6)UAS tries another tcp call to the UAC which is still unplugged
7)tcp_conn_lists shows the tcp connection to the UAC and netstat shows
the connection in SYN_SENT state
8)After the tcp connection timeout (set to 5 mins in opensips.cfg),
the connection goes away from netstat however it remains there in
tcp_conn_lists and at that moment the “BUG - trying to del fd 38 with
flags 2 1” starts printing in infinite loop.
I looked at the source code and observed the following
1)When the network cable is plugged in
The io_watch_add happens with flag IO_WATCH_READ in tcp_main.c when
the command is CONN_NEW
2)When the network cable is unplugged
The io_watch_add happens with flag IO_WATCH_WRITE in tcp_main.c when
the command is ASYNC_CONNECT
3)While doing io_watch_del after timeout, from handle_tcpconn_ev
method, io_watch_del always uses IO_WATCH_READ to delete the fd, which
gives this error in case of unplugged cable.
Please look into this and suggest how can I fix this issue ?
Thanks
Rahul Gupta
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DISCLAIMER: This e-mail may contain information that is confidential,
privileged or otherwise protected from disclosure. If you are not an
intended recipient of this e-mail, do not duplicate or redistribute it
by any means. Please delete it and any attachments and notify the
sender that you have received it in error. Unintended recipients are
prohibited from taking action on the basis of information in this
e-mail.E-mail messages may contain computer viruses or other defects,
may not be accurately replicated on other systems, or may be
intercepted, deleted or interfered with without the knowledge of the
sender or the intended recipient. If you are not comfortable with the
risks associated with e-mail messages, you may decide not to use
e-mail to communicate with IPC. IPC reserves the right, to the extent
and under circumstances permitted by applicable law, to retain,
monitor and intercept e-mail messages to and from its systems.
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users