From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3AE4A389853C; Thu, 8 Jul 2021 13:34:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3AE4A389853C From: "pedro at palves dot net" To: gdb-prs@sourceware.org Subject: [Bug threads/28065] FAIL: gdb.threads/access-mem-running-thread-exit.exp: all-stop: access mem (print global_var after writing again, inf=1, iter=354) Date: Thu, 08 Jul 2021 13:34:46 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: threads X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pedro at palves dot net X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2021 13:34:46 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28065 --- Comment #9 from Pedro Alves --- I'm looking at the kernel sources, and AFAICT, the only way pread64 could return 0 is if the address space is gone. See here: https://github.com/torvalds/linux/blob/master/fs/proc/base.c#L834 For reads, mem_read -> mem_rw. We either reach the !mm path: if (!mm) return 0; or, here: copied =3D 0; if (!mmget_not_zero(mm)) goto free; ... free: free_page((unsigned long) page); return copied; 'mm' is cleared by mem_release. Could this be something like an OOM kill? Maybe by tweaking the testcase to not exit immediately on first FAIL we wou= ld see the process exit. --=20 You are receiving this mail because: You are on the CC list for the bug.=