Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] WARNING:core:timer_ticker: timer task <b2bl-clean> already scheduled, delaying execution #3211

Closed
devoxy1 opened this issue Sep 28, 2023 · 42 comments

Comments

@devoxy1
Copy link

devoxy1 commented Sep 28, 2023

Hello!

We experience bug which causes opensips to be unresponsive for SIP requests. At some point opensips just stops processing any requests and throws an error like this in log each second:

WARNING:core:timer_ticker: timer task <b2bl-clean> already scheduled 59710 ms ago (now 168359960 ms), delaying execution
WARNING:core:timer_ticker: timer task <b2bl-clean> already scheduled 60700 ms ago (now 168360950 ms), delaying execution

The problem persists until i restart opensips service, then it works ok for some time and then issue happens again. I don't know what causes it so i cannot reproduce, only act once it happens.
Opensips is configured with b2b module and acts like SBC.

OpenSIPS version you are running

version: opensips 3.4.1 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
git revision: 6a60715e9
main.c compiled on 15:34:50 Sep 20 2023 with gcc 9

Describe the bug
Opensips stops responding to requests and calls to it results in 408 timeout.

To Reproduce
Cannot reproduce, the issue is intermittent.

Expected behavior
Opensips doesn't hang and keeps processing calls.

Relevant System Logs
Since i don't know what causes the issue i enabled debug 7 and waited for issue to rise up again so my log file is quite large. I copied logs preceding the Warning for couple of minutes, but if it is needed i can get logs earlier than this.
https://file.io/dNYt3ar7j2HN

OS/environment information

  • Operating System: Ubuntu 20.04.5 LTS
  • OpenSIPS installation: git
  • other relevant information:

Additional context
I already submitted bug report earlier on this problem but after updating to latest version i haven't seen this for a while. However the issue still persists.

@andingv
Copy link

andingv commented Oct 4, 2023

hi @devoxy1 are you doing any blocking operation such as querying the HTTP service or unresponsive DB? I have seen something similar also in the b2b scenarios when the DNS service does not respond, so in all those situations one can see the log lines like this one above about the delayed timer execution. It helped me lookking at the PCAP with DNS queries as an example. HTH

@devoxy1
Copy link
Author

devoxy1 commented Oct 4, 2023

Hi @andingv, no, nothing like that. This is purely test stand so there are no integrations or anything, all hosts in dispatcher and drouting are added as IP so it doesn't do any queries to DNS(except for some basic may be), just simple b2b functional. Thanks for the suggestion though, i will try to check tcpdump when this happens next time.

@github-actions
Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Oct 20, 2023
@devoxy1
Copy link
Author

devoxy1 commented Oct 20, 2023

Up, the problem still comes up

@stale stale bot removed the stale label Oct 20, 2023
@devoxy1
Copy link
Author

devoxy1 commented Oct 27, 2023

The issue seems to be a deadlock, I got opensips trap file and can see messages like
Cannot access memory at address 0x20005, but i'm not sure what's causing it as there many modules mentioned in file.

Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Nov 12, 2023
@devoxy1
Copy link
Author

devoxy1 commented Nov 12, 2023

Up

@stale stale bot removed the stale label Nov 12, 2023
@bogdan-iancu
Copy link
Member

The way to progress here is to try to do a trap (via opensips-cli) while you are experiencing this un-responsivness from OpenSIPS.

@devoxy1
Copy link
Author

devoxy1 commented Nov 27, 2023

Hello @bogdan-iancu!
Thanks for looking into this. I did several traps, here is the latest one from beginning of November - https://www.transfernow.net/dl/202311274mDfsN5Z.
I can collect another one if needed.

@devoxy1
Copy link
Author

devoxy1 commented Nov 28, 2023

@bogdan-iancu
last link might be expired, here is new one https://file.io/hiVCJSl6YMWe

@bogdan-iancu
Copy link
Member

thanks @devoxy1 , I might have a lead here pointing to the rtp_relay module....this is the one blocking the B2B engine actually. Let me do more digging here.

@devoxy1
Copy link
Author

devoxy1 commented Nov 28, 2023

@bogdan-iancu sounds good! I'm up for providing any info that can help to resolve the issue.
Thanks

@razvancrainea
Copy link
Member

@devoxy1 as @bogdan-iancu said, the logs show you are using the rtp_relay module. Can you tell us whether you are engaging rtp_relay in main/request route, or in local_route?

@devoxy1
Copy link
Author

devoxy1 commented Nov 29, 2023

Hello @razvancrainea,

We engage rtp_relay under route{} prior to calling b2b_init_request

if (!has_totag()) {
        b2b_server_new("caller",,$avp(extra_hdrs),$avp(extra_hdr_bodies));
        b2b_client_new("callee", "$ru",,,,$avp(b2b_hdrs),$avp(b2b_hdr_bodies));

        $rtp_relay = "replace-origin replace-session-connection";
        $rtp_relay_peer = "replace-origin replace-session-connection";
        rtp_relay_engage("rtpengine",0);
        # initialize B2B session
        b2b_init_request("refer");

        exit;
    }

@devoxy1
Copy link
Author

devoxy1 commented Dec 5, 2023

Hello @razvancrainea!

Is there any other information i can provide to help investigating this?

Thank you.

Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Dec 21, 2023
@devoxy1
Copy link
Author

devoxy1 commented Dec 21, 2023

Hello guys! this is still actual

@stale stale bot removed the stale label Dec 21, 2023
Copy link

github-actions bot commented Jan 6, 2024

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Jan 6, 2024
@devoxy1
Copy link
Author

devoxy1 commented Jan 9, 2024

Up

@stale stale bot removed the stale label Jan 9, 2024
@devoxy1
Copy link
Author

devoxy1 commented Mar 26, 2024

Up

@github-actions github-actions bot removed the stale label Apr 21, 2024
Copy link

github-actions bot commented May 6, 2024

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label May 6, 2024
@devoxy1
Copy link
Author

devoxy1 commented May 6, 2024

The issue is still actual even on the latest version unfortunately (

@stale stale bot removed the stale label May 6, 2024
@devoxy1
Copy link
Author

devoxy1 commented May 7, 2024

I gathered another trap for this issue https://file.io/0tx8sdqYBKmF
Hope this helps

Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label May 23, 2024
@devoxy1
Copy link
Author

devoxy1 commented May 24, 2024

@razvancrainea Hi, i followed some instructions on how to enable more debugging and was able to collect some more memory information once the issue arises.
Here is logfile with this info https://file.io/vybtUJju7fJh

@stale stale bot removed the stale label May 24, 2024
@devoxy1
Copy link
Author

devoxy1 commented May 28, 2024

@razvancrainea Hello! I also collected traps from 2 crashes with opensips compiled without any optimizations and more debug. Hope this can clear things up a bit.
https://file.io/XG0fm5z8YiVb

Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Jun 14, 2024
@devoxy1
Copy link
Author

devoxy1 commented Jun 14, 2024

up

@stale stale bot removed the stale label Jun 14, 2024
Copy link

github-actions bot commented Jul 1, 2024

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Jul 1, 2024
@devoxy1
Copy link
Author

devoxy1 commented Jul 10, 2024

Up

@stale stale bot removed the stale label Jul 10, 2024
Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Aug 21, 2024
@devoxy1
Copy link
Author

devoxy1 commented Aug 22, 2024

up

@github-actions github-actions bot removed the stale label Aug 24, 2024
@devoxy1
Copy link
Author

devoxy1 commented Sep 19, 2024

It seems like this deadlock doesn't repeat if we don't use key no-late-sdp in bridge. We have REFER scenario with this key due to remote device not supporting it but recently we changed config to default behavior and we haven't seen this deadlock for couple of weeks. I will keep monitor

Copy link

github-actions bot commented Oct 5, 2024

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Oct 5, 2024
Copy link

github-actions bot commented Nov 5, 2024

Marking as closed due to lack of progress for more than 30 days. If this issue is still relevant, please re-open it with additional details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants