SIGBUS on wl_shm clients (Re: Newest git version of Wayland is even worse)
Pekka Paalanen
ppaalanen at gmail.com
Sat Dec 8 00:23:23 PST 2012
On Fri, 07 Dec 2012 10:39:41 -0800
Bill Spitzak <spitzak at gmail.com> wrote:
> Okay the newest version does not even run simple-shm for me. I hope
> somebody has a hint as to what is wrong and how to fix it, as I am very
> interested in wayland development but rather limited as long as I cannot
> test any changes!
>
> I deleted my ~/install directory and managed to build wayland, mesa, and
> weston including all the dependencies they needed, running git clean
> -xfd in all of them and doing git pull for the newest. It was not able
> to build xserver because it needs a new version of xtrans, but I did not
> think that was important.
>
> Running the x11-compositor produces a blue window with red panel, with
> correct icons for two terminals, a fallback X for the browser, and a
> knob icon, and the date. Also the cursor works. This makes me believe
> that a significant amount of code works, including egl.
>
> However all clients crash. At least previously I was able to get
> simple-shm and "flower" to work. With all the debugging symbols here is
> what simple-shm prints:
>
> $ env MESA_DEBUG=1 EGL_LOG_LEVEL=debug LIBGL_DEBUG=verbose
> WAYLAND_DEBUG=1 weston/clients/simple-shm
> [1030574.667] -> wl_display at 1.get_registry(new id wl_registry at 2)
> [1030574.914] -> wl_display at 1.sync(new id wl_callback at 3)
> [1030575.141] wl_display at 1.get_registry(new id wl_registry at 0)
> [1030575.310] -> wl_registry at 2.global(1, "wl_display", 1)
> [1030575.523] -> wl_registry at 2.global(2, "wl_compositor", 2)
> [1030575.725] -> wl_registry at 2.global(3, "screenshooter", 1)
> [1030575.923] -> wl_registry at 2.global(4, "text_cursor_position", 1)
> [1030576.117] -> wl_registry at 2.global(5, "text_model_factory", 1)
> [1030576.311] -> wl_registry at 2.global(6, "wl_data_device_manager", 1)
> [1030576.497] -> wl_registry at 2.global(7, "wl_shm", 1)
> [1030576.691] -> wl_registry at 2.global(8, "wl_seat", 1)
> [1030576.886] -> wl_registry at 2.global(9, "input_method", 1)
> [1030577.079] -> wl_registry at 2.global(10, "wl_output", 1)
> [1030577.273] -> wl_registry at 2.global(11, "wl_shell", 1)
> [1030577.472] -> wl_registry at 2.global(12, "desktop_shell", 1)
> [1030577.671] -> wl_registry at 2.global(13, "screensaver", 1)
> [1030577.914] -> wl_registry at 2.global(14, "input_panel", 1)
> [1030578.106] -> wl_registry at 2.global(15, "workspace_manager", 1)
> [1030578.303] -> wl_registry at 2.global(16, "xserver", 1)
> [1030578.492] wl_display at 1.sync(new id wl_callback at 0)
> [1030578.622] -> wl_callback at 3.done(27)
> [1030578.718] -> wl_display at 1.delete_id(3)
> [1030578.894] wl_registry at 2.global(1, "wl_display", 1)
> [1030579.088] wl_registry at 2.global(2, "wl_compositor", 2)
> [1030579.303] -> wl_registry at 2.bind(2, "wl_compositor", 1, new id
> [unknown]@4)
> [1030579.559] wl_registry at 2.global(3, "screenshooter", 1)
> [1030579.745] wl_registry at 2.global(4, "text_cursor_position", 1)
> [1030579.918] wl_registry at 2.global(5, "text_model_factory", 1)
> [1030580.105] wl_registry at 2.global(6, "wl_data_device_manager", 1)
> [1030580.278] wl_registry at 2.global(7, "wl_shm", 1)
> [1030580.469] -> wl_registry at 2.bind(7, "wl_shm", 1, new id [unknown]@5)
> [1030580.721] wl_registry at 2.global(8, "wl_seat", 1)
> [1030580.894] wl_registry at 2.global(9, "input_method", 1)
> [1030581.074] wl_registry at 2.global(10, "wl_output", 1)
> [1030581.262] wl_registry at 2.global(11, "wl_shell", 1)
> [1030581.440] -> wl_registry at 2.bind(11, "wl_shell", 1, new id [unknown]@6)
> [1030581.719] wl_registry at 2.global(12, "desktop_shell", 1)
> [1030581.907] wl_registry at 2.global(13, "screensaver", 1)
> [1030582.043] wl_registry at 2.global(14, "input_panel", 1)
> [1030582.173] wl_registry at 2.global(15, "workspace_manager", 1)
> [1030582.301] wl_registry at 2.global(16, "xserver", 1)
> [1030582.428] wl_callback at 3.done(27)
> [1030582.496] wl_display at 1.delete_id(3)
> [1030582.567] -> wl_display at 1.sync(new id wl_callback at 3)
> [1030582.685] wl_registry at 2.bind(2, "wl_compositor", 1, new id
> [unknown]@1065353216)
> [1030582.878] wl_registry at 2.bind(7, "wl_shm", 1, new id [unknown]@150354792)
> [1030583.064] -> wl_shm at 5.format(0)
> [1030583.133] -> wl_shm at 5.format(1)
> [1030583.202] wl_registry at 2.bind(11, "wl_shell", 1, new id
> [unknown]@150248600)
> [1030583.418] wl_display at 1.sync(new id wl_callback at 2037147509)
> [1030583.523] -> wl_callback at 3.done(27)
> [1030583.608] -> wl_display at 1.delete_id(3)
> [1030583.758] wl_shm at 5.format(0)
> [1030583.862] wl_shm at 5.format(1)
> [1030583.956] wl_callback at 3.done(27)
> [1030584.048] wl_display at 1.delete_id(3)
> [1030584.145] -> wl_compositor at 4.create_surface(new id wl_surface at 3)
> [1030584.241] -> wl_shell at 6.get_shell_surface(new id
> wl_shell_surface at 7, wl_surface at 3)
> [1030584.373] -> wl_shell_surface at 7.set_title("simple-shm")
> [1030584.459] -> wl_shell_surface at 7.set_toplevel()
> [1030584.544] -> wl_surface at 3.damage(0, 0, 250, 250)
> [1030584.908] -> wl_shm at 5.create_pool(new id wl_shm_pool at 8, fd 5, 250000)
> [1030585.125] -> wl_shm_pool at 8.create_buffer(new id wl_buffer at 9, 0,
> 250, 250, 1000, 1)
> [1030585.477] -> wl_shm_pool at 8.destroy()
> [09:06:43.920] libwayland: disconnect from client 0x8f657b0
> Bus error (core dumped)
FWIW, I have seen a bus error (SIGBUS) before. One way to trigger
it is to run out of space on the tmpfs, where your XDG_RUNTIME_DIR
points to. Maybe you should check that?
I think it needs at least 20-30 MB, to not run out too soon with
shm clients, and the more the better. Of course depends quite a lot
on whether toytoolkit is mainly using shm or EGL buffers. If
you are still on proprietary drivers, it is definitely shm buffers.
> Here is what running Wayland prints, note it does not crash and will
> exit cleanly when I click the close box on the x11 window:
>
> -e
> Running weston, the example wayland compositor.
> Sleeping 3 seconds so the compositor is actually running by the time I
> run other stuff.
> Date: 2012-12-07 PST
> [09:06:31.778] weston 1.0.0
> http://wayland.freedesktop.org/
> Bug reports to:
> https://bugs.freedesktop.org/enter_bug.cgi?product=weston
> Build: 1.0.0-168-gdb99938 shell: Remove confusing case
> fall-through (2012-12-06 22:34:20 -0500)
> [09:06:31.779] OS: Linux, 3.2.0-27-generic, #43-Ubuntu SMP Fri Jul 6
> 14:46:35 UTC 2012, i686
> [09:06:31.779] warning: XDG_RUNTIME_DIR "/var/lock" is not configured
> correctly. Unix access mode must be 0700 but is 777,
> and XDG_RUNTIME_DIR must be owned by the user, but is
> owned by UID 0.
> Refer to your distribution on how to get it, or
> http://www.freedesktop.org/wiki/Specifications/basedir-spec
> on how to implement it.
> [09:06:31.779] Loading module
> '/home/spitzak/install/lib/weston/x11-backend.so'
> [09:06:31.783] initializing x11 backend
> libEGL debug: Native platform type: x11 (autodetected)
Thanks,
pq
More information about the wayland-devel
mailing list