inotify-cpp icon indicating copy to clipboard operation
inotify-cpp copied to clipboard

wdToPath crashes

Open belousotroll opened this issue 2 years ago • 1 comments

#0 0x0000000000585cc4 in boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorstd::out_of_range >::clone_impl(boost::exception_detail::error_info_injectorstd::out_of_range const&) () #1 0x00000000005847bb in boost::wrapexceptstd::out_of_range::wrapexcept(boost::exception_detail::error_info_injectorstd::out_of_range const&) () #2 0x0000000000582d91 in boost::wrapexcept<boost::exception_detail::remove_error_info_injectorstd::out_of_range::type> boost::exception_detail::enable_bothstd::out_of_range(std::out_of_range const&) () #3 0x0000000000580f9f in void boost::throw_exceptionstd::out_of_range(std::out_of_range const&) () #4 0x000000000057f50b in std::filesystem::cxx11::path const& boost::bimaps::detail::non_mutable_data_unique_map_view_access<boost::bimaps::views::map_view<boost::bimaps::relation::member_at::left, boost::bimaps::detail::bimap_core<int, std::filesystem::cxx11::path, mpl::na, mpl::na, mpl::na> >, boost::bimaps::relation::member_at::left, boost::bimaps::detail::bimap_core<int, std::filesystem::cxx11::path, mpl::na, mpl::na, mpl::na> >::at(int const&) const () #5 0x000000000057d2e5 in inotify::Inotify::wdToPathabi:cxx11 () #6 0x000000000057da2d in inotify::Inotify::readEventsFromBuffer(unsigned char*, int, std::vector<inotify::FileSystemEvent, std::allocatorinotify::FileSystemEvent >&) () #7 0x000000000057d457 in inotify::Inotify::getNextEvent() () #8 0x0000000000577ac3 in inotify::NotifierBuilder::runOnce() ()

Something went wrong in that area.

belousotroll avatar Jan 25 '23 05:01 belousotroll

I don't understand C++ and Linux well enough, so it's hard for me to find the cause of the crash. As I understand it, the reason is that event->wd passes an invalid file descriptor, but I don't understand how.

Maybe you can help me to figure out this issue. It happens once per 2-3 months, hard to detect/reproduce.

belousotroll avatar Jan 25 '23 05:01 belousotroll