gazebosim / gz-rendering

C++ library designed to provide an abstraction for different rendering engines. It offers unified APIs for creating 3D graphics applications.
https://gazebosim.org
Apache License 2.0
56 stars 51 forks source link

INTEGRATION_load_unload_ogre_gl3plus test fails on gz_rendering-ci-pr_any-noble-amd64 #1007

Closed iche033 closed 1 month ago

iche033 commented 4 months ago

Environment

Description

INTEGRATION_load_unload_ogre_gl3plus test is failing on gz_rendering-ci-pr_any-noble-amd64 CI

The test passes on Ubuntu Jammy on github actions and jenkins

Output

CI console output

39:  GZ_ENGINE_TO_TEST=ogre
39:  GZ_ENGINE_BACKEND=gl3plus
39: Test timeout computed to be: 240
39: Running main() from /home/jenkins/workspace/gz_rendering-ci-pr_any-noble-amd64/gz-rendering/test/gtest_vendor/src/gtest_main.cc
39: [==========] Running 1 test from 1 test suite.
39: [----------] Global test environment set-up.
39: [----------] 1 test from LoadUnloadTest
39: [ RUN      ] LoadUnloadTest.Thread
 39/132 Test  #39: INTEGRATION_load_unload_ogre_gl3plus .................***Exception: SegFault  0.63 sec
Blast545 commented 3 months ago

:farmer: This is also affecting main noble jobs, see: https://build.osrfoundation.org/job/gz_rendering-ci-main-noble-amd64/6/

iche033 commented 2 months ago

I was able to reproduce the issue on Ubuntu Noble with ogre 1.9.0 debs but I haven't found a fix for it yet. Some observations:

iche033 commented 1 month ago

When testing with ogre 1.9.0 built from source (with the same cmake args as ones used to build the debs), the test passes.

I missed a few compile flags last time and now have found the one that caused the crash: -flto=auto. Running the test with ogre 1.9 built with this flag will reliably make the test fail. It seems to be related to the RenderSystem_GL.so plugin. If you comment out the call to unload (dlclose) the plugin, test does not crash when thread exists.

iche033 commented 1 month ago

merged workaround in https://github.com/gazebosim/gz-rendering/pull/1033