From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 162E63858433 for ; Sun, 22 Aug 2021 23:23:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 162E63858433 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-125-o6WTd3mDNpmw7xhKXu-lTg-1; Sun, 22 Aug 2021 19:23:11 -0400 X-MC-Unique: o6WTd3mDNpmw7xhKXu-lTg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5EC9A801AC0; Sun, 22 Aug 2021 23:23:10 +0000 (UTC) Received: from f34-1.lan (ovpn-112-47.phx2.redhat.com [10.3.112.47]) by smtp.corp.redhat.com (Postfix) with ESMTP id 322C010013C1; Sun, 22 Aug 2021 23:23:10 +0000 (UTC) From: Kevin Buettner To: gdb-patches@sourceware.org Subject: [PATCH v2 1/6] Handle recursive internal problem in gdb_internal_error_resync Date: Sun, 22 Aug 2021 16:19:56 -0700 Message-Id: <20210822231959.184061-2-kevinb@redhat.com> In-Reply-To: <20210822231959.184061-1-kevinb@redhat.com> References: <20210822231959.184061-1-kevinb@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: , X-List-Received-Date: Sun, 22 Aug 2021 23:23:16 -0000 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". --- gdb/testsuite/lib/gdb.exp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 6b6a70a89b0..481a9bc25c4 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -754,6 +754,10 @@ proc gdb_internal_error_resync {} { set count 0 while {$count < 10} { gdb_expect { + -re "Recursive internal problem\\." { + perror "Could not resync from internal error (recursive internal problem)" + return 0 + } -re "Quit this debugging session\\? \\(y or n\\) $" { send_gdb "n\n" answer incr count -- 2.31.1