From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id iymqMKQCUmGiSgAAWB0awg (envelope-from ) for ; Mon, 27 Sep 2021 13:43:00 -0400 Received: by simark.ca (Postfix, from userid 112) id B26791EE25; Mon, 27 Sep 2021 13:43:00 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=MAILING_LIST_MULTI, NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 29A001E4A3 for ; Mon, 27 Sep 2021 13:42:59 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9A95C3857C75 for ; Mon, 27 Sep 2021 17:42:58 +0000 (GMT) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by sourceware.org (Postfix) with ESMTPS id B42BE3858426 for ; Mon, 27 Sep 2021 17:38:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B42BE3858426 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f44.google.com with SMTP id 136-20020a1c048e000000b0030d05169e9bso1293643wme.4 for ; Mon, 27 Sep 2021 10:38:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YjqCSligOBW/1nsTahyJe8R07rM7306dSkIN+6Icd44=; b=kS0Bgs+E4DCw3bDFRKu5rjEJlJjMaxCJtFZASelMM0rxPUO/n3eh4Cqe8KM7Byfk7W dMzXTB05TP0MK1FKmF7qqKMmOwwutVIf3YjWH9SnVadlLdnNLtvygOQDwjLz9hrZsXsE RYViXsEieWq4ML669/Ua7oDa6KxTc5AncDogHsCJXs/13L19Y7DhR+FlgJIG7mxtHz0j choY8CHC8kEkxxvMnXewuTCz5js+uTP77yBc9A/T3QgVmM6+MWKJJZZGOJOWByhJornU x1fWZ2BxzuyjKf2fUMHXyv/37bNIJAozy33Mb8ABAO18suHpeUsHwoBzT8IlxtAYXoJe YbeQ== X-Gm-Message-State: AOAM531o+PSszNs3ofJ4CSPE8+Yuh2DAaefIJHO2H32m0+gLxlhWgcb1 cgrcZ2n/dv6uL4xYzOwdUjMK5/oLfDw= X-Google-Smtp-Source: ABdhPJxmdV+KITszjAPgMggOZ6OJWxaNPGu0YRl+DizOuNPmS0+30bHVevF2HRp7P9PaBlA+L5lasw== X-Received: by 2002:a1c:4407:: with SMTP id r7mr292862wma.69.1632764323042; Mon, 27 Sep 2021 10:38:43 -0700 (PDT) Received: from ?IPv6:2001:8a0:f932:6a00:46bc:d03b:7b3a:2227? ([2001:8a0:f932:6a00:46bc:d03b:7b3a:2227]) by smtp.gmail.com with ESMTPSA id y18sm16808615wrq.6.2021.09.27.10.38.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Sep 2021 10:38:42 -0700 (PDT) Subject: Re: [PATCH v2 1/6] Handle recursive internal problem in gdb_internal_error_resync From: Pedro Alves To: Kevin Buettner , gdb-patches@sourceware.org References: <20210822231959.184061-1-kevinb@redhat.com> <20210822231959.184061-2-kevinb@redhat.com> Message-ID: <9cce1ee1-7489-6558-9145-211097c1848e@palves.net> Date: Mon, 27 Sep 2021 18:38:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20210822231959.184061-2-kevinb@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2021-08-23 12:19 a.m., Kevin Buettner wrote: > I came across this problem when testing gdb.base/gdb-sigterm.exp > on a machine with a pre-release version of glib-2.34 installed: > > A problem internal to GDB has been detected, > further debugging may prove unreliable. > Quit this debugging session? (y or n) Recursive internal problem. > FAIL: gdb.base/gdb-sigterm.exp: expect eof #0 (GDB internal error) > Resyncing due to internal error. > ERROR: : spawn id exp11 not open > while executing > "expect { > -i exp11 -timeout 10 > -re "Quit this debugging session\\? \\(y or n\\) $" { > send_gdb "n\n" answer > incr count > } > -re "Create..." > ("uplevel" body line 1) > invoked from within > "uplevel $body" NONE : spawn id exp11 not open > ERROR: Could not resync from internal error (timeout) > gdb.base/gdb-sigterm.exp: expect eof #0: stepped 9 times > UNRESOLVED: gdb.base/gdb-sigterm.exp: 50 SIGTERM passes > > I don't have a problem with the latter ERROR nor the UNRESOLVED > messages. However the first ERROR regarding the exp11 spawn id > not being open is not especially useful. > > This commit handles the "Recursive internal problem" case, avoiding > the problematic ERROR shown above. > > With this commit in place, the log messages look like this instead: > > A problem internal to GDB has been detected, > further debugging may prove unreliable. > Quit this debugging session? (y or n) Recursive internal problem. > FAIL: gdb.base/gdb-sigterm.exp: expect eof #15 (GDB internal error) > Resyncing due to internal error. > ERROR: Could not resync from internal error (recursive internal problem) > gdb.base/gdb-sigterm.exp: expect eof #15: stepped 12 times > UNRESOLVED: gdb.base/gdb-sigterm.exp: 50 SIGTERM passes > > gdb/testsuite/ChangeLog: > > * lib/gdb.exp (gdb_internal_error_resync): Handle "Recursive > internal problem". LGTM.