GNU bug report logs - #34519
Test "colors" fails on Debian/ppc64el

Previous Next

Package: diffutils;

Reported by: Santiago Vila <sanvila <at> unex.es>

Date: Mon, 18 Feb 2019 01:03:01 UTC

Severity: normal

Merged with 25402, 36488

To reply to this bug, email your comments to 34519 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-diffutils <at> gnu.org:
bug#34519; Package diffutils. (Mon, 18 Feb 2019 01:03:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Santiago Vila <sanvila <at> unex.es>:
New bug report received and forwarded. Copy sent to bug-diffutils <at> gnu.org. (Mon, 18 Feb 2019 01:03:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Santiago Vila <sanvila <at> unex.es>
To: bug-diffutils <at> gnu.org
Subject: Test "colors" fails on Debian/ppc64el
Date: Mon, 18 Feb 2019 01:57:09 +0100 (CET)
Hello.

I've just uploaded diffutils 3.7 for Debian unstable (hopefully to be
part of Debian 10, since it contains only small fixes).

But there is a problem: The build in the ppc64el autobuilder failed:

https://buildd.debian.org/status/logs.php?pkg=diffutils&ver=1%3A3.7-1&arch=ppc64el

In tests/colors there was a race condition which I tried to fix
by adding a "sleep 1", like this:

mkfifo fifo
printf '%1000000s-a' > a
printf '%1000000s-b' > b
head -c 10 < fifo > /dev/null &
sleep 1
diff --color=always ---presume-output-tty a b > fifo
test $? = 141 || fail=1

It is possible that the "head" command takes (sometimes) more than one second to
complete on ppc64el?

Are there any other places in the test where a race condition could be
happening?

Thanks.




Information forwarded to bug-diffutils <at> gnu.org:
bug#34519; Package diffutils. (Tue, 27 Aug 2019 22:07:01 GMT) Full text and rfc822 format available.

Message #8 received at 34519 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Santiago Vila <sanvila <at> unex.es>
Cc: 34519 <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#34519: Test "colors" fails on Debian/ppc64el
Date: Tue, 27 Aug 2019 15:06:21 -0700
Santiago Vila wrote:
> In tests/colors there was a race condition which I tried to fix
> by adding a "sleep 1", like this:
> 
> mkfifo fifo
> printf '%1000000s-a' > a
> printf '%1000000s-b' > b
> head -c 10 < fifo > /dev/null &
> sleep 1
> diff --color=always ---presume-output-tty a b > fifo
> test $? = 141 || fail=1

Sorry, but what is the race condition, and why would adding 'sleep 1' help? The 
test should work regardless of whether 'diff' starts before 'head' does.

Are fifos broken on your system somehow?

Can you use 'strace -f' to see what syscalls are going wrong in 'head' and/or 
'diff'?




Information forwarded to bug-diffutils <at> gnu.org:
bug#34519; Package diffutils. (Sat, 28 Aug 2021 15:30:02 GMT) Full text and rfc822 format available.

Message #11 received at 34519 <at> debbugs.gnu.org (full text, mbox):

From: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
To: 34519 <at> debbugs.gnu.org
Cc: Frédéric Bonnard <frediz <at> debian.org>,
 Santiago Vila <sanvila <at> unex.es>, Paul Eggert <eggert <at> cs.ucla.edu>
Subject: Re: [bug-diffutils] bug#34519: Test "colors" fails on Debian/ppc64el
Date: Sat, 28 Aug 2021 12:29:17 -0300
Hello,

Em terça-feira, 27 de agosto de 2019, às 19:06:21 -03, Paul Eggert 
escreveu:
> Santiago Vila wrote:
> > In tests/colors there was a race condition which I tried to fix
> > by adding a "sleep 1", like this:
> > 
> > mkfifo fifo
> > printf '%1000000s-a' > a
> > printf '%1000000s-b' > b
> > head -c 10 < fifo > /dev/null &
> > sleep 1
> > diff --color=always ---presume-output-tty a b > fifo
> > test $? = 141 || fail=1
> 
> Sorry, but what is the race condition, and why would adding 'sleep 1'
> help? The test should work regardless of whether 'diff' starts before
> 'head' does.
> 
> Are fifos broken on your system somehow?
> 
> Can you use 'strace -f' to see what syscalls are going wrong in 'head'
> and/or 'diff'?

I still see this problem on powerpc64le-linux with version 3.8.

There was a great analysis of the problem made by Frédéric Bonnard (whom I 
took the liberty of copying on this message. I hope it’s ok), and also a 
tentative fix by him which would need to be assessed by someone more 
knowledgeable of the diffutils code:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=922552#19

In short: it’s not a problem in the test. It’s a bug in the signal handling 
code that was added to support the ‘--color’ option.

For some reason, it’s particularly easy to hit on powerpc64le-linux. With 
Frédéric’s patch I can’t hit it anymore.

-- 
Thanks,
Thiago






Merged 34519 36488. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Sun, 29 Aug 2021 06:56:01 GMT) Full text and rfc822 format available.

Merged 25402 34519 36488. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Sun, 29 Aug 2021 07:20:02 GMT) Full text and rfc822 format available.

Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 29 Aug 2021 21:50:02 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 288 days ago.

Previous Next


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