From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22366 invoked by alias); 9 Aug 2012 20:20:49 -0000 Received: (qmail 22358 invoked by uid 22791); 9 Aug 2012 20:20:47 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Aug 2012 20:20:26 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q79KKQ9H030451 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 9 Aug 2012 16:20:26 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q79KKPkv025887 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 9 Aug 2012 16:20:25 -0400 From: Tom Tromey To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: RFC: clear quit_flag in quit, not throw_exception References: <87mx2dqnk8.fsf@fleche.redhat.com> <501AB42C.4000701@redhat.com> Date: Thu, 09 Aug 2012 20:20:00 -0000 In-Reply-To: <501AB42C.4000701@redhat.com> (Pedro Alves's message of "Thu, 02 Aug 2012 18:09:00 +0100") Message-ID: <878vdnddh2.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-08/txt/msg00294.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> If the unrelated exception/error unwinds things all the way up to Pedro> the top prompt, managing to bypass all QUIT calls, then we'll end Pedro> up with a dangling quit until the next command it entered Pedro> (resulting in a spurious, delayed "Quit"), it seems to me. If Pedro> that analysis is correct, maybe we should also clear or handle Pedro> these somehow somewhere near the top loop? Thanks for noticing this. I looked into the problem in more detail, and I think it is a crazy morass. The quit_flag part is all solvable. Maybe I will tackle it. However, the immediate_quit part is really quite bad. I started by changing the current places that set and clear immediate_quit to use a cleanup instead. However, remote_start_remote remains a big problem -- it is just wrong. I think a fix here would be to only set and clear immediate_quit around I/O primitives. But, finding all those and applying the change is troublesome. One idea I had was that maybe we could simply not have immediate_quit, but instead rely on EINTR and sprinkle more QUIT calls around. In my initial experiment, this didn't seem to work, but I haven't gone back yet to understand why. Maybe someone else has a more workable idea. Tom