From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 2473B3858412 for ; Mon, 24 Oct 2022 19:05:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2473B3858412 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.95,210,1661846400"; d="scan'208";a="85162883" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 24 Oct 2022 11:05:53 -0800 IronPort-SDR: bKJQ3Z5jMuirTolHPWzEliKiZW5QSUzKzTpzHyCvWkCQRjAMTUhEJBNnwZOIvx1XbAX48LHhEB hFr3pQyZqWr148XuoFC+snXa0/UzFsKflfA17vtC/Pbwf5fRge/Z5r+Js3BWM9NkVMBdwZ0+xN WbEJvX699V+BwBMVCCd5vHFvqitN+lfk/ph0mIqkNMMKhXLaH4cAJARMJ/pUxdYMSRH5gwsCNh 2m5GPCBLtAEtznJkRa3ZaZUq7X7RKLC/9zeVjyFzU7Yc+APTHo+Y88+weH/FEvUTGzZ5Qe+pmp jH0= From: Thomas Schwinge To: Jakub Jelinek , Tobias Burnus CC: Alexander Monakov , Subject: Re: [Patch][v5] libgomp/nvptx: Prepare for reverse-offload callback handling In-Reply-To: References: <3f0fc49f-b07f-bee2-51a8-a5d03f1c33ed@codesourcery.com> <30e3ed49-0d14-8015-57ef-3d70b1dea69a@codesourcery.com> <3ebce406-46e4-8f98-8c53-83b61423644e@codesourcery.com> <798d7ee1-2ffa-a591-38cb-a9ad421265d0@codesourcery.com> <832946f-bb12-23d7-7d64-47b85c95125@ispras.ru> <1e56b27f-3c74-8bc2-028b-9091fa1ae7b1@codesourcery.com> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/27.1 (x86_64-pc-linux-gnu) Date: Mon, 24 Oct 2022 21:05:46 +0200 Message-ID: <87r0yxoxdh.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-13.mgc.mentorg.com (139.181.222.13) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Tobias! On 2022-10-24T16:07:25+0200, Jakub Jelinek via Gcc-patches wrote: > On Wed, Oct 12, 2022 at 10:55:26AM +0200, Tobias Burnus wrote: >> libgomp/nvptx: Prepare for reverse-offload callback handling > Ok, thanks. Per commit r13-3460-g131d18e928a3ea1ab2d3bf61aa92d68a8a254609 "libgomp/nvptx: Prepare for reverse-offload callback handling", I'm seeing a lot of libgomp execution test regressions. Random example, 'libgomp.c-c++-common/error-1.c': [...] GOMP_OFFLOAD_run: kernel main$_omp_fn$0: launch [(teams: 1), 1, 1] [(= lanes: 32), (threads: 8), 1] Thread 1 "a.out" received signal SIGSEGV, Segmentation fault. 0x00007ffff793b87d in GOMP_OFFLOAD_run (ord=3D, tgt_fn= =3D, tgt_vars=3D, args=3D) at = [...]/source-gcc/libgomp/plugin/plugin-nvptx.c:2127 2127 if (__atomic_load_n (&ptx_dev->rev_data->fn, __ATOMIC_A= CQUIRE) !=3D 0) (gdb) print ptx_dev $1 =3D (struct ptx_device *) 0x6a55a0 (gdb) print ptx_dev->rev_data $2 =3D (struct rev_offload *) 0xffffffff00000000 (gdb) print ptx_dev->rev_data->fn Cannot access memory at address 0xffffffff00000000 Why is it even taking this 'if (reverse_offload)' code path, which isn't applicable to this test case (as far as I understand)? (Well, the answer is 'bool reverse_offload =3D ptx_dev->rev_data !=3D NULL;', but why is that= ?) Gr=C3=BC=C3=9Fe Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955