bugzilla-daemon at freedesktop.org
2016-Aug-29 20:41 UTC
[Nouveau] [Bug 97537] New: nvc0 occasionally crashes in glDrawArrays in a multi-threaded app
https://bugs.freedesktop.org/show_bug.cgi?id=97537
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 at lists.freedesktop.org
Reporter: shinji.suzuki at gmail.com
QA Contact: nouveau at lists.freedesktop.org
Ubuntu 16.04.01 LTS (version of libgl1-mesa-dri is 11.2.0-1ubuntu2.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 code
for reproduction if time permits but I'll attach the stack trace from the
app
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=<optimized out>, res=<optimized
out>)
at ../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_screen.h:156
156 ../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_screen.h: No such
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=<optimized out>,
res=<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=0, abstime=0x0, expected=0,
futex_word=0x611838 <gPboFifo+344>)
at ../sysdeps/unix/sysv/linux/futex-internal.h:205
(gdb) where
#0 nvc0_resource_validate (flags=<optimized out>, res=<optimized
out>)
at ../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_screen.h:156
#1 nvc0_bufctx_fence (nvc0=nvc0 at entry=0x7842c0, bufctx=<optimized
out>,
on_flush=on_flush at entry=true)
at ../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_context.c:434
#2 0x00007ffff38b69c3 in nvc0_state_validate (nvc0=nvc0 at entry=0x7842c0,
mask=mask at entry=4294967295)
at
../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c:760
#3 0x00007ffff38c1dcd in nvc0_draw_vbo (pipe=0x7842c0, info=0x7fffee487890)
at ../../../../../src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c:972
#4 0x00007ffff3572e77 in st_draw_vbo (ctx=0x7ae730, prims=<optimized
out>,
nr_prims=1,
ib=0x0, index_bounds_valid=<optimized out>, min_index=0, max_index=3,
tfb_vertcount=0x0, stream=0, indirect=0x0)
at ../../../src/mesa/state_tracker/st_draw.c:288
#5 0x00007ffff353994a in vbo_draw_arrays (ctx=0x7ae730, mode=6, start=0,
count=4,
numInstances=1, baseInstance=0) at
../../../src/mesa/vbo/vbo_exec_array.c:497
#6 0x0000000000404e8b in renderToWindow (target=4) at main.cpp:825
#7 0x0000000000405efd in RenderThread (pArg=0x7fffffffe140) at main.cpp:1105
#8 0x00007ffff740e6fa in start_thread (arg=0x7fffee488700) at
pthread_create.c:333
#9 0x00007ffff668eb5d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:109
(gdb) p res
$1 = <optimized out>
(gdb) up
#1 nvc0_bufctx_fence (nvc0=nvc0 at entry=0x7842c0, bufctx=<optimized
out>,
on_flush=on_flush at entry=true)
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 = (struct nv04_resource *) 0xfa
(gdb) p ref
$3 = (struct nouveau_bufref *) 0x786f18
(gdb) p ref->priv
$4 = (void *) 0xfa
(gdb)
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<https://lists.freedesktop.org/archives/nouveau/attachments/20160829/b6eb567d/attachment.html>
bugzilla-daemon at freedesktop.org
2016-Aug-29 20:42 UTC
[Nouveau] [Bug 97537] nvc0 occasionally crashes in glDrawArrays in a multi-threaded app
https://bugs.freedesktop.org/show_bug.cgi?id=97537
shinji.suzuki at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Hardware|Other |x86-64 (AMD64)
OS|All |Linux (All)
Version|unspecified |11.2
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<https://lists.freedesktop.org/archives/nouveau/attachments/20160829/5c32958b/attachment.html>
bugzilla-daemon at freedesktop.org
2016-Aug-29 20:46 UTC
[Nouveau] [Bug 97537] nvc0 occasionally crashes in glDrawArrays in a multi-threaded app
https://bugs.freedesktop.org/show_bug.cgi?id=97537 --- Comment #1 from Ilia Mirkin <imirkin at alum.mit.edu> --- Does the app ever draw from multiple threads at once (into separate contexts)? If so, it's a known isse. You can use this branch, it may help: https://github.com/imirkin/mesa/commits/locking -- You are receiving this mail because: You are the assignee for the bug. You are the QA Contact for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20160829/e552b058/attachment.html>
bugzilla-daemon at freedesktop.org
2016-Aug-29 21:05 UTC
[Nouveau] [Bug 97537] nvc0 occasionally crashes in glDrawArrays in a multi-threaded app
https://bugs.freedesktop.org/show_bug.cgi?id=97537 --- Comment #2 from shinji.suzuki at gmail.com --- Yes, each thread writes to its own context without any explicit synchronization other than GL-fences to synchronize access on shared resources (texture and PBO) with. Thank you for the info. I'll examine the branch and wet my feet in building mesa myself. -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20160829/64f0aea9/attachment-0001.html>
bugzilla-daemon at freedesktop.org
2016-Aug-29 21:05 UTC
[Nouveau] [Bug 97537] nvc0 occasionally crashes in glDrawArrays in a multi-threaded/multi-context app
https://bugs.freedesktop.org/show_bug.cgi?id=97537
shinji.suzuki at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|nvc0 occasionally crashes |nvc0 occasionally crashes
|in glDrawArrays in a |in glDrawArrays in a
|multi-threaded app |multi-threaded/multi-contex
| |t app
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<https://lists.freedesktop.org/archives/nouveau/attachments/20160829/770c03e0/attachment.html>
bugzilla-daemon at freedesktop.org
2016-Sep-01 17:05 UTC
[Nouveau] [Bug 97537] nvc0 occasionally crashes in glDrawArrays in a multi-threaded/multi-context app
https://bugs.freedesktop.org/show_bug.cgi?id=97537
--- Comment #3 from shinji.suzuki at gmail.com ---
I managed to have glxinfo run with newly built libs through the use of
LIBGL_DRIVERS_PATH and LD_LIBRARY_PATH env-vars. But once I copy them to the
system dir (/usr/lib/x86_64_linux_gnu/{|mesa|dri}) and reboot then ibus-ui-gtk3
fails to load due to segfault. Since the libs also have an issue that glxinfo
shows incorrect values for "Max core profile version" and "Max
compat profile
version", "OpenGL shading language version string", I guess
I'd give Ubuntu
16.10 a try.
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<https://lists.freedesktop.org/archives/nouveau/attachments/20160901/b8ba92a6/attachment.html>
bugzilla-daemon at freedesktop.org
2016-Sep-01 22:19 UTC
[Nouveau] [Bug 97537] nvc0 occasionally crashes in glDrawArrays in a multi-threaded/multi-context app
https://bugs.freedesktop.org/show_bug.cgi?id=97537 --- Comment #4 from Ilia Mirkin <imirkin at alum.mit.edu> --- (In reply to shinji.suzuki from comment #3)> I managed to have glxinfo run with newly built libs through the use of > LIBGL_DRIVERS_PATH and LD_LIBRARY_PATH env-vars. But once I copy them to the > system dir (/usr/lib/x86_64_linux_gnu/{|mesa|dri}) and reboot then > ibus-ui-gtk3 fails to load due to segfault. Since the libs also have an > issue that glxinfo shows incorrect values for "Max core profile version" and > "Max compat profile version", "OpenGL shading language version string", I > guess I'd give Ubuntu 16.10 a try.Just run the application in question with LD_LIBRARY_PATH=... (note - using LIBGL_DRIVERS_PATH is highly unadvisable unless you *really* know what you're doing. Just build with some prefix, install, and point LD_LIBRARY_PATH at that.) Anyways, if doing your own mesa build is beyond your powers that's fine. We can keep this open and I can assume it'll magically get fixed when I get around to finishing up those locking patches. -- You are receiving this mail because: You are the assignee for the bug. You are the QA Contact for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20160901/034e2407/attachment.html>
bugzilla-daemon at freedesktop.org
2016-Dec-10 14:36 UTC
[Nouveau] [Bug 97537] nvc0 occasionally crashes in glDrawArrays in a multi-threaded/multi-context app
https://bugs.freedesktop.org/show_bug.cgi?id=97537
Tomasz Paweł Gajc <tpgxyz at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Depends on| |92077, 98039
Status|NEW |ASSIGNED
--- Comment #5 from Tomasz Paweł Gajc <tpgxyz at gmail.com> ---
Looks like this is related to broken multi-threading in nouveau, see linked
bugs.
Referenced Bugs:
https://bugs.freedesktop.org/show_bug.cgi?id=92077
[Bug 92077] nouveau graphics freeze when using KDE Plasma 5; PGR engine fault
https://bugs.freedesktop.org/show_bug.cgi?id=98039
[Bug 98039] KMail crash on starting (nouveau-related)
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<https://lists.freedesktop.org/archives/nouveau/attachments/20161210/2783c76c/attachment.html>
bugzilla-daemon at freedesktop.org
2016-Dec-11 22:29 UTC
[Nouveau] [Bug 97537] nvc0 occasionally crashes in glDrawArrays in a multi-threaded/multi-context app
https://bugs.freedesktop.org/show_bug.cgi?id=97537
Ilia Mirkin <imirkin at alum.mit.edu> changed:
What |Removed |Added
----------------------------------------------------------------------------
Depends on|98039 |
Referenced Bugs:
https://bugs.freedesktop.org/show_bug.cgi?id=98039
[Bug 98039] KMail crash on starting (nouveau-related)
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<https://lists.freedesktop.org/archives/nouveau/attachments/20161211/09c975a8/attachment.html>
bugzilla-daemon at freedesktop.org
2019-Sep-18 20:41 UTC
[Nouveau] [Bug 97537] nvc0 occasionally crashes in glDrawArrays in a multi-threaded/multi-context app
https://bugs.freedesktop.org/show_bug.cgi?id=97537
Bug 97537 depends on bug 92077, which changed state.
Bug 92077 Summary: nouveau graphics freeze when using KDE Plasma 5; PGR engine
fault
https://bugs.freedesktop.org/show_bug.cgi?id=92077
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |MOVED
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<https://lists.freedesktop.org/archives/nouveau/attachments/20190918/2f117e76/attachment.html>
bugzilla-daemon at freedesktop.org
2019-Sep-18 20:43 UTC
[Nouveau] [Bug 97537] nvc0 occasionally crashes in glDrawArrays in a multi-threaded/multi-context app
https://bugs.freedesktop.org/show_bug.cgi?id=97537
GitLab Migration User <gitlab-migration at fdo.invalid> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |MOVED
--- Comment #6 from GitLab Migration User <gitlab-migration at
fdo.invalid> ---
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been
closed from further activity.
You can subscribe and participate further through the new bug through this link
to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1110.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<https://lists.freedesktop.org/archives/nouveau/attachments/20190918/6630dab0/attachment.html>
Possibly Parallel Threads
- [PATCH try 2 2/2] gallium/nouveau: move pushbuf and fences to context
- [Mesa-dev] [PATCH try 2 2/2] gallium/nouveau: move pushbuf and fences to context
- [Bug 92077] New: nouveau graphics freeze when using KDE Plasma 5; PGR engine fault
- Does mongrel look at the Rails page cache?
- [Bug 98039] New: KMail crash on starting (nouveau-related)