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

satty segfaults after updating nixpkgs #354080

Closed
istudyatuni opened this issue Nov 6, 2024 · 5 comments
Closed

satty segfaults after updating nixpkgs #354080

istudyatuni opened this issue Nov 6, 2024 · 5 comments
Labels
0.kind: bug Something is broken 0.kind: regression Something that worked before working no longer

Comments

@istudyatuni
Copy link
Contributor

istudyatuni commented Nov 6, 2024

Describe the bug

I updated nixpkgs from 5633bcf (Oct 9) to 4aa3656 (Nov 5, latest nixos-unstable), after that satty started crashes for

cat test.png | satty --filename -

png file can be captured with grim - > test.png

Crash output:

[1]    109447 done                              cat test.png |
       109448 segmentation fault (core dumped)  nix run 'nixpkgs/4aa36568#satty' -- --filename -

Steps To Reproduce

Steps to reproduce the behavior:

# works
cat test.png | nix run 'nixpkgs/5633bcff#satty' -- --filename -
# not
cat test.png | nix run 'nixpkgs/4aa36568#satty' -- --filename -

Expected behavior

No crash

Screenshots

-

Additional context

I use wayland

Notify maintainers

@pinpox @donovanglover

Metadata

  • system: "x86_64-linux"
  • host os: Linux 6.6.59, NixOS, 24.11 (Vicuna), 24.11.20241105.4aa3656
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.24.10
  • channels(root): "nixos-24.05"
  • nixpkgs: /nix/store/sh0v21n9zc03b94qjj4jkkg5mbsjkpzr-source

Add a 👍 reaction to issues you find important.

@istudyatuni istudyatuni added the 0.kind: bug Something is broken label Nov 6, 2024
@pinpox
Copy link
Member

pinpox commented Nov 6, 2024

I'm failing to reproduce this, running cat test.png | nix run 'nixpkgs/4aa36568#satty' -- --filename - on wayland/sway works for me with a testfile. Do you have any other configuration or can try a different image?

@istudyatuni
Copy link
Contributor Author

TLDR: works after disabling amdvlk

For future reference, stack trace from core dump

Stack trace

Stack trace of thread 7388:
#0  0x00007fc4dbff902d wl_proxy_add_listener (libwayland-client.so.0 + 0x702d)
#1  0x00007fc476d986dc n/a (amdvlk64.so + 0x5986dc)
#2  0x00007fc476d98953 n/a (amdvlk64.so + 0x598953)
#3  0x00007fc476c86fd1 n/a (amdvlk64.so + 0x486fd1)
#4  0x00007fc476eed35f n/a (amdvlk64.so + 0x6ed35f)
#5  0x00007fc4dd71047b gdk_vulkan_context_check_swapchain (libgtk-4.so.1 + 0x51047b)
#6  0x00007fc4dd7117d7 gdk_vulkan_context_real_init (libgtk-4.so.1 + 0x5117d7)
#7  0x00007fc4dce891ff g_initable_new_valist (libgio-2.0.so.0 + 0x891ff)
#8  0x00007fc4dce892e9 g_initable_new (libgio-2.0.so.0 + 0x892e9)
#9  0x00007fc4dd74dab8 gsk_vulkan_renderer_create_context (libgtk-4.so.1 + 0x54dab8)
#10 0x00007fc4dd7a05f4 gsk_gpu_renderer_realize (libgtk-4.so.1 + 0x5a05f4)
#11 0x00007fc4dd722618 gsk_renderer_do_realize (libgtk-4.so.1 + 0x522618)
#12 0x00007fc4dd7237e9 gsk_renderer_new_for_surface (libgtk-4.so.1 + 0x5237e9)
#13 0x00007fc4dd4dfb30 gtk_window_realize (libgtk-4.so.1 + 0x2dfb30)
#14 0x00007fc4dd1b3fb1 _g_closure_invoke_va (libgobject-2.0.so.0 + 0x17fb1)
#15 0x00007fc4dd1c9b6c signal_emit_valist_unlocked (libgobject-2.0.so.0 + 0x2db6c)
#16 0x00007fc4dd1cf542 g_signal_emit_valist (libgobject-2.0.so.0 + 0x33542)
#17 0x00007fc4dd1cf5ff g_signal_emit (libgobject-2.0.so.0 + 0x335ff)
#18 0x00007fc4dd4d381f gtk_widget_realize (libgtk-4.so.1 + 0x2d381f)
#19 0x00007fc4dd4e5ccd gtk_window_show (libgtk-4.so.1 + 0x2e5ccd)
#20 0x00007fc4dd1b3da8 g_closure_invoke (libgobject-2.0.so.0 + 0x17da8)
#21 0x00007fc4dd1c8238 signal_emit_unlocked_R.isra.0 (libgobject-2.0.so.0 + 0x2c238)
#22 0x00007fc4dd1c9a71 signal_emit_valist_unlocked (libgobject-2.0.so.0 + 0x2da71)
#23 0x00007fc4dd1cf542 g_signal_emit_valist (libgobject-2.0.so.0 + 0x33542)
#24 0x00007fc4dd1cf5ff g_signal_emit (libgobject-2.0.so.0 + 0x335ff)
#25 0x00007fc4dd4c8db9 gtk_widget_show (libgtk-4.so.1 + 0x2c8db9)
#26 0x00005594abfbd690 _ZN3gio4auto11application14ApplicationExt16connect_activate19activate_trampoline17h16f4016c750c0bb6E (.satty-wrapped + 0>
#27 0x00007fc4dd1b3da8 g_closure_invoke (libgobject-2.0.so.0 + 0x17da8)
#28 0x00007fc4dd1c80fc signal_emit_unlocked_R.isra.0 (libgobject-2.0.so.0 + 0x2c0fc)
#29 0x00007fc4dd1c9a71 signal_emit_valist_unlocked (libgobject-2.0.so.0 + 0x2da71)
#30 0x00007fc4dd1cf542 g_signal_emit_valist (libgobject-2.0.so.0 + 0x33542)
#31 0x00007fc4dd1cf5ff g_signal_emit (libgobject-2.0.so.0 + 0x335ff)
#32 0x00007fc4dcef2920 g_application_real_local_command_line (libgio-2.0.so.0 + 0xf2920)
#33 0x00007fc4dcef2ab6 g_application_run (libgio-2.0.so.0 + 0xf2ab6)
#34 0x00005594ac02a4b7 _ZN3gio11application20ApplicationExtManual13run_with_args17h19c44a7c9bbef139E (.satty-wrapped + 0xda4b7)
#35 0x00005594abfd30d9 _ZN5relm43app16RelmApp$LT$M$GT$3run17h0993d0ad6acd6e19E (.satty-wrapped + 0x830d9)
#36 0x00005594abff81a0 _ZN5satty4main17hbfa09ae2a9c4e008E (.satty-wrapped + 0xa81a0)
#37 0x00005594ac034433 _ZN3std3sys9backtrace28__rust_begin_short_backtrace17hfb844460b1395e71E (.satty-wrapped + 0xe4433)
#38 0x00005594ac015d5d _ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h4d482b5d2aebf5efE.llvm.10530956842523456472 (.satty-wrapped + 0xc>
#39 0x00005594ac1fc335 _ZN3std2rt19lang_start_internal17h2084fce485147f46E (.satty-wrapped + 0x2ac335)
#40 0x00005594abffcb85 main (.satty-wrapped + 0xacb85)
#41 0x00007fc4dcb4a27e __libc_start_call_main (libc.so.6 + 0x2a27e)
#42 0x00007fc4dcb4a339 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x2a339)
#43 0x00005594abf9a505 _start (.satty-wrapped + 0x4a505)

When running with rust-gdb satty and executing run --filename - < test.png, program receive SIGSEGV in wl_proxy_add_listener

Program no longer crashes after I disabled hardware.amdgpu.amdvlk.enable, so it's probably issue with wayland/amdvlk/gtk, though I don't know where to report that

@donovanglover donovanglover added the 0.kind: regression Something that worked before working no longer label Nov 7, 2024
@folliehiyuki
Copy link

folliehiyuki commented Nov 9, 2024

I'm facing the same issue with a GTK4 app tangram after updating from 807e915 to 4aa3656. Disabling hardware.amdgpu.amdvlk.enable indeed makes the app run normally.

Running WAYLAND_DEBUG=1 re.sonny.Tangram crashes to these logs:

...
[1593048.820] {Default Queue}  -> xdg_activation_v1#20.get_activation_token(new id xdg_activation_token_v1#69)
[1593048.823]  -> xdg_activation_token_v1#69.set_serial(0, wl_seat#36)
[1593048.826]  -> xdg_activation_token_v1#69.commit()
[1593048.857] {Display Queue} wl_display#1.error(wl_drm#61, 0, "wl_drm.create_prime_buffer is not implemented")
Gdk-Message: 21:06:16.145: Error 71 (Protocol error) dispatching to Wayland display.

Seems related to these reported issues:

@clushie
Copy link

clushie commented Nov 11, 2024

On nixpkgs-unstable

zed-editor wouldn't start with WAYLAND_DISPLAY set.

nix-shell -p vulkan-tools --run vulkaninfo segfaults

WL_RENDERER=vulkan sway results in a white screen.

Disabling amdvlk fixed all those issues for me on AMD Ryzen 7 7840U w/ Radeon 780M Graphics

Thank you all for the pointer :).

@pinpox
Copy link
Member

pinpox commented Nov 11, 2024

I'll close this, as it seems to be not related to satty specifically. Feel free to reopen if there is something to do regarding this application in particular.

@pinpox pinpox closed this as completed Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 0.kind: regression Something that worked before working no longer
Projects
None yet
Development

No branches or pull requests

5 participants