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

DataStorm/events: Unhandled exception thrown: read access violation. #2926

Open
pepone opened this issue Oct 18, 2024 · 2 comments
Open

DataStorm/events: Unhandled exception thrown: read access violation. #2926

pepone opened this issue Oct 18, 2024 · 2 comments

Comments

@pepone
Copy link
Member

pepone commented Oct 18, 2024

I got this on Windows while running DataStorm/events test in a loop:

*** [1/1 loop=23850] Running cpp/DataStorm/events tests ***
[ running client/server test - 10/17/24 20:58:21 ]
- Config: Debug,x64
(C:\Users\jose\source\repos\3.8\ice\cpp\test\DataStorm\events\msbuild\reader\x64\Debug\reader.exe --Ice.Default.Host=127.0.0.1 --Ice.Warn.Connections=1 --Ice.Default.Protocol=tcp --Ice.IPv6=0 --Ice.PrintStackTraces=1 --Ice.ThreadPool.Server.Size=1 --Ice.ThreadPool.Server.SizeMax=3 --Ice.ThreadPool.Server.SizeWarn=0 --Ice.PrintAdapterReady=1 --DataStorm.Node.Server.Endpoints="tcp -p 12020" --DataStorm.Trace.Topic=1 --DataStorm.Trace.Session=3 --DataStorm.Trace.Data=2 --Ice.Trace.Protocol=2 --Ice.Trace.Network=2 --Ice.LogFile=C:\Users\jose\source\repos\3.8\ice\cpp\test\DataStorm\events\server-101724-2058.log env={'PATH': 'C:\\Users\\jose\\source\\repos\\3.8\\ice\\cpp\\test\\Common\\msbuild\\x64\\Debug;C:\\Users\\jose\\source\\repos\\3.8\\ice\\cpp\\bin\\x64\\Debug'})
(C:\Users\jose\source\repos\3.8\ice\cpp\test\DataStorm\events\msbuild\writer\x64\Debug\writer.exe --Ice.Default.Host=127.0.0.1 --Ice.Warn.Connections=1 --Ice.Default.Protocol=tcp --Ice.IPv6=0 --Ice.PrintStackTraces=1 --DataStorm.Node.Server.Enabled=0 --DataStorm.Node.ConnectTo="tcp -p 12020" --DataStorm.Trace.Topic=1 --DataStorm.Trace.Session=3 --DataStorm.Trace.Data=2 --Ice.Trace.Protocol=2 --Ice.Trace.Network=2 --Ice.LogFile=C:\Users\jose\source\repos\3.8\ice\cpp\test\DataStorm\events\client-101724-2058.log env={'PATH': 'C:\\Users\\jose\\source\\repos\\3.8\\ice\\cpp\\test\\Common\\msbuild\\x64\\Debug;C:\\Users\\jose\\source\\repos\\3.8\\ice\\cpp\\bin\\x64\\Debug'})
testing single key reader/writer... ok
testing multi-key reader/writer... ok
testing any-key reader/writer... ok
testing reader/multi-key writer... ok
testing reader/any-key writer... ok
testing multi-key reader/multi-key writer... ok
testing any-key reader/any-key writer... ok
testing filtered reader/writer... ok
testing filtered reader/multi-key writer... ok
testing filtered reader/any-key writer... ok
testing filtered sample reader... process C:\Users\jose\source\repos\3.8\ice\cpp\test\DataStorm\events\msbuild\writer\x64\Debug\writer.exe --Ice.Default.Host=127.0.0.1 --Ice.Warn.Connections=1 --Ice.Default.Protocol=tcp --Ice.IPv6=0 --Ice.PrintStackTraces=1 --DataStorm.Node.Server.Enabled=0 --DataStorm.Node.ConnectTo="tcp -p 12020" --DataStorm.Trace.Topic=1 --DataStorm.Trace.Session=3 --DataStorm.Trace.Data=2 --Ice.Trace.Protocol=2 --Ice.Trace.Network=2 --Ice.LogFile=C:\Users\jose\source\repos\3.8\ice\cpp\test\DataStorm\events\client-101724-2058.log pid=11108 is hanging - 10/17/24 20:59:51

Stack trace

>	reader.exe!std::_Matcher<char const *,char,std::regex_traits<char>,char const *>::_Match_pat(std::_Node_base * _Nx) Line 3501	C++
 	reader.exe!std::_Matcher<char const *,char,std::regex_traits<char>,char const *>::_Do_if(std::_Node_if * _Node) Line 3166	C++
 	reader.exe!std::_Matcher<char const *,char,std::regex_traits<char>,char const *>::_Match_pat(std::_Node_base * _Nx) Line 3625	C++
 	reader.exe!std::_Matcher<char const *,char,std::regex_traits<char>,char const *>::_Match<std::allocator<std::sub_match<char const *>>>(std::match_results<char const *,std::allocator<std::sub_match<char const *>>> * _Matches, bool _Full_match) Line 1628	C++
 	reader.exe!std::_Regex_match1<char const *,std::allocator<std::sub_match<char const *>>,char,std::regex_traits<char>,char const *>(const char * _First, const char * _Last, std::match_results<char const *,std::allocator<std::sub_match<char const *>>> * _Matches, const std::basic_regex<char,std::regex_traits<char>> & _Re, std::regex_constants::match_flag_type _Flgs, bool _Full) Line 2165	C++
 	reader.exe!std::regex_match<std::char_traits<char>,std::allocator<char>,char,std::regex_traits<char>>(const std::string & _Str, const std::basic_regex<char,std::regex_traits<char>> & _Re, std::regex_constants::match_flag_type _Flgs) Line 2222	C++
 	reader.exe!DataStorm::makeRegexFilter::__l2::<lambda_1>::()::__l2::<lambda_1>::operator()(const std::string & value) Line 1831	C++
 	reader.exe!std::invoke<``DataStorm::makeRegexFilter<std::string>'::`2'::<lambda_1>::operator()'::`2'::<lambda_1> &,std::string const &>(DataStorm::makeRegexFilter::__l2::<lambda_1>::()::__l2::<lambda_1> & _Obj, const std::string & _Arg1) Line 1734	C++
 	reader.exe!std::_Func_impl_no_alloc<``DataStorm::makeRegexFilter<std::string>'::`2'::<lambda_1>::operator()'::`2'::<lambda_1>,bool,std::string const &>::_Do_call(const std::string & <_Args_0>) Line 878	C++
 	reader.exe!std::_Func_class<bool,std::string const &>::operator()(const std::string & <_Args_0>) Line 921	C++
 	reader.exe!DataStormI::FilterT<std::string,DataStormI::KeyT<std::string>>::match(const std::shared_ptr<DataStormI::Filterable> & value) Line 428	C++
 	datastorm38a0d.dll!DataStormI::TopicI::getElementSpecs(__int64 topicId, const std::vector<DataStormContract::ElementInfo,std::allocator<DataStormContract::ElementInfo>> & infos, const std::shared_ptr<DataStormI::SessionI> & session) Line 185	C++
 	datastorm38a0d.dll!DataStormI::SessionI::announceElements::__l2::<lambda_1>::operator()(DataStormI::TopicI * topic, DataStormI::SessionI::TopicSubscriber & __formal, DataStormI::SessionI::TopicSubscribers & __formal) Line 291	C++
 	datastorm38a0d.dll!std::invoke<`DataStormI::SessionI::announceElements'::`2'::<lambda_1> &,DataStormI::TopicI *,DataStormI::SessionI::TopicSubscriber &,DataStormI::SessionI::TopicSubscribers &>(DataStormI::SessionI::announceElements::__l2::<lambda_1> & _Obj, DataStormI::TopicI * && _Arg1, DataStormI::SessionI::TopicSubscriber & <_Args2_0>, DataStormI::SessionI::TopicSubscribers & <_Args2_1>) Line 1714	C++
 	datastorm38a0d.dll!std::_Func_impl_no_alloc<`DataStormI::SessionI::announceElements'::`2'::<lambda_1>,void,DataStormI::TopicI *,DataStormI::SessionI::TopicSubscriber &,DataStormI::SessionI::TopicSubscribers &>::_Do_call(DataStormI::TopicI * && <_Args_0>, DataStormI::SessionI::TopicSubscriber & <_Args_1>, DataStormI::SessionI::TopicSubscribers & <_Args_2>) Line 874	C++
 	datastorm38a0d.dll!std::_Func_class<void,DataStormI::TopicI *,DataStormI::SessionI::TopicSubscriber &,DataStormI::SessionI::TopicSubscribers &>::operator()(DataStormI::TopicI * <_Args_0>, DataStormI::SessionI::TopicSubscriber & <_Args_1>, DataStormI::SessionI::TopicSubscribers & <_Args_2>) Line 920	C++
 	datastorm38a0d.dll!DataStormI::SessionI::runWithTopics(__int64 id, std::function<void __cdecl(DataStormI::TopicI *,DataStormI::SessionI::TopicSubscriber &,DataStormI::SessionI::TopicSubscribers &)> fn) Line 1210	C++
 	datastorm38a0d.dll!DataStormI::SessionI::announceElements(__int64 topicId, std::vector<DataStormContract::ElementInfo,std::allocator<DataStormContract::ElementInfo>> elements, const Ice::Current & __formal) Line 280	C++
 	datastorm38a0d.dll!DataStormContract::Session::_iceD_announceElements(Ice::IncomingRequest & request, std::function<void __cdecl(Ice::OutgoingResponse)> sendResponse) Line 808	C++
 	datastorm38a0d.dll!DataStormContract::SubscriberSession::dispatch(Ice::IncomingRequest & request, std::function<void __cdecl(Ice::OutgoingResponse)> sendResponse) Line 1164	C++
 	datastorm38a0d.dll!`anonymous namespace'::DispatchInterceptorI::dispatch(Ice::IncomingRequest & request, std::function<void __cdecl(Ice::OutgoingResponse)> sendResponse) Line 32	C++
 	ice38a0d.dll!IceInternal::ServantManager::dispatch(Ice::IncomingRequest & request, std::function<void __cdecl(Ice::OutgoingResponse)> sendResponse) Line 486	C++
 	ice38a0d.dll!IceInternal::LoggerMiddleware::dispatch(Ice::IncomingRequest & request, std::function<void __cdecl(Ice::OutgoingResponse)> sendResponse) Line 29	C++
 	ice38a0d.dll!Ice::ConnectionI::dispatchAll(Ice::InputStream & stream, int requestCount, int requestId, unsigned char compress, const std::shared_ptr<Ice::ObjectAdapterI> & adapter) Line 3454	C++
 	ice38a0d.dll!Ice::ConnectionI::parseMessage::__l26::<lambda_1>::operator()(Ice::InputStream & messageStream) Line 3253	C++
 	ice38a0d.dll!std::invoke<`Ice::ConnectionI::parseMessage'::`26'::<lambda_1> &,Ice::InputStream &>(Ice::ConnectionI::parseMessage::__l26::<lambda_1> & _Obj, Ice::InputStream & _Arg1) Line 1734	C++
 	ice38a0d.dll!std::_Func_impl_no_alloc<`Ice::ConnectionI::parseMessage'::`26'::<lambda_1>,bool,Ice::InputStream &>::_Do_call(Ice::InputStream & <_Args_0>) Line 878	C++
 	ice38a0d.dll!std::_Func_class<bool,Ice::InputStream &>::operator()(Ice::InputStream & <_Args_0>) Line 921	C++
 	ice38a0d.dll!Ice::ConnectionI::upcall(std::function<void __cdecl(std::shared_ptr<Ice::ConnectionI>)> connectionStartCompleted, const std::vector<Ice::ConnectionI::OutgoingMessage,std::allocator<Ice::ConnectionI::OutgoingMessage>> & sentCBs, std::function<bool __cdecl(Ice::InputStream &)> messageUpcall, Ice::InputStream & messageStream) Line 1532	C++
 	ice38a0d.dll!Ice::ConnectionI::message(IceInternal::ThreadPoolCurrent & current) Line 1461	C++
 	ice38a0d.dll!IceInternal::ThreadPool::run(const std::shared_ptr<IceInternal::ThreadPool::EventHandlerThread> & thread) Line 723	C++
 	ice38a0d.dll!IceInternal::ThreadPool::EventHandlerThread::run() Line 1080	C++
 	ice38a0d.dll!std::invoke<void (__cdecl IceInternal::ThreadPool::EventHandlerThread::*)(void),IceInternal::ThreadPool::EventHandlerThread *>(void(IceInternal::ThreadPool::EventHandlerThread::*)() && _Obj, IceInternal::ThreadPool::EventHandlerThread * && _Arg1) Line 1720	C++
 	ice38a0d.dll!std::thread::_Invoke<std::tuple<void (__cdecl IceInternal::ThreadPool::EventHandlerThread::*)(void),IceInternal::ThreadPool::EventHandlerThread *>,0,1>(void * _RawVals) Line 61	C++
 	ucrtbased.dll!00007ffa74543010()	Unknown
 	kernel32.dll!00007ffac3167374()	Unknown
 	ntdll.dll!00007ffac49dcc91()	Unknown
@pepone pepone added this to the 3.8.0 milestone Oct 18, 2024
@pepone
Copy link
Member Author

pepone commented Oct 21, 2024

Main thread stack:

 	ntdll.dll!00007ffac4a30f24()	Unknown
 	ntdll.dll!00007ffac49b9205()	Unknown
 	msvcp140d.dll!00007ffa83be2c63()	Unknown
 	msvcp140d.dll!00007ffa83be29d5()	Unknown
 	datastorm38a0d.dll!std::_Mutex_base::lock() Line 52	C++
 	datastorm38a0d.dll!std::lock_guard<std::mutex>::lock_guard<std::mutex>(std::mutex & _Mtx) Line 454	C++
 	datastorm38a0d.dll!DataStormI::TopicReaderI::createFiltered(const std::shared_ptr<DataStormI::Filter> & filter, const std::string & name, DataStorm::ReaderConfig config, const std::string & sampleFilterName, std::vector<enum std::byte,std::allocator<enum std::byte>> sampleFilterCriteria) Line 881	C++
 	reader.exe!DataStorm::FilteredKeyReader<std::string,std::string,std::string>::FilteredKeyReader<std::string,std::string,std::string><std::string,std::vector<enum DataStorm::SampleEvent,std::allocator<enum DataStorm::SampleEvent>>>(const DataStorm::Topic<std::string,std::string,std::string> & topic, const DataStorm::Filter<std::string> & keyFilter, const DataStorm::Filter<std::vector<enum DataStorm::SampleEvent,std::allocator<enum DataStorm::SampleEvent>>> & sampleFilter, const std::string & name, const DataStorm::ReaderConfig & config) Line 1546	C++
 	reader.exe!DataStorm::makeFilteredKeyReader<std::string,std::vector<enum DataStorm::SampleEvent,std::allocator<enum DataStorm::SampleEvent>>,std::string,std::string,std::string>(const DataStorm::Topic<std::string,std::string,std::string> & topic, const DataStorm::Filter<std::string> & keyFilter, const DataStorm::Filter<std::vector<enum DataStorm::SampleEvent,std::allocator<enum DataStorm::SampleEvent>>> & sampleFilter, const std::string & name, const DataStorm::ReaderConfig & config) Line 1023	C++
>	reader.exe!main(int argc, char * * argv) Line 341	C++
 	reader.exe!invoke_main() Line 79	C++
 	reader.exe!__scrt_common_main_seh() Line 288	C++
 	reader.exe!__scrt_common_main() Line 331	C++
 	reader.exe!mainCRTStartup(void * __formal) Line 17	C++
 	kernel32.dll!00007ffac3167374()	Unknown
 	ntdll.dll!00007ffac49dcc91()	Unknown

auto reader13 = makeFilteredKeyReader(
topic,
Filter<string>("_regex", "elem[1]"),
Filter<SampleEventSeq>("_event", SampleEventSeq{SampleEvent::Remove}),
"",
config);

Which correspond with

@pepone
Copy link
Member Author

pepone commented Oct 22, 2024

Got another similar crash with the same test, after 11625 iterations

Unhandled exception thrown: read access violation.
this->**_Rep** was 0xFFFFFFFFFFFFFFDF.
 	reader.exe!std::basic_regex<char,std::regex_traits<char>>::flags() Line 1980	C++
 	reader.exe!std::_Regex_match1<char const *,std::allocator<std::sub_match<char const *>>,char,std::regex_traits<char>,char const *>(const char * _First, const char * _Last, std::match_results<char const *,std::allocator<std::sub_match<char const *>>> * _Matches, const std::basic_regex<char,std::regex_traits<char>> & _Re, std::regex_constants::match_flag_type _Flgs, bool _Full) Line 2163	C++
 	reader.exe!std::regex_match<std::char_traits<char>,std::allocator<char>,char,std::regex_traits<char>>(const std::string & _Str, const std::basic_regex<char,std::regex_traits<char>> & _Re, std::regex_constants::match_flag_type _Flgs) Line 2222	C++
 	reader.exe!DataStorm::makeRegexFilter::__l2::<lambda_1>::()::__l2::<lambda_1>::operator()(const std::string & value) Line 1831	C++
 	reader.exe!std::invoke<``DataStorm::makeRegexFilter<std::string>'::`2'::<lambda_1>::operator()'::`2'::<lambda_1> &,std::string const &>(DataStorm::makeRegexFilter::__l2::<lambda_1>::()::__l2::<lambda_1> & _Obj, const std::string & _Arg1) Line 1734	C++
 	reader.exe!std::_Func_impl_no_alloc<``DataStorm::makeRegexFilter<std::string>'::`2'::<lambda_1>::operator()'::`2'::<lambda_1>,bool,std::string const &>::_Do_call(const std::string & <_Args_0>) Line 878	C++
 	reader.exe!std::_Func_class<bool,std::string const &>::operator()(const std::string & <_Args_0>) Line 921	C++
 	reader.exe!DataStormI::FilterT<std::string,DataStormI::KeyT<std::string>>::match(const std::shared_ptr<DataStormI::Filterable> & value) Line 428	C++
>	datastorm38a0d.dll!DataStormI::TopicI::attachElements(__int64 topicId, const std::vector<DataStormContract::ElementSpec,std::allocator<DataStormContract::ElementSpec>> & elements, const std::shared_ptr<DataStormI::SessionI> & session, DataStormContract::SessionPrx prx, const std::chrono::time_point<std::chrono::system_clock,std::chrono::duration<__int64,std::ratio<1,10000000>>> & now) Line 390	C++
 	datastorm38a0d.dll!DataStormI::SessionI::attachElements::__l2::<lambda_1>::operator()(DataStormI::TopicI * topic, DataStormI::SessionI::TopicSubscriber & subscriber, DataStormI::SessionI::TopicSubscribers & __formal) Line 330	C++
 	datastorm38a0d.dll!std::invoke<`DataStormI::SessionI::attachElements'::`2'::<lambda_1> &,DataStormI::TopicI *,DataStormI::SessionI::TopicSubscriber &,DataStormI::SessionI::TopicSubscribers &>(DataStormI::SessionI::attachElements::__l2::<lambda_1> & _Obj, DataStormI::TopicI * && _Arg1, DataStormI::SessionI::TopicSubscriber & <_Args2_0>, DataStormI::SessionI::TopicSubscribers & <_Args2_1>) Line 1714	C++
 	datastorm38a0d.dll!std::_Func_impl_no_alloc<`DataStormI::SessionI::attachElements'::`2'::<lambda_1>,void,DataStormI::TopicI *,DataStormI::SessionI::TopicSubscriber &,DataStormI::SessionI::TopicSubscribers &>::_Do_call(DataStormI::TopicI * && <_Args_0>, DataStormI::SessionI::TopicSubscriber & <_Args_1>, DataStormI::SessionI::TopicSubscribers & <_Args_2>) Line 874	C++
 	datastorm38a0d.dll!std::_Func_class<void,DataStormI::TopicI *,DataStormI::SessionI::TopicSubscriber &,DataStormI::SessionI::TopicSubscribers &>::operator()(DataStormI::TopicI * <_Args_0>, DataStormI::SessionI::TopicSubscriber & <_Args_1>, DataStormI::SessionI::TopicSubscribers & <_Args_2>) Line 920	C++
 	datastorm38a0d.dll!DataStormI::SessionI::runWithTopics(__int64 id, std::function<void __cdecl(DataStormI::TopicI *,DataStormI::SessionI::TopicSubscriber &,DataStormI::SessionI::TopicSubscribers &)> fn) Line 1210	C++
 	datastorm38a0d.dll!DataStormI::SessionI::attachElements(__int64 id, std::vector<DataStormContract::ElementSpec,std::allocator<DataStormContract::ElementSpec>> elements, bool initialize, const Ice::Current & __formal) Line 316	C++
 	datastorm38a0d.dll!DataStormContract::Session::_iceD_attachElements(Ice::IncomingRequest & request, std::function<void __cdecl(Ice::OutgoingResponse)> sendResponse) Line 826	C++
 	datastorm38a0d.dll!DataStormContract::SubscriberSession::dispatch(Ice::IncomingRequest & request, std::function<void __cdecl(Ice::OutgoingResponse)> sendResponse) Line 1174	C++
 	datastorm38a0d.dll!`anonymous namespace'::DispatchInterceptorI::dispatch(Ice::IncomingRequest & request, std::function<void __cdecl(Ice::OutgoingResponse)> sendResponse) Line 32	C++
 	ice38a0d.dll!IceInternal::ServantManager::dispatch(Ice::IncomingRequest & request, std::function<void __cdecl(Ice::OutgoingResponse)> sendResponse) Line 486	C++
 	ice38a0d.dll!IceInternal::LoggerMiddleware::dispatch(Ice::IncomingRequest & request, std::function<void __cdecl(Ice::OutgoingResponse)> sendResponse) Line 29	C++
 	ice38a0d.dll!Ice::ConnectionI::dispatchAll(Ice::InputStream & stream, int requestCount, int requestId, unsigned char compress, const std::shared_ptr<Ice::ObjectAdapterI> & adapter) Line 3454	C++
 	ice38a0d.dll!Ice::ConnectionI::parseMessage::__l26::<lambda_1>::operator()(Ice::InputStream & messageStream) Line 3253	C++
 	ice38a0d.dll!std::invoke<`Ice::ConnectionI::parseMessage'::`26'::<lambda_1> &,Ice::InputStream &>(Ice::ConnectionI::parseMessage::__l26::<lambda_1> & _Obj, Ice::InputStream & _Arg1) Line 1734	C++
 	ice38a0d.dll!std::_Func_impl_no_alloc<`Ice::ConnectionI::parseMessage'::`26'::<lambda_1>,bool,Ice::InputStream &>::_Do_call(Ice::InputStream & <_Args_0>) Line 878	C++
 	ice38a0d.dll!std::_Func_class<bool,Ice::InputStream &>::operator()(Ice::InputStream & <_Args_0>) Line 921	C++
 	ice38a0d.dll!Ice::ConnectionI::upcall(std::function<void __cdecl(std::shared_ptr<Ice::ConnectionI>)> connectionStartCompleted, const std::vector<Ice::ConnectionI::OutgoingMessage,std::allocator<Ice::ConnectionI::OutgoingMessage>> & sentCBs, std::function<bool __cdecl(Ice::InputStream &)> messageUpcall, Ice::InputStream & messageStream) Line 1532	C++
 	ice38a0d.dll!Ice::ConnectionI::message(IceInternal::ThreadPoolCurrent & current) Line 1461	C++
 	ice38a0d.dll!IceInternal::ThreadPool::run(const std::shared_ptr<IceInternal::ThreadPool::EventHandlerThread> & thread) Line 723	C++
 	ice38a0d.dll!IceInternal::ThreadPool::EventHandlerThread::run() Line 1080	C++
 	ice38a0d.dll!std::invoke<void (__cdecl IceInternal::ThreadPool::EventHandlerThread::*)(void),IceInternal::ThreadPool::EventHandlerThread *>(void(IceInternal::ThreadPool::EventHandlerThread::*)() && _Obj, IceInternal::ThreadPool::EventHandlerThread * && _Arg1) Line 1720	C++
 	ice38a0d.dll!std::thread::_Invoke<std::tuple<void (__cdecl IceInternal::ThreadPool::EventHandlerThread::*)(void),IceInternal::ThreadPool::EventHandlerThread *>,0,1>(void * _RawVals) Line 61	C++
 	ucrtbased.dll!00007ffa80d43010()	Unknown
 	kernel32.dll!00007ffac3167374()	Unknown
 	ntdll.dll!00007ffac49dcc91()	Unknown

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

1 participant