GNU bug report logs - #16463
'file-encoding' truncates encoding name

Previous Next

Package: guile;

Reported by: sreeharsha <at> totakura.in

Date: Thu, 16 Jan 2014 12:09:02 UTC

Severity: normal

Found in version 2.0.9

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16463 in the body.
You can then email your comments to 16463 AT debbugs.gnu.org in the normal way.

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-guix <at> gnu.org:
bug#16463; Package guix. (Thu, 16 Jan 2014 12:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to sreeharsha <at> totakura.in:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 16 Jan 2014 12:09:02 GMT) Full text and rfc822 format available.

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

From: Sree Harsha Totakura <sreeharsha <at> totakura.in>
To: bug-guix <at> gnu.org
Subject: Guile derivation fails to build
Date: Thu, 16 Jan 2014 13:07:27 +0100
[Message part 1 (text/plain, inline)]
Hi!

Guile derivation seems to fail during `make check`.  I am not sure why
Guile is even being built; all I did was to execute `guix package
install=hello`.  Perhaps guile is one of the (indirect) dependencies for
hello? and hydra.gnu.org was unresponsive for some reason..

Attached is a excerpt from the output where the build fails.

-
Sree
[fail.txt (text/plain, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#16463; Package guix. (Thu, 16 Jan 2014 23:33:02 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Sree Harsha Totakura <sreeharsha <at> totakura.in>
Cc: 16463 <at> debbugs.gnu.org
Subject: Re: bug#16463: Guile derivation fails to build
Date: Fri, 17 Jan 2014 00:32:24 +0100
Sree Harsha Totakura <sreeharsha <at> totakura.in> skribis:

> Guile derivation seems to fail during `make check`.  I am not sure why
> Guile is even being built; all I did was to execute `guix package
> install=hello`.  Perhaps guile is one of the (indirect) dependencies for
> hello?

Yes, it’s a dependency for everything.  See the “Bootstrapping” node of
the manual.

> and hydra.gnu.org was unresponsive for some reason..

Yes, that’s often the case unfortunately, but it just means it’s a bit
slow.

> make[5]: Entering directory '/tmp/nix-build-guile-2.0.9.drv-0/guile-2.0.9/test-suite/standalone'
> PASS: test-system-cmds
> PASS: test-bad-identifiers
> PASS: test-require-extension
> PASS: test-guile-snarf
> PASS: test-import-order
> PASS: test-command-line-encoding
> Backtrace:
> In ice-9/boot-9.scm:
>  157: 8 [catch #t #<catch-closure 204dd80> ...]
> In unknown file:
>    ?: 7 [apply-smob/1 #<catch-closure 204dd80>]
> In ice-9/boot-9.scm:
>   63: 6 [call-with-prompt prompt0 ...]
> In ice-9/eval.scm:
>  432: 5 [eval # #]
> In ice-9/boot-9.scm:
> 2320: 4 [save-module-excursion #<procedure 207ccc0 at ice-9/boot-9.scm:3961:3 ()>]
> 3966: 3 [#<procedure 207ccc0 at ice-9/boot-9.scm:3961:3 ()>]
> 1645: 2 [%start-stack load-stack ...]
> 1650: 1 [#<procedure 207b060 ()>]
> In unknown file:
>    ?: 0 [primitive-load "/tmp/nix-build-guile-2.0.9.drv-0/guile-2.0.9/test-suite/standalone/test-command-line-encoding2"]
>
> ERROR: In procedure primitive-load:
> ERROR: In procedure open_iconv_descriptors: invalid or unknown character encoding "ISO-"
> FAIL: test-command-line-encoding2

This is very weird.  Is it reproducible?  Does ‘guix-daemon’ use the
chroot, separate name spaces, and separate build users?

Does this fail in the same way?

  guix build -e '(@ (gnu packages base) guile-final)' -n

TIA,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#16463; Package guix. (Fri, 17 Jan 2014 09:18:02 GMT) Full text and rfc822 format available.

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

From: Sree Harsha Totakura <sreeharsha <at> totakura.in>
To: bug-guix <at> gnu.org
Subject: Re: bug#16463: Guile derivation fails to build
Date: Fri, 17 Jan 2014 10:16:59 +0100
On 01/17/2014 12:32 AM, Ludovic Courtès wrote:
> This is very weird.  Is it reproducible?  Does ‘guix-daemon’ use
> the chroot, separate name spaces, and separate build users?

Yes, it is reproducible.

> 
> Does this fail in the same way?
> 
> guix build -e '(@ (gnu packages base) guile-final)' -n

Yes, but I had to modify the command as
   guix build -e '(@ (gnu packages base) guile-final)'

Sree




Information forwarded to bug-guix <at> gnu.org:
bug#16463; Package guix. (Fri, 17 Jan 2014 09:45:01 GMT) Full text and rfc822 format available.

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

From: Sree Harsha Totakura <sreeharsha <at> totakura.in>
To: bug-guix <at> gnu.org
Subject: Re: bug#16463: Guile derivation fails to build
Date: Fri, 17 Jan 2014 10:42:41 +0100
[Message part 1 (text/plain, inline)]
> <sriharsha> civodul, I was able to reproduce the guile bug manually from the guile derivation build directory.  Here's the output: http://pastebin.ca/2554521
> <civodul> sriharsha: oh good that you could reproduce it
> <civodul> could you run that process in "strace -f", and send the output?
> <civodul> ideally mail that to the bug report

Attached is the output with strace.  Note that I had to symlink strace
from the existing system into the guile derivation directory.


Sree
[fail.txt (text/plain, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#16463; Package guix. (Fri, 17 Jan 2014 10:05:01 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Sree Harsha Totakura <sreeharsha <at> totakura.in>
Cc: 16463 <at> debbugs.gnu.org
Subject: Re: bug#16463: Guile derivation fails to build
Date: Fri, 17 Jan 2014 11:04:55 +0100
Sree Harsha Totakura <sreeharsha <at> totakura.in> skribis:

> open("./test-command-line-encoding2", O_RDONLY) = 3
> ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff02231670) = -1 ENOTTY (Inappropriate ioctl for device)
> lseek(3, 0, SEEK_CUR)                   = 0
> read(3, "#!/home/nix/store/v7vpnjlrgs4w3z"..., 80) = 80
> lseek(3, 0, SEEK_SET)                   = 0
> getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=4*1024}) = 0
> fcntl(255, F_GETFD)                     = -1 EBADF (Bad file descriptor)
> dup2(3, 255)                            = 255
> close(3)                                = 0
> fcntl(255, F_SETFD, FD_CLOEXEC)         = 0
> fcntl(255, F_GETFL)                     = 0x8000 (flags O_RDONLY|O_LARGEFILE)
> fstat(255, {st_mode=S_IFREG|0755, st_size=512, ...}) = 0

This is weird.  In my checkout that file is 455 byte long, not 512.  Its
SHA1 is 81f83b7f877a4970add5d891bf2112e028032e1d.

Can you check yours?

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#16463; Package guix. (Fri, 17 Jan 2014 10:15:01 GMT) Full text and rfc822 format available.

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

From: Sree Harsha Totakura <sreeharsha <at> totakura.in>
To: bug-guix <at> gnu.org
Subject: Re: bug#16463: Guile derivation fails to build
Date: Fri, 17 Jan 2014 11:13:18 +0100
On 01/17/2014 11:04 AM, Ludovic Courtès wrote:
> This is weird.  In my checkout that file is 455 byte long, not 512.
> Its SHA1 is 81f83b7f877a4970add5d891bf2112e028032e1d.
> 
> Can you check yours?

I have the same values from my local build:
> totakura <at> nautophone:~/build/guile-2.0.9/test-suite/standalone$
> sha1sum ./test-command-line-encoding2 
> 81f83b7f877a4970add5d891bf2112e028032e1d
> ./test-command-line-encoding2 
> totakura <at> nautophone:~/build/guile-2.0.9/test-suite/standalone$ stat
> ./test-command-line-encoding2 File:
> `./test-command-line-encoding2' Size: 455       	Blocks: 8
> IO Block: 4096   regular file Device: fe07h/65031d	Inode: 6818828
> Links: 1 Access: (0750/-rwxr-x---)  Uid: ( 1000/totakura)   Gid: (
> 1000/totakura) Access: 2014-01-17 10:08:46.471166827 +0100 Modify:
> 2012-12-17 00:27:40.000000000 +0100 Change: 2014-01-17
> 09:53:35.842651260 +0100 Birth: -

But, these change in the guix guile build directory, perhaps due to
the path overwrite from /bin/sh to
/home/nix/store/v7vpnjlrgs4w3zsgbkqplksnsncl0lv6-bash-4.2/bin/sh

> totakura <at> nautophone:/tmp/nix-build-guile-2.0.9.drv-0/guile-2.0.9/test-suite/standalone$
> sha1sum ./test-command-line-encoding2 
> f155f1137b326f9c16efc2c2f57fbd51e2ee24c2
> ./test-command-line-encoding2 
> totakura <at> nautophone:/tmp/nix-build-guile-2.0.9.drv-0/guile-2.0.9/test-suite/standalone$
> stat ./test-command-line-encoding2 File:
> `./test-command-line-encoding2' Size: 512             Blocks: 8
> IO Block: 4096   regular file Device: fe04h/65028d    Inode: 261292
> Links: 1 Access: (0755/-rwxr-xr-x)  Uid: ( 1000/totakura)   Gid: (
> 1000/totakura) Access: 2014-01-17 09:47:23.884806822 +0100 Modify:
> 2012-12-17 00:27:40.000000000 +0100 Change: 2014-01-17
> 09:44:56.468075823 +0100 Birth: - 
> totakura <at> nautophone:/tmp/nix-build-guile-2.0.9.drv-0/guile-2.0.9/test-suite/standalone$
> diff ./test-command-line-encoding2
> ~/build/guile-2.0.9/test-suite/standalone/test-command-line-encoding2
>  1c1 <
> #!/home/nix/store/v7vpnjlrgs4w3zsgbkqplksnsncl0lv6-bash-4.2/bin/sh 
> ---
>> #!/bin/sh

Can you check it in your guix guile directory.

Sree




Information forwarded to bug-guix <at> gnu.org:
bug#16463; Package guix. (Fri, 17 Jan 2014 10:36:01 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Sree Harsha Totakura <sreeharsha <at> totakura.in>
Cc: 16463 <at> debbugs.gnu.org
Subject: Re: bug#16463: Guile derivation fails to build
Date: Fri, 17 Jan 2014 11:35:37 +0100
Sree Harsha Totakura <sreeharsha <at> totakura.in> skribis:

> On 01/17/2014 11:04 AM, Ludovic Courtès wrote:
>> This is weird.  In my checkout that file is 455 byte long, not 512.
>> Its SHA1 is 81f83b7f877a4970add5d891bf2112e028032e1d.
>> 
>> Can you check yours?
>
> I have the same values from my local build:
>> totakura <at> nautophone:~/build/guile-2.0.9/test-suite/standalone$
>> sha1sum ./test-command-line-encoding2 
>> 81f83b7f877a4970add5d891bf2112e028032e1d
>> ./test-command-line-encoding2 
>> totakura <at> nautophone:~/build/guile-2.0.9/test-suite/standalone$ stat
>> ./test-command-line-encoding2 File:
>> `./test-command-line-encoding2' Size: 455       	Blocks: 8
>> IO Block: 4096   regular file Device: fe07h/65031d	Inode: 6818828
>> Links: 1 Access: (0750/-rwxr-x---)  Uid: ( 1000/totakura)   Gid: (
>> 1000/totakura) Access: 2014-01-17 10:08:46.471166827 +0100 Modify:
>> 2012-12-17 00:27:40.000000000 +0100 Change: 2014-01-17
>> 09:53:35.842651260 +0100 Birth: -
>
> But, these change in the guix guile build directory, perhaps due to
> the path overwrite from /bin/sh to
> /home/nix/store/v7vpnjlrgs4w3zsgbkqplksnsncl0lv6-bash-4.2/bin/sh

Ah, of course, silly me.

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#16463; Package guix. (Fri, 17 Jan 2014 10:45:02 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Sree Harsha Totakura <sreeharsha <at> totakura.in>
Cc: 16463 <at> debbugs.gnu.org
Subject: Re: bug#16463: Guile derivation fails to build
Date: Fri, 17 Jan 2014 11:44:49 +0100
Sree Harsha Totakura <sreeharsha <at> totakura.in> skribis:

> open("./test-command-line-encoding2", O_RDONLY) = 3
> ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff02231670) = -1 ENOTTY (Inappropriate ioctl for device)
> lseek(3, 0, SEEK_CUR)                   = 0
> read(3, "#!/home/nix/store/v7vpnjlrgs4w3z"..., 80) = 80
> lseek(3, 0, SEEK_SET)                   = 0
> getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=4*1024}) = 0
> fcntl(255, F_GETFD)                     = -1 EBADF (Bad file descriptor)
> dup2(3, 255)                            = 255
> close(3)                                = 0
> fcntl(255, F_SETFD, FD_CLOEXEC)         = 0
> fcntl(255, F_GETFL)                     = 0x8000 (flags O_RDONLY|O_LARGEFILE)
> fstat(255, {st_mode=S_IFREG|0755, st_size=512, ...}) = 0
> lseek(255, 0, SEEK_CUR)                 = 0
> brk(0x203f000)                          = 0x203f000
> rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
> read(255, "#!/home/nix/store/v7vpnjlrgs4w3z"..., 512) = 512

What does this report:

  ./meta/guile -c '(pk (file-encoding (open-input-file "test-suite/standalone/test-command-line-encoding2")))'

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#16463; Package guix. (Fri, 17 Jan 2014 10:48:01 GMT) Full text and rfc822 format available.

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

From: Sree Harsha Totakura <sreeharsha <at> totakura.in>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 16463 <at> debbugs.gnu.org
Subject: Re: bug#16463: Guile derivation fails to build
Date: Fri, 17 Jan 2014 11:46:51 +0100
On 01/17/2014 11:44 AM, Ludovic Courtès wrote:
> What does this report:
> 
> ./meta/guile -c '(pk (file-encoding (open-input-file
> "test-suite/standalone/test-command-line-encoding2")))'

It reports:

> bash-4.2$ meta/guile -c '(pk (file-encoding (open-input-file
> "test-suite/standalone/test-command-line-encoding2")))' ;;;
> ("ISO-885")

Sree




Information forwarded to bug-guix <at> gnu.org:
bug#16463; Package guix. (Fri, 17 Jan 2014 11:09:02 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Sree Harsha Totakura <sreeharsha <at> totakura.in>
Cc: 16463 <at> debbugs.gnu.org, control <at> debbugs.gnu.org
Subject: Re: bug#16463: Guile derivation fails to build
Date: Fri, 17 Jan 2014 12:08:03 +0100
reassign 16463 guile 2.0.9
retitle 16463 ‘file-encoding’ truncates encoding name
thanks

Sree Harsha Totakura <sreeharsha <at> totakura.in> skribis:

> On 01/17/2014 11:44 AM, Ludovic Courtès wrote:
>> What does this report:
>> 
>> ./meta/guile -c '(pk (file-encoding (open-input-file
>> "test-suite/standalone/test-command-line-encoding2")))'
>
> It reports:
>
>> bash-4.2$ meta/guile -c '(pk (file-encoding (open-input-file
>> "test-suite/standalone/test-command-line-encoding2")))' ;;;
>> ("ISO-885")

OK, that’s the problem.

I can reproduce it by changing the shebang to this:

--8<---------------cut here---------------start------------->8---
#!/foo/nix/store/bwjl94kaigsxd64pgzs2j1cj0wn67v76-glibc-2.18/bin/sh
--8<---------------cut here---------------end--------------->8---

This is a bug in Guile’s encoding-cookie scanner: it looks for the
string ‘coding:’ in the first 500 bytes of the file.  Here it does find
it and proceeds to read the next token, except that it stops at 500
bytes, thereby truncating the encoding name.

I’ll look for a fix on the Guile side.

In the meantime, I’m afraid there is no nice way to work around it in
your Guix install.  You could work around it by using a shorter store
directory name, or you could have a local patch in guile.scm that
changes ‘test-command-line-encoding2’ to read ‘coding: utf-8’...

Thanks,
Ludo’.




bug reassigned from package 'guix' to 'guile'. Request was from ludo <at> gnu.org (Ludovic Courtès) to control <at> debbugs.gnu.org. (Fri, 17 Jan 2014 11:09:02 GMT) Full text and rfc822 format available.

bug Marked as found in versions 2.0.9. Request was from ludo <at> gnu.org (Ludovic Courtès) to control <at> debbugs.gnu.org. (Fri, 17 Jan 2014 11:09:03 GMT) Full text and rfc822 format available.

Changed bug title to ''file-encoding' truncates encoding name' from 'Guile derivation fails to build' Request was from ludo <at> gnu.org (Ludovic Courtès) to control <at> debbugs.gnu.org. (Fri, 17 Jan 2014 12:35:02 GMT) Full text and rfc822 format available.

Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Fri, 17 Jan 2014 17:24:01 GMT) Full text and rfc822 format available.

Notification sent to sreeharsha <at> totakura.in:
bug acknowledged by developer. (Fri, 17 Jan 2014 17:24:02 GMT) Full text and rfc822 format available.

Message #43 received at 16463-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Sree Harsha Totakura <sreeharsha <at> totakura.in>
Cc: 16463-done <at> debbugs.gnu.org
Subject: Re: bug#16463: Guile derivation fails to build
Date: Fri, 17 Jan 2014 18:23:21 +0100
Fixed in 3ff8a9d, which will be in 2.0.10.

Thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 15 Feb 2014 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 72 days ago.

Previous Next


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