Closed Themaister closed 6 years ago
Can you give information about your distribution, package versions (kernel and dri at least I think), GPU etc?
I'll try and reproduce this locally, but if you're able it would be useful to get callstacks both for the missing VkFence (my guess is this is in a Serialise_vkWaitForFences
or Serialise_vkResetFences
where it's harmless but should be fixed) and then also for the first failing VkResult. Since you should be able to step into the driver as well that might be a hint of what's going wrong.
Dist: Arch x64 (latest update) libdrm: 2.4.89 amdvlk-git: Latest (basically from today) GPU: RX470 Kernel: 4.14.12
BT for first vkQueueSubmit error:
Error - Assertion failed: 'vkr == VK_SUCCESS' (vkr=VK_ERROR_INITIALIZATION_FAILED, VK_SUCCESS=VK_SUCCESS)
Thread 22 "QThread" received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 0x7fffa49c9700 (LWP 8466)]
0x00007ffff416dc50 in raise () from /usr/lib/libpthread.so.0
(gdb)
(gdb) bt
#0 0x00007ffff416dc50 in raise () at /usr/lib/libpthread.so.0
#1 0x00007ffff6903acf in WrappedVulkan::SubmitCmds() (this=0x7fff88005160) at /home/maister/git/renderdoc/renderdoc/driver/vulkan/vk_core.cpp:256
#2 0x00007ffff6a3f614 in VulkanReplay::FlipOutputWindow(unsigned long) (this=0x7fff88005250, id=3)
at /home/maister/git/renderdoc/renderdoc/driver/vulkan/vk_replay.cpp:2909
#3 0x00007ffff6f08776 in ReplayOutput::Display() (this=0x7fff8a0fdde0) at /home/maister/git/renderdoc/renderdoc/replay/replay_output.cpp:594
#4 0x000055555604e724 in BufferViewer::RT_UpdateAndDisplay(IReplayController*) (this=0x5555570dd5e0)
at ../../qrenderdoc/Windows/BufferViewer.cpp:2677
#5 0x00005555560454b7 in BufferViewer::<lambda(IReplayController*)>::operator()(IReplayController *) const (__closure=0x5555576e0d18, r=
0x7fff88002d20) at ../../qrenderdoc/Windows/BufferViewer.cpp:1369
#6 0x00005555560565ca in std::_Function_handler<void(IReplayController*), BufferViewer::OnCaptureLoaded()::<lambda(IReplayController*)> >::_M_invoke(const std::_Any_data &, IReplayController *&&) (__functor=..., __args#0=@0x7fffa49c8a30: 0x7fff88002d20)
at /usr/include/c++/7.2.1/bits/std_function.h:316
#7 0x0000555555d7f569 in std::function<void (IReplayController*)>::operator()(IReplayController*) const (this=0x5555576e0d18, __args#0=0x7fff88002d20) at /usr/include/c++/7.2.1/bits/std_function.h:706
#8 0x0000555555d7b4bf in ReplayManager::run(int, QString const&, std::function<void (float)>) (this=0x7fffffffc9b8, proxyRenderer=-1, capturefile=..., progress=...) at ../../qrenderdoc/Code/ReplayManager.cpp:464
#9 0x0000555555d78847 in ReplayManager::<lambda()>::operator()(void) const (__closure=0x7fff98004050) at ../../qrenderdoc/Code/ReplayManager.cpp:54
#10 0x0000555555d7c0ec in std::_Function_handler<void(), ReplayManager::OpenCapture(const QString&, RENDERDOC_ProgressCallback)::<lambda()> >::_M_invoke(const std::_Any_data &) (__functor=...) at /usr/include/c++/7.2.1/bits/std_function.h:316
#11 0x0000555555d7ee48 in std::function<void ()>::operator()() const (this=0x7fff98004010) at /usr/include/c++/7.2.1/bits/std_function.h:706
#12 0x0000555555d7e904 in LambdaThread::process() (this=0x7fff98004000) at ../../qrenderdoc/Code/QRDUtils.h:272
#13 0x0000555555d8049a in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (LambdaThread::*)()>::call(void (LambdaThread::*)(), LambdaThread*, void**) (f=(void (LambdaThread::*)(LambdaThread * const)) 0x555555d7e8e8 <LambdaThread::process()>, o=0x7fff98004000, arg=0x7fffa49c8db0) at /usr/include/qt/QtCore/qobjectdefs_impl.h:136
#14 0x0000555555d80183 in QtPrivate::FunctionPointer<void (LambdaThread::*)()>::call<QtPrivate::List<>, void>(void (LambdaThread::*)(), LambdaThread*, void**) (f=(void (LambdaThread::*)(LambdaThread * const)) 0x555555d7e8e8 <LambdaThread::process()>, o=0x7fff98004000, arg=0x7fffa49c8db0)
at /usr/include/qt/QtCore/qobjectdefs_impl.h:169
#15 0x0000555555d7fb84 in QtPrivate::QSlotObject<void (LambdaThread::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x7fff98003bd0, r=0x7fff98004000, a=0x7fffa49c8db0, ret=0x0) at /usr/include/qt/QtCore/qobjectdefs_impl.h:398
#16 0x00007ffff48d1b2f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/libQt5Core.so.5
#17 0x00007ffff46ae3f8 in QThread::started(QThread::QPrivateSignal) () at /usr/lib/libQt5Core.so.5
#18 0x00007ffff46b4b12 in () at /usr/lib/libQt5Core.so.5
#19 0x00007ffff416308c in start_thread () at /usr/lib/libpthread.so.0
#20 0x00007ffff35b0e1f in clone () at /usr/lib/libc.so.6
Thread 22 "QThread" hit Breakpoint 2, DoSerialiseViaResourceId<Serialiser<(SerialiserMode)1>, VkFence_T*> (ser=..., el=@0x7fff8a474e10: 0x0)
at /home/maister/git/renderdoc/renderdoc/driver/vulkan/vk_serialise.cpp:105
105 RDCWARN("Capture may be missing reference to %s resource.", TypeName<type>());
(gdb) bt
#0 0x00007ffff6a9f4fe in DoSerialiseViaResourceId<Serialiser<(SerialiserMode)1>, VkFence_T*>(Serialiser<(SerialiserMode)1>&, VkFence_T*&) (ser=..., el=@0x7fff8a474e10: 0x0) at /home/maister/git/renderdoc/renderdoc/driver/vulkan/vk_serialise.cpp:105
#1 0x00007ffff6a7f293 in DoSerialise<Serialiser<(SerialiserMode)1> >(Serialiser<(SerialiserMode)1>&, VkFence_T*&) (ser=..., el=@0x7fff8a474e10: 0x0)
at /home/maister/git/renderdoc/renderdoc/driver/vulkan/vk_serialise.cpp:120
#2 0x00007ffff6bb417f in Serialiser<(SerialiserMode)1>::SerialiseDispatch<Serialiser<(SerialiserMode)1>, VkFence_T*, false>::Do(Serialiser<(SerialiserMode)1>&, VkFence_T*&) (ser=..., el=@0x7fff8a474e10: 0x0) at /home/maister/git/renderdoc/renderdoc/serialise/serialiser.h:1542
#3 0x00007ffff6be0114 in Serialiser<(SerialiserMode)1>::Serialise<VkFence_T*>(char const*, VkFence_T**&, unsigned long&, SerialiserFlags) (this=0x7fffa49c7ed0, name=0x7ffff7197802 "pFences", el=@0x7fffa49c7ba8: 0x7fff8a474e10, arrayCount=@0x7fffa49c7b80: 3, flags=SerialiserFlags::AllocateMemory)
at /home/maister/git/renderdoc/renderdoc/serialise/serialiser.h:725
#4 0x00007ffff6bdeb0e in Serialiser<(SerialiserMode)1>::Serialise<VkFence_T*>(char const*, VkFence_T* const*&, unsigned long&, SerialiserFlags) (this=0x7fffa49c7ed0, name=0x7ffff7197802 "pFences", el=@0x7fffa49c7ba8: 0x7fff8a474e10, arrayCount=@0x7fffa49c7b80: 3, flags=SerialiserFlags::AllocateMemory) at /home/maister/git/renderdoc/renderdoc/serialise/serialiser.h:1124
#5 0x00007ffff6bddc41 in Serialiser<(SerialiserMode)1>::Serialise<VkFence_T* const>(char const*, VkFence_T* const*&, unsigned int&, SerialiserFlags) (this=0x7fffa49c7ed0, name=0x7ffff7197802 "pFences", el=@0x7fffa49c7ba8: 0x7fff8a474e10, arrayCount=@0x7fffa49c7bb4: 0, flags=SerialiserFlags::AllocateMemory) at /home/maister/git/renderdoc/renderdoc/serialise/serialiser.h:759
#6 0x00007ffff6bd76c3 in WrappedVulkan::Serialise_vkWaitForFences<ReadSerialiser>(ReadSerialiser&, VkDevice_T*, unsigned int, VkFence_T* const*, unsigned int, unsigned long) (this=0x7fff88005160, ser=..., device=0x7ffff7e89010, fenceCount=0, pFences=0x7fff8a474e10, waitAll=0, timeout=0)
at /home/maister/git/renderdoc/renderdoc/driver/vulkan/wrappers/vk_sync_funcs.cpp:234
#7 0x00007ffff690d3d7 in WrappedVulkan::ProcessChunk(ReadSerialiser&, VulkanChunk) (this=0x7fff88005160, ser=..., chunk=VulkanChunk::vkWaitForFences) at /home/maister/git/renderdoc/renderdoc/driver/vulkan/vk_core.cpp:1927
#8 0x00007ffff690cd92 in WrappedVulkan::ContextProcessChunk(ReadSerialiser&, VulkanChunk) (this=0x7fff88005160, ser=..., chunk=VulkanChunk::vkWaitForFences) at /home/maister/git/renderdoc/renderdoc/driver/vulkan/vk_core.cpp:1810
#9 0x00007ffff690b3d0 in WrappedVulkan::ContextReplayLog(CaptureState, unsigned int, unsigned int, bool) (this=0x7fff88005160, readType=CaptureState::LoadingReplaying, startEventID=0, endEventID=0, partial=false) at /home/maister/git/renderdoc/renderdoc/driver/vulkan/vk_core.cpp:1672
#10 0x00007ffff690a3c4 in WrappedVulkan::ReadLogInitialisation(RDCFile*, bool) (this=0x7fff88005160, rdc=0x7fff88001910, storeStructuredBuffers=false) at /home/maister/git/renderdoc/renderdoc/driver/vulkan/vk_core.cpp:1522
#11 0x00007ffff6a2e9c7 in VulkanReplay::ReadLogInitialisation(RDCFile*, bool) (this=0x7fff88005250, rdc=0x7fff88001910, storeStructuredBuffers=false)
at /home/maister/git/renderdoc/renderdoc/driver/vulkan/vk_replay.cpp:700
#12 0x00007ffff6f12bb3 in ReplayController::PostCreateInit(IReplayDriver*, RDCFile*) (this=0x7fff88002d20, device=0x7fff88005250, rdc=0x7fff88001910)
at /home/maister/git/renderdoc/renderdoc/replay/replay_controller.cpp:1598
#13 0x00007ffff6f12a2e in ReplayController::CreateDevice(RDCFile*) (this=0x7fff88002d20, rdc=0x7fff88001910)
at /home/maister/git/renderdoc/renderdoc/replay/replay_controller.cpp:1575
#14 0x00007ffff6ef8842 in CaptureFile::OpenCapture(std::function<void (float)>) (this=0x7fff88001790, progress=...)
at /home/maister/git/renderdoc/renderdoc/replay/capture_file.cpp:338
#15 0x0000555555d7b292 in ReplayManager::run(int, QString const&, std::function<void (float)>) (this=0x7fffffffc9b8, proxyRenderer=-1, capturefile=..., progress=...) at ../../qrenderdoc/Code/ReplayManager.cpp:428
#16 0x0000555555d78847 in ReplayManager::<lambda()>::operator()(void) const (__closure=0x7fff8c0087e0) at ../../qrenderdoc/Code/ReplayManager.cpp:54
#17 0x0000555555d7c0ec in std::_Function_handler<void(), ReplayManager::OpenCapture(const QString&, RENDERDOC_ProgressCallback)::<lambda()> >::_M_invoke(const std::_Any_data &) (__functor=...) at /usr/include/c++/7.2.1/bits/std_function.h:316
#18 0x0000555555d7ee48 in std::function<void ()>::operator()() const (this=0x7fff8c008b20) at /usr/include/c++/7.2.1/bits/std_function.h:706
#19 0x0000555555d7e904 in LambdaThread::process() (this=0x7fff8c008b10) at ../../qrenderdoc/Code/QRDUtils.h:272
pal/src/core/os/lnx/lnxQueue.cpp:753 (submitIbs) is the call which fails when stepping through, but I have no idea what that means.
Can confirm too, renderdoc nightly build, latest amdvlk, Ubuntu 18.04:
I also have this issue on Ubuntu 16.04 with amdvlk
Working with @Themaister offline a bit, I wasn't able to get a consistent repro for this.
I tried both with latest amdvlk (newest commit as of yesterday) and sync'd back to the older version that was used for the original report. Both worked fine for me:
New:
llvm = eb5eb1c6b6f21677a9a8f026eb6bd20b1ec59815
pal = 91e30f14e0903aeed35604382e4fa5b41f027125
xgl = 3e2d125e523ad0b748f52907165054b63ad21425
Old:
llvm: eb5eb1c6b6f21677a9a8f026eb6bd20b1ec59815
PAL: 488c77b05bc8e083dcbfd85921d2ab604b5cce12
XGL: a20e78937cde682a8caa90d60359e769747cf0ae
@Themaister was able to repro this on the simplest cube demo from the vulkan SDK so it seems like this probably applies to any and all vulkan captures. However I didn't run into any problems except I hit a crash if the mesh output window is open. However that's an instant crash inside vkCreateComputePipelines, so it's a separate bug I'll look into.
I also tried an older commit of renderdoc, but it still worked for me.
For reference my system is:
Dist: Ubuntu 17.10 x64 libdrm: 2.4.83-1 amdvlk-git: Latest (as above) GPU: RX480 Kernel: 4.13.0-31
It's possible that the libdrm difference is significant, or theoretically the GPU difference, so more data points would help. @procedural @edrickhong can you give more information about your system and versions? Are you able to repro with the cube demo, or else share what you are using to repro with in case it's transient?
Cool, looks like AMDVLK guys fixed it: renderdoc_2018_01_23_9587cba4.tar.gz (https://renderdoc.org/autobuilds/v0.x/2018/renderdoc_2018_01_23_9587cba4.tar.gz), latest amdvlk64.so (compiled today from latest commits: https://github.com/procedural/amdvlk/releases/tag/24_Jan_2018), custom example app (https://github.com/procedural/vulkan-example/tree/78f46dd)
Distro: Ubuntu 18.04 x64 libdrm: 2.4.89-1 Kernel: 4.13.0-25
Yep, amdvlk64.so from Jan 11, 2018 (https://github.com/procedural/amdvlk/releases/tag/11_Jan_2018) shows garbage, while amdvlk64.so from both Jan 19, 2018 and Jan 24, 2018 renders textures correctly.
I tried very latest renderdoc, amdvlk and everything on Arch. It seems to work just fine now.
I'll close this down as it seems like it was a driver-side issue.
Trying to run local captures on the new amdvlk driver seems to have some issues:
I'm also getting some errors in console.