https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111024
Bug ID: 111024 Summary: libgomp: FAILs with oldish libnuma/libmemkind Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: openmp Severity: normal Priority: P3 Component: libgomp Assignee: unassigned at gcc dot gnu.org Reporter: tschwinge at gcc dot gnu.org CC: burnus at gcc dot gnu.org, jakub at gcc dot gnu.org Target Milestone: --- Re commit r14-2462-g450b05ce54d3f08c583c3b5341233ce0df99725b "libgomp: Use libnuma for OpenMP's partition=nearest allocation trait" (plus commit r14-2514-g407d68daed00e040a7d9545b2a18aa27bf93a106 "libgomp: Fix allocator handling for Linux when libnuma is not available"), on our amdfury2, nvidia-4a systems (not necessarily an exhaustive list), I see: +PASS: libgomp.c/../libgomp.c-c++-common/alloc-11.c (test for excess errors) +FAIL: libgomp.c/../libgomp.c-c++-common/alloc-11.c execution test alloc-11.exe: src/memkind_interleave.c:54: memkind_interleave_init_once: Assertion `err == 0' failed. +PASS: libgomp.c/../libgomp.c-c++-common/alloc-12.c (test for excess errors) +FAIL: libgomp.c/../libgomp.c-c++-common/alloc-12.c execution test alloc-12.exe: src/memkind_interleave.c:54: memkind_interleave_init_once: Assertion `err == 0' failed. Same for C++. (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007ffff75b2921 in __GI_abort () at abort.c:79 #2 0x00007ffff75a248a in __assert_fail_base (fmt=0x7ffff7729750 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7ffff7169682 "err == 0", file=file@entry=0x7ffff716986a "src/memkind_interleave.c", line=line@entry=54, function=function@entry=0x7ffff7169890 "memkind_interleave_init_once") at assert.c:92 #3 0x00007ffff75a2502 in __GI___assert_fail (assertion=0x7ffff7169682 "err == 0", file=0x7ffff716986a "src/memkind_interleave.c", line=54, function=0x7ffff7169890 "memkind_interleave_init_once") at assert.c:101 #4 0x00007ffff71691c4 in memkind_interleave_init_once () from /usr/lib/x86_64-linux-gnu/libmemkind.so.0 #5 0x00007ffff7972907 in __pthread_once_slow (once_control=0x7ffff736d72c, init_routine=0x7ffff7169180 <memkind_interleave_init_once>) at pthread_once.c:116 #6 0x00007ffff7166d95 in memkind_malloc () from /usr/lib/x86_64-linux-gnu/libmemkind.so.0 #7 0x00007ffff7bbed04 in omp_aligned_alloc (alignment=1, size=4, allocator=6309568) at [...]/libgomp/config/linux/../../allocator.c:521 #8 0x0000000000400fd9 in main () at source-gcc/libgomp/testsuite/libgomp.c-c++-common/alloc-11.c:182 Note that the failure is in libmemkind; the commits that trigger it are for libnuma support. Both these system have Ubuntu bionic libnuma1 2.0.11-2.1ubuntu0.1, libmemkind0 1.1.0-0ubuntu1. Assuming this is similar to the latter's upstream v1.1.0, that's <https://github.com/memkind/memkind/blob/v1.1.0/src/memkind_interleave.c#L53-L54>, where, per assembly-level debugging, we've got 'err = MEMKIND_ERROR_MALLCTL' from 'memkind_arena_create_map'; <https://github.com/memkind/memkind/blob/v1.1.0/src/memkind_arena.c#L95-L133>. Might be a bug in libnuma/libmemkind, fixed in later versions (we're not seeing these FAILs on other systems), or is the bug on our side, due to calling into libnuma/libmemkind with some unexpected parameters, for example?