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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham
autolearn_force=no version=3.4.4
Received: (qmail 32612 invoked from network); 29 Mar 2022 09:09:07 -0000
Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368)
by inbox.vuxu.org with ESMTPUTF8; 29 Mar 2022 09:09:07 -0000
ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1648544947;
b=Wlg761RlucjCR6cT6sgnydyGY50rTpk+dHEDx+y9/9pjMs/TbDaSCm/IJRKmyUEOy8FOKd7b/c
9uHRpzj4s1MtvElIWNdYLaw4sO+njd3rIxE5qvj4QJLAKPodlEQ8414T3r7vV2Mt6rwgwG4tuW
eySYok6yESwnDDUO+lxU7VxXC/yH6YBx68E3IxnV5HbfbjQMxqlmRjY6JzorTvNGp6XvYZFlNF
uHO1KCGeMcj1Ps/IxCH8TZy5SsNxhAT/A9QsNXwJsscXxGrET7ZmklvY803aUDVkWDDVm/MFuN
oYQ45WtZQUCXpiYOr7G+55+matHL10x2EqYbWRfE2tQDFg==;
ARC-Authentication-Results: i=1; zsh.org;
iprev=pass (smtpq2.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.97;
dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256;
dmarc=pass header.from=ntlworld.com;
arc=none
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1648544947;
bh=fJwhq3uNrrtZI8ET//yiFsz/dO6ennQdWGFXmKtoTiU=;
h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help:
List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:
References:In-Reply-To:Message-ID:To:From:Date:DKIM-Signature:
DKIM-Signature;
b=UuhBbnyjniklNZCkTxf6hJLXqUKcISnLt/nWrZZ4ljKDBiJeBi+Dpj4h+DPNR/E6D0nscAvomS
gRVFkFE1Zzf20iQxMGyMVXveNrgwvTOnejnbV+Uxmu9U1GjgJwW09tQ9UIGNaNlxjJHXBjBLpu
xDtySSQjcUQOn/HenbMh+vNPtfR3iGcSJzY4SIzDBU5yfSdHrlddcgN2A1iJcHCECTqOcGmI1P
Vl1FETd8JNxDMfbFKT/n9w8qx3QvMG4j9jR4JalI6bNJVyp5qB17ll9QQlFh2omZn//YdtLV0q
/AKbMQV+ySEEOKLyU8uypdLI8FpyR9iF5FTw7FjdFJPJ6Q==;
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:Content-Transfer-Encoding:
Content-Type:MIME-Version:Subject:References:In-Reply-To:Message-ID:To:From:
Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:
Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID;
bh=sZCRGAAZ8wh0EWPyah1AbQ/rpsa2TMyplxwiRZ3mOoU=; b=cJTG/ppvTW6ymV42if7XVT5yE7
UxDEEN0PoVqcHyGt0qJeffZ2TRIGm/BxN914Bv9jVk/el0BB9XY0eFoT1LBC1YHwhU9gNvdqsO6DD
3Vs3zpCoJ1tw9bzGg/3uERUTkrve7TPBQu+9M45e1yrcPYe9E6lqQVte+hYik9TF7Os9aUn9xVitu
KYYTW7QYGarkcHZr8G9NL/92eBmuhyp4+lZFXEfnpLLqmS4IAti7lw2oFqIMNXdl/6x2QOqNYKhFv
jvzZJmU8n/4kmPpoVAawAH4bc2OQOOApVTVBO0m2hKrfcNhiazM5Jy5iYhKXOI/AlHprXRzMlr3Kk
gh5NAnSg==;
Received: from authenticated user by zero.zsh.org with local
id 1nZ7qc-0001Iv-Rp; Tue, 29 Mar 2022 09:09:06 +0000
Authentication-Results: zsh.org;
iprev=pass (smtpq2.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.97;
dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256;
dmarc=pass header.from=ntlworld.com;
arc=none
Received: from smtpq2.tb.ukmail.iss.as9143.net ([212.54.57.97]:44414)
by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
id 1nZ7qK-0000xB-Q7; Tue, 29 Mar 2022 09:08:49 +0000
Received: from [212.54.57.82] (helo=smtp3.tb.ukmail.iss.as9143.net)
by smtpq2.tb.ukmail.iss.as9143.net with esmtp (Exim 4.90_1)
(envelope-from
)
id 1nZ7qK-0001BM-Dg
for zsh-workers@zsh.org; Tue, 29 Mar 2022 11:08:48 +0200
Received: from oxbe25.tb.ukmail.iss.as9143.net ([172.25.160.156])
by smtp3.tb.ukmail.iss.as9143.net with ESMTP
id Z7qKn3vZ5l7D1Z7qKnQleP; Tue, 29 Mar 2022 11:08:48 +0200
X-Env-Mailfrom: p.w.stephenson@ntlworld.com
X-Env-Rcptto: zsh-workers@zsh.org
X-SourceIP: 172.25.160.156
X-CNFS-Analysis: v=2.4 cv=Xo7phHJ9 c=1 sm=1 tr=0 ts=6242cca0 cx=a_exe
a=NA7IgXeTfPXpJV+SL5V8Rw==:117 a=wbvTLvLwOfMA:10 a=IkcTkHD0fZMA:10
a=7H6ixmLU1AQA:10 a=q2GGsy2AAAAA:8 a=NLZqzBF-AAAA:8 a=mozrTxneFJef36rvf1AA:9
a=QEXdDO2ut3YA:10 a=z9dJwno5l634igLiVhy-:22 a=wW_WBVUImv98JQXhvVPZ:22
X-Authenticated-Sender: p.w.stephenson@ntlworld.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntlworld.com;
s=meg.feb2017; t=1648544928;
bh=fJwhq3uNrrtZI8ET//yiFsz/dO6ennQdWGFXmKtoTiU=;
h=Date:From:To:In-Reply-To:References:Subject;
b=lrK4GvP4xbWF20liJzkYSYHXJ6RVkebP/JoAiluG8SAsL3ETVQo1zYJDT+BOPyR24
JeodQp13xxacGPeJvvg5j0glYNoAq+NWMWpnVHc3V/t9XWb8C7yQUXO3XlVa2/osHD
283JaZSVw/DHssLMUateu/sZxUqwCUTVwU/2gpyypVAGWNoAp+hTXtL3CzjJbkJ9Rc
CAe5A3HFNMjzri2iWnMDY/s6xdv5M5c1AvFdkaOimHrPIJR/1ABxyvXaPSgyA5GczX
x0FaNesvdWryaWywyHFB6lR8PhbQNfx9A90eaVMrl0Sh600V4GmqBZwS4rsvKDd7HF
A0jfBM4MZkwbg==
Date: Tue, 29 Mar 2022 10:08:48 +0100 (BST)
From: Peter Stephenson
To: Zsh hackers list
Message-ID: <1639573778.726687.1648544928144@mail2.virginmedia.com>
In-Reply-To:
References:
<1409134730.698961.1648457237653@mail2.virginmedia.com>
<1613542531.711035.1648478945973@mail2.virginmedia.com>
<1830314137.713553.1648484054367@mail2.virginmedia.com>
<1e36a19a15237624412bc502ebfcf99034dfbb79.camel@ntlworld.com>
Subject: Re: Crash on jobstates since workers/49783 (commit 6a8aa2a)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Priority: 3
Importance: Medium
X-Mailer: Open-Xchange Mailer v7.8.4-Rev72
X-Originating-IP: 147.161.167.85
X-Originating-Client: open-xchange-appsuite
X-CMAE-Envelope: MS4xfC8NHp5qoAfgalPBmaBncF9X09tXWVxwqrnYdSY0gRqeC0Cid4iozQG4wD/qAikTALyEp3UWXj6Xu+G53JXS30jEWDs4ZaKUxYMsnfVw2BN/JpmIlCMk
eutDBkvgsC08o3yzHqIKnZIPWWhf2NCrmBCU9XuWn6RH/e1q/iUmsaddxO3Eg63D9JQNH3mvhP4r3iS0jcvXtVKQy4XRj4YNcGthRpGxauLxBhv0FEeCazap
X-Seq: 49909
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:
> On 29 March 2022 at 04:49 Bart Schaefer wrote:
> On Mon, Mar 28, 2022 at 12:53 PM Peter Stephenson
> wrote:
> >
> > When I simply print
> > jobstates and it does crash I'm seeing what looks like the process
> > number of the subshell process appear right before the crash (i.e. it's
> > typically one more than the sleep that was just started).
>
> This?
>
> diff --git a/Src/jobs.c b/Src/jobs.c
> index 18e43f03c..83ffdbde5 100644
> --- a/Src/jobs.c
> +++ b/Src/jobs.c
> @@ -1718,6 +1718,12 @@ clearjobtab(int monitor)
> /* Don't report any job we're part of */
> if (thisjob != -1 && thisjob < oldmaxjob)
> memset(oldjobtab+thisjob, 0, sizeof(struct job));
> +
> + /* oldmaxjob is now the size of the table, but outside
> + * this function, it's used as a job number, which must
> + * be the largest index available in the table.
> + */
> + --oldmaxjob;
> }
Yes, that seems like it's doing the right thing.
I'll add documentation and tests to the patch for the other half and remove
changes to job state querying.
pws