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

Occasional SIGFPE crashing sway #3942

Closed
stsquad opened this issue Mar 20, 2019 · 5 comments
Closed

Occasional SIGFPE crashing sway #3942

stsquad opened this issue Mar 20, 2019 · 5 comments

Comments

@stsquad
Copy link

stsquad commented Mar 20, 2019

  • Sway Version:

swaymsg -t get_version =>

{
   "human_readable": "1.0",
   "variant": "sway",
   "major": 1,
   "minor": 0,
   "patch": 0,
   "loaded_config_file_name": "\/home\/alex\/.config\/sway\/config"
 }
  • Debug Log:

Sorry no debug log, all I have is dmesg:

 [199120.183631] traps: sway[592] trap divide error ip:55bd5ea1fe32 sp:7ffde72dc680 error:0 in sway[55bd5ea0c000+65000]
 [199124.085347] traps: Chrome_IOThread[7286] trap int3 ip:55d65b998845 sp:7f93a9e96ad0 error:0 in chrome[55d6593a3000+68d7000]
 [199146.572486] traps: notification-da[9532] general protection fault ip:7f74634b4d55 sp:7ffeafeba5d0 error:0 in libX11.so.6.3.0[7f74634a2000+8a000]
 [199506.542863] traps: notification-da[12689] general protection fault ip:7f85b2f05d55 sp:7ffff17018e0 error:0 in libX11.so.6.3.0[7f85b2ef3000+8a000]
 [204348.242494] traps: sway[9204] trap divide error ip:55a7a8005e32 sp:7fff0fba4120 error:0 in sway[55a7a7ff2000+65000]
 [204505.306633] traps: sway[26496] trap divide error ip:55f70471ae32 sp:7ffe8c464fb0 error:0 in sway[55f704707000+65000]
 [204550.526040] notification-da[30165]: segfault at 1 ip 00007f813543ee9e sp 00007ffe32a1f650 error 6 in libX11.so.6.3.0[7f813542c000+8a000]
 [204550.526052] Code: 00 bf 01 00 00 00 4c 89 44 24 18 e8 4c e4 fe ff 48 8b 15 45 c1 10 00 48 89 85 88 09 00 00 49 89 c5 48 8b 45 08 4c 8b 44 24 18 <48> 89 10 48 0f be 03 48 8d 53 01 84 c0 0f 85 00 fe ff ff 45 31 c9
 [208019.258270] notification-da[15919]: segfault at 1 ip 00007fa5af1f8e9e sp 00007ffcc71e0620 error 6 in libX11.so.6.3.0[7fa5af1e6000+8a000]
 [208019.258281] Code: 00 bf 01 00 00 00 4c 89 44 24 18 e8 4c e4 fe ff 48 8b 15 45 c1 10 00 48 89 85 88 09 00 00 49 89 c5 48 8b 45 08 4c 8b 44 24 18 <48> 89 10 48 0f be 03 48 8d 53 01 84 c0 0f 85 00 fe ff ff 45 31 c9
 [264457.003975] traps: sway[29069] trap divide error ip:564b24191e32 sp:7fff8c8417d0 error:0 in sway[564b2417e000+65000]
 [264543.503300] notification-da[29118]: segfault at 1 ip 00007fe95df5ce9e sp 00007ffe95093fb0 error 6 in libX11.so.6.3.0[7fe95df4a000+8a000]
 [264543.503311] Code: 00 bf 01 00 00 00 4c 89 44 24 18 e8 4c e4 fe ff 48 8b 15 45 c1 10 00 48 89 85 88 09 00 00 49 89 c5 48 8b 45 08 4c 8b 44 24 18 <48> 89 10 48 0f be 03 48 8d 53 01 84 c0 0f 85 00 fe ff ff 45 31 c9

Stack Trace, if sway crashes:

Core was generated by `sway'.
Program terminated with signal SIGFPE, Arithmetic exception.
#0  0x0000564b24191e32 in get_deco_rect (c=0x564b257cb2a0, deco_rect=deco_rect@entry=0x7fff8c841850) at ../sway-1.0/sway/ipc-json.c:368
368                     deco_rect->y = c->y - c->workspace->y;
c->y
$5 = 47.590128858062954
c->workspace->y
$6 = 0
#0  0x0000564b24191e32 in get_deco_rect (c=0x564b257cb2a0, deco_rect=deco_rect@entry=0x7fff8c841850) at ../sway-1.0/sway/ipc-json.c:368
        parent_layout = L_TABBED
#1  0x0000564b241929c0 in ipc_json_describe_node (node=node@entry=0x564b257cb2a0) at ../sway-1.0/sway/ipc-json.c:539
        deco_rect = {x = 91, y = 47, width = 1266, height = 27}
        count = <optimized out>
        seat = 0x564b255a29a0
        focused = false
        name = 0x564b25857a00 "Kubernetes - Wikipedia - Google Chrome"
        box = {x = 91, y = 47, width = 1266, height = 876}
        focus = <optimized out>
        data = {node = 0x130, object = 0x700000060}
        object = <optimized out>
#2  0x0000564b24192156 in ipc_json_describe_node_recursive (node=0x564b257cb2a0) at ../sway-1.0/sway/ipc-json.c:577
        object = <optimized out>
        i = <optimized out>
        children = <optimized out>
#3  0x0000564b24192bc1 in ipc_json_describe_workspace (object=0x564b257aa950, workspace=0x564b257a1860) at ../sway-1.0/sway/ipc-json.c:347
        floater = <optimized out>
        i = <optimized out>
        num = <optimized out>
        floating_array = 0x564b25837df0
        num = <optimized out>
        floating_array = <optimized out>
        i = <optimized out>
        floater = <optimized out>
#4  ipc_json_describe_node (node=node@entry=0x564b257a1860) at ../sway-1.0/sway/ipc-json.c:569
        seat = 0x564b255a29a0
        focused = <optimized out>
        name = 0x564b2565cab0 "4"
        box = {x = 0, y = 0, width = 1680, height = 1025}
        focus = <optimized out>
        data = {node = 0x564b257a1860, object = 0x564b257f0000}
        object = 0x564b257aa950
#5  0x0000564b24192156 in ipc_json_describe_node_recursive (node=node@entry=0x564b257a1860) at ../sway-1.0/sway/ipc-json.c:577
        object = <optimized out>
        i = <optimized out>
        children = <optimized out>
#6  0x0000564b24194f44 in ipc_event_workspace (old=0x564b257a1860, new=0x564b255d7c40, change=0x564b241ca712 "focus") at ../sway-1.0/sway/ipc-server.c:301
        obj = 0x564b25715300
        json_string = <optimized out>
#7  0x0000564b241a2a00 in set_workspace (seat=0x564b255a29a0, new_ws=0x564b255d7c40) at ../sway-1.0/sway/input/seat.c:766
No locals.
#8  seat_set_focus () at ../sway-1.0/sway/input/seat.c:869
        last_workspace = 0x564b257a1860
        container = <optimized out>
        new_output = <optimized out>
        new_output_last_ws = 0x564b257a1860
        last_focus = 0x564b257a1860
        new_workspace = <optimized out>
        last_workspace = <optimized out>
        new_workspace = <optimized out>
        new_output = <optimized out>
        parent = <optimized out>
        parent = <optimized out>
        floater = <optimized out>
        view = <optimized out>
        node = <optimized out>
        seat = 0x564b255a29a0
        new_output_last_ws = <optimized out>
        layer = <optimized out>
        last_focus = <optimized out>
        container = <optimized out>
        i = <optimized out>
        last_focus = <optimized out>
        last_workspace = <optimized out>
        new_workspace = <optimized out>
        container = <optimized out>
        new_output = <optimized out>
        new_output_last_ws = <optimized out>
        layer = <optimized out>
        parent = <optimized out>
        parent = <optimized out>
        i = <optimized out>
        floater = <optimized out>
        view = <optimized out>
#9  0x0000564b241c541a in workspace_switch (workspace=0x564b255d7c40, no_auto_back_and_forth=no_auto_back_and_forth@entry=false) at ../sway-1.0/sway/tree/workspace.c:486
        seat = 0x564b255a29a0
        active_ws = <optimized out>
        focus = <optimized out>
        next = <optimized out>
#10 0x0000564b241b7951 in cmd_workspace (argc=1, argv=<optimized out>) at ../sway-1.0/sway/commands/workspace.c:221
        no_auto_back_and_forth = false
        ws = <optimized out>
        error = <optimized out>
        output_location = <optimized out>
        gaps_location = <optimized out>
#11 0x0000564b2418ce79 in execute_command (_exec=<optimized out>, seat=seat@entry=0x564b255a29a0, con=con@entry=0x0) at ../sway-1.0/sway/commands.c:286
        node = <optimized out>
        res = <optimized out>
        argc = 2
        argv = 0x564b257e3bf0
        handler = 0x564b243e4450 <handlers+752>
        res_list = 0x564b2586a9e0
        exec = 0x564b2585a3c0 "workspace \"1: Shells\""
        head = 0x0
        cmdlist = 0x0
        cmd = <optimized out>
        views = 0x0
        __PRETTY_FUNCTION__ = "execute_command"
#12 0x0000564b241ad453 in seat_execute_command (seat=seat@entry=0x564b255a29a0, binding=0x564b255ac290) at ../sway-1.0/sway/commands/bind.c:347
        con = 0x0
        res_list = <optimized out>
        success = <optimized out>
#13 0x0000564b241a9182 in handle_keyboard_key (listener=0x564b25684f50, data=<optimized out>) at ../sway-1.0/sway/input/keyboard.c:377
        keyboard = 0x564b25684f40
        seat = 0x564b255a29a0
        wlr_seat = 0x564b255a2ae0
        wlr_device = 0x564b25665280
        device_identifier = 0x564b2587fca0 "1118:219:Microsoft_Natural®_Ergonomic_Keyboard_4000"
        event = <optimized out>
        input_inhibited = <optimized out>
        keycode = <optimized out>
        raw_keysyms = 0x564b25679358
        raw_modifiers = 64
        raw_keysyms_len = <optimized out>
        translated_keysyms = 0x564b25679358
        translated_modifiers = 64
        translated_keysyms_len = 1
        code_modifiers = 64
        handled = <optimized out>
        binding_released = 0x0
        binding = 0x564b255ac290
#14 0x00007f6bde22f53c in wlr_signal_emit_safe () from /usr/lib64/libwlroots.so.2
No symbol table info available.
#15 0x00007f6bde21e625 in wlr_keyboard_notify_key () from /usr/lib64/libwlroots.so.2
No symbol table info available.
#16 0x00007f6bde1fa990 in handle_keyboard_key () from /usr/lib64/libwlroots.so.2
No symbol table info available.
#17 0x00007f6bde1f987b in handle_libinput_readable () from /usr/lib64/libwlroots.so.2
No symbol table info available.
#18 0x00007f6bde46fbe2 in wl_event_loop_dispatch (loop=0x564b2537af10, timeout=timeout@entry=-1) at /var/tmp/portage/dev-libs/wayland-1.16.0/work/wayland-1.16.0/src/event-loop.c:641
        ep = {{events = 1, data = {ptr = 0x564b256b3dc0, fd = 627785152, u32 = 627785152, u64 = 94880750321088}}, {events = 1, data = {ptr = 0x564b256b3dc0, fd = 627785152, u32 = 627785152, u64 = 94880750321088}}, {events = 3725089478, data = {ptr = 0x564b00007f6b, fd = 32619, u32 = 32619, u64 = 94880122568555}}, {events = 4, data = {ptr = 0xafcd4c8be33c4400, fd = -482589696, u32 = 3812377600, u64 = 12667865490559616000}}, {events = 32, data = {ptr = 0x2570b00000000000, fd = 0, u32 = 0, u64 = 2697849690841415680}}, {events = 22091, data = {ptr = 0x7fff8c841f50, fd = -1937498288, u32 = 2357469008, u64 = 140735550857040}}, {events = 628154392, data = {ptr = 0x2570c0080000564b, fd = 22091, u32 = 22091, u64 = 2697867317387220555}}, {events = 22091, data = {ptr = 0x7f6bde4701a5 <wl_connection_flush+325>, fd = -565771867, u32 = 3729195429, u64 = 140101267423653}}, {events = 32, data = {ptr = 0x8c841fc000000000, fd = 0, u32 = 0, u64 = 10125252771729899520}}, {events = 32767, data = {ptr = 0x7fff8c841fb0, fd = -1937498192, u32 = 2357469104, u64 = 140735550857136}}, {events = 629605280, data = {ptr = 0x1687998, fd = 23624088, u32 = 23624088, u64 = 23624088}}, {events = 0, data = {ptr = 0xafcd4c8b00000000, fd = 0, u32 = 0, u64 = 12667865486747238400}}, {events = 2357469072, data = {ptr = 0x100007fff, fd = 32767, u32 = 32767, u64 = 4295000063}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 22091, data = {ptr = 0xafcd4c8be33c4400, fd = -482589696, u32 = 3812377600, u64 = 12667865490559616000}}, {events = 628148640, data = {ptr = 0x200000564b, fd = 22091, u32 = 22091, u64 = 137438975563}}, {events = 0, data = {ptr = 0x564b2570c008, fd = 628146184, u32 = 628146184, u64 = 94880750682120}}, {events = 24, data = {ptr = 0x1400000000, fd = 0, u32 = 0, u64 = 85899345920}}, {events = 0, data = {ptr = 0x100000001, fd = 1, u32 = 1, u64 = 4294967297}}, {events = 119, data = {ptr = 0xde46e2100000564b, fd = 22091, u32 = 22091, u64 = 16016737683137123915}}, {events = 32619, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 629425928, data = {ptr = 0x258447100000564b, fd = 22091, u32 = 22091, u64 = 2703363810374211147}}, {events = 22091, data = {ptr = 0xafcd4c8be33c4400, fd = -482589696, u32 = 3812377600, u64 = 12667865490559616000}}, {events = 3729187232, data = {ptr = 0x2587d08000007f6b, fd = 32619, u32 = 32619, u64 = 2704359349433696107}}, {events = 22091, data = {ptr = 0x72, fd = 114, u32 = 114, u64 = 114}}, {events = 624416584, data = {ptr = 0x241cc6100000564b, fd = 22091, u32 = 22091, u64 = 2602172456735102539}}, {events = 22091, data = {ptr = 0x7f6bde074721 <close+113>, fd = -569948383, u32 = 3725018913, u64 = 140101263247137}}, {events = 605862839, data = {ptr = 0xde4703190000564b, fd = 22091, u32 = 22091, u64 = 16016774005675546187}}, {events = 0, data = {ptr = 0x564b25865630, fd = 629560880, u32 = 629560880, u64 = 94880752096816}}, {events = 3812377600, data = {ptr = 0x25865630afcd4c8b, fd = -1345500021, u32 = 2949467275, u64 = 2703943393390447755}}, {events = 22091, data = {ptr = 0x564b2566ada0, fd = 627486112, u32 = 627486112, u64 = 94880750022048}}}
        source = <optimized out>
        i = <optimized out>
        count = <optimized out>
#19 0x00007f6bde46e7fa in wl_display_run (display=0x564b2537d700) at /var/tmp/portage/dev-libs/wayland-1.16.0/work/wayland-1.16.0/src/wayland-server.c:1260
No locals.
#20 0x0000564b2418c506 in main (argc=1, argv=0x7fff8c842228) at ../sway-1.0/sway/main.c:401
        verbose = 0
        debug = 0
        validate = 0
        allow_unsupported_gpu = 0
        long_options = {{name = 0x564b241cc7c5 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x564b241cf858 "config", has_arg = 1, flag = 0x0, val = 99}, {name = 0x564b241cc7ca "validate", has_arg = 0, flag = 0x0, val = 67}, {name = 0x564b241cc7d3 "debug", has_arg = 0, flag = 0x0, val = 100}, {name = 0x564b241cc729 "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x564b241cb861 "verbose", has_arg = 0, flag = 0x0, val = 86}, {name = 0x564b241cc7d9 "get-socketpath", has_arg = 0, flag = 0x0, val = 112}, {name = 0x564b241cc7e8 "unsupported-gpu", has_arg = 0, flag = 0x0, val = 117}, {name = 0x564b241cc7f8 "my-next-gpu-wont-be-nvidia", has_arg = 0, flag = 0x0, val = 117}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}
        config_path = 0x0
        usage = 0x564b241ccb08 "Usage: sway [options] [command]\n\n  -h, --help", ' ' <repeats 13 times>, "Show help message and quit.\n  -c, --config <config>  Specify a config file.\n  -C, --validate         Check the validity of the config file, th"...
        c = <optimized out>
@emersion
Copy link
Member

c->y - c->workspace->y

That doesn't look like a division? What's wrong here?

@stsquad
Copy link
Author

stsquad commented Mar 20, 2019

@emersion the actual instruction is:

(gdb) x/i $pc
=> 0x564b24191e32 <get_deco_rect+354>:  idivl  0x4(%rsi)

However I can only assume this is because the optimisation has moved things around.

@stsquad
Copy link
Author

stsquad commented Mar 20, 2019

More context for the function....

(gdb) info line 368
Line 368 of "../sway-1.0/sway/ipc-json.c" starts at address 0x564b24191e11 <get_deco_rect+321> and ends at 0x564b24191e40 <get_deco_rect+368>.
(gdb) x/13i 0x564b24191e11
   0x564b24191e11 <get_deco_rect+321>:  cvttsd2si %xmm0,%eax
   0x564b24191e15 <get_deco_rect+325>:  mov    %eax,0x4(%rbp)
   0x564b24191e18 <get_deco_rect+328>:  jmpq   0x564b24191d64 <get_deco_rect+148>
   0x564b24191e1d <get_deco_rect+333>:  nopl   (%rax)
   0x564b24191e20 <get_deco_rect+336>:  mov    0x188(%rbx),%rax
   0x564b24191e27 <get_deco_rect+343>:  mov    0xb0(%rax),%rsi
   0x564b24191e2e <get_deco_rect+350>:  mov    0x68(%rax),%eax
   0x564b24191e31 <get_deco_rect+353>:  cltd
=> 0x564b24191e32 <get_deco_rect+354>:  idivl  0x4(%rsi)
   0x564b24191e35 <get_deco_rect+357>:  mov    %eax,%r12d
   0x564b24191e38 <get_deco_rect+360>:  jmpq   0x564b24191dae <get_deco_rect+222>
   0x564b24191e3d <get_deco_rect+365>:  nopl   (%rax)
   0x564b24191e40 <get_deco_rect+368>:  mov    %rbx,%rdi

@RedSoxFan
Copy link
Member

I think this is a duplicate of #3870. Unfortunately, this was fixed after the 1.0 release, but is fixed on git master

@stsquad
Copy link
Author

stsquad commented Mar 20, 2019

@RedSoxFan it looks like.. I'll update to the -9999 build until 1.1 makes it's way to the repos. Thanks.

@stsquad stsquad closed this as completed Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants