Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gst-plugins-bad gst-plugins-bad
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 986
    • Issues 986
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 132
    • Merge requests 132
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamer
  • gst-plugins-badgst-plugins-bad
  • Issues
  • #1414

Closed
Open
Created Sep 14, 2020 by Jan Schmidt@thaytanMaintainer

wpe: crash on shutdown using SHM

Testing !1568 (merged), I observed a crash shutting down a wpesrc, where WPE was destroying the SHM area while there is still a GStreamer buffer active (note there are multiple wpesrc active in the trace):

Thread 45 (Thread 0x7fd89492b700 (LWP 91619)):
#0  0x00007fd8c60655bb in munmap () at /lib64/libc.so.6
#1  0x00007fd8c49ba808 in shm_pool_unref () at /lib64/libwayland-server.so.0
#2  0x00007fd8c49baa4d in destroy_buffer () at /lib64/libwayland-server.so.0
#3  0x00007fd8c49b83df in destroy_resource () at /lib64/libwayland-server.so.0
#4  0x00007fd8c49be6e1 in for_each_helper.isra () at /lib64/libwayland-server.so.0
#5  0x00007fd8c49bec44 in wl_map_for_each () at /lib64/libwayland-server.so.0
#6  0x00007fd8c49b8e99 in wl_client_destroy () at /lib64/libwayland-server.so.0
#7  0x00007fd8c49b8f77 in wl_client_connection_data () at /lib64/libwayland-server.so.0
#8  0x00007fd8c49bbbea in wl_event_loop_dispatch () at /lib64/libwayland-server.so.0
#9  0x00007fd8c4ae51cb in operator() (__closure=0x0, base=0x7fd880009490) at ../subprojects/wpebackend-fdo/src/ws.cpp:74
#10 _FUN(GSource*, GSourceFunc, gpointer) () at ../subprojects/wpebackend-fdo/src/ws.cpp:83
#11 0x00007fd8c61dd78f in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#12 0x00007fd8c61ddb18 in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
#13 0x00007fd8c61dde33 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#14 0x00007fd8c6324dd2 in WPEContextThread::s_viewThread(void*) (data=0x7fd884002fb0) at ../subprojects/gst-plugins-bad/ext/wpe/WPEThreadedView.cpp:152
#15 0x00007fd8c62077f2 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#16 0x00007fd8c6157432 in start_thread () at /lib64/libpthread.so.0
#17 0x00007fd8c606a913 in clone () at /lib64/libc.so.6

Thread 28 (Thread 0x7fd7da715700 (LWP 92873)):
#0  0x00007fd8c606537d in syscall () at /lib64/libc.so.6
#1  0x00007fd8c622c4f3 in g_cond_wait () at /lib64/libglib-2.0.so.0
#2  0x00007fd8c6326b73 in WPEContextThread::dispatch<WPEView::releaseSHMBuffer(gpointer)::<lambda()> > (func=..., this=0x7fd884002fb0) at ../subprojects/gst-plugins-bad/ext/wpe/WPEThreadedView.cpp:54
#3  WPEView::releaseSHMBuffer(void*) (this=<optimized out>, data=<optimized out>) at ../subprojects/gst-plugins-bad/ext/wpe/WPEThreadedView.cpp:518
#4  0x00007fd8c6326baf in WPEView::s_releaseSHMBuffer(void*) (data=0x7fd8800d9b40) at ../subprojects/gst-plugins-bad/ext/wpe/WPEThreadedView.cpp:528
#5  0x00007fd8c63916d9 in default_free (allocator=<optimized out>, mem=0x7fd8800da0e0) at ../subprojects/gstreamer/gst/gstallocator.c:523
#6  0x00007fd8c63d1f4b in _gst_memory_free (mem=0x7fd8800da0e0) at ../subprojects/gstreamer/gst/gstmemory.c:97
#7  0x00007fd8c639bb46 in gst_memory_unref (memory=<optimized out>) at ../subprojects/gstreamer/gst/gstmemory.h:347
#8  _gst_buffer_free (buffer=0x7fd88c016b40) at ../subprojects/gstreamer/gst/gstbuffer.c:801
#9  0x00007fd8c632610c in gst_buffer_unref (buf=<optimized out>) at ../subprojects/gstreamer/gst/gstbuffer.h:446
#10 WPEView::buffer() (this=0x7fd8800349a0) at ../subprojects/gst-plugins-bad/ext/wpe/WPEThreadedView.cpp:395
#11 0x00007fd8c6327f2c in gst_wpe_src_create(GstBaseSrc*, guint64, guint, GstBuffer**) (bsrc=0x7fd8b0026f50, offset=18446744073709551615, length=4096, buf=0x7fd7da714920) at ../subprojects/gst-plugins-bad/ext/wpe/gstwpesrc.cpp:171
#12 0x00007fd8c64db58d in gst_base_src_get_range (src=src@entry=0x7fd8b0026f50, offset=offset@entry=18446744073709551615, length=<optimized out>, length@entry=4096, buf=buf@entry=0x7fd7da7149f8) at ../subprojects/gstreamer/libs/gst/base/gstbasesrc.c:2587
#13 0x00007fd8c64dd982 in gst_base_src_loop (pad=0x7fd8b003eb20) at ../subprojects/gstreamer/libs/gst/base/gstbasesrc.c:2911
#14 0x00007fd8c640dfdf in gst_task_func (task=0x7fd7e402a290) at ../subprojects/gstreamer/gst/gsttask.c:328
--Type <RET> for more, q to quit, c to continue without paging--
#15 0x00007fd8c62080f4 in g_thread_pool_thread_proxy () at /lib64/libglib-2.0.so.0
#16 0x00007fd8c62077f2 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#17 0x00007fd8c6157432 in start_thread () at /lib64/libpthread.so.0
#18 0x00007fd8c606a913 in clone () at /lib64/libc.so.6

Thread 11 (Thread 0x7fd7d75fd700 (LWP 93126)):
#0  0x00007fd8c60ce7a5 in __memmove_avx_unaligned_erms () at /lib64/libc.so.6
#1  0x00007fd8c63918f7 in _sysmem_copy (mem=0x7fd8800da200, offset=<optimized out>, size=8294400) at ../subprojects/gstreamer/gst/gstallocator.c:462
#2  0x00007fd8c639d5ea in gst_buffer_copy_into (dest=0x7fd888005360, src=src@entry=0x7fd88c018120, flags=flags@entry=(GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS | GST_BUFFER_COPY_META | GST_BUFFER_COPY_MEMORY | GST_BUFFER_COPY_DEEP), offset=offset@entry=0, size=8294400, size@entry=18446744073709551615) at ../subprojects/gstreamer/gst/gstbuffer.c:632
#3  0x00007fd8c639da93 in gst_buffer_copy_with_flags (buffer=0x7fd88c018120, flags=flags@entry=(GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS | GST_BUFFER_COPY_META | GST_BUFFER_COPY_MEMORY | GST_BUFFER_COPY_DEEP)) at ../subprojects/gstreamer/gst/gstbuffer.c:713
#4  0x00007fd8c639dafa in gst_buffer_copy_deep (buffer=<optimized out>) at ../subprojects/gstreamer/gst/gstbuffer.c:742
#5  0x00007fd8c6327f3d in gst_wpe_src_create(GstBaseSrc*, guint64, guint, GstBuffer**) (bsrc=0x7fd8bc047ed0, offset=18446744073709551615, length=4096, buf=0x7fd7d75fc920) at ../subprojects/gst-plugins-bad/ext/wpe/gstwpesrc.cpp:178
#6  0x00007fd8c64db58d in gst_base_src_get_range (src=src@entry=0x7fd8bc047ed0, offset=offset@entry=18446744073709551615, length=<optimized out>, length@entry=4096, buf=buf@entry=0x7fd7d75fc9f8) at ../subprojects/gstreamer/libs/gst/base/gstbasesrc.c:2587
#7  0x00007fd8c64dd982 in gst_base_src_loop (pad=0x7fd8bc0343d0) at ../subprojects/gstreamer/libs/gst/base/gstbasesrc.c:2911
#8  0x00007fd8c640dfdf in gst_task_func (task=0x7fd88c012a70) at ../subprojects/gstreamer/gst/gsttask.c:328
#9  0x00007fd8c62080f4 in g_thread_pool_thread_proxy () at /lib64/libglib-2.0.so.0
#10 0x00007fd8c62077f2 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#11 0x00007fd8c6157432 in start_thread () at /lib64/libpthread.so.0
#12 0x00007fd8c606a913 in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7fd897130700 (LWP 91614)):
#0  0x00007fd8c60ce6d5 in __memmove_avx_unaligned_erms () at /lib64/libc.so.6
#1  0x00007fd8c63918f7 in _sysmem_copy (mem=0x7fd8b4034310, offset=<optimized out>, size=8294400) at ../subprojects/gstreamer/gst/gstallocator.c:462
#2  0x00007fd8c639d5ea in gst_buffer_copy_into (dest=0x7fd88c018360, src=src@entry=0x7fd7b0008000, flags=flags@entry=(GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS | GST_BUFFER_COPY_META | GST_BUFFER_COPY_MEMORY | GST_BUFFER_COPY_DEEP), offset=offset@entry=0, size=8294400, size@entry=18446744073709551615) at ../subprojects/gstreamer/gst/gstbuffer.c:632
#3  0x00007fd8c639da93 in gst_buffer_copy_with_flags (buffer=0x7fd7b0008000, flags=flags@entry=(GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS | GST_BUFFER_COPY_META | GST_BUFFER_COPY_MEMORY | GST_BUFFER_COPY_DEEP)) at ../subprojects/gstreamer/gst/gstbuffer.c:713
#4  0x00007fd8c639dafa in gst_buffer_copy_deep (buffer=<optimized out>) at ../subprojects/gstreamer/gst/gstbuffer.c:742
#5  0x00007fd8c6327f3d in gst_wpe_src_create(GstBaseSrc*, guint64, guint, GstBuffer**) (bsrc=0x7fd8c0072a70, offset=18446744073709551615, length=4096, buf=0x7fd89712f920) at ../subprojects/gst-plugins-bad/ext/wpe/gstwpesrc.cpp:178
#6  0x00007fd8c64db58d in gst_base_src_get_range (src=src@entry=0x7fd8c0072a70, offset=offset@entry=18446744073709551615, length=<optimized out>, length@entry=4096, buf=buf@entry=0x7fd89712f9f8) at ../subprojects/gstreamer/libs/gst/base/gstbasesrc.c:2587
#7  0x00007fd8c64dd982 in gst_base_src_loop (pad=0x7fd8c00740b0) at ../subprojects/gstreamer/libs/gst/base/gstbasesrc.c:2911
#8  0x00007fd8c640dfdf in gst_task_func (task=0x7fd8c008e3b0) at ../subprojects/gstreamer/gst/gsttask.c:328
#9  0x00007fd8c62080f4 in g_thread_pool_thread_proxy () at /lib64/libglib-2.0.so.0
#10 0x00007fd8c62077f2 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#11 0x00007fd8c6157432 in start_thread () at /lib64/libpthread.so.0
#12 0x00007fd8c606a913 in clone () at /lib64/libc.so.6
Assignee
Assign to
Time tracking