pthread_cancel bug on ubuntu2004/debian11
I wanted to write down some thoughts on this which I have all the pieces handy.
We saw a nightly layer check fail for meta-openembedded:
https://autobuilder.yoctoproject.org/typhoon/#/builders/121/builds/1798/steps/21/logs/stdio
INFO: ======================================================================
INFO: ERROR: test_show_environment (common.CommonCheckLayer)
INFO: ----------------------------------------------------------------------
INFO: Traceback (most recent call last):
File "/home/pokybuild/yocto-worker/check-layer-nightly/build/scripts/lib/checklayer/cases/common.py", line 48, in test_show_environment
check_command('Layer %s failed to show environment.' % self.tc.layer['name'],
File "/home/pokybuild/yocto-worker/check-layer-nightly/build/scripts/lib/checklayer/__init__.py", line 287, in check_command
raise RuntimeError(msg)
RuntimeError: Layer meta-gnome failed to show environment.
Command: bitbake -e
Output:
libgcc_s.so.1 must be installed for pthread_cancel to work
Aborted (core dumped)
which unsurprisingly is on ubuntn 20.04. We've also seen issues like this on Debian 11.
I noticed:
and:
https://bugs.ams1.psf.io/issue42888
which led me to try:
ubuntu2004-ty-1:~$ wget https://bugs.ams1.psf.io/file50112/pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ echo $? 0 rpurdie@ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py libgcc_s.so.1 must be installed for pthread_cancel to work Aborted (core dumped) ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py libgcc_s.so.1 must be installed for pthread_cancel to work Aborted (core dumped) ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py libgcc_s.so.1 must be installed for pthread_cancel to work Aborted (core dumped)
(1 in 4 success)
Then adding to the script:
import ctypeslibgcc_s = ctypes.CDLL('libgcc_s.so.1')
ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 --version Python 3.8.10
I also tried this on debian 11:
debian11-ty-1:~$ python3 pthread_cancel_bug.py libgcc_s.so.1 must be installed for pthread_cancel to work Aborted
debian11-ty-1:~$ python3 --version Python 3.9.2
where the above workaround using ctypes also seems to work.
I'm therefore tempted for python 3.8/3.9 to preload libgcc_s as a workaround for this...
Cheers,
Richard
Quoted 76 lines · Richard Purdie
I wanted to write down some thoughts on this which I have all the pieces handy.
We saw a nightly layer check fail for meta-openembedded:
https://autobuilder.yoctoproject.org/typhoon/#/builders/121/builds/1798/steps/21/logs/stdio
INFO: ======================================================================
INFO: ERROR:test_show_environment(common.CommonCheckLayer)
INFO: ----------------------------------------------------------------------
INFO: Traceback (most recent call last):
File "/home/pokybuild/yocto-worker/check-layer-nightly/build/scripts/lib/checklayer/cases/common.py", line 48, intest_show_environment
check_command('Layer %s failed to show environment.' % self.tc.layer['name'],
File "/home/pokybuild/yocto-worker/check-layer-nightly/build/scripts/lib/checklayer/__init__.py", line 287, incheck_command
raise RuntimeError(msg)
RuntimeError: Layer meta-gnome failed to show environment.
Command: bitbake -e
Output:
libgcc_s.so.1 must be installed forpthread_cancelto work
Aborted (core dumped)which unsurprisingly is on ubuntn 20.04. We've also seen issues like this on Debian 11.
I noticed:
and:
https://bugs.ams1.psf.io/issue42888
which led me to try:
ubuntu2004-ty-1:~$ wget https://bugs.ams1.psf.io/file50112/pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ echo $? 0 rpurdie@ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py libgcc_s.so.1 must be installed for pthread_cancel to work Aborted (core dumped) ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py libgcc_s.so.1 must be installed for pthread_cancel to work Aborted (core dumped) ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py libgcc_s.so.1 must be installed for pthread_cancel to work Aborted (core dumped)(1 in 4 success)
Then adding to the script:
import ctypeslibgcc_s=ctypes.CDLL('libgcc_s.so.1')ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 --version Python 3.8.10I also tried this on debian 11:
debian11-ty-1:~$ python3 pthread_cancel_bug.py libgcc_s.so.1 must be installed for pthread_cancel to work Aborted
Quoted 7 lines
debian11-ty-1:~$ python3 --version Python 3.9.2where the above workaround using ctypes also seems to work.
I'm therefore tempted for python 3.8/3.9 to preload
libgcc_sas a workaround for this...
Seems reasonable to me, as long as we can restrict it to a specific version range of python and have a nice comment explaining why
Quoted 15 lines
Cheers,
Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#15704): https://lists.openembedded.org/g/bitbake-devel/message/15704
Mute This Topic: https://lists.openembedded.org/mt/103383244/3616693
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/leave/8021544/3616693/382565666/xyzzy [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 81 lines · Joshua Watt
Quoted 79 lines · Richard Purdie
I wanted to write down some thoughts on this which I have all the pieces handy.
We saw a nightly layer check fail for meta-openembedded:
https://autobuilder.yoctoproject.org/typhoon/#/builders/121/builds/1798/steps/21/logs/stdio
INFO: ======================================================================
INFO: ERROR:test_show_environment(common.CommonCheckLayer)
INFO: ----------------------------------------------------------------------
INFO: Traceback (most recent call last):
File "/home/pokybuild/yocto-worker/check-layer-nightly/build/scripts/lib/checklayer/cases/common.py", line 48, intest_show_environment
check_command('Layer %s failed to show environment.' % self.tc.layer['name'],
File "/home/pokybuild/yocto-worker/check-layer-nightly/build/scripts/lib/checklayer/__init__.py", line 287, incheck_command
raise RuntimeError(msg)
RuntimeError: Layer meta-gnome failed to show environment.
Command: bitbake -e
Output:
libgcc_s.so.1 must be installed forpthread_cancelto work
Aborted (core dumped)which unsurprisingly is on ubuntn 20.04. We've also seen issues like this on Debian 11.
I noticed:
and:
https://bugs.ams1.psf.io/issue42888
which led me to try:
ubuntu2004-ty-1:~$ wget https://bugs.ams1.psf.io/file50112/pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ echo $? 0 rpurdie@ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py libgcc_s.so.1 must be installed for pthread_cancel to work Aborted (core dumped) ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py libgcc_s.so.1 must be installed for pthread_cancel to work Aborted (core dumped) ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py libgcc_s.so.1 must be installed for pthread_cancel to work Aborted (core dumped)(1 in 4 success)
Then adding to the script:
import ctypeslibgcc_s=ctypes.CDLL('libgcc_s.so.1')ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 --version Python 3.8.10I also tried this on debian 11:
debian11-ty-1:~$ python3 pthread_cancel_bug.py libgcc_s.so.1 must be installed for pthread_cancel to work Aborteddebian11-ty-1:~$ python3 --version Python 3.9.2
Quoted 7 lines
Quoted 4 lines
where the above workaround using ctypes also seems to work.
I'm therefore tempted for python 3.8/3.9 to preload
libgcc_sas a workaround for this...Seems reasonable to me, as long as we can restrict it to a specific version range of python and have a nice comment explaining why
Patch tested, sent and I've applied it to older bitbake branches too in the hope that it helps some of Steve's autobuilder failures too.
Once we get to 3.10 as a minimum version we can drop it.
Cheers,
Richard
Quoted 85 lines · Richard Purdie
Quoted 83 lines · Joshua Watt
Quoted 81 lines · Richard Purdie
I wanted to write down some thoughts on this which I have all the pieces handy.
We saw a nightly layer check fail for meta-openembedded:
https://autobuilder.yoctoproject.org/typhoon/#/builders/121/builds/1798/steps/21/logs/stdio
INFO: ======================================================================
INFO: ERROR:test_show_environment(common.CommonCheckLayer)
INFO: ----------------------------------------------------------------------
INFO: Traceback (most recent call last):
File "/home/pokybuild/yocto-worker/check-layer-nightly/build/scripts/lib/checklayer/cases/common.py", line 48, intest_show_environment
check_command('Layer %s failed to show environment.' % self.tc.layer['name'],
File "/home/pokybuild/yocto-worker/check-layer-nightly/build/scripts/lib/checklayer/__init__.py", line 287, incheck_command
raise RuntimeError(msg)
RuntimeError: Layer meta-gnome failed to show environment.
Command: bitbake -e
Output:
libgcc_s.so.1 must be installed forpthread_cancelto work
Aborted (core dumped)which unsurprisingly is on ubuntn 20.04. We've also seen issues like this on Debian 11.
I noticed:
and:
https://bugs.ams1.psf.io/issue42888
which led me to try:
ubuntu2004-ty-1:~$ wget https://bugs.ams1.psf.io/file50112/pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ echo $? 0 rpurdie@ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py libgcc_s.so.1 must be installed for pthread_cancel to work Aborted (core dumped) ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py libgcc_s.so.1 must be installed for pthread_cancel to work Aborted (core dumped) ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py libgcc_s.so.1 must be installed for pthread_cancel to work Aborted (core dumped)(1 in 4 success)
Then adding to the script:
import ctypeslibgcc_s=ctypes.CDLL('libgcc_s.so.1')ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 --version Python 3.8.10I also tried this on debian 11:
debian11-ty-1:~$ python3 pthread_cancel_bug.py libgcc_s.so.1 must be installed for pthread_cancel to work Aborteddebian11-ty-1:~$ python3 --version Python 3.9.2where the above workaround using ctypes also seems to work.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
I'm therefore tempted for python 3.8/3.9 to preload
libgcc_sas a workaround for this...Seems reasonable to me, as long as we can restrict it to a specific version range of python and have a nice comment explaining why
Patch tested, sent and I've applied it to older bitbake branches too in the hope that it helps some of Steve's autobuilder failures too.
I pulled the patch into my -nut branches when you posted it and have been testing too -- all looks fine from my perspective.
Thanks for merging!
Steve
It’s preloading the library so I think it
Won’t have unintended side effects therefore can be applied regardless I would imagine
Quoted 120 lines · Joshua Watt
Quoted 7 lines · Richard Purdie
I wanted to write down some thoughts on this which I have all the pieces handy.
We saw a nightly layer check fail for meta-openembedded:
https://autobuilder.yoctoproject.org/typhoon/#/builders/121/builds/1798/steps/21/logs/stdio
Quoted 2 lines
INFO:
======================================================================
Quoted 2 lines
INFO: ERROR:
test_show_environment(common.CommonCheckLayer) INFO:----------------------------------------------------------------------
Quoted 2 lines
INFO: Traceback (most recent call last):
File"
/home/pokybuild/yocto-worker/check-layer-nightly/build/scripts/lib/checklayer/cases/common.py", line 48, intest_show_environmentQuoted 1 line
check_command('Layer %s failed to show environment.' %
self.tc.layer['name'],
Quoted 1 line
File
"
/home/pokybuild/yocto-worker/check-layer-nightly/build/scripts/lib/checklayer/__init__.py", line 287, incheck_commandQuoted 7 lines
raise RuntimeError(msg)
RuntimeError: Layer meta-gnome failed to show environment.
Command: bitbake -e
Output:
libgcc_s.so.1 must be installed forpthread_cancelto work Aborted (core dumped)Quoted 6 lines
which unsurprisingly is on ubuntn 20.04. We've also seen issues like this on Debian 11.
I noticed:
Quoted 7 lines
and:
https://bugs.ams1.psf.io/issue42888
which led me to try:
ubuntu2004-ty-1:~$ wgethttps://bugs.ams1.psf.io/file50112/pthread_cancel_bug.py
Quoted 41 lines
ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ echo $? 0 rpurdie@ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py libgcc_s.so.1 must be installed for pthread_cancel to work Aborted (core dumped) ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py libgcc_s.so.1 must be installed for pthread_cancel to work Aborted (core dumped) ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py libgcc_s.so.1 must be installed for pthread_cancel to work Aborted (core dumped)(1 in 4 success)
Then adding to the script:
import ctypeslibgcc_s=ctypes.CDLL('libgcc_s.so.1')ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 pthread_cancel_bug.py ubuntu2004-ty-1:~$ python3 --version Python 3.8.10I also tried this on debian 11:
debian11-ty-1:~$ python3 pthread_cancel_bug.py libgcc_s.so.1 must be installed for pthread_cancel to work AbortedQuoted 7 lines
debian11-ty-1:~$ python3 --version Python 3.9.2where the above workaround using ctypes also seems to work.
I'm therefore tempted for python 3.8/3.9 to preload
libgcc_sas a workaround for this...Seems reasonable to me, as long as we can restrict it to a specific version range of python and have a nice comment explaining why
Quoted 9 lines
Cheers,
Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#15709):
https://lists.openembedded.org/g/bitbake-devel/message/15709
Mute This Topic: https://lists.openembedded.org/mt/103383244/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-