-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
segfault in sway #489
Comments
Thanks for the report, do you happen to know how to trigger this crash? It happens because |
I tried to run sway through gdb, but whole pc got frozen just after sway was run through gdb. |
@podhorsky-ksj it's most likely because wlc sends a |
This is happening unpredictably for me now. It tends to happen when I try to edit certain documents in LibreOffice Writer (running as an X app), or more occasionally when opening a window (or menu) in Wine. Also randomly happens when changing workspace. |
@PluMGMK could please post a backtrace of the crashes so we can get a better understanding of when this happens. Remember to run addr2line on the backtrace and post that along with it. Thanks! |
I'd love to, but of course now I can't seem to trigger it anymore. Typical! If it happens again I'll post what I can. |
@mikkeloscar I think I got a segfault in gdb, but then the sway will freeze and I can't use any keyboard bindings. Do you think it can be replaced by set unlimited settings in ulimit to make core file and then load it into gdb? |
Whenever I would debug a segfault in sway I ran the following:
This runs gdb in batch mode: After the first signal it simply continues and after the second one it prints a backtrace and exits. Hope this helps. [s/backspace/backtrace/, need more coffee] |
@sce Thanks for it, It works good, but I think is better use: |
@podhorsky-ksj that's even better, thanks. |
Segfaults seem to happen when I (frustratedly) give a lot of keyboard input in rapid succession. At one point I launched Steam which (as usual) popped up an XTerm window trying to install Debian packages, which is neither possible nor necessary since I'm not on Debian, but I still had to type my password for sudo. I mistyped about half of it and started frustratedly hitting the backspace key, causing the window manager to crash and producing this output: [log.c:150] Error: Signal 11. Printing backtrace Another one happened when I tried to play a game with Wine, but then a message box (from Uplay, also under Wine) popped up causing it to freeze. After frustratedly pressing Mod+Shift+Q, I got it to close, then when I right-clicked the Steam icon in the Wine system tray the window manager crashed (instead of bringing up a menu). [log.c:150] Error: Signal 11. Printing backtrace From the looks of it, I'm not even sure if it's the same problem that caused these two crashes. I've attached the full log files anyway. @mikkeloscar When you say to run addr2line "on it", what exactly do you mean? Do I take each individual address and check it? I don't have much debugging experience. |
@PluMGMK yes, that's right. This script can be helpful: https://gist.github.com/mikkeloscar/badebca2b9766a067397 You run it like this:
It will take all the relevant addresses in the backtrace of the log, and translate them to line numbers in the sway source. |
Ah, okay then. The first segfault gave me: [log.c:160] Backtrace: sway(error_handler+0xb7) [0x42444a] And the second gave me: [log.c:160] Backtrace: sway(error_handler+0xb7) [0x42444a] |
@PluMGMK thanks, one last thing, please post the version of sway you are using. I can see that this must be at least a couple of commits behind master. |
@mikkeloscar As far as I can tell I'm only one commit behind (i.e. on 91d6113). |
I also get one segfault in gdb:
sway commit id is: 016a774 I also have exec and core file. I'm attaching them here: You can use it as: |
I don't think this is Sway's fault because I reverted to 0ba3f08 (predating this issue by a considerable amount of time) and it's still happening. |
Since updating to the latest wlc and sway commits last Saturday, the window manager has crashed only once. That was when I attempted to use the clipboard in the Otter Browser, so it's probably QtWayland's fault. So for me, this issue seems to be resolved! |
Now I'm only seeing crashes, dependent on Intel drivers, so it can't be corrected in sway or wlc. But no crashes with bt wlc or sway. So, I'm closing the ticket. |
Hi,
I found this segfault and decoded parts, which have something to do with sway:
Backtrace: /usr/bin/sway(error_handler+0x2f) [0x41b25f]
/home/ksj/sway-git/src/sway/common/log.c:151
Backtrace: /usr/lib/libc.so.6(+0x33680) [0x7f64050cf680]
Backtrace: /usr/bin/sway(swayc_parent_by_type+0x58) [0x4110f8]
/home/ksj/sway-git/src/sway/sway/container.c:474 (discriminator 1)
Backtrace: /usr/bin/sway(set_focused_container+0x80) [0x413510]
/home/ksj/sway-git/src/sway/sway/focus.c:109
Backtrace: /usr/bin/sway() [0x4144bd]
/home/ksj/sway-git/src/sway/sway/handlers.c:260
Backtrace: /usr/lib/libwlc.so.0(+0x1e27f) [0x7f6405fdc27f]
Backtrace: /usr/lib/libwlc.so.0(+0x15839) [0x7f6405fd3839]
Backtrace: /usr/lib/libffi.so.6(ffi_call_unix64+0x4c) [0x7f6402fb61f0]
Backtrace: /usr/lib/libffi.so.6(ffi_call+0x2f8) [0x7f6402fb5c58]
Backtrace: /usr/lib/libwayland-server.so.0(+0xafb8) [0x7f640596bfb8]
Backtrace: /usr/lib/libwayland-server.so.0(+0x74a6) [0x7f64059684a6]
Backtrace: /usr/lib/libwayland-server.so.0(wl_event_loop_dispatch+0x72) [0x7f640596a242]
Backtrace: /usr/lib/libwayland-server.so.0(wl_display_run+0x25) [0x7f64059689a5]
Backtrace: /usr/lib/libwlc.so.0(wlc_run+0xec) [0x7f6405fe623c]
Backtrace: /usr/bin/sway(main+0x39c) [0x40716c]
/home/ksj/sway-git/src/sway/sway/main.c:214
Backtrace: /usr/lib/libc.so.6(__libc_start_main+0xf0) [0x7f64050bc610]
Backtrace: /usr/bin/sway(_start+0x29) [0x4071b9]
??:?
log file is there:
sway-err.txt
commits:
sway 6793648
wlc faa4d3c
The text was updated successfully, but these errors were encountered: