[Bug 60929] [r600-llvm] mono games with opengl are blocking on start

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Aug 26 19:34:15 PDT 2013


https://bugs.freedesktop.org/show_bug.cgi?id=60929

--- Comment #17 from Tom Stellard <tstellar at gmail.com> ---
(In reply to comment #15)
> r600g initializes LLVM without first setting the
> llvm::DisablePrettyStackTrace variable to true. If this variable is false
> (the default), LLVM will register a bunch of signal handlers, including for
> SIGXCPU and SIGPWR, both of which are used by Mono's garbage collector.
> 
> gallivm correctly sets llvm::DisablePrettyStackTrace to true, but it runs
> after r600g has already started calling into LLVM and the signal handlers
> have been registered.
> 
> If you set a breakpoint on r600_create_context, manually set
> llvm::DisablePrettyStackTrace to true and then continue, the application
> will function correctly. I tested this using Fractal (a Unity game which
> deadlocks in sem_wait on startup), Bastion (a MonoGame, also deadlocks in
> sem_wait), and RepetierHost (an OpenTK app which dies in the SIGXCPU handler
> at startup).

Thanks for tracking this down.  I think we'll need to extend the LLVM C API in
order to get access to this variable.  However, looking through the LLVM code
it looks like the PrettyStackTrace handler is registered by a static
initializer, so I wonder if setting this variable is enough and if we can
guarantee that r600g will set this variable before the handler is initialized.

Also, this seems to me like it is a bug in LLVM.  Is it common practice for
libraries to override signal handlers of applications?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20130827/43bbac3a/attachment.html>


More information about the dri-devel mailing list