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

Unhandled exception thrown by Boost.Asio #7371

Open
glassez opened this issue Apr 7, 2023 · 13 comments
Open

Unhandled exception thrown by Boost.Asio #7371

glassez opened this issue Apr 7, 2023 · 13 comments

Comments

@glassez
Copy link
Contributor

glassez commented Apr 7, 2023

There are many crash reports in qBittorrent bug tracker that point to unhandled exception thrown in boost::asio::detail::socket_select_interrupter::open_descriptors. IIRC, exception is often thrown once some VPN service is enabled during qBittorrent run.

@glassez glassez changed the title Unhandled exception thrown by Boist.Asio Unhandled exception thrown by Boost.Asio Apr 7, 2023
@glassez
Copy link
Contributor Author

glassez commented Apr 9, 2023

Yet another related crash report, but qBittorrent is crashed after hibernation: qbittorrent/qBittorrent#18823.

@xavier2k6
Copy link
Contributor

@arvidn Going over chriskohlhoff/asio#1061 (comment) & chriskohlhoff/asio#1061 (comment) - I don't know if this is related/relevant but the only place left in libtorrent code that wasn't changed from async_receive to async_receive_from was in ip_notifier.cpp

m_socket.async_receive(boost::asio::buffer(m_buf)

&

m_socket.async_receive(boost::asio::buffer(m_buf)

What if there's a socket failure/error not properly being handled??

@xavier2k6
Copy link
Contributor

@arvidn Reproducible steps in qbittorrent/qBittorrent#18811 (comment)

@xavier2k6
Copy link
Contributor

@arvidn Ping

@xavier2k6
Copy link
Contributor

I see you're prepping 2.0.9 / 1.2.19 for release, would a fix for this issue make it in to these versions by any chance?

@arvidn
Copy link
Owner

arvidn commented May 21, 2023

I don't believe there is a fix

@arvidn
Copy link
Owner

arvidn commented May 21, 2023

I don't know if this is related/relevant but the only place left in libtorrent code that wasn't changed from async_receive to async_receive_from was in ip_notifier.cpp

Chris' comment was about using null_buffers instead of allocating the receive buffer up-front. In more recent versions of asio, null_buffers have been replaced by async_wait() on sockets. This is still done on the UDP socket.

@stale
Copy link

stale bot commented Sep 17, 2023

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.

@xavier2k6
Copy link
Contributor

keep alive

@stale stale bot removed the stale label Sep 26, 2023
@xavier2k6
Copy link
Contributor

First record/reference of issue with boost::asio::detail::socket_select_interrupter::open_descriptors

@xavier2k6
Copy link
Contributor

We are still getting crash reports of this over at qBittorrent.

@arvidn
Copy link
Owner

arvidn commented Nov 14, 2023

I suspect I would need to not use async_wait() on sockets.

@xavier2k6
Copy link
Contributor

Still getting crashes even with Boost 1.86.0

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

No branches or pull requests

4 participants
@arvidn @glassez @xavier2k6 and others