Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upIntermittent segfault in webrender build script (signal: 11, SIGSEGV: invalid memory reference) #27039
Comments
jdm
commented
Jun 22, 2020
|
Since this happens in this code, I suspect that either glslopt is not threadsafe the way it's being used, or the implementation of build_parallel is not upholding the required Rust safety invariants. |
|
aras-p/glsl-optimizer#76 suggests that glsl-optimizer might be the culprit. |
|
I'm going to switch us to https://github.com/servo/webrender/tree/crash-backtrace to get a better sense of what code is segfaulting. |
Update webrender to crash-backtrace branch. This moves us to https://github.com/servo/webrender/tree/crash-backtrace, which adds a signal handler to the webrender build script to give us more information about the crash in #27039.
Update webrender to crash-backtrace branch. This moves us to https://github.com/servo/webrender/tree/crash-backtrace, which adds a signal handler to the webrender build script to give us more information about the crash in #27039.
Update webrender to crash-backtrace branch. This moves us to https://github.com/servo/webrender/tree/crash-backtrace, which adds a signal handler to the webrender build script to give us more information about the crash in #27039.
Update webrender to crash-backtrace branch. This moves us to https://github.com/servo/webrender/tree/crash-backtrace, which adds a signal handler to the webrender build script to give us more information about the crash in #27039.
|
|
Since it's segfaulting on calling methods from a type that is created at https://github.com/jamienicol/glsl-optimizer/blob/a9bdfcc8d80050e45e40d9cf806f3e38f339afd0/src/compiler/glsl/builtin_variables.cpp#L983, I strongly suspect threading issues. |
|
The various types are stored in static hashtables in https://github.com/jamienicol/glsl-optimizer/blob/a9bdfcc8d80050e45e40d9cf806f3e38f339afd0/src/compiler/glsl_types.h#L1170-L1186, which looks unlikely to be protected against multiple threads using them. |
|
jamienicol/glsl-optimizer@d6ec0aa added a mutex protecting those hashtables, but I think it's being undermined by https://github.com/aras-p/glsl-optimizer/blob/21b98a985423eec771600d2db0fbf6d340106af9/src/glsl/builtin_functions.cpp#L4628-L4632. |