($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: Steve Sakoman <steve@sakoman.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Joshua Watt <jpewhacker@gmail.com>,
	 bitbake-devel <bitbake-devel@lists.openembedded.org>,
	 openembedded-core <openembedded-core@lists.openembedded.org>
Subject: Re: [bitbake-devel] pthread_cancel bug on ubuntu2004/debian11
Date: Sat, 30 Dec 2023 09:58:36 -1000	[thread overview]
Message-ID: <CAOSpxdYdBh_jGfbwDYQmKF0P1dGV6G0Tt5ru6g717JS3GpZT3A@mail.gmail.com> (raw)
In-Reply-To: <388ea27fd963ab72dd3506204848979ee0f80904.camel@linuxfoundation.org>

On Sat, Dec 30, 2023 at 1:31 AM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Wed, 2023-12-27 at 11:30 -0700, Joshua Watt wrote:
> > On Wed, Dec 27, 2023 at 4:28 AM Richard Purdie
> > <richard.purdie@linuxfoundation.org> wrote:
> > >
> > > 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:
> > >
> > > https://stackoverflow.com/questions/64797838/libgcc-s-so-1-must-be-installed-for-pthread-cancel-to-work
> > >
> > > 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 ctypes
> > > libgcc_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...
> >
> > 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


  reply	other threads:[~2023-12-30 19:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-27 11:28 pthread_cancel bug on ubuntu2004/debian11 Richard Purdie
2023-12-27 18:30 ` [bitbake-devel] " Joshua Watt
2023-12-30 11:31   ` Richard Purdie
2023-12-30 19:58     ` Steve Sakoman [this message]
2023-12-30 17:35   ` Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOSpxdYdBh_jGfbwDYQmKF0P1dGV6G0Tt5ru6g717JS3GpZT3A@mail.gmail.com \
    --to=steve@sakoman.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=jpewhacker@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).