linux-lima icon indicating copy to clipboard operation
linux-lima copied to clipboard

When running piglit test gl-1.0-ortho-pos lima hangs at ioctl

Open Icenowy opened this issue 6 years ago • 2 comments

Userspace backtrace is:

#0  0xb69c9558 in ioctl () from /usr/lib/libc.so.6
#1  0xb6bad868 in drmIoctl () from /usr/lib/libdrm.so.2
#2  0xb64bef64 in lima_bo_wait (bo=bo@entry=0x1064690, op=1, timeout_ns=<optimized out>, relative=relative@entry=false) at lima_bo.c:383
#3  0xb64baf70 in lima_transfer_map (pctx=0x1052be8, pres=0x1064658, level=0, usage=1, usage@entry=258, box=0xbe9e1668, box@entry=0xbe9e1660, 
    pptrans=pptrans@entry=0x104dfc4) at lima_resource.c:346
#4  0xb627f068 in pipe_transfer_map (transfer=0x104dfc4, h=3055480076, w=17096544, y=<optimized out>, x=0, access=258, layer=<optimized out>, level=<optimized out>, 
    resource=<optimized out>, context=<optimized out>) at ../../src/gallium/auxiliary/util/u_inlines.h:448
#5  st_MapRenderbuffer (ctx=ctx@entry=0x106a3c0, rb=rb@entry=0x104df60, x=0, x@entry=3198031564, y=y@entry=0, w=w@entry=160, h=160, h@entry=17116136, 
    mode=mode@entry=1, mapOut=0xbe9e16d0, mapOut@entry=0xbe9e16c8, rowStrideOut=0xbe9e16cc, rowStrideOut@entry=0xbe9e16c4) at state_tracker/st_cb_fbo.c:814
#6  0xb61eed0c in read_rgba_pixels (packing=0x1907, pixels=0x109e880, type=160, format=6407, height=17116136, width=<optimized out>, y=<optimized out>, x=-1096935732, 
    ctx=0x106a3c0) at main/readpix.c:462
#7  _mesa_readpixels (ctx=ctx@entry=0x106a3c0, x=-1096935732, x@entry=0, y=y@entry=0, width=width@entry=160, height=160, height@entry=-1096935244, 
    format=format@entry=6407, type=5121, type@entry=160, packing=0xbe9e1830, packing@entry=0x1907, pixels=0x109e880, pixels@entry=0x1401) at main/readpix.c:894
#8  0xb6283664 in st_ReadPixels (ctx=ctx@entry=0x106a3c0, x=0, y=0, width=160, height=160, format=6407, format@entry=0, type=<optimized out>, type@entry=3055486048, 
    pack=pack@entry=0xbe9e1830, pixels=pixels@entry=0x1401) at state_tracker/st_cb_readpixels.c:550
#9  0xb61f03a4 in read_pixels (no_error=false, pixels=0x1401, pixels@entry=0xb61f0460 <_mesa_ReadPixels+40>, bufSize=6407, bufSize@entry=-1238878816, type=3055486048, 
    format=0, height=<optimized out>, width=160, y=<optimized out>, x=0) at main/readpix.c:1124
#10 _mesa_ReadnPixelsARB (x=<optimized out>, y=<optimized out>, width=<optimized out>, height=<optimized out>, format=format@entry=6407, type=5121, type@entry=41740, 
    bufSize=bufSize@entry=2147483647, pixels=0x109e880, pixels@entry=0x1907) at main/readpix.c:1141
#11 0xb61f0460 in _mesa_ReadPixels (x=<optimized out>, y=<optimized out>, width=<optimized out>, height=<optimized out>, format=6407, type=5121, pixels=0x109e880)
    at main/readpix.c:1156
#12 0x0000a30c in ortho_pos_tiny_quads () at /root/piglit/tests/spec/gl-1.0/orthpos.c:523
#13 0x0000aa70 in piglit_display () at /root/piglit/tests/spec/gl-1.0/orthpos.c:690
#14 0xb6f4a238 in enter_event_loop (winsys_fw=0x1053d38) at /root/piglit/tests/util/piglit-framework-gl/piglit_gbm_framework.c:42
#15 0xb6f49884 in run_test (gl_fw=0x1053d38, argc=1, argv=0xbe9e1ad4) at /root/piglit/tests/util/piglit-framework-gl/piglit_winsys_framework.c:88
#16 0xb6f27808 in piglit_gl_test_run (argc=1, argv=0xbe9e1ad4, config=0xbe9e1944) at /root/piglit/tests/util/piglit-framework-gl.c:229
#17 0x0000907c in main (argc=1, argv=0xbe9e1ad4) at /root/piglit/tests/spec/gl-1.0/orthpos.c:57

And when I killed the process and try to run a glmark2-es2-drm, kernel enters bug state:

[11383.653942] BUG: scheduling while atomic: glmark2-es2-drm/17516/0x00000002
[11383.661209] Modules linked in: lima sun4i_backend gpu_sched brcmfmac sun4i_codec brcmutil sun4i_drm_hdmi sun4i_drm sun4i_tcon uio_pdrv_genirq uio ip_tables x_tables ]
[11383.679130] CPU: 0 PID: 17516 Comm: glmark2-es2-drm Not tainted 4.16.0-rc5-aosc-sunxi+ #3
[11383.687553] Hardware name: Allwinner sun7i (A20) Family
[11383.692982] [<c010f084>] (unwind_backtrace) from [<c010bbd8>] (show_stack+0x10/0x14)
[11383.700955] [<c010bbd8>] (show_stack) from [<c0b1f0d8>] (dump_stack+0x88/0x9c)
[11383.708391] [<c0b1f0d8>] (dump_stack) from [<c01429ec>] (__schedule_bug+0x64/0x84)
[11383.716185] [<c01429ec>] (__schedule_bug) from [<c0b33b58>] (__schedule+0x498/0x67c)
[11383.724151] [<c0b33b58>] (__schedule) from [<c0b33d90>] (schedule+0x54/0xc0)
[11383.731408] [<c0b33d90>] (schedule) from [<c0b373d0>] (schedule_timeout+0x1a8/0x260)
[11383.739379] [<c0b373d0>] (schedule_timeout) from [<c06de520>] (dma_fence_default_wait+0x1dc/0x208)
[11383.748616] [<c06de520>] (dma_fence_default_wait) from [<bf0316ac>] (lima_sched_context_queue_task+0x6c/0x1a8 [lima])
[11383.759553] [<bf0316ac>] (lima_sched_context_queue_task [lima]) from [<bf0302ac>] (lima_gem_submit+0x3b8/0x3cc [lima])
[11383.770565] [<bf0302ac>] (lima_gem_submit [lima]) from [<bf02d36c>] (lima_ioctl_gem_submit+0x20c/0x26c [lima])
[11383.780855] [<bf02d36c>] (lima_ioctl_gem_submit [lima]) from [<c06914bc>] (drm_ioctl+0x1a8/0x378)
[11383.789983] [<c06914bc>] (drm_ioctl) from [<c022a79c>] (do_vfs_ioctl+0x9c/0x88c)
[11383.797596] [<c022a79c>] (do_vfs_ioctl) from [<c022afc0>] (SyS_ioctl+0x34/0x58)
[11383.805116] [<c022afc0>] (SyS_ioctl) from [<c0101000>] (ret_fast_syscall+0x0/0x54)
[11383.812897] Exception stack(0xe2123fa8 to 0xe2123ff0)
[11383.818098] 3fa0:                   01603ef8 be963658 00000011 c0206444 be963658 00000000
[11383.826504] 3fc0: 01603ef8 be963658 c0206444 00000036 00000060 b6779000 01289600 03a16340
[11383.834907] 3fe0: b6e21f34 be96363c b6e17868 b6b1555c

Reproduced by run /lib/piglit/bin/gl-1.0-ortho-pos -auto -fbo after reboot.

linux-lima commit: d6c9ab4822e4c1ae327049482c1539bd02169881 mesa-lima commit: 2a4185ec08a33fa81ebe956ea78702ab2c071cc4 piglit commit: af1140c9d152e11380519ff79dde2cac110bb327

Icenowy avatar Mar 29 '18 05:03 Icenowy

P.S. it might be a regression as in previous piglit run gl-1.0-ortho-pos doesn't hang.

Icenowy avatar Mar 29 '18 05:03 Icenowy

The LIMA_SHADER_DEBUG=all log is at https://gist.github.com/Icenowy/660d9b3e234247669a49a479ef9205d4

Icenowy avatar Mar 29 '18 06:03 Icenowy