From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Kurtis Rader Newsgroups: gmane.emacs.help Subject: Re: ^L showing up in Emacs M-x shell-mode, with ksh but not bash Date: Tue, 5 Nov 2019 11:18:57 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="184897"; mail-complaints-to="usenet@blaine.gmane.org" Cc: help-gnu-emacs@gnu.org, Korn Shell To: Nicholas Papadonis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 05 20:20:04 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iS4N2-000lyd-7K for geh-help-gnu-emacs@m.gmane.org; Tue, 05 Nov 2019 20:20:04 +0100 Original-Received: from localhost ([::1]:48482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iS4N0-000803-BV for geh-help-gnu-emacs@m.gmane.org; Tue, 05 Nov 2019 14:20:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40544) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iS4MQ-0007xf-Gd for help-gnu-emacs@gnu.org; Tue, 05 Nov 2019 14:19:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iS4MJ-0001QD-E8 for help-gnu-emacs@gnu.org; Tue, 05 Nov 2019 14:19:24 -0500 Original-Received: from mail-il1-x143.google.com ([2607:f8b0:4864:20::143]:34086) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iS4MG-0001Mh-L7 for help-gnu-emacs@gnu.org; Tue, 05 Nov 2019 14:19:17 -0500 Original-Received: by mail-il1-x143.google.com with SMTP id p6so6576293ilp.1 for ; Tue, 05 Nov 2019 11:19:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skepticism-us.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yT6bmkgZBmF4/HdPJ2ug2xvglYshTfcS9piJYtMXYoc=; b=iaLtspdnEs32WpzZ+WOkWwFRI9yqM0nNpEDJ4qGDL5vL0psAWRgRiUtyKguPkdpxjm OsoeHpJNADgWjlr/jHu8EPcSHy0VUmLlB2K9zwk5IvHEbPNCqV4d4b4BGNkx5BdMm/Kk jwScDAfYTNtBEpTvBiyo2AHkcN+dwyZnKUepbja7dEHWwgaimVh9+22q7HMXcgZE7VWk TZruF93+mY95MxHXPJERAm1b39AUAl4XAsF7tFyyahPwCpkdH7JpOoQ/CHxbPRaxzI4x OcV0fZoDSnTQt4Bmukyjvd3p+263vVD95WughdSpqMJbGQntfHRuWjEGPkgmvEkpyz4s JQOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yT6bmkgZBmF4/HdPJ2ug2xvglYshTfcS9piJYtMXYoc=; b=o+NRYA8KnkVnyzecVSA/87hDCtJejVOgom1yu7RG3SREt8shlptnbNV1RLXk3Q1gcz ccAoFPEnU8SefQxsfyMnAkoZ3JGsQbTtOFeUI6Ia1QGRgWYoJgGvRBm0bFLEtOVjy/Rz 5onRFnPqbsc8oKWIZxvDKsn1/iTg+e94HGNxWBvpI7DsrhiJph4JKop4izi3kk5vtBpa M+b7CpB+KAc5de+kBLgTkxGEZN6YY3U4imDEQJ7BOhFhjCnRiwSPwPsyqyYlPg42ISGi JvBtbPzf0QHK1zK8sGSpD7hnone+s5UpwrCGPfvvONR5BVaz+g4cbarSooHA/p6Arlym pdkg== X-Gm-Message-State: APjAAAVNIzla8PErvzbVPWXiyLTxTcY2jO1344hKfX9/w6iQQz1tcR+j 4ZVKIrK5gUHwNerE1xzmarsq/NNZHbOkdNC6jwuhnjr0Wh4= X-Google-Smtp-Source: APXvYqw8VG4xT0AasU5BhwiPmBxA+YmBZ9HpTAxVnXsuh5SzW4YTlG9SDvAv8uvpzvw16HUTOsZH5Nd2UvtYojGIAOQ= X-Received: by 2002:a92:8d83:: with SMTP id w3mr17415649ill.155.1572981548594; Tue, 05 Nov 2019 11:19:08 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::143 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:121801 Archived-At: I can't reproduce this. And I don't see anything in the strace output that would account for the \f chars. Which strongly suggests something like a use-after-free bug or using an uninitialized var. We've fixed a huge number of such bugs in the past two years thanks to updating the project so that we can employ tools like libc's debug malloc and ASAN. Honestly, I don't think there is much point in further debugging until you are able to reproduce this problem using the current source; or at least the 2020.0.0 stable release we recently announced. If you can't build from source you should be able to use a binary built for a comparable Linux distro such as Ubuntu or Fedora. Happy to give you a current binary from one of my Linux VMs I use for testing. On Tue, Nov 5, 2019 at 9:04 AM Nicholas Papadonis < nick.papadonis.ml@gmail.com> wrote: > The "^L"s are coming from this trace. > > Is anyone running ksh93 in Emacs shell-mode? > > ) = ? ERESTARTNOHAND (To be restarted if no handler) > --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} --- > rt_sigaction(SIGWINCH, {sa_handler=0x55e35c5a23b0, sa_mask=[], > sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7ffb3cb91060}, > {sa_handler=0x55e35c5a23b0, sa_mask=[], sa_flags=SA_RESTORER|SA_INTERRUPT, > sa_restorer=0x7ffb3cb91060}, 8) = 0 > ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0 > rt_sigprocmask(SIG_UNBLOCK, [WINCH], NULL, 8) = 0 > rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system > call) > ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0 > poll([], 0, 50) = 0 (Timeout) > ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0 > lseek(3, 0, SEEK_END) = 2 > lseek(3, 0, SEEK_CUR) = 2 > lseek(3, 2, SEEK_SET) = 2 > read(3, "", 65536) = 0 > lseek(3, 2, SEEK_SET) = 2 > read(3, "", 65536) = 0 > select(1, [0], NULL, NULL, {tv_sec=0, tv_usec=0}) = 0 (Timeout) > write(2, "> ", 3) = 3 > select(1, [0], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be > restarted if no handler) > --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} --- > rt_sigaction(SIGWINCH, {sa_handler=0x55e35c5a23b0, sa_mask=[], > sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7ffb3cb91060}, > {sa_handler=0x55e35c5a23b0, sa_mask=[], sa_flags=SA_RESTORER|SA_INTERRUPT, > sa_restorer=0x7ffb3cb91060}, 8) = 0 > ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=103, ws_xpixel=0, ws_ypixel=0}) = 0 > rt_sigprocmask(SIG_UNBLOCK, [WINCH], NULL, 8) = 0 > rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system > call) > ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=103, ws_xpixel=0, ws_ypixel=0}) = 0 > poll([], 0, 50) = 0 (Timeout) > ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=103, ws_xpixel=0, ws_ypixel=0}) = 0 > select(1, [0], NULL, NULL, {tv_sec=0, tv_usec=0}) = 0 (Timeout) > write(2, "> ", 3) = 3 > select(1, [0], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be > restarted if no handler) > --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} --- > rt_sigaction(SIGWINCH, {sa_handler=0x55e35c5a23b0, sa_mask=[], > sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7ffb3cb91060}, > {sa_handler=0x55e35c5a23b0, sa_mask=[], sa_flags=SA_RESTORER|SA_INTERRUPT, > sa_restorer=0x7ffb3cb91060}, 8) = 0 > ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=104, ws_xpixel=0, ws_ypixel=0}) = 0 > rt_sigprocmask(SIG_UNBLOCK, [WINCH], NULL, 8) = 0 > rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system > call) > ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=104, ws_xpixel=0, ws_ypixel=0}) = 0 > poll([], 0, 50) = 0 (Timeout) > ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=104, ws_xpixel=0, ws_ypixel=0}) = 0 > select(1, [0], NULL, NULL, {tv_sec=0, tv_usec=0}) = 0 (Timeout) > write(2, "> ", 3) = 3 > select(1, [0], NULL, NULL, NULL) = 1 (in [0]) > recvfrom(0, 0x7ffb3d814320, 65536, MSG_PEEK, NULL, NULL) = -1 ENOTSOCK > (Socket operation on non-socket) > read(0, "\n", 1) = 1 > lseek(3, 0, SEEK_END) = 2 > lseek(3, 0, SEEK_END) = 2 > lseek(3, 0, SEEK_CUR) = 2 > stat("/usr/bin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or > directory) > stat("/usr/sbin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or > directory) > stat("/bin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or > directory) > stat("/sbin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or > directory) > stat("/usr/local/bin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or > directory) > stat("/usr/local/sbin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file > or directory) > stat("/usr/bin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or > directory) > stat("/usr/sbin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or > directory) > stat("/bin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or > directory) > stat("/sbin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or > directory) > stat("/usr/local/bin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or > directory) > stat("/usr/local/sbin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file > or directory) > write(2, "\f\f: not found [No such file or d"..., 42) = 42 > lseek(3, 0, SEEK_END) = 2 > lseek(3, 2, SEEK_SET) = 2 > lseek(3, 2, SEEK_SET) = 2 > read(3, "", 65536) = 0 > write(2, "[debian:~]$ ", 12) = 12 > select(1, [0], NULL, NULL, NULL > > > On Tue, Nov 5, 2019 at 11:58 AM Nicholas Papadonis < > nick.papadonis.ml@gmail.com> wrote: > >> This is what the child ksh M-x shell process is doing when I resize the >> window. As you can see the write of "> " near the end. Hopefully some >> folks have more insight into this. >> >> select(1, [0], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be >> restarted if no handler) >> --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} --- >> rt_sigaction(SIGWINCH, {sa_handler=0x55e35c5a23b0, sa_mask=[], >> sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7ffb3cb91060}, >> {sa_handler=0x55e35c5a23b0, sa_mask=[], sa_flags=SA_RESTORER|SA_INTERRUPT, >> sa_restorer=0x7ffb3cb91060}, 8) = 0 >> ioctl(2, TIOCGWINSZ, {ws_row=9, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0 >> rt_sigprocmask(SIG_UNBLOCK, [WINCH], NULL, 8) = 0 >> rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system >> call) >> ioctl(2, TIOCGWINSZ, {ws_row=9, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0 >> poll([], 0, 50) = 0 (Timeout) >> ioctl(2, TIOCGWINSZ, {ws_row=9, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0 >> lseek(3, 0, SEEK_END) = 2 >> lseek(3, 0, SEEK_CUR) = 2 >> lseek(3, 2, SEEK_SET) = 2 >> read(3, "", 65536) = 0 >> lseek(3, 2, SEEK_SET) = 2 >> read(3, "", 65536) = 0 >> select(1, [0], NULL, NULL, {tv_sec=0, tv_usec=0}) = 0 (Timeout) >> write(2, "> ", 3) = 3 >> select(1, [0], NULL, NULL, NULL >> >> >> On Mon, Nov 4, 2019 at 8:57 PM Kurtis Rader wrote: >> >>> On Mon, Nov 4, 2019 at 4:19 PM Nicholas Papadonis < >>> nick.papadonis.ml@gmail.com> wrote: >>> >>>> When Emacs is invoked in an X-session and when I resize a M-x >>>> shell-mode *shell* window by more then a single line of text, $PS2 is being >>>> output in the shell mode window. When I type then a number of >>>> "^L"s are also output in the shell mode window. >>>> >>>> I'm using /bin/ksh93 in Debian. >>>> >>>> This behavior does not occur with bash. >>>> >>>> Does anyone know why this is happening? Also, more ways to debug it? >>>> >>> >>> No idea what's happening, but I wouldn't leap to the conclusion that >>> $PS2 is being displayed. Given the presence of the [ctrl-L] chars it's just >>> as likely that both chars are being sent to the shell. Possibly >>> bracketed-paste mode is enabled by the emacs shell mode. If you start the >>> shell, then in a different window strace it what appears in the trace when >>> you resize the window? Also, you might want to try the current development >>> version that you'll find at https://github.com/att/ast/ >>> . It's easy to build if you're >>> willing to install Meson. >>> >>> P.S., You might want to take a look at https://asciinema.org for >>> capturing terminal sessions for playback. >>> >>> -- >>> Kurtis Rader >>> Caretaker of the exceptional canines Junior and Hank >>> >> -- > You received this message because you are subscribed to the Google Groups > "Korn Shell" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to korn-shell+unsubscribe@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/korn-shell/CAKD0t1%2BRdniqNExU0oXShbybZtAq7HSjoEFJdcL25Due4QEB6g%40mail.gmail.com > > . > -- Kurtis Rader Caretaker of the exceptional canines Junior and Hank