From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv Date: Wed, 26 May 2021 16:25:31 +0100 Message-ID: <87bl8x8ql0.fsf@tcd.ie> References: <87y2c4rtvh.fsf@tcd.ie> <83wnroccmi.fsf@gnu.org> <8735ucnk93.fsf@tcd.ie> <875yz8gh4e.fsf@igel.home> <87fsyckmdm.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="813"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 48629@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 26 17:26:22 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1llvQM-000AUP-6w for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 May 2021 17:26:22 +0200 Original-Received: from localhost ([::1]:49450 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llvQL-0007Dp-7g for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 May 2021 11:26:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llvQ2-00079n-FN for bug-gnu-emacs@gnu.org; Wed, 26 May 2021 11:26:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38203) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1llvQ2-0007Uk-6y for bug-gnu-emacs@gnu.org; Wed, 26 May 2021 11:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1llvQ2-0001KK-3Y for bug-gnu-emacs@gnu.org; Wed, 26 May 2021 11:26:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87y2c4rtvh.fsf@tcd.ie> Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 May 2021 15:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48629 X-GNU-PR-Package: emacs Original-Received: via spool by 48629-submit@debbugs.gnu.org id=B48629.16220427425052 (code B ref 48629); Wed, 26 May 2021 15:26:02 +0000 Original-Received: (at 48629) by debbugs.gnu.org; 26 May 2021 15:25:42 +0000 Original-Received: from localhost ([127.0.0.1]:49745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llvPh-0001JP-Py for submit@debbugs.gnu.org; Wed, 26 May 2021 11:25:42 -0400 Original-Received: from mail-wr1-f43.google.com ([209.85.221.43]:39493) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llvPg-0001JC-4C for 48629@debbugs.gnu.org; Wed, 26 May 2021 11:25:40 -0400 Original-Received: by mail-wr1-f43.google.com with SMTP id v12so1580254wrq.6 for <48629@debbugs.gnu.org>; Wed, 26 May 2021 08:25:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:cc:subject:references:date:message-id:user-agent :mime-version; bh=+ml2IGfdMAGVXmZTPdJoWohDC4MdnpRaDY4uIsz5Lds=; b=WVTfRhvtKGnFAXrP/H+bQBJM/NIBENCxg8ab/354NNkcifbRsHPg6ppdXggujJkDTe 2JhI2qAotIYAzb7jYYMSmloENdgd91nvQmYnnxTLI7EODBFGFLIX5l8b9/jtndWQZKxd ugj8j9QAbyhmKMSzRxTas7nfLrn+/DRjVINcXxCd4OQqjSXmlhXyRF0vhv2jVp3Q6tYT aOlzI8hEWL5sxRl9IDRZRHnaJ1VgANv69kp9MhvdveUbFE53xJR08R5yzMoJ4qgo99Qn GlcVdJLgw5e0bSDOTeHtmLK3m18mlx3orkCAiUFhMKjUIWOIAoH0ENM5owsDkhc83Aus ZJSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:message-id :user-agent:mime-version; bh=+ml2IGfdMAGVXmZTPdJoWohDC4MdnpRaDY4uIsz5Lds=; b=ePPxU7CIT0Hd+L7b7304DviBwBFVWDFY5J9CpwBaQcgy3s8qJi/PKyWDyX2iiv1ZdZ 3xaa1Fhqv+MjXHl5g6nO90fwvHGaQYwPInkhAq/ZYLdrz6kewqCW8fKY9u6eGnxnnKgk Niv5JTN0Wo4g7a+iWxQVXuxnVEs18UnLF4Fp29/5LsbA/bO5kLuEPjirKjOxSZrxwLfP ZYHvAucKq+juJebYjKnGJnvvmZyJ63HIi1ChjWF8HiNxGDK6D+LQJmOpf3lk7QOQv5Fc vpGHNEAwRYqCcaUwULEL8wHtWzjJ5o+8YHRaSZcbnCw+nRB4d8Q98vT66/06NXkWEYNV AuvQ== X-Gm-Message-State: AOAM530kNvL8isFDlK66D5AcjudM+RSCH9SPiYDI3CJicMnLoz9aOXuY 8UzkHRVVJhmrzuz5IYIYRe4kv8Cfal7LgQ== X-Google-Smtp-Source: ABdhPJx4mpif4nLXvf8ONMsAEoELCioiMdtV83MFp8U/p1fXvcSRB1z6gUp5IHeXSwkT1iBoscr76A== X-Received: by 2002:a5d:5250:: with SMTP id k16mr33317235wrc.211.1622042732811; Wed, 26 May 2021 08:25:32 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:d15:339e:aa10:60f1]) by smtp.gmail.com with ESMTPSA id v7sm2094182wrf.26.2021.05.26.08.25.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 08:25:32 -0700 (PDT) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:207297 Archived-At: "Basil L. Contovounesios" writes: > Andreas Schwab writes: >> On Mai 24 2021, Basil L. Contovounesios wrote: >>> Eli Zaretskii writes: >>>> or you are asking why it becomes stuck in recv for prolonged times? >>> Not just prolonged, but indefinite. >> But emacsclient is just waiting for the answer from Emacs, so it is >> behaving as expected. > > Right, I just attached GDB to a non-frozen emacsclient process, and it's > exactly the same story as in the OP. Sorry for the misleading report. >>> I have yet to find a way to restore these graphical sessions to >>> normal operation, >> That must be something else, not related to emacsclient. > > ...whatever elusive cause is making my GUI emacsclient frames stop > accepting keyboard input. Perhaps then the issue lies in the Emacs > keyboard input code, and I'd be able to reproduce the hang even in > non-daemon Emacs sessions? > > Any ideas on how to debug that next time it happens? It happened again, and this time I attached GDB to the 'emacs --daemon' process: Attaching to process 39876 [New LWP 39877] [New LWP 39878] [New LWP 39879] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 0x00007f8bc8e3e9c6 in __pselect (nfds=26, readfds=0x7fff028412f0, writefds=0x7fff02841370, exceptfds=0x0, timeout=, sigmask=0x7fff02841140) at ../sysdeps/unix/sysv/linux/pselect.c:48 48 ../sysdeps/unix/sysv/linux/pselect.c: No such file or directory. SIGINT is used by the debugger. Are you sure you want to change it? (y or n) [answered Y; input not from terminal] DISPLAY = :0 TERM = xterm-256color Breakpoint 1 at 0x5585832d279e .gdbinit:1239: Error in sourced command file: No symbol "defined_HAVE_X_WINDOWS" in current context. (gdb) bt full #0 0x00007f8bc8e3e9c6 in __pselect (nfds=26, readfds=0x7fff028412f0, writefds=0x7fff02841370, exceptfds=0x0, timeout=, sigmask=0x7fff02841140) at ../sysdeps/unix/sysv/linux/pselect.c:48 resultvar = 18446744073709551102 sc_cancel_oldtype = 0 tval = { tv_sec = 2, tv_nsec = 908570849 } data = { ss = 0, ss_len = 8 } #1 0x00005585834a85b6 in really_call_select () #2 0x00005585834a9320 in thread_select () #3 0x00005585834c5f58 in xg_select () #4 0x000055858348689d in wait_reading_process_output () #5 0x00005585832e5660 in sit_for () #6 0x00005585833cd024 in read_char () #7 0x00005585833cd822 in read_key_sequence () #8 0x00005585833cf22c in command_loop_1 () #9 0x000055858343d3d7 in internal_condition_case () #10 0x00005585833c03e4 in command_loop_2 () #11 0x000055858343f9d3 in internal_catch () #12 0x00005585833c0383 in command_loop () #13 0x00005585833c5976 in recursive_edit_1 () #14 0x00005585833c5ca1 in Frecursive_edit () #15 0x00005585832db09e in main () 'backtrace_top' has unknown return type; cast the call to its declared return type I then entered 'n' a few times followed unfortunately by C-c, which killed the process (I would have tried 'thread apply all bt full' next). So it looks like it's actually pselect that's blocking? -- Basil