From: ludo@gnu.org (Ludovic Courtès)
To: 26253@debbugs.gnu.org
Subject: bug#26253: Coreutils 8.26 test failure on arm-linux-gnueabihf
Date: Sat, 25 Mar 2017 23:08:31 +0100 [thread overview]
Message-ID: <87r31lt3fk.fsf@gnu.org> (raw)
In-Reply-To: <87a889weaq.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sat, 25 Mar 2017 16:45:33 +0100")
[-- Attachment #1: Type: text/plain, Size: 2434 bytes --]
ludo@gnu.org (Ludovic Courtès) skribis:
> So the two lines that fail are these:
>
> # Explicitly disallow values above CUT_MAX
> (ulimit -v $vm && returns_ 1 cut -b$SIZE_MAX /dev/null 2>/dev/null) || fail=1
> (ulimit -v $vm && returns_ 1 cut -b$SIZE_OFLOW /dev/null 2>/dev/null) || fail=1
>
> I don’t understand why at this point, but I found that removing
> “2>/dev/null” from these two lines lets the test pass (and AIUI, this
> redirection is not necessary for the test; it just hides the
>
> cut: byte/character offset '4294967296' is too large
>
> error message.)
With the attached file I (and a patch coreutils such that it would
build; #:tests? #f is enough), I was able to reproduce the problem. The
build log I get is this:
--8<---------------cut here---------------start------------->8---
+ ulimit -v 2004
+ echo before
before
+ /gnu/store/iglljv347sj1mjx8r6li7plb4h7cv8h9-coreutils-8.26/bin/cut -b4294967296 /dev/null
/gnu/store/9bkl74hd3f1gysdkq22hp8w4z9w8022l-bash-4.4.12/bin/sh: xmalloc: variables.c:4539: cannot allocate 69 bytes (57344 bytes allocated)
+ echo after 2
after 2
/gnu/store/iglljv347sj1mjx8r6li7plb4h7cv8h9-coreutils-8.26/bin/cut: byte/character offset '4294967296' is too large
Try '/gnu/store/iglljv347sj1mjx8r6li7plb4h7cv8h9-coreutils-8.26/bin/cut --help' for more information.
/gnu/store/iglljv347sj1mjx8r6li7plb4h7cv8h9-coreutils-8.26/bin/cut: byte/character offset '4294967296' is too large
Try '/gnu/store/iglljv347sj1mjx8r6li7plb4h7cv8h9-coreutils-8.26/bin/cut --help' for more information.
;;; (bash "/gnu/store/9bkl74hd3f1gysdkq22hp8w4z9w8022l-bash-4.4.12/bin/sh")
;;; (status 0 0)
;;; (status2 256 1)
;;; (status3 256 1)
--8<---------------cut here---------------end--------------->8---
The thing that’s failing here is the shell that invokes ‘cut’, and thus
we get an exit value of 2 whereas the test explicitly checks for 1.
This is very sensitive: depending on the command sequence we pass to “sh
-c”, we hit that problem or we don’t. The fact that removing
“2>/dev/null” solved the problem was probably just chance.
So I think Coreutils commit 28803c8a3144d5d4363cdbd148bbe067af1a67c2,
which arbitrarily increased the value passed to “ulimit -v”, goes in the
right direction after all but is insufficient.
I’m trying out a new patch based on that and will push if it works.
Ludo’.
[-- Attachment #2: the test --]
[-- Type: text/plain, Size: 950 bytes --]
(use-modules (guix))
(define cu (@@ (gnu packages commencement) coreutils-final))
(define bash (@@ (gnu packages commencement) bash-final))
(define build
#~(let* ((_ #$output)
(cut (string-append #$cu "/bin/cut -b4294967296 /dev/null "))
(status (system* (pk 'bash (string-append #$bash "/bin/sh")) "-c"
(string-append "set -x; (ulimit -v 2004; echo before; "
cut " 2>/dev/null)"
"; echo after $?")))
(status2 (system cut))
(status3 (apply system* (string-tokenize cut))))
(pk 'status status (status:exit-val status))
(pk 'status2 status2 (status:exit-val status2))
(pk 'status3 status3 (status:exit-val status3))
#f))
(with-store store
(run-with-store store
(mlet %store-monad ((drv (gexp->derivation "foo" build)))
(built-derivations (list drv)))))
next prev parent reply other threads:[~2017-03-25 22:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-25 15:45 bug#26253: Coreutils 8.26 test failure on arm-linux-gnueabihf Ludovic Courtès
2017-03-25 18:18 ` Leo Famulari
2017-03-25 21:30 ` Ludovic Courtès
2017-03-25 22:08 ` Ludovic Courtès [this message]
2017-03-25 22:33 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r31lt3fk.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=26253@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).