Bug 219478 - New PSX implementation fails with old bug
Summary: New PSX implementation fails with old bug
Status: RESOLVED WILL_NOT_FIX
Alias: None
Product: Tools
Classification: Unclassified
Component: libcap (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: Andrew G. Morgan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-07 04:33 UTC by Andrew G. Morgan
Modified: 2024-11-10 08:31 UTC (History)
0 users

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Andrew G. Morgan 2024-11-07 04:33:44 UTC
This PSX rewrite (intended for release in libcap-2.72) doesn't play nicely with Go prior to go1.16.? (observed to work on go1.16.15, but not tested on earlier sub-releases). The problem is a bug in Go's cgo implementation that was fixed in the 1.16.* release sequence. The issue related to where Go completely blocks all signals as a thread is exiting.

You can read about it here:

  https://github.com/golang/go/issues/42494

I was previously able to work around it in earlier go releases because pthread's implement a pthread_atexit() function. LWP threads do not.

The latest release of go is 1.23.3, so I'm going to drop support for earlier releases of go prior to go 1.16.15. I'll mark this bug wont-fix prior to releasing libcap-2.72. But if I come across a way to work around it, I'll reference this present bug when I do.

As can be seen from the above bug, glibc's implementation of setuid() etc. also didn't work reliably prior to that go1.16.? release, so we're in good company.
Comment 1 Andrew G. Morgan 2024-11-10 08:31:02 UTC
Disabled the test for versions of go before 1.16 with:

https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=f001ee7343e9bbaf75d5cd45512a71e5628b6db8

Note You need to log in before you can comment on or make changes to this bug.