NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/54661: pthread_self() returns invalid value in some circumstances
The following reply was made to PR lib/54661; it has been noted by GNATS.
From: Tom Lane <tgl%sss.pgh.pa.us@localhost>
To: gnats-bugs%netbsd.org@localhost, Joerg Sonnenberger <joerg%bec.de@localhost>
Cc: lib-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: lib/54661: pthread_self() returns invalid value in some circumstances
Date: Wed, 30 Oct 2019 11:05:05 -0400
Joerg Sonnenberger <joerg%bec.de@localhost> writes:
> We didn't allow dynamic loading of libpthread at all for a long time. I
> still believe allowing it was a mistake, but *shrug*. We certainly do
> not support calling pthread_create if libpthread was not initially
> loaded. As much pthread_self() can only ever return the main thread.
Hmm. So the idea is to lock down libpthread.so to act like the stub
functions, if it's dlopen'd after main() initialization? Weird, but
no skin off my nose --- from a Postgres-centric viewpoint, we don't
support anybody trying to start additional threads inside a Python
function, anyway.
In that case we should close this as not-a-bug, and I'll go rant
at the Python people that they shouldn't be making an error check
on pthread_self's result. Or at least, -1 is a really unfortunate
choice of value for PYTHREAD_INVALID_THREAD_ID.
regards, tom lane
Home |
Main Index |
Thread Index |
Old Index