The symptom of this bug was:
- there are multiple waiters for COND.
- COND is fired by npth_cond_broadcast, all waiters should be waken up, but only one wakes up by the old code of 1.7.
- other waiters keep waiting forever.
The symptom of this bug was:
After I fixed the problem, I realized that the description of this ticket was not accurate, so, modified.
Thanks, I confirm that this new commit is fixing the issue.
Thank you for testing. Now, I can see the exact reason by your npth log.
Pushed another change: rPTH75c68399ef3b: Fix previous commit.
Build is still failing even with this commit, here is an extract of npth log:
Could you show us the build log of nPth, please?
On Mac OS X 10.5.8, PPC Leopard, it built with the patch, gpg-agent works.
Thank you for your quick testing.
I've reported the success to MacPorts. My test was performed on only one platform, Mac OS X 10.4.11 or "Tiger". Since there exists a problem with building recent version of GPGME testing on Mac OS X 10.5.8 or "Leopard" will have to wait a few days…
With the unified patch all works fine (again), even the test target succeeds!
Performing the patch manually the "port" (package) built and installed. Starting then gpg-agent worked too, killing it (with gpgconf) worked as well.
The patches looks too large to merge (than actually needed), and not enough/clean like not having detection of the system.
Apply the change in: rPTH417abd56fd7b: Fix INSERT_EXPOSE_RWLOCK_API for musl C library.
@gniibe Thank you very much! That works.
@thesamesam Thank you for the report.
This seems to have regressed musl support, per https://bugs.gentoo.org/925443.
Fixed in npth 1.7.
The patch is part of 1.7 - please test and in case of problems feel free to re-open.
After applying patch to nPth 1.6 no semaphore leaks detected. Tested with GnuPG-2.3.3.
There has been positive feedback from production environment as well.
npth_t is untouched for Windows 64-bit.
@gniibe Thanks!
In the repo, for all related software, it's done.
Note that versions since 2020-11-07 to 2021-07-03 have major problem with non-POSIX shell, which doesn't support $(..) construct.
Thank you.
Indeed, different versions of MinGW use different symbols to guard the declaration, and using those symbols in not future-proof enough, IME.
Removing the declaration is definitely the best solution.
Pushed the change removing the definition.
In T5889#156302, @gniibe wrote:Considering again, I think that just removing the definition of the struct timespec in npth.h is the best approach, given the situation, it's been there for MINGW64 and it's now in original MinGW.
Considering again, I think that just removing the definition of the struct timespec in npth.h is the best approach, given the situation, it's been there for MINGW64 and it's now in original MinGW.
Thank you. I understand the situation by looking at mingwrt-5.4.2-mingw32-src.tar.xz.
The version of MinGW is 5.4.x, the latest one. It is available from https://osdn.net/projects/mingw/releases.
MinGW64 is a fork of the above (original) MinGW. They have unfortunately diverged, thus the need to have these changes.
Also applied to gpgme.
Since there is no problem with libgpg-error 1.43, I applied it to other libraries: npth, libassuan, libksba, and ntbtls.
Thanks! I was able to compile the current source code of npth (1.7) (with gcc 7.1. and ldd (GNU libc) 2.3.2 ). The error error: unknown type name ‘pthread_rwlock_t’ didn't occour.
I have a little concern for glibc 2.34 (which has dummy libpthread and all is actually in libc).
Okay, any thing else missing in nPth?
Hello @gniibe, you did the last work on nPTh. Would you be so kind and look into this?
These are great news. Thank you!
Pushed the change to libgpg-error and libgcrypt (1.9 and master).
Let us see if there are any problem(s) for that, I will apply it to other libraries when it will be found no problem.
Thank you for the information.
For the record, I put the link to the email submitted:
https://lists.gnu.org/archive/html/libtool-patches/2020-06/msg00001.html
Oh, you are right, it's not upstream. It's actually applied to Homebrew (https://brew.sh/) libtool formula which is where I originally got libtool.m4, see:
I see your point. I'd like to locate/identify where the change comes from.
I think that what you refer by "new libtool.m4" is actually macOS local change (I mean, not from libtool upstream, AFAIK).
Could you please point out the source of the change?
That would work, however we might hit this issue with a new macOS release. Would it make more sense to update to what the new libtool.m4 is doing? Linker flags are the same, it only changes the way they detect macOS versions:
That does indeed not look like something which could introduce a regression.
I misunderstood as if we need to update libtool from upstream.
macOS has low priority for us and I do not want to risk any regression.