From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 7231 invoked from network); 7 Oct 2021 01:45:05 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 7 Oct 2021 01:45:05 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1633571105; b=W6aOD7h2MyzqDO6tTbrHtaQXlUJMLMLUPCmsXKTsaSlmK1bRfwzNlIHbfRaiPZqiQ1im5qX+NP yHcsMcrSXe57T66gPMlyd4/EI5v0WOHY1MF1gxzVZN+cGFFw20E/MdmpBP3kAXwFcYuXcmKUIE hYjWdvaKstet0lRRtV0oR3Pm4rGOMWOq8LFcJMcplh7Y6q7szItb4CGfha27fJlVUZnO0poRvF pI51VFjnUXHiEYGRhMbaBcM1B0+2mShLkDMX/M4eNnEeXc3JuecO97fSGFlm9F6OAN8ekM1IOP ZU/twXjaHw8tnYps/t507gkWW7A2LruRbIMGuiM+P2Mi8w==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-io1-f46.google.com) smtp.remote-ip=209.85.166.46; dkim=pass header.d=principlestudios-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=principlestudios.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1633571105; bh=ZU+TS6VowSXV1O2wqcpLK70NWStwrHFpHZc4FJyC8Q0=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:References:To:Cc:In-Reply-To:Date:Subject:MIME-Version: Content-Type:Message-ID:From:DKIM-Signature:DKIM-Signature; b=OD/LkYqD3QbDp9/uhyzwbLoaW1uXMLIoEibufTh/1xc06PhlACA80fO2rh1QxXwZ5k/2gB/ArG XOI5iAC1UaVsHxORB+Hw+GJoBEoHvQeXg/eT+hSFE7eVZD8jI2PulaWdHD0KKqrhpTQWIO1MZy jdx+eQlbvEBj0v8vBVvvxrsM4wKCpdjSbUid44PT4UXe4qsfKX+5GhLWD26v4BK+2WmkjK8eeS yiCJt4rhEuyIfr4IytuC+/exSUm70kogL2MAo5EpLWyOZLsg3ykpvgPWojjjwe+Z3glVOg4ZXs c3b/sB/O5T4eh1blNgpBsWCGySHU5CwTHbk4QZAdwg1HVw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:References:To:Cc:In-Reply-To:Date: Subject:Mime-Version:Content-Type:Message-Id:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=/U9IEibYXedvd9Y6bny13e58PUzXrCC+FXLwGTXJqtM=; b=TNpKa0NKTkDAyIN9R5FabEodc8 4k6Xg4LulzGkcjZCX0G091WJibd1BxEIg4gGoknHosffbc9HIrVGGHQyY1raTh2JIt+crY4Wtw1B7 y2ppDOiLkuYefXzaU2Tnog5i64ErKX1p8Qp9e+kzzpW8Prgy9inef9lJprmBeCm3pp0jbsQl8Vj+s LkwwibZEc112l8fykpE5HbqRAMcaUpgCaQaP7dHJTLA3NjpGoAHQikJzmk5g7kWtV13AyR3gqj548 qHSPaqK6l2H/oQIkf3GibcIeg5zShht0LCcu88gkr6R6b591qpfH+2YsXsv7GYvfs6/I0Apz3tCz1 E5gkGbYg==; Received: from authenticated user by zero.zsh.org with local id 1mYIT3-0009B2-B4; Thu, 07 Oct 2021 01:45:05 +0000 Authentication-Results: zsh.org; iprev=pass (mail-io1-f46.google.com) smtp.remote-ip=209.85.166.46; dkim=pass header.d=principlestudios-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=principlestudios.com; arc=none Received: from mail-io1-f46.google.com ([209.85.166.46]:42735) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mYISm-0008tx-Ti; Thu, 07 Oct 2021 01:44:49 +0000 Received: by mail-io1-f46.google.com with SMTP id 5so4962200iov.9 for ; Wed, 06 Oct 2021 18:44:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=principlestudios-com.20210112.gappssmtp.com; s=20210112; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=/U9IEibYXedvd9Y6bny13e58PUzXrCC+FXLwGTXJqtM=; b=je5WJJqdZNFUdDRhgrC520TDBUgn7moDM1OFL3MYVU/l5wiWYdRwfKXsaoQANMG6GP EG7otOJAokQ7jLnJj+wiMvFLnQnv/SVSwwlHMQcQeudqf6/dEw7eumyjN/C/uy8ToST8 XEd/8ugXSmdMpxWaTSj6Zk66F/Ts5ezs1HdcwTL1hlP/zMV4Lg3cXv3SGTBOmYkGvAe6 SjzT1UrZcm54TG9sFnDyO9+tl4okWu2setCQ4bXZ7xdmMCk6m+J3DoAOnNPwcK2kna0c yiux8q8QFVHVLHpF+TGvkB4QAnjWA+7rMnMPH+oVxT7cGQwSyqRcu0MhhS57WyKkeu73 x5lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=/U9IEibYXedvd9Y6bny13e58PUzXrCC+FXLwGTXJqtM=; b=qBb7PRel1AIxNiWq38YfvEcCJ7dDexqvwlESHBWrvkklJfIUKT2FLdJeksAZJwahr5 GwQOQfZihmu01KjFBLSExOmPQOBsVWdweOkiMFDxtABTQNybp5tFTqjnGQS+zo7YmdtC CsA+epNsDHLEdioQ5p2wLIz196IWXX18J5I4Fv96awge6j+EPkCBQFiqIBxs/RkBeRpP iHFxIHIF30GX/gvPsWB8wM5X9iOpbkmt2KAc1Z4PaIv2k+kDf+hvkNLg4aj1wgnjKMCh zM70v6e/dia/bnKO8ov92jF9St/u4MCaJLkpCNq6dPTd5mgSUVfBXT4qnaYQxKf+OJL3 lS8w== X-Gm-Message-State: AOAM533xtIvQM5L8/UUVYslmLeRxef4kmMIxAPie/rNqeDLGC2ul2OOg 92FZfSukhDpMFzKQrYkGObgVNJYe4ET36Q== X-Google-Smtp-Source: ABdhPJzXUOwwx3Fl6URpPr+vu+4/2UfWpeQar/Bcqjk8vBiTN6jNCUbm/w9AZQldkbI46c377wDGEA== X-Received: by 2002:a05:6638:f91:: with SMTP id h17mr827092jal.106.1633571087548; Wed, 06 Oct 2021 18:44:47 -0700 (PDT) Received: from smtpclient.apple ([2601:281:c102:7920:2976:9ccb:16a8:ed98]) by smtp.gmail.com with ESMTPSA id x17sm13287066ilc.14.2021.10.06.18.44.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Oct 2021 18:44:47 -0700 (PDT) From: Andrew Owen Message-Id: <45857E5C-99C5-4834-ACCB-30570A2B910D@principlestudios.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_3F4510EA-F5A2-4B7E-A1F9-528500FA462E" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: Strange terminal resizing behavior on macOS 11.6 and calling pwsh under zsh Date: Wed, 6 Oct 2021 19:44:46 -0600 In-Reply-To: Cc: zsh-workers@zsh.org To: Bart Schaefer References: <7CE5FEA4-52A2-478B-98E4-1C30F5D6C2CF@principlestudios.com> X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Seq: 49461 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: --Apple-Mail=_3F4510EA-F5A2-4B7E-A1F9-528500FA462E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Oct 6, 2021, at 7:03 PM, Bart Schaefer = wrote: >=20 > On Wed, Oct 6, 2021 at 4:06 PM Andrew Owen > wrote: >>=20 >> I seem to have found a curious bug in how zsh interacts with pwsh on = macOS 11.6. I first reported it to the pwsh team, here: = https://github.com/PowerShell/PowerShell/issues/16174 >=20 > I presume we can ignore the typo in > = https://github.com/PowerShell/PowerShell/issues/16174#issuecomment-9347158= 68 > ("/usr/local/bin pwsh ...=E2=80=9D). Yes, that typo doesn=E2=80=99t exist in the actual script, Safari has = some spell-correcting in place that misfires on occasion.=20 > I would suggest two things: > 1) Examine the pwsh process with dtruss while attempting to reproduce > the issue, to give some hint of whether QUIT is actually being > received. Maybe you can figure out from where. This is what I see when I target the zsh parent process (I got = sidetracked with the pwsh process, which seems rather noisy from a = syscall standpoint) SYSCALL(args) =3D return dtrace: error on enabled probe ID 1657 (ID 258: = syscall::sigprocmask:return): invalid user access in action #5 at DIF = offset 0 dtrace: error on enabled probe ID 1657 (ID 258: = syscall::sigprocmask:return): invalid user access in action #5 at DIF = offset 0 dtrace: error on enabled probe ID 2212 (ID 270: syscall::ioctl:return): = invalid user access in action #5 at DIF offset 0 dtrace: error on enabled probe ID 2082 (ID 530: = syscall::sigreturn:return): invalid user access in action #5 at DIF = offset 0 > 2) Try using "exec /usr/local/bin/pwsh ..." in the script so the zsh > parent is removed from the process tree, and then try to reproduce the > issue. This makes it so that the reproduction steps I listed before no longer = lead to the crash.=20 --Apple-Mail=_3F4510EA-F5A2-4B7E-A1F9-528500FA462E Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Oct 6, 2021, at 7:03 PM, Bart Schaefer <schaefer@brasslantern.com> wrote:

On = Wed, Oct 6, 2021 at 4:06 PM Andrew Owen
<andrew.owen@principlestudios.com> wrote:

I seem to = have found a curious bug in how zsh interacts with pwsh on macOS 11.6. I = first reported it to the pwsh team, here: https://github.com/PowerShell/PowerShell/issues/16174

I presume we can ignore the typo = in
https://github.com/PowerShell/PowerShell/issues/16174#issuecomm= ent-934715868
("/usr/local/bin pwsh ...=E2=80=9D).
Yes, that typo doesn=E2=80=99t exist = in the actual script, Safari has some spell-correcting in place that = misfires on occasion. 

I would suggest = two things:
1) Examine the pwsh process with dtruss while = attempting to reproduce
the issue, to give some hint of = whether QUIT is actually being
received.  Maybe you = can figure out from where.
This is what I see when I target the zsh parent = process (I got sidetracked with the pwsh process, which seems rather = noisy from a syscall standpoint)

SYSCALL(args)  = =3D return
dtrace: = error on enabled probe ID 1657 (ID 258: syscall::sigprocmask:return): = invalid user access in action #5 at DIF offset 0
dtrace: error on enabled probe ID 1657 = (ID 258: syscall::sigprocmask:return): invalid user access in action #5 = at DIF offset 0
dtrace: = error on enabled probe ID 2212 (ID 270: syscall::ioctl:return): invalid = user access in action #5 at DIF offset 0
dtrace: error on enabled probe ID 2082 (ID 530: = syscall::sigreturn:return): invalid user access in action #5 at DIF = offset 0


2) Try using "exec /usr/local/bin/pwsh ..." in the script so = the zsh
parent is removed from the process tree, and then = try to reproduce the
issue.
This makes it so that the = reproduction steps I listed before no longer lead to the crash. 

= --Apple-Mail=_3F4510EA-F5A2-4B7E-A1F9-528500FA462E--