Skip to content

bpo-46045: Do not use POSIX semaphores on NetBSD #30047

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Do not use POSIX semaphores on NetBSD
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changelog also needs an explanation why POSIX semaphores cannot be used on NetBSD. Is there an issue with NetBSD kernel or do we need extra quirks to support NetBSD flavor of semaphores?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I don't know that.
I've tried using gdb to look at the python processes that are forked by the three mentioned tests, but there are a lot of them. Can you suggest a simple example where Python would use semaphores that I could use to file a NetBSD bug report?

4 changes: 4 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -12848,6 +12848,10 @@ $as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
AIX/*)
$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h

;;
NetBSD/*)
$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h

;;
esac

Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3611,6 +3611,9 @@ if test "$posix_threads" = "yes"; then
AIX/*) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1,
[Define if the Posix semaphores do not work on your system])
;;
NetBSD/*) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1,
[Define if the Posix semaphores do not work on your system])
;;
esac

AC_CACHE_CHECK([if PTHREAD_SCOPE_SYSTEM is supported], [ac_cv_pthread_system_supported],
Expand Down