wayland crash debugging help required

Vikas Patil vikasmpatil at gmail.com
Thu Mar 31 06:07:21 UTC 2016


Hi Pekka Paalanen,

Thanks a lot for your comment.

As you mentioned this could be the case of multiple threads receiving
and dispatching events as I am using [1] qtwayland 5.5.1 and [2]
imxeglviv video sink. Both the component uses the
wl_display_prepare_read() and wl_display_read_events(). Qtwayland uses
the socke and signal while imxeglvivsink uses the poll.

How could I confirm that this is the same race mentioned in
https://bugs.freedesktop.org/show_bug.cgi?id=91273 or
https://bugs.freedesktop.org/show_bug.cgi?id=91768 ?

[1] http://code.qt.io/cgit/qt/qtwayland.git/commit/?h=5.5&id=8cc88f4854b72bb270e4b701d15ada7bdbb74ff4
[2] https://github.com/Freescale/gstreamer-imx/blob/master/src/eglvivsink/egl_platform_wayland.c

Yes, I won't be able to share the application source but I will try to
create test application and if I could I will share.

Thanks & Regards,
Vikash

On Wed, Mar 30, 2016 at 1:38 PM, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> On Wed, 30 Mar 2016 12:01:58 +0530
> Vikas Patil <vikasmpatil at gmail.com> wrote:
>
>> Dear all,
>>
>> I am observing "Segmentation fault" with below mentioned back-trace
>> while playing video (loop back mode )and continuously pressing home
>> button on target (which brings video screen to home screen of HMI).
>>
>> Printing the locals shows null pointer deference (i.e. line 46, print
>> elm->next,  wl_list_insert, /wayland-1.8.1/src/wayland-util.c:46  )
>>
>> Am I hitting some known issue with wayland/weston? How should I debug
>> this further and find the root cause if it is not known issue? Could
>> you guys please provide input/suggestion on finding the root cause?
>>
>> I am on wayland/weston 1.8.0 and using i.MX6/Linux3.14.28. Test
>> application is based on gstreamer1.0 and uses wayland based
>> “imxeglvivsink“ as video sink plug-in. Home button is a gpio mapped to
>> KEY_HOME as standard keyboard and uses input stack as it is from
>> wayland/weston and libinput.
>>
>>
>> Backtrace:
>> warning: Unable to find libthread_db matching inferior's thread
>> library, thread debugging will not be available.
>> warning: Unable to find libthread_db matching inferior's thread
>> library, thread debugging will not be available.
>> Core was generated by `./testVideoPlayer'.
>> Program terminated with signal SIGSEGV, Segmentation fault.
>>
>> #0  wl_list_insert (list=0x1, elm=0x1802660, elm at entry=0x16c) at
>> /usr/src/debug/wayland/1.8.1-r0/wayland-1.8.1/src/wayland-util.c:46
>>
>> 46              elm->next = list->next;
>>
>> (gdb) bt
>>
>> #0  wl_list_insert (list=0x1, elm=0x1802660, elm at entry=0x16c) at
>> /usr/src/debug/wayland/1.8.1-r0/wayland-1.8.1/src/wayland-util.c:46
>>
>> #1  0x75c412c8 in queue_event (len=1975783972, display=0x180116c) at
>> /usr/src/debug/wayland/1.8.1-r0/wayland-1.8.1/src/wayland-client.c:1122
>>
>> #2  read_events (display=<optimized out>) at
>> /usr/src/debug/wayland/1.8.1-r0/wayland-1.8.1/src/wayland-client.c:1207
>>
>> #3  0x75c42030 in wl_display_dispatch_queue
>> (display=display at entry=0x76036800,  queue=queue at entry=0x760005a8) at
>> /usr/src/debug/wayland/1.8.1-r0/wayland-1.8.1/src/wayland-client.c:1579
>>
>> #4  0x75c42290 in wl_display_roundtrip_queue (display=0x76036800,
>> queue=0x760005a8) at
>> /usr/src/debug/wayland/1.8.1-r0/wayland-1.8.1/src/wayland-client.c:982
>>
>> #5  0x75d56cb4 in wl_egl_window_destroy (window=0x1801104) at
>> gc_egl_platform.c:779
>>
>> #6  0x75d7ab44 in gst_imx_egl_viv_sink_egl_platform_shutdown_window (
>> platform=0x76016f00) at ../src/eglvivsink/egl_platform_wayland.c:990
>>
>> #7  0x75d77e68 in gst_imx_egl_viv_sink_gles2_renderer_thread (
>> thread_data=<optimized out>) at ../src/eglvivsink/gles2_renderer.c:227
>
> Hi,
>
> this looks very much like a threading issue in gst imx egl viv sink or
> perhaps in the proprietary EGL implementation. Being random instead of
> deterministically every time you press the button also hints to a race.
>
> Note, that the code you are looking at is not Weston, it is some
> application. I don't think this has anything to do with Weston or
> Wayland really...
>
> Unless this happens to be the case of multiple threads racing between
> setting up queues and listeners for a wl_callback vs. receiving and
> dispatching events: https://bugs.freedesktop.org/show_bug.cgi?id=91768
>
> However, there are things that make looking into your issue very
> difficult for upstream:
> - old weston and wayland
> - gstreamer sink written for a proprietary software platform
> - proprietary EGL implementation
> - use of IVI
> - use of applications we cannot have the sources for (I presume)
>
> IOW, it doesn't look like there would be any way for us to reproduce
> the issue to have a look into.
>
>
> Thanks,
> pq


More information about the wayland-devel mailing list