Find a file
Dimitry Andric 7b966dcc3a Merge commit 5300a6731e98 from llvm-project (by Jonathan Peyton):
[OpenMP] Fix re-locking hang found in issue 86684 (#88539)

  This was initially reported here (including stacktraces):
  https://stackoverflow.com/questions/78183545/does-compiling-imagick-with-openmp-enabled-in-freebsd-13-2-cause-sched-yield

  If `__kmp_register_library_startup()` detects that another instance of
  the library is present, `__kmp_is_address_mapped()` is eventually
  called. which uses `kmpc_alloc()` to allocate memory. This function
  calls `__kmp_entry_thread()` to access the thread-local memory pool,
  which is a bad idea during initialization. This macro internally calls
  `__kmp_get_global_thread_id_reg()` which sets the bootstrap lock at the
  beginning (before calling `__kmp_register_library_startup()`).

  The fix is to use `KMP_INTERNAL_MALLOC()`/`KMP_INTERNAL_FREE()` instead
  of `kmpc_malloc()`/`kmpc_free()`. `KMP_INTERNAL_MALLOC` and
  `KMP_INTERNAL_FREE` do not use any bootstrap locks. They just translate
  to `malloc()`/`free()` and are meant to be used during library
  initialization before other library-specific allocators have been
  initialized.

  Fixes: #86684

This should fix OpenMP processes sometimes getting locked with 100% CPU
usage, endlessly calling sched_yield(2).

PR:		278845
Reported by:	Cassidy B. Larson <cbl@cbl.us>
MFC after:	3 days

(cherry picked from commit da15ed2e98)
2024-05-11 10:56:33 +02:00
.cirrus-ci
.github/workflows .github: Switch to v4 of actions/checkout 2024-04-08 11:03:08 -07:00
bin sync.8: Document that the "sync dance" is not a thing 2024-04-28 20:29:36 +02:00
cddl zfs: merge openzfs/zfs@fb6d53206 (zfs-2.1-release) into stable/13 2024-03-01 15:16:06 +01:00
contrib Merge commit 5300a6731e98 from llvm-project (by Jonathan Peyton): 2024-05-11 10:56:33 +02:00
crypto heimdal: Fix compiling hdb ldap as a module 2024-04-29 05:51:11 -07:00
etc calendar: cleanup obsolete directories 2024-05-10 08:55:46 +00:00
gnu
include posix_spawn(3): add POSIX_SPAWN_DISABLE_ASLR_NP 2024-03-11 02:29:51 +02:00
kerberos5
lib __cxa_thread_call_dtors(3): fix dtor pointer validity check 2024-05-10 10:49:36 +03:00
libexec rtld.1: clarify interaction between -u and -o 2024-05-07 11:59:07 +03:00
release release: Use the ABI of the target release to fetch packages 2024-04-23 22:04:44 -07:00
rescue rescue: include ping iff at least one of INET & INET6 is enabled 2023-09-24 11:48:33 -04:00
sbin ifconfig(8): Fix two typos in source code comments 2024-04-23 07:26:30 +02:00
secure caroot: routine update 2024-02-13 13:15:13 -06:00
share vmm.4: Add verbiage about need to load module from loader.conf 2024-05-04 15:18:15 +02:00
stand loader: For EFI, if we don't have ConOut, try ConIn 2024-02-06 17:12:40 -07:00
sys nfsd: Fix Link conformance with RFC8881 for delegations 2024-05-10 18:09:21 -07:00
targets Merge llvm-project main llvmorg-17-init-19304-gd0b54bb50e51 2024-01-08 00:04:38 +01:00
tests path_test: fix cap_rights_init usage 2024-03-22 09:35:44 -04:00
tools mwlstats: Fix a typo in an error message 2024-04-25 08:17:38 +02:00
usr.bin Tighten boundary check in split(1) to prevent a potential buffer overflow. 2024-05-05 23:04:43 -07:00
usr.sbin adduser: Fix confusion between uclass and _class. 2024-05-09 11:05:36 +00:00
.arcconfig
.arclint
.cirrus.yml Cirrus-CI: bump Clang versions to 16 and 17 2024-04-24 10:06:09 -04:00
.clang-format
.gitattributes
.gitignore
COPYRIGHT
LOCKS Remove $FreeBSD$: one-line bare tag 2023-08-23 11:43:33 -06:00
MAINTAINERS Remove $FreeBSD$: one-line bare tag 2023-08-23 11:43:33 -06:00
Makefile
Makefile.inc1 Merge llvm-project main llvmorg-17-init-19304-gd0b54bb50e51 2024-01-08 00:04:38 +01:00
Makefile.libcompat
Makefile.sys.inc
ObsoleteFiles.inc Add a few missed libclang_rt files to ObsoleteFiles.inc 2024-04-24 23:26:28 +02:00
README.md
RELNOTES Remove $FreeBSD$: one-line bare tag 2023-08-23 11:43:33 -06:00
UPDATING net80211: deal with lost state transitions 2024-02-19 08:02:01 +00:00

FreeBSD Source:

This is the top level of the FreeBSD source directory.

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms. A large community has continually developed it for more than thirty years. Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices.

For copyright information, please see the file COPYRIGHT in this directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information.

The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree. See build(7), config(8), FreeBSD handbook on building userland, and Handbook for kernels for more information, including setting make(1) variables.

For information on the CPU architectures and platforms supported by FreeBSD, see the FreeBSD website's Platforms page.

Source Roadmap:

Directory Description
bin System/user commands.
cddl Various commands and libraries under the Common Development and Distribution License.
contrib Packages contributed by 3rd parties.
crypto Cryptography stuff (see crypto/README).
etc Template files for /etc.
gnu Commands and libraries under the GNU General Public License (GPL) or Lesser General Public License (LGPL). Please see gnu/COPYING* for more information.
include System include files.
kerberos5 Kerberos5 (Heimdal) package.
lib System libraries.
libexec System daemons.
release Release building Makefile & associated tools.
rescue Build system for statically linked /rescue utilities.
sbin System commands.
secure Cryptographic libraries and commands.
share Shared resources.
stand Boot loader sources.
sys Kernel sources (see sys/README.md).
targets Support for experimental DIRDEPS_BUILD
tests Regression tests which can be run by Kyua. See tests/README for additional information.
tools Utilities for regression testing and miscellaneous tasks.
usr.bin User commands.
usr.sbin System administration commands.

For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see FreeBSD Handbook.