intel / llvm

Intel staging area for llvm.org contribution. Home for Intel LLVM-based projects.
Other
1.2k stars 708 forks source link

SchedulerTest.HostTaskCleanup failed on Windows with "access violation" #13457

Closed steffenlarsen closed 21 hours ago

steffenlarsen commented 2 months ago

Describe the bug

SchedulerTest.HostTaskCleanup failed in Windows post commit CI for https://github.com/intel/llvm/commit/5ea799284c7c13e8727536627bc64c79f614ec58 but passed with later post-commits.

Failure:

Exception Code: 0xC0000005
 #0 0x00007ff6c0b1c040 waitFunc(unsigned int, struct _pi_event *const *) ...\llvm\src\sycl\unittests\scheduler\CommandsWaitForEvents.cpp:50:0
 #1 0x00007ff6c0aeb4f4 sycl::_V1::unittest::proxy_mock_piEventsWait<enum _pi_result, unsigned int, struct _pi_event *const *>(unsigned int, struct _pi_event *const *) ...\llvm\build\include\sycl\detail\pi.def:96:0
 #2 0x00007ff6c09c5a04 sycl::_V1::detail::plugin::call_nocheck<67, unsigned __int64, struct _pi_event **>(unsigned __int64, struct _pi_event **) const ...\llvm\src\sycl\source\detail\plugin.hpp:231:0
 #3 0x00007ff6c09f1344 sycl::_V1::detail::plugin::call ...\llvm\src\sycl\source\detail\plugin.hpp:257:0
 #4 0x00007ff6c09f1344 sycl::_V1::detail::waitForEvents ...\llvm\src\sycl\source\detail\memory_manager.cpp:128:0
 #5 0x00007ff6c09f0d9a sycl::_V1::detail::MemoryManager::release(class std::shared_ptr<class sycl::_V1::detail::context_impl>, class sycl::_V1::detail::SYCLMemObjI *, void *, class std::vector<class std::shared_ptr<class sycl::_V1::detail::event_impl>, class std::allocator<class std::shared_ptr<class sycl::_V1::detail::event_impl>>>, struct _pi_event *&) ...\llvm\src\sycl\source\detail\memory_manager.cpp:254:0
 #6 0x00007ff6c0a7e09c sycl::_V1::detail::ReleaseCommand::enqueueImp(void) ...\llvm\src\sycl\source\detail\scheduler\commands.cpp:1275:0
 #7 0x00007ff6c0a7bbcd sycl::_V1::detail::Command::enqueue(struct sycl::_V1::detail::EnqueueResultT &, enum sycl::_V1::detail::BlockingT, class std::vector<class sycl::_V1::detail::Command *, class std::allocator<class sycl::_V1::detail::Command *>> &) ...\llvm\src\sycl\source\detail\scheduler\commands.cpp:881:0
 #8 0x00007ff6c0a93c42 sycl::_V1::detail::Scheduler::GraphProcessor::enqueueCommand(class sycl::_V1::detail::Command *, class std::shared_lock<class std::shared_timed_mutex> &, struct sycl::_V1::detail::EnqueueResultT &, class std::vector<class sycl::_V1::detail::Command *, class std::allocator<class sycl::_V1::detail::Command *>> &, class sycl::_V1::detail::Command *, enum sycl::_V1::detail::BlockingT) ...\llvm\src\sycl\source\detail\scheduler\graph_processor.cpp:145:0
 #9 0x00007ff6c0a937f6 sycl::_V1::detail::Scheduler::waitForRecordToFinish(struct sycl::_V1::detail::MemObjRecord *, class std::shared_lock<class std::shared_timed_mutex> &) ...\llvm\src\sycl\source\detail\scheduler\scheduler.cpp:82:0
#10 0x00007ff6c0a92c73 sycl::_V1::detail::Scheduler::removeMemoryObject(class sycl::_V1::detail::SYCLMemObjI *, bool) ...\llvm\src\sycl\source\detail\scheduler\scheduler.cpp:293:0
#11 0x00007ff6c0a91bee sycl::_V1::detail::Scheduler::cleanupDeferredMemObjects(enum sycl::_V1::detail::BlockingT) ...\llvm\src\sycl\source\detail\scheduler\scheduler.cpp:549:0
#12 0x00007ff6c0a91613 sycl::_V1::detail::Scheduler::cleanupCommands(class std::vector<class sycl::_V1::detail::Command *, class std::allocator<class sycl::_V1::detail::Command *>> const &) ...\llvm\src\sycl\source\detail\scheduler\scheduler.cpp:436:0
#13 0x00007ff6c0a8ec5d sycl::_V1::detail::Scheduler::NotifyHostTaskCompletion(class sycl::_V1::detail::Command *) ...\llvm\src\sycl\source\detail\scheduler\scheduler.cpp:498:0
#14 0x00007ff6c0a71924 sycl::_V1::detail::DispatchHostTask::operator()(void) const ...\llvm\src\sycl\source\detail\scheduler\commands.cpp:440:0
#15 0x00007ff6c0992af6 sycl::_V1::detail::ThreadPool::worker(void) ...\llvm\src\sycl\source\detail\thread_pool.hpp:51:0
#16 0x00007ff6c098e941 std::thread::_Invoke<class std::tuple<class `private: void __cdecl sycl::_V1::detail::ThreadPool::start(void)'::`3'::<lambda_1>>, 0>(void *) ...\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.34.31933\include\thread:56:0
#17 0x00007ffe515f6b4c (...\System32\ucrtbase.dll+0x26b4c)

#18 0x00007ffe53b34ed0 (...\System32\KERNEL32.DLL+0x14ed0)

#19 0x00007ffe53fce20b (...\SYSTEM32\ntdll.dll+0x7e20b)

Access violation

To reproduce

No response

Environment

No response

Additional context

No response

KseniyaTikhomirova commented 2 months ago

fixed by https://github.com/intel/llvm/pull/13481

KseniyaTikhomirova commented 2 months ago

fix is merged. closing as fixed.

steffenlarsen commented 2 months ago

It seems to have failed again in https://github.com/intel/llvm/actions/runs/8816297036/job/24200105484. Tag @KseniyaTikhomirova for info.

aelovikov-intel commented 1 week ago

Failed in https://github.com/intel/llvm/actions/runs/9684542876/job/26722763288?pr=13385

KseniyaTikhomirova commented 1 day ago

fix is on review https://github.com/intel/llvm/pull/14447