raboof/volare
6
22
Fork
You've already forked volare
2

Odd crash in seat_node_from_node() #75

Open
opened 2023年12月09日 04:21:30 +01:00 by edmonds · 0 comments
Collaborator
Copy link

Got this random crash when exiting volare, haven't had time to track it down but wanted to document it here.

Core was generated by `/home/edmonds/bin/volare'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00005564d6af8cbd in seat_node_from_node (seat=seat@entry=0x5564d7c1c5b0, node=node@entry=0x0) at ../sway/input/seat.c:350
350		if (node->type == N_ROOT || node->type == N_OUTPUT) {
[Current thread is 1 (Thread 0x7fe011c0aa80 (LWP 1523))]
(gdb) bt
#0 0x00005564d6af8cbd in seat_node_from_node (seat=seat@entry=0x5564d7c1c5b0, node=node@entry=0x0) at ../sway/input/seat.c:350
#1 0x00005564d6afda28 in seat_set_raw_focus (seat=0x5564d7c1c5b0, node=0x0) at ../sway/input/seat.c:1157
#2 0x00005564d6b2c2d8 in container_reap_empty (con=0x5564d831c310) at ../sway/tree/container.c:221
#3 0x00005564d6b32840 in container_reap_empty (con=0x5564d831c310) at ../sway/tree/view.c:906
#4 view_unmap (view=0x5564d831cee0) at ../sway/tree/view.c:896
#5 0x00005564d6af88ec in handle_unmap (listener=0x5564d831d108, data=<optimized out>) at ../sway/desktop/xdg_shell.c:404
#6 0x00007fe012bc6acc in wl_signal_emit_mutable () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#7 0x00007fe012b29542 in () at /lib/x86_64-linux-gnu/libwlroots.so.11
#8 0x00007fe012b29915 in () at /lib/x86_64-linux-gnu/libwlroots.so.11
#9 0x00007fe012b29931 in () at /lib/x86_64-linux-gnu/libwlroots.so.11
#10 0x00007fe012b2d5f0 in wlr_surface_destroy_role_object () at /lib/x86_64-linux-gnu/libwlroots.so.11
#11 0x00007fe012b2d691 in () at /lib/x86_64-linux-gnu/libwlroots.so.11
#12 0x00007fe012bc4ee7 in () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#13 0x00007fe012bcb720 in () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#14 0x00007fe012bcbcd3 in () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#15 0x00007fe012bc59d0 in wl_client_destroy () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#16 0x00007fe012bc6536 in wl_display_destroy_clients () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#17 0x00005564d6ae309f in server_fini (server=<optimized out>) at ../sway/server.c:268
#18 main (argc=<optimized out>, argv=0x7fff44ccfed8) at ../sway/main.c:420

Stack seems to be missing the call to container_add_placeholder_child(), maybe due to optimization.

I'm not immediately seeing how seat_set_raw_focus() would get called with a NULL node parameter, but I guess a if (node == NULL) { return; } at the top of that function would prevent the crash.

I'm also wondering if the focus variable in container_add_placeholder_child() can ever be NULL.

Got this random crash when exiting volare, haven't had time to track it down but wanted to document it here. ``` Core was generated by `/home/edmonds/bin/volare'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00005564d6af8cbd in seat_node_from_node (seat=seat@entry=0x5564d7c1c5b0, node=node@entry=0x0) at ../sway/input/seat.c:350 350 if (node->type == N_ROOT || node->type == N_OUTPUT) { [Current thread is 1 (Thread 0x7fe011c0aa80 (LWP 1523))] (gdb) bt #0 0x00005564d6af8cbd in seat_node_from_node (seat=seat@entry=0x5564d7c1c5b0, node=node@entry=0x0) at ../sway/input/seat.c:350 #1 0x00005564d6afda28 in seat_set_raw_focus (seat=0x5564d7c1c5b0, node=0x0) at ../sway/input/seat.c:1157 #2 0x00005564d6b2c2d8 in container_reap_empty (con=0x5564d831c310) at ../sway/tree/container.c:221 #3 0x00005564d6b32840 in container_reap_empty (con=0x5564d831c310) at ../sway/tree/view.c:906 #4 view_unmap (view=0x5564d831cee0) at ../sway/tree/view.c:896 #5 0x00005564d6af88ec in handle_unmap (listener=0x5564d831d108, data=<optimized out>) at ../sway/desktop/xdg_shell.c:404 #6 0x00007fe012bc6acc in wl_signal_emit_mutable () at /lib/x86_64-linux-gnu/libwayland-server.so.0 #7 0x00007fe012b29542 in () at /lib/x86_64-linux-gnu/libwlroots.so.11 #8 0x00007fe012b29915 in () at /lib/x86_64-linux-gnu/libwlroots.so.11 #9 0x00007fe012b29931 in () at /lib/x86_64-linux-gnu/libwlroots.so.11 #10 0x00007fe012b2d5f0 in wlr_surface_destroy_role_object () at /lib/x86_64-linux-gnu/libwlroots.so.11 #11 0x00007fe012b2d691 in () at /lib/x86_64-linux-gnu/libwlroots.so.11 #12 0x00007fe012bc4ee7 in () at /lib/x86_64-linux-gnu/libwayland-server.so.0 #13 0x00007fe012bcb720 in () at /lib/x86_64-linux-gnu/libwayland-server.so.0 #14 0x00007fe012bcbcd3 in () at /lib/x86_64-linux-gnu/libwayland-server.so.0 #15 0x00007fe012bc59d0 in wl_client_destroy () at /lib/x86_64-linux-gnu/libwayland-server.so.0 #16 0x00007fe012bc6536 in wl_display_destroy_clients () at /lib/x86_64-linux-gnu/libwayland-server.so.0 #17 0x00005564d6ae309f in server_fini (server=<optimized out>) at ../sway/server.c:268 #18 main (argc=<optimized out>, argv=0x7fff44ccfed8) at ../sway/main.c:420 ``` Stack seems to be missing the call to `container_add_placeholder_child()`, maybe due to optimization. I'm not immediately seeing how `seat_set_raw_focus()` would get called with a NULL `node` parameter, but I guess a `if (node == NULL) { return; }` at the top of that function would prevent the crash. I'm also wondering if the `focus` variable in `container_add_placeholder_child()` can ever be NULL.
Sign in to join this conversation.
No Branch/Tag specified
main
prepare-for-1.11
volare-1.10
multi-system
prepare-for-0.10
volare-1.9
fix-config-examples
prepare-for-1.9
rebase-on-1.9
volare-1.8.0.x
fix-ci
test
config
flake-enable-debugging
avoid_unsplit_crash
move
move-tab-config-syntax
move-tab
implement-unsplit
build-on-ci
versioning
sway-replacement-non-goal
document-branching-strategy
drop-issue-templates
look
wallpaper
renames
remove-toggle-split
update-to-1.8
update-to-1.8-branch-off-point
unsplit
second_test
v1.11.0.0
v1.10.1.0
1.10.1
1.10
1.10-rc4
1.10-rc3
1.10-rc2
1.10-rc1
v1.9.0.0
1.9
1.9-rc4
1.9-rc3
1.9-rc2
1.9-rc1
v1.8.1.0
1.8.1
1.8
1.8-rc4
1.8-rc3
1.8-rc2
1.8-rc1
1.7
1.7-rc3
1.7-rc2
1.7-rc1
1.6.1
1.6
1.6-rc3
1.6-rc2
1.6-rc1
1.5.1
1.5
v1.5-rc2
1.5-rc1
1.4
1.3-rc3
1.3-rc2
1.3-rc1
1.2
1.2-rc2
1.2-rc1
1.1.1
1.1
1.1-rc3
1.1-rc2
1.1-rc1
1.0
1.0-rc5
1.0-rc4
1.0-rc3
1.0-rc2
1.0-rc1
1.0-beta.2
1.0-beta.1
1.0-alpha.6
1.0-alpha.5
1.0-alpha.4
1.0-alpha.3
1.0-alpha.2
1.0-alpha.1
0.15-rc1
0.14-rc1
0.13-rc1
0.12-rc1
0.11
0.11-rc3
0.11-rc2
0.11-rc1
0.10-rc1
0.9
0.9-rc3
0.9-rc2
0.9-rc1
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
raboof/volare#75
Reference in a new issue
raboof/volare
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?