HiRahul,

I tried to reproduce your scenarioduring the last 2 days. Thanks to the detailed instructions and stepping, I mananged to get (as described) to the last step. But instead of getting the error you mentioned, the tcp conn timeout event was properly handled:

[23203] DBG:core:__tcpconn_lifetime: timeout for hash=3 - 0x7f94f298fea0 (322 > 317) [23203] DBG:core:io_watch_del: [TCP_main] io_watch_del op on index -1 29 (0x8828a0, 29, -1, 0x10,0x3) fd_no=22 called

Are you sure you are using the latest GIT code (I tested both 2.1 and 1.11).

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 31.07.2015 17:40, Gupta, Rahul wrote:

Hi Bogdan, thanks for looking into this issue. Let me know if anyway I can help to get to the bottom of this issue, like providing logs etc

Thanks

Rahul

*From:*Bogdan-Andrei Iancu [mailto:[email protected]]
*Sent:* Tuesday, July 28, 2015 1:13 PM
*To:* Gupta, Rahul; [email protected]
*Subject:* Re: ERROR:core:io_watch_del: BUG - trying to del fd 38 with flags 2 1

Hi Rahul,

These are great news - that you find a 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
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to