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

Seg Fault running examples #2338

Closed
Calamari opened this issue Dec 30, 2021 · 7 comments
Closed

Seg Fault running examples #2338

Calamari opened this issue Dec 30, 2021 · 7 comments
Labels
api: vulkan Issues with Vulkan area: correctness We're behaving incorrectly external: driver-bug A driver is causing the bug, though we may still want to work around it type: bug Something isn't working

Comments

@Calamari
Copy link

Description
While running the examples I get a seg fault instead of a useful result.

Repro steps

I just ran:

$ cargo run --example boids
   Compiling wgpu v0.12.0 (/home/calamari/work/games/wgpu/wgpu)
    Finished dev [unoptimized + debuginfo] target(s) in 10.87s
     Running `target/debug/examples/boids`
Using Intel(R) UHD Graphics 620 (KBL GT2) (Vulkan)
[1]    29705 segmentation fault (core dumped)  cargo run --example boids

Extra materials

Here is some info (using gdb) that I knew how to gather:

gdb target/debug/examples/boids 
GNU gdb (Ubuntu 8.1.1-0ubuntu1) 8.1.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Registered pretty printers for UE4 classes
Reading symbols from target/debug/examples/boids...done.
warning: Missing auto-load script at offset 0 in section .debug_gdb_scripts
of file /home/calamari/work/games/wgpu/target/debug/examples/boids.
Use `info auto-load python-scripts [REGEXP]' to list them.
(gdb) run
Starting program: /home/calamari/work/games/wgpu/target/debug/examples/boids 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe9ed5700 (LWP 32013)]
[New Thread 0x7fffe96d4700 (LWP 32014)]
[New Thread 0x7fffe8ed3700 (LWP 32015)]
[New Thread 0x7fffdbfff700 (LWP 32016)]
[New Thread 0x7fffdb7fe700 (LWP 32017)]
[New Thread 0x7fffdaffd700 (LWP 32018)]
[New Thread 0x7fffda7fc700 (LWP 32019)]
[New Thread 0x7fffd9ffb700 (LWP 32020)]
Using Intel(R) UHD Graphics 620 (KBL GT2) (Vulkan)
[New Thread 0x7fffd8ffa700 (LWP 32021)]
[New Thread 0x7fffc37ff700 (LWP 32022)]
[Thread 0x7fffd8ffa700 (LWP 32021) exited]

Thread 1 "boids" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00005555561b736e in ash::vk::extensions::ExtDebugUtilsFn::cmd_begin_debug_utils_label_ext (self=0x555556b65040, command_buffer=..., p_label_info=0x7fffffff9170)
    at /home/calamari/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.35.0+1.2.203/src/vk/extensions.rs:9584
#2  0x00005555561ae2cc in ash::extensions::ext::debug_utils::DebugUtils::cmd_begin_debug_utils_label (self=0x555556b65038, command_buffer=..., label=0x7fffffff9170)
    at /home/calamari/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.35.0+1.2.203/src/extensions/ext/debug_utils.rs:50
#3  0x0000555556051bc3 in wgpu_hal::vulkan::command::<impl wgpu_hal::CommandEncoder<wgpu_hal::vulkan::Api> for wgpu_hal::vulkan::CommandEncoder>::begin_debug_marker (self=0x55555708e068, group_label=...)
    at wgpu-hal/src/vulkan/command.rs:524
#4  0x0000555555e06d10 in wgpu_core::command::<impl wgpu_core::hub::Global<G>>::command_encoder_push_debug_group (self=0x555556e45ed0, encoder_id=..., label=...) at /home/calamari/work/games/wgpu/wgpu-core/src/command/mod.rs:333
#5  0x0000555555e79448 in <wgpu::backend::direct::Context as wgpu::Context>::command_encoder_push_debug_group (self=0x555556e45ed0, encoder=0x7fffffff9628, label=...) at wgpu/src/backend/direct.rs:2078
#6  0x0000555555dd0cb7 in wgpu::CommandEncoder::push_debug_group (self=0x7fffffff9620, label=...) at wgpu/src/lib.rs:2436
#7  0x00005555557080f6 in <boids::Example as boids::framework::Example>::render (self=0x7fffffffade0, view=0x7fffffffa180, device=0x7fffffffae98, queue=0x7fffffffaeb8, _spawner=0x7fffffffadc8) at wgpu/examples/boids/main.rs:298
#8  0x00005555557184ab in boids::framework::start::{{closure}} (event=..., control_flow=0x7fffffffa4e0) at wgpu/examples/boids/../framework.rs:336
#9  0x00005555557123d2 in winit::platform_impl::platform::sticky_exit_callback (evt=..., target=0x555556abcb70, control_flow=0x7fffffffa4e0, callback=0x7fffffffad28)
    at /home/calamari/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.26.0/src/platform_impl/linux/mod.rs:753
#10 0x00005555556fd912 in winit::platform_impl::platform::x11::EventLoop<T>::run_return (self=0x7fffffffb1a0, callback=...)
    at /home/calamari/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.26.0/src/platform_impl/linux/x11/mod.rs:310
#11 0x00005555556fe463 in winit::platform_impl::platform::x11::EventLoop<T>::run (self=..., callback=...) at /home/calamari/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.26.0/src/platform_impl/linux/x11/mod.rs:392
#12 0x00005555557121a0 in winit::platform_impl::platform::EventLoop<T>::run (self=..., callback=...) at /home/calamari/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.26.0/src/platform_impl/linux/mod.rs:669
#13 0x00005555556e9ccc in winit::event_loop::EventLoop<T>::run (self=..., event_handler=...) at /home/calamari/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.26.0/src/event_loop.rs:154
#14 0x0000555555717c5e in boids::framework::start () at wgpu/examples/boids/../framework.rs:229
#15 0x0000555555718b4c in boids::framework::run (title=...) at wgpu/examples/boids/../framework.rs:386
#16 0x0000555555708512 in boids::main () at wgpu/examples/boids/main.rs:332

Platform

OS: Linux Mint 19.3 Tricia
rustc 1.59.0-nightly (78fd0f633 2021-12-29)
wgpu current master

@Calamari
Copy link
Author

I was redirected by the folks of bevyengine/bevy#3496 that this might be a problem here.

@kvark
Copy link
Member

kvark commented Dec 31, 2021

This is ash-rs/ash#484
I'm not able to see this, so it would be most helpful if you could gather as much info as possible on your end. Would you be able to get a core dump from this crash and upload somewhere?

@Calamari
Copy link
Author

If you tell me how that is done, I probably can :-)

@kvark
Copy link
Member

kvark commented Dec 31, 2021

It says:

[1] 29705 segmentation fault (core dumped) cargo run --example boids

So we need to find that dump in /var/lib/systemd/coredump, archive it and attach here.

@Calamari
Copy link
Author

That should be it:
boids.coredump.tar.gz

@cwfitzgerald cwfitzgerald added area: correctness We're behaving incorrectly external: driver-bug A driver is causing the bug, though we may still want to work around it type: bug Something isn't working labels Jan 3, 2022
@kvark
Copy link
Member

kvark commented Jan 4, 2022

@Calamari could you also share the exact binary please (i.e. the example binary that caused the crash)?

@cwfitzgerald
Copy link
Member

Closing as stale, if there are still issues the latest versions, please re-file!

@cwfitzgerald cwfitzgerald closed this as not planned Won't fix, can't repro, duplicate, stale Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: vulkan Issues with Vulkan area: correctness We're behaving incorrectly external: driver-bug A driver is causing the bug, though we may still want to work around it type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants