From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 91C9D3858C50 for ; Sat, 14 Jan 2023 01:11:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 91C9D3858C50 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id D6EFF1E110; Fri, 13 Jan 2023 20:11:47 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1673658708; bh=+9wlM/F/p4D9nB5qFnd8Ctonx4NgYb9W8hoRUgnsG7c=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=nabG3YuN76FY6c/f1gFO/WoPAQrXR+gnpVCmS3Gg3yvXD9eiji6Cry2rblONPhxIi ZCqw3u3VYoZXY1YJ+PdOeoAkF3aqF9J3RUHV+AIlsWMJOf/b6zVQKiH+yPWgAF6yNQ 08LvBjtPybsImJ/SAOtFnNH4THLwWsR7xB86ltbs= Message-ID: <94f1db30-8514-3bed-3539-142ac2690187@simark.ca> Date: Fri, 13 Jan 2023 20:11:47 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH] Handle SIGSEGV in gdb selftests Content-Language: en-US To: tdevries , Tom Tromey Cc: gdb-patches@sourceware.org References: <20221215211442.2515108-1-tromey@adacore.com> <7fca4280-a259-9785-fdd1-ac802b886804@suse.de> <87pmcjba6j.fsf@tromey.com> <375589413f851bebcc3b1256273ab784@suse.de> From: Simon Marchi In-Reply-To: <375589413f851bebcc3b1256273ab784@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 12/26/22 03:02, tdevries via Gdb-patches wrote: > On 2022-12-16 16:11, Tom Tromey via Gdb-patches wrote: >>>>>>> "Tom" == Tom de Vries writes: >> >> Tom> On 12/15/22 22:14, Tom Tromey via Gdb-patches wrote: >>>> The gdb.gdb self-tests were timing out for me. Looking into it, the >>>> problem is that the version of the Boehm GC that is used by Guile on >>>> my machine causes a SEGV during stack probing. This unexpected stop >>>> confuses the tests and causes repeated timeouts. >>>> >> >> Tom> FWIW, that's https://sourceware.org/bugzilla/show_bug.cgi?id=29325 . >> >> Thanks, I updated the commit message. > > I ran into this again, tried out the patch and checked that it fixes the problem. > > LGTM. > > Thanks, > - Tom Hi both Toms, I still see the issue on Ubuntu 22.04, when testing with the native-extended-gdbserver board: ... Thread 1 "xgdb" received signal SIGSEGV, Segmentation fault. 0x00007ffff6d828f2 in GC_find_limit_with_bound () from /usr/lib/x86_64-linux-gnu/libgc.so.1 (gdb) FAIL: gdb.gdb/selftest.exp: xgdb is at prompt The modified code looks like this: set test "xgdb is at prompt" gdb_test_multiple "continue" $test { -i "$inferior_spawn_id" -re "received signal SIGSEGV.* in GC_.*$gdb_prompt" { # Some versions of the GC used by Guile cause a SEGV # during stack probing. Ignore this and carry on. send_gdb "continue\n" exp_continue } -re "$banner" { pass $test } } Shouldn't the SIGSEGV -re be before the `-i $inferior_spawn_id`? Otherwise we expect the "received signal SIGSEGV" message to come from the debugged GDB, when it's the top GDB that will print it (like when debugging any other test program). I think we don't see the problem when testing with native because the top and bottom GDBs share the same spawn id. Simon