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

SIGABRT - Assert fail in invariant checker #3089

Closed
RicoTilgner opened this issue Jun 5, 2018 · 7 comments
Closed

SIGABRT - Assert fail in invariant checker #3089

RicoTilgner opened this issue Jun 5, 2018 · 7 comments
Labels

Comments

@RicoTilgner
Copy link

libtorrent version (or branch): [tags/libtorrent-1_1_7]

platform/architecture: linux x64

compiler and compiler version: gcc (GCC) 7.3.1 20180406

please describe what symptom you see, what you would expect to see instead and
how to reproduce it.

running a client with a couple (<100) share_mode only torrents, it consistently crashes after a few hours. Just built a libtorrent with invariant checks enabled and it complains about m_in_use in peer_connection::second_tick.
Full stack trace: stack.txt

@RicoTilgner
Copy link
Author

I've been running the fix suggested in #3084 now and it's been running stable for ~15h now.

@arvidn
Copy link
Owner

arvidn commented Jun 6, 2018

good to know. that setting is 0 by default at least

@RicoTilgner
Copy link
Author

sorry, wrong alert, libtorrent this time actually went into an infinite loop. Unfortunately I only realized after I killed it already. :/

@RicoTilgner
Copy link
Author

ok, got it to repro again, this time with much more insight since I had a debugger running :)
It's stuck in libtorrent::torrent::second_tick, the loop over m_connections that starts at 10499. (Same place where I had the assert fail before)
idx is toggling between 31 and 32, however m_connections only has 26 elements.
I'm not exactly sure where items are deleted from m_connections, but looking at line 10527 it might be that they get removed from that container when they're disconnected.
My guess would be that the way this code tries to avoid the invalidation of the iterators doesn't work too well.

@aldenml
Copy link
Contributor

aldenml commented Jun 6, 2018

@RicoTilgner can you test master? there are a lot of improvements (and fixes) there related to iteration and disconnection of m_connections

@RicoTilgner
Copy link
Author

thanks for the tip!
Built from master now, can definitely see a difference in peer management... upload rate is way higher than with 1.1.7. :)
I'll let it run for a while now in debug mode and see if the problem still repros.

@stale
Copy link

stale bot commented Feb 29, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Feb 29, 2020
@stale stale bot closed this as completed Mar 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants