public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tschwinge at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libgomp/111024] New: libgomp: FAILs with oldish libnuma/libmemkind
Date: Tue, 15 Aug 2023 08:35:22 +0000	[thread overview]
Message-ID: <bug-111024-4@http.gcc.gnu.org/bugzilla/> (raw)

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?

             reply	other threads:[~2023-08-15  8:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-15  8:35 tschwinge at gcc dot gnu.org [this message]
2023-08-16 14:38 ` [Bug libgomp/111024] " burnus at gcc dot gnu.org
2023-08-17 11:01 ` burnus at gcc dot gnu.org
2023-08-17 13:24 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-111024-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).