Closed hadess closed 1 year ago
Thanks for the report! I sent a fix to PR #207.
Would it be possible to have this be made available in a release? I can only get one in 10 CI runs to pass in upower right now.
Thanks @hadess for the ping (feel free to do it ealier next time). 0.17.17 is released upstream and Fedora koji builds are running (should be on bodhi in a few mins). I also uploaded to Debian unstable.
The upower test suite randomly crashes in
getenv()
: https://gitlab.freedesktop.org/upower/upower/-/issues/216I think that one of the possible reasons is the code that creates the testbed in
src/umockdev.vala
first creates a worked thread, and then setsUMOCKDEV_DIR
. If the worker thread reads from the environment while the main thread is still setting up the environment, that could lead to a crash.I would recommend:
checked_setenv()
callUMOCKDEV_DIR
and passing it as data to the thread you're creating, so it has its own copy of the string and doesn't need to poke at the environment from another thread.