-
Notifications
You must be signed in to change notification settings - Fork 251
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
Crash - assertion failed. #429
Comments
The way to duplicate this is if you do this: and then you attempt to do a post like this: It will crash as above. I've duplicated it about a dozen times so far with tests. I presume it is because it is busy fetching information on that user, hence the In short, if someone tries to post for a particular user while it is still fetching for that particular user, it crashes from my testing. So one can mitigate it by checking to see if NULL is returned from a twisterd call checking a user prior to attempting to post their post. It shouldn't crash of course, but at least one can check for the condition prior to doing a post. In case anyone else sees that, at least it can be mitigated. |
What I ended up doing besides just checking it is to programmatically do a This seems to be the same error as is checked in the html interface with the message: |
Hi @centaur1. Thank you very much for your investigation! |
If I can dig more into the code, I'll post it here. It seems to be really two related issues:
I think they are related in that if the lastPostId is unknown (the torrent hasn't been fetched yet either) then one would be using an incorrect K value. My "fix" was doing a dhtget, unfollow, and then follow. I am not sure about all that though since I am still progressing on it. |
This happens reasonably often.
assertion failed. Please file a bugreport at https://github.com/miguelfreitas/twister-core/issues
Please include the following information:
version: 1.0.0.0
$Rev: 7680 $
file: 'libtorrent/src/torrent.cpp'
line: 3066
function: void libtorrent::torrent::piece_finished(int, int, boost::uint32_t, int)
expression: !m_picker->have_piece(index)
stack:
1: assert_fail(char const*, int, char const*, char const*, char const*)
2: libtorrent::torrent::piece_finished(int, int, unsigned int, int)
3: boost::detail::function::void_function_obj_invoker2<boost::_bi::bind_t<void, boost::_mfi::mf4<void, libtorrent::torrent, int, int, unsigned int, int>, boost::_bi::list5<boost::_bi::value<boost::shared_ptrlibtorrent::torrent >, boost::_bi::value, boost::arg<1>, boost::arg<2>, boost::_bi::value > >, void, int, unsigned int>::invoke(boost::detail::function::function_buffer&, int, unsigned int)
4: libtorrent::torrent::on_piece_verified(int, libtorrent::disk_io_job const&, boost::function<void (int, unsigned int)>)
5: void boost::_mfi::mf3<void, libtorrent::torrent, int, libtorrent::disk_io_job const&, boost::function<void (int, unsigned int)> >::call<boost::shared_ptrlibtorrent::torrent, int, libtorrent::disk_io_job const, boost::function<void (int, unsigned int)> >(boost::shared_ptrlibtorrent::torrent&, void const*, int&, libtorrent::disk_io_job const&, boost::function<void (int, unsigned int)>&) const
6: void boost::_bi::list4<boost::_bi::value<boost::shared_ptrlibtorrent::torrent >, boost::arg<1>, boost::arg<2>, boost::_bi::value<boost::function<void (int, unsigned int)> > >::operator()<boost::_mfi::mf3<void, libtorrent::torrent, int, libtorrent::disk_io_job const&, boost::function<void (int, unsigned int)> >, boost::_bi::list2<int&, libtorrent::disk_io_job const&> >(boost::_bi::type, boost::_mfi::mf3<void, libtorrent::torrent, int, libtorrent::disk_io_job const&, boost::function<void (int, unsigned int)> >&, boost::_bi::list2<int&, libtorrent::disk_io_job const&>&, int)
7: boost::detail::function::void_function_obj_invoker2<boost::_bi::bind_t<void, boost::_mfi::mf3<void, libtorrent::torrent, int, libtorrent::disk_io_job const&, boost::function<void (int, unsigned int)> >, boost::_bi::list4<boost::_bi::value<boost::shared_ptrlibtorrent::torrent >, boost::arg<1>, boost::arg<2>, boost::_bi::value<boost::function<void (int, unsigned int)> > > >, void, int, libtorrent::disk_io_job const&>::invoke(boost::detail::function::function_buffer&, int, libtorrent::disk_io_job const&)
8: libtorrent::completion_queue_handler(std::__1::list<std::__1::pair<libtorrent::disk_io_job, int>, std::__1::allocator<std::__1::pair<libtorrent::disk_io_job, int> > >)
9: void boost::asio::asio_handler_invoke<boost::_bi::bind_t<void, void ()(std::__1::list<std::__1::pair<libtorrent::disk_io_job, int>, std::__1::allocator<std::__1::pair<libtorrent::disk_io_job, int> > >), boost::_bi::list1<boost::_bi::value<std::__1::list<std::__1::pair<libtorrent::disk_io_job, int>, std::__1::allocator<std::__1::pair<libtorrent::disk_io_job, int> > >> > > >(boost::_bi::bind_t<void, void ()(std::__1::list<std::__1::pair<libtorrent::disk_io_job, int>, std::__1::allocator<std::__1::pair<libtorrent::disk_io_job, int> > >), boost::_bi::list1<boost::_bi::value<std::__1::list<std::__1::pair<libtorrent::disk_io_job, int>, std::__1::allocator<std::__1::pair<libtorrent::disk_io_job, int> > >> > >&, ...)
10: boost::asio::detail::completion_handler<boost::_bi::bind_t<void, void ()(std::__1::list<std::__1::pair<libtorrent::disk_io_job, int>, std::__1::allocator<std::__1::pair<libtorrent::disk_io_job, int> > >), boost::_bi::list1<boost::_bi::value<std::__1::list<std::__1::pair<libtorrent::disk_io_job, int>, std::__1::allocator<std::__1::pair<libtorrent::disk_io_job, int> > >> > > >::do_complete(void*, boost::asio::detail::scheduler_operation*, boost::system::error_code const&, unsigned long)
11: boost::asio::detail::scheduler::do_run_one(boost::asio::detail::conditionally_enabled_mutex::scoped_lock&, boost::asio::detail::scheduler_thread_info&, boost::system::error_code const&)
12: boost::asio::detail::scheduler::run(boost::system::error_code&)
13: boost::asio::io_context::run(boost::system::error_code&)
14: libtorrent::aux::session_impl::main_thread()
15: boost::asio::detail::posix_thread::func<boost::_bi::bind_t<void, boost::_mfi::mf0<void, libtorrent::aux::session_impl>, boost::_bi::list1<boost::_bi::valuelibtorrent::aux::session_impl* > > >::run()
16: boost_asio_detail_posix_thread_function
17: _pthread_body
18: _pthread_body
19: thread_start
The text was updated successfully, but these errors were encountered: