Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ldKRn-0001MX-4f for pgsql-bugs@arkaria.postgresql.org; Sun, 02 May 2021 22:20:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ldKRk-0007Ag-7w for pgsql-bugs@arkaria.postgresql.org; Sun, 02 May 2021 22:20:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ldKRk-0007AZ-11 for pgsql-bugs@lists.postgresql.org; Sun, 02 May 2021 22:20:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ldKRg-0005B4-TE for pgsql-bugs@lists.postgresql.org; Sun, 02 May 2021 22:20:14 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 142MJw903723543; Sun, 2 May 2021 18:19:59 -0400 From: Tom Lane To: Paul Guyot cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16990: Random PANIC in qemu user context In-reply-to: <86C24765-95F7-464F-9677-B09A396A5F69@kallisys.net> References: <16990-10b586bc699fd234@postgresql.org> <3714052.1619980429@sss.pgh.pa.us> <86C24765-95F7-464F-9677-B09A396A5F69@kallisys.net> Comments: In-reply-to Paul Guyot message dated "Sun, 02 May 2021 22:20:39 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3723541.1619993998.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 02 May 2021 18:19:58 -0400 Message-ID: <3723542.1619993998@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Paul Guyot writes: > QEMU user emulation documentation mentions something specific to threadi= ng on ARM. > https://qemu.readthedocs.io/en/latest/user/main.html >> Threading: >> On Linux, QEMU can emulate the clone syscall and create a real host thr= ead (with a separate virtual CPU) for each emulated thread. Note that not = all targets currently emulate atomic operations correctly. x86 and Arm use= a global lock in order to preserve their semantics. Oooh, that's pretty suggestive. I wonder just when that "global lock" is taken or released. Maybe the timing of it is such that it interferes with ever seeing our lock as free? regards, tom lane