GNU bug report logs - #63550
proced-refine-with-update-test is racy

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattias.engdegard <at> gmail.com>

Date: Wed, 17 May 2023 09:39:01 UTC

Severity: normal

Done: Mattias Engdegård <mattias.engdegard <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Laurence Warne <laurencewarne <at> gmail.com>
To: Mattias Engdegård <mattias.engdegard <at> gmail.com>
Cc: contovob <at> tcd.ie, Eli Zaretskii <eliz <at> gnu.org>, 63550 <at> debbugs.gnu.org
Subject: bug#63550: proced-refine-with-update-test is racy
Date: Sat, 27 May 2023 20:14:34 +0100
[Message part 1 (text/plain, inline)]
> These steps seem to provoke a failure of the original test quite reliably
on macOS:

> 1. add the call (sleep-for 1) both before and after (proced-refine), to
widen the windows
> 2. in a different terminal, keep the command

>  while true; do /bin/sleep 2 & sleep 0.1; done

Thanks for this, with the help of these instructions I can reproduce.

> but I think the test should still pass in this case

Sorry I was wrong here, if the process used for the refinement exited
between proced being called, and then `(proced-update t)` being called,
then the whole process list will be shown as proced would skip applying the
refinement.  So I think using (proced-update) instead of (proced-update t)
is the simplest fix since it means `proced-process-alist` will never be
refreshed.  I've re-attached the patch from before, but with a bit more
explanation.

Thanks, Laurence
[Message part 2 (text/html, inline)]
[0001-Fix-unstable-proced-test.patch (text/x-patch, attachment)]

This bug report was last modified 2 years and 52 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.