Bug 78415 - Weston aborts during shutdown in multi-head when primary is hot unplugged
Summary: Weston aborts during shutdown in multi-head when primary is hot unplugged
Status: VERIFIED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-08 00:23 UTC by Anu Reddy
Modified: 2014-09-17 17:54 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
gdb-backtrace (4.91 KB, text/plain)
2014-05-08 00:26 UTC, Anu Reddy
Details

Description Anu Reddy 2014-05-08 00:23:25 UTC
Steps :
1. Identify two touch displays as display1 and display2
2. Launch weston
3. Unplug display1 (primary). Mouse pointer moves to display2.
4. Launch weston-terminal on display2
5. Shutdown weston via <ctrl> + <alt> + <backspace>
6. Observe weston receives SIGABRT. See attached gdb_backtrace.


Software Stack:
wayland (HEAD) 1.4.92-0-g4a4523f
drm (HEAD) libdrm-2.4.52-0-g46d451c
mesa (HEAD) remotes/origin/10.1-0-g340ebdb
libva (HEAD) libva-1.2.1-0-g88ed1eb
intel-driver (HEAD) 1.2.2-0-g121e70d
cairo (HEAD) heads/1.12-0-g59e2a93
libinput (HEAD) remotes/origin/HEAD-0-g97af5c3
weston (HEAD) 1.4.92-0-gd7d71e8
Comment 1 Anu Reddy 2014-05-08 00:26:29 UTC
Created attachment 98650 [details]
gdb-backtrace
Comment 2 Ander Conselvan de Oliveira 2014-05-08 08:06:44 UTC
I can't reproduce this one. Could you run weston inside valgrind and see if it reports any useful information?
Comment 3 Neil Roberts 2014-05-08 17:41:56 UTC
I was able to reproduce this bug and saw the following output in Valgrind. I made a patch but I couldn't reproduce the problem 100% of the time so I'm not totally sure if the patch is right but it seems like a likely candidate.

==14331== Invalid write of size 8
==14331==    at 0x4C1CB47: wl_list_remove (wayland-util.c:55)
==14331==    by 0x40E53F: unbind_resource (compositor.c:3043)
==14331==    by 0x4C16EC0: destroy_resource (wayland-server.c:533)
==14331==    by 0x4C1D319: for_each_helper (wayland-util.c:354)
==14331==    by 0x4C1D355: wl_map_for_each (wayland-util.c:360)
==14331==    by 0x4C171B8: wl_client_destroy (wayland-server.c:671)
==14331==    by 0x93A11AC: shell_destroy (shell.c:5976)
==14331==    by 0x4075CC: wl_signal_emit (wayland-server.h:260)
==14331==    by 0x410E5B: main (compositor.c:4318)
==14331==  Address 0x93248c8 is 40 bytes inside a block of size 1,168 free'd
==14331==    at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==14331==    by 0x5A2B7E6: drm_output_destroy (compositor-drm.c:1156)
==14331==    by 0x5A2E5B0: update_outputs (compositor-drm.c:2325)
==14331==    by 0x5A2E6E8: udev_drm_event (compositor-drm.c:2361)
==14331==    by 0x4C19257: wl_event_source_fd_dispatch (event-loop.c:86)
==14331==    by 0x4C19BFA: wl_event_loop_dispatch (event-loop.c:422)
==14331==    by 0x4C17A4C: wl_display_run (wayland-server.c:959)
==14331==    by 0x410E3A: main (compositor.c:4312)

http://lists.freedesktop.org/archives/wayland-devel/2014-May/014728.html


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.