From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ@public.gmane.org Subject: [Bug 97537] New: nvc0 occasionally crashes in glDrawArrays in a multi-threaded app Date: Mon, 29 Aug 2016 20:41:11 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0217442130==" Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: nouveau-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Sender: "Nouveau" To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org List-Id: nouveau.vger.kernel.org --===============0217442130== Content-Type: multipart/alternative; boundary="14725032710.EE71D6.15217"; charset="UTF-8" --14725032710.EE71D6.15217 Date: Mon, 29 Aug 2016 20:41:11 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D97537 Bug ID: 97537 Summary: nvc0 occasionally crashes in glDrawArrays in a multi-threaded app Product: Mesa Version: unspecified Hardware: Other OS: All Status: NEW Severity: normal Priority: medium Component: Drivers/DRI/nouveau Assignee: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Reporter: shinji.suzuki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org QA Contact: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Ubuntu 16.04.01 LTS (version of libgl1-mesa-dri is 11.2.0-1ubuntu2.1) / Nvi= dia Quadro K4000. I am examining a sample app from SDK for a video capture card. The app is multi-threaded. The app runs fine for some time (line 10 - 20 mins) but it eventually crahes in glDrawArrays. I intend to try to come up with small co= de for reproduction if time permits but I'll attach the stack trace from the a= pp for now in a hope someone can figure out what's going wrong. (gdb) core glDrawArrays.core warning: core file may not match specified executable file. [New LWP 14181] [New LWP 14175] [New LWP 14179] [New LWP 14180] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `{app-name-hidden}'. Program terminated with signal SIGSEGV, Segmentation fault. #0 nvc0_resource_validate (flags=3D, res=3D) at ../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_screen.h:156 156 ../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_screen.h: No s= uch file or directory. [Current thread is 1 (Thread 0x7fffee488700 (LWP 14181))] (gdb) info threads Id Target Id Frame * 1 Thread 0x7fffee488700 (LWP 14181) nvc0_resource_validate (flags=3D, res=3D) at ../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_screen.h:156 2 Thread 0x7ffff7fd2740 (LWP 14175) 0x00007ffff741798d in recvmsg () at ../sysdeps/unix/syscall-template.S:84 3 Thread 0x7fffef48a700 (LWP 14179) 0x00007ffff6684687 in ioctl () at ../sysdeps/unix/syscall-template.S:84 4 Thread 0x7fffeec89700 (LWP 14180) 0x00007ffff7416867 in futex_abstimed_wait_cancelable (private=3D0, abstime=3D0x0, expected=3D0, futex_word=3D0x611838 ) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 (gdb) where #0 nvc0_resource_validate (flags=3D, res=3D) at ../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_screen.h:156 #1 nvc0_bufctx_fence (nvc0=3Dnvc0@entry=3D0x7842c0, bufctx=3D, on_flush=3Don_flush@entry=3Dtrue) at ../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_context.c:434 #2 0x00007ffff38b69c3 in nvc0_state_validate (nvc0=3Dnvc0@entry=3D0x7842c0, mask=3Dmask@entry=3D4294967295) at ../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c:760 #3 0x00007ffff38c1dcd in nvc0_draw_vbo (pipe=3D0x7842c0, info=3D0x7fffee48= 7890) at ../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c:972 #4 0x00007ffff3572e77 in st_draw_vbo (ctx=3D0x7ae730, prims=3D, nr_prims=3D1, ib=3D0x0, index_bounds_valid=3D, min_index=3D0, max_inde= x=3D3, tfb_vertcount=3D0x0, stream=3D0, indirect=3D0x0) at ../../../src/mesa/state_tracker/st_draw.c:288 #5 0x00007ffff353994a in vbo_draw_arrays (ctx=3D0x7ae730, mode=3D6, start= =3D0, count=3D4, numInstances=3D1, baseInstance=3D0) at ../../../src/mesa/vbo/vbo_exec_array.c:497 #6 0x0000000000404e8b in renderToWindow (target=3D4) at main.cpp:825 #7 0x0000000000405efd in RenderThread (pArg=3D0x7fffffffe140) at main.cpp:= 1105 #8 0x00007ffff740e6fa in start_thread (arg=3D0x7fffee488700) at pthread_create.c:333 #9 0x00007ffff668eb5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 (gdb) p res $1 =3D (gdb) up #1 nvc0_bufctx_fence (nvc0=3Dnvc0@entry=3D0x7842c0, bufctx=3D, on_flush=3Don_flush@entry=3Dtrue) at ../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_context.c:434 434 ../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_context.c: No = such file or directory. (gdb) p res $2 =3D (struct nv04_resource *) 0xfa (gdb) p ref $3 =3D (struct nouveau_bufref *) 0x786f18 (gdb) p ref->priv $4 =3D (void *) 0xfa (gdb) --=20 You are receiving this mail because: You are the assignee for the bug. You are the QA Contact for the bug.= --14725032710.EE71D6.15217 Date: Mon, 29 Aug 2016 20:41:11 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated
Bug ID 97537
Summary nvc0 occasionally crashes in glDrawArrays in a multi-threaded= app
Product Mesa
Version unspecified
Hardware Other
OS All
Status NEW
Severity normal
Priority medium
Component Drivers/DRI/nouveau
Assignee nouveau@lists.freedesktop.org
Reporter shinji.suzuki@gmail.com
QA Contact nouveau@lists.freedesktop.org

Ubuntu 16.04.01 LTS (version of libgl1-mesa-dri is 11.2.0-1ubu=
ntu2.1) / Nvidia
Quadro K4000.

I am examining a sample app from SDK for a video capture card. The app is
multi-threaded. The app runs fine for some time (line 10 - 20 mins) but it
eventually crahes in glDrawArrays. I intend to try to come up with small co=
de
for reproduction if time permits but I'll attach the stack trace from the a=
pp
for now in a hope someone can figure out what's going wrong.

(gdb) core glDrawArrays.core
warning: core file may not match specified executable file.
[New LWP 14181]
[New LWP 14175]
[New LWP 14179]
[New LWP 14180]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so=
.1".
Core was generated by `{app-name-hidden}'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  nvc0_resource_validate (flags=3D<optimized out>, res=3D<optimi=
zed out>)
    at ../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_screen.h:156
156     ../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_screen.h: No s=
uch
file or directory.
[Current thread is 1 (Thread 0x7fffee488700 (LWP 14181))]
(gdb) info threads
  Id   Target Id         Frame
* 1    Thread 0x7fffee488700 (LWP 14181) nvc0_resource_validate
(flags=3D<optimized out>,
    res=3D<optimized out>)
    at ../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_screen.h:156
  2    Thread 0x7ffff7fd2740 (LWP 14175) 0x00007ffff741798d in recvmsg ()
    at ../sysdeps/unix/syscall-template.S:84
  3    Thread 0x7fffef48a700 (LWP 14179) 0x00007ffff6684687 in ioctl ()
    at ../sysdeps/unix/syscall-template.S:84
  4    Thread 0x7fffeec89700 (LWP 14180) 0x00007ffff7416867 in
futex_abstimed_wait_cancelable (private=3D0, abstime=3D0x0, expected=3D0,
futex_word=3D0x611838 <gPboFifo+344>)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:205
(gdb) where
#0  nvc0_resource_validate (flags=3D<optimized out>, res=3D<optimi=
zed out>)
    at ../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_screen.h:156
#1  nvc0_bufctx_fence (nvc0=3Dnvc0@entry=3D0x7842c0, bufctx=3D<optim=
ized out>,
    on_flush=3Don_flush@entry=3Dtrue)
    at ../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_context.c:434
#2  0x00007ffff38b69c3 in nvc0_state_validate (nvc0=3Dnvc0@entry=3D0x78=
42c0,
    mask=3Dmask@entry=3D4294967295)
    at
../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c:760
#3  0x00007ffff38c1dcd in nvc0_draw_vbo (pipe=3D0x7842c0, info=3D0x7fffee48=
7890)
    at ../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c:972
#4  0x00007ffff3572e77 in st_draw_vbo (ctx=3D0x7ae730, prims=3D<optimize=
d out>,
nr_prims=3D1,
    ib=3D0x0, index_bounds_valid=3D<optimized out>, min_index=3D0, ma=
x_index=3D3,
    tfb_vertcount=3D0x0, stream=3D0, indirect=3D0x0)
    at ../../../src/mesa/state_tracker/st_draw.c:288
#5  0x00007ffff353994a in vbo_draw_arrays (ctx=3D0x7ae730, mode=3D6, start=
=3D0,
count=3D4,
    numInstances=3D1, baseInstance=3D0) at
../../../src/mesa/vbo/vbo_exec_array.c:497
#6  0x0000000000404e8b in renderToWindow (target=3D4) at main.cpp:825
#7  0x0000000000405efd in RenderThread (pArg=3D0x7fffffffe140) at main.cpp:=
1105
#8  0x00007ffff740e6fa in start_thread (arg=3D0x7fffee488700) at
pthread_create.c:333
#9  0x00007ffff668eb5d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:109
(gdb) p res
$1 =3D <optimized out>
(gdb) up
#1  nvc0_bufctx_fence (nvc0=3Dnvc0@entry=3D0x7842c0, bufctx=3D<optim=
ized out>,
    on_flush=3Don_flush@entry=3Dtrue)
    at ../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_context.c:434
434     ../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_context.c: No =
such
file or directory.
(gdb) p res
$2 =3D (struct nv04_resource *) 0xfa
(gdb) p ref
$3 =3D (struct nouveau_bufref *) 0x786f18
(gdb) p ref->priv
$4 =3D (void *) 0xfa
(gdb)


You are receiving this mail because:
  • You are the assignee for the bug.
  • You are the QA Contact for the bug.
= --14725032710.EE71D6.15217-- --===============0217442130== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KTm91dmVhdSBt YWlsaW5nIGxpc3QKTm91dmVhdUBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0cHM6Ly9saXN0cy5m cmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9ub3V2ZWF1Cg== --===============0217442130==--