AnsweredAssumed Answered

weston crash

Question asked by zhao wei on Dec 13, 2018
Latest reply on Dec 26, 2018 by zhao wei

NXP的工程师您好:

   我们现在基于imx6dl+fsl-yocto-L4.1.15_2.0.0-ga这个base做产品开发,采用wayland/weston作为图形系统,但是发现weston概率性的crash如下:

 #0  malloc_consolidate (av=av@entry=0x76d3d79c <main_arena>) at /usr/src/debug/glibc/2.23-r0/git/malloc/malloc.c:4176
 4176            unlink(av, p, bck, fwd);
 [Current thread is 1 (Thread 0x76f9a000 (LWP 169))]
 #0  malloc_consolidate (av=av@entry=0x76d3d79c <main_arena>) at /usr/src/debug/glibc/2.23-r0/git/malloc/malloc.c:4176
         fb = 0x76d3d7b8 <main_arena+28>
         maxfb = 0x1e3478
         p = 0x4
         nextp = 0x479aa0
         unsorted_bin = 0x76d3d7cc <main_arena+48>
         first_unsorted = <optimized out>
         nextchunk = 0x47a280
         size = 4694652
         nextsize = 536
         prevsize = 4694596
         nextinuse = <optimized out>
         bck = <optimized out>
         fwd = <optimized out>
 #1  0x76c73278 in _int_free (av=0x76d3d79c <main_arena>, p=<optimized out>, have_lock=0) at /usr/src/debug/glibc/2.23-r0/git/malloc/malloc.c:4076
         size = 84320
         fb = <optimized out>
         nextchunk = <optimized out>
         nextsize = 83392
         nextinuse = <optimized out>
         prevsize = <optimized out>
         bck = <optimized out>
         fwd = <optimized out>
         errstr = 0x0
         locked = <optimized out>
         __func__ = "_int_free"
 #2  0x769efd88 in gcoOS_FreeMemory (Os=<optimized out>, Memory=Memory@entry=0x4893bc) at gc_hal_user_os.c:2032
         os = 0x1e6038
         __user__ = 1 '\001'
         __user_ptr__ = <synthetic pointer>
 #3  0x769efdfc in gcoOS_Free (Os=Os@entry=0x0, Memory=Memory@entry=0x4893bc) at gc_hal_user_os.c:1829
         status = <optimized out>
         __user_ptr__ = <synthetic pointer>
 #4  0x769461c8 in gcoSURF_Destroy (Surface=Surface@entry=0x4893bc) at gc_hal_user_surface.c:2141
         tls = 0x1e657c
         __user__ = <optimized out>
         Surface = 0x4893bc
         __user__ = 1 '\001'
         __user_ptr__ = <synthetic pointer>
 #5  0x769f3380 in gcoWL_DestroyBuffer (resource=<optimized out>) at gc_hal_user_wayland.c:3124
         surface = 0x4893bc
         buffer = 0x4cb684
 #6  0x76f61b88 in destroy_resource (element=0x4cb6b8, data=<optimized out>) at /usr/src/debug/wayland/1.9.0-r0/wayland-1.9.0/src/wayland-server.c:537
         resource = 0x4cb6b8
         client = 0x4cd390
         flags = 0
 #7  0x76f668ec in for_each_helper (entries=0x4cd3b0, entries=0x4cd3b0, data=0x7e9ea76c, func=0x76f61b20 <destroy_resource>) at /usr/src/debug/wayland/1.9.0-r0/wayland-1.9.0/src/wayland-util.c:359
         start = <optimized out>
         end = 0x4c8e78
         p = 0x4c8e74
 #8  wl_map_for_each (map=map@entry=0x4cd3b0, func=0x76f61b20 <destroy_resource>, data=0x7e9ea76c, data@entry=0x7e9ea764) at /usr/src/debug/wayland/1.9.0-r0/wayland-1.9.0/src/wayland-util.c:365
 No locals.
 #9  0x76f624d4 in wl_client_destroy (client=client@entry=0x4cd390) at /usr/src/debug/wayland/1.9.0-r0/wayland-1.9.0/src/wayland-server.c:675
         serial = 0
 #10 0x76f6256c in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=0x4cd390) at /usr/src/debug/wayland/1.9.0-r0/wayland-1.9.0/src/wayland-server.c:249
         client = 0x4cd390
         connection = <optimized out>
         resource = <optimized out>
         object = <optimized out>
         closure = <optimized out>
         message = <optimized out>
         p = {1, 0}
         resource_flags = <optimized out>
         opcode = <optimized out>
         size = <optimized out>
         since = <optimized out>
         len = <optimized out>
 #11 0x76f642e4 in wl_event_loop_dispatch (loop=0x1e1230, timeout=timeout@entry=-1) at /usr/src/debug/wayland/1.9.0-r0/wayland-1.9.0/src/event-loop.c:422
         ep = {{events = 17, data = {ptr = 0x4cd2d8, fd = 5034712, u32 = 5034712, u64 = 5034712}}, {events = 1, data = {ptr = 0x4cd2d8, fd = 5034712, u32 = 5034712, u64 = 5034712}}, {events = 0, data = {ptr = 0x9, fd = 9, u32 = 9, u64 = 10070378439900135433}}, {events = 1996126232, data = {ptr = 0x7e9ea870, fd = 2124327024, u32 = 2124327024, u64 = 8572038448949405808}}, {evens = 2124327032, data = {ptr = 0x7e9ea8cc, fd = 2124327116, u32 = 2124327116, u64 = 8572660115400730828}}, {events = 2124327032, data = {ptr = 0x8, fd = 8, u32 = 8, u64 = 8573078116673519624}}, {events = 5, data = {ptr = 0x1, fd = 1, u32 = 1, u64 = 8573294995342098433}}, {events = 4716768, data = {ptr = 0x1e5408, fd = 1987592, u32 = 1987592, u64 = 7904449479323833352}}, {events = 1995828432, data = {ptr = 0x76fa7818, fd = 1996126232, u32 = 1996126232, u64 = 8573294997338224664}}, {events = 4294967295, data = {ptr = 0x76d42d68, fd = 1993616744, u32 = 1993616744, u64 = 8573123576600997224}}, {events = 1, data = {ptr = 0xbf, fd = 191, u32 =
 191, u64 = 8572025334289924287}}, {events = 1996125792, data = {ptr = 0x7e9ea8e8, fd = 2124327144, u32 = 2124327144, u64 = 9123915663149017320}}, {events = 2124327152, data = {ptr = 0x76f5e750, fd = 1995827024, u32 = 1995827024, u64 = 8572003758370056016}}, {events = 108640, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 4294967296}}, {events = 4668080, data = {ptr = 0x7e9ea920, fd = 2124327200, u32 = 2124327200, u64 = 8572751477945051424}}, {events = 1996075296, data = {ptr = 0x5, fd = 5, u32 = 5, u64 = 5}}, {events = 0, data = {ptr = 0x474a98, fd = 4672152, u32 = 4672152, u64 = 4672152}}, {events = 0, data = {ptr = 0x7e9ea930, fd = 2124327216, u32 = 2124327216, u64 = 8562778684142823728}}, {events = 4672152, data = {ptr = 0x14, fd = 20, u32 = 20, u64 = 20031555669852180}}, {events = 0, data = {ptr = 0x7e9ea960, fd = 2124327264, u32 = 2124327264, u64 = 21459780938080}}, {events = 4660772, data = {ptr = 0x471aa0, fd = 4659872, u32 = 4659872, u64 = 85904005792}}, {events = 0, data = {ptr = 0x7e9ea920, fd = 2124327
 200, u32 = 2124327200, u64 = 6419294496}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 1996126232, data = {ptr = 0xffffffff, fd = -1, u32 = 4294967295, u64 = 8573333448184299519}}, {events = 1995830080, data = {ptr = 0x76f5ecd0, fd = 1995828432, u32 = 1995828432, u64 = 8573294997337926864}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x1a9a0 <weston_view_schedule_repaint+64>, fd = 108960, u32 = 108960, u64 = 8573064510217234848}}, {events = 0, data = {ptr = 0x2c978, fd = 182648, u32 = 182648, u64 = 8501939302222200}}, {events = 1991533176, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 4294967296}}, {events = 5, data = {ptr = 0x5, fd = 5, u32 = 5, u64 = 21624713658761221}}, {events = 4655632, data = {ptr = 0x7e9eae04, fd = 2124328452, u32 = 2124328452, u64 = 6419295748}}}
         source = <optimized out>
         i = 0
         count = 1
         n = 1
 #12 0x76f62bb8 in wl_display_run (display=0x1e11e8) at /usr/src/debug/wayland/1.9.0-r0/wayland-1.9.0/src/wayland-server.c:1004
 No locals.
 #13 0x00017374 in ?? ()
 No symbol table info available.
 Backtrace stopped: previous frame identical to this frame (corrupt stack?)
 r0             0x0    0
 r1             0x0    0
 r2             0x219    537
 r3             0x47a244    4694596
 r4             0x4    4
 r5             0x47a27c    4694652
 r6             0x47a280    4694656
 r7             0x479aa0    4692640
 r8             0x218    536
 r9             0x4ccf98    5033880
| r10            0x76d3d7cc    1993594828
| r11            0x76d3d79c    1993594780
| r12            0x7e9ea67c    2124326524
| sp             0x7e9ea658    0x7e9ea658
| lr             0x0    0
| pc             0x76c72474    0x76c72474 <malloc_consolidate+384>
| cpsr           0x600d0010    1611464720
[New LWP 1107]
[New LWP 1109]
[New LWP 1099]
[New LWP 1098]
[New LWP 1100]
[New LWP 1094]

 

我看到一些信息说是和GPU相关,是不是我这个版本的gpu部分也有一些问题,需要加一些patch修复呢?

gpu相关的信息我看到是下面这些,请您参考

sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-graphics/imx-gpu-viv/imx-gpu-viv_5.0.11.p8.6-hfp.bb

sources/meta-fsl-bsp-release/imx/meta-sdk/recipes-graphics/imx-gpu-sdk/imx-gpu-sdk_2.3.2.bb

 

另外我用valgrind检查发现有下面的提示,详细的检查我放在附件中,请参考,希望对您有所帮助

==2139== Invalid write of size 4
==2139==    at 0x484B1EC: memcpy (vg_replace_strmem.c:1019)
==2139==    by 0x51C527F: gcoOS_MemCopy (gc_hal_user_os_memory.h:86)
==2139==    by 0x51C527F: gcoBUFFER_Write (gc_hal_user_buffer.c:895)
==2139==    by 0x51C571B: gcoBUFFER_EndTEMPCMDBUF (gc_hal_user_buffer.c:1475)
==2139==    by 0x51FF3AF: gcoHARDWARE_FlushPipe (gc_hal_user_hardware.c:13454)
==2139==    by 0x51FF50B: gcoHARDWARE_InvalidateCache (gc_hal_user_hardware.c:15647)
==2139==    by 0x5218B23: gcoHARDWARE_QueryChipIdentity (gc_hal_user_hardware_query.c:4257)
==2139==    by 0x51C3E63: gcoHAL_QueryChipLimits (gc_hal_user_query.c:1118)
==2139==    by 0x51A4E13: veglGetThreadData (gc_egl.c:280)
==2139==    by 0x519A353: eglGetDisplay (gc_egl_init.c:561)
==2139==    by 0x547A747: gl_renderer_create (gl-renderer.c:2656)
==2139==    by 0x50804C7: fbdev_backend_create (compositor-fbdev.c:981)
==2139==    by 0x50804C7: backend_init (compositor-fbdev.c:1042)
==2139==    by 0x16E97: main (main.c:741)
==2139==  Address 0x6efb0020 is not stack'd, malloc'd or (recently) free'd

 

以上多谢多谢!!!!!!!

Attachments

Outcomes