GNU bug report logs - #23194
Benign error in installation image: "stty: standard input: Input/output error"

Previous Next

Package: guix;

Reported by: Chris Marusich <cmmarusich <at> gmail.com>

Date: Sat, 2 Apr 2016 21:11:02 UTC

Severity: normal

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 23194 in the body.
You can then email your comments to 23194 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#23194; Package guix. (Sat, 02 Apr 2016 21:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Chris Marusich <cmmarusich <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sat, 02 Apr 2016 21:11:02 GMT) Full text and rfc822 format available.

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

From: Chris Marusich <cmmarusich <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: Benign error in installation image: "stty: standard input:
 Input/output error"
Date: Sat, 02 Apr 2016 14:09:51 -0700
[Message part 1 (text/plain, inline)]
Hi,

In the installation image for GuixSD v0.10.0, I get some I/O errors on
the terminal just before/during/after the MOTD is displayed:

"stty: standard input: Input/output error"

The error appears to be benign because I encountered no actual problems
with input or output.  However, it would be nice to find out why this is
being emitted and fix it, so that errors are not the first thing that
new GuixSD users see when installing the system.

-- 
Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#23194; Package guix. (Sun, 03 Apr 2016 06:28:02 GMT) Full text and rfc822 format available.

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

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: 23194 <at> debbugs.gnu.org
Subject: Re: bug#23194: Benign error in installation image: "stty: standard
 input: Input/output error"
Date: Sun, 3 Apr 2016 09:27:39 +0300
[Message part 1 (text/plain, inline)]
On Sat, 02 Apr 2016 14:09:51 -0700
Chris Marusich <cmmarusich <at> gmail.com> wrote:

> Hi,
> 
> In the installation image for GuixSD v0.10.0, I get some I/O errors on
> the terminal just before/during/after the MOTD is displayed:
> 
> "stty: standard input: Input/output error"
> 
> The error appears to be benign because I encountered no actual problems
> with input or output.  However, it would be nice to find out why this is
> being emitted and fix it, so that errors are not the first thing that
> new GuixSD users see when installing the system.
> 

I just did the install too and I noticed these also. tty1 is the install
commandline, tty2 is the instructions, and the others aren't set so they give
an error.

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#23194; Package guix. (Sun, 03 Apr 2016 06:54:01 GMT) Full text and rfc822 format available.

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

From: Chris Marusich <cmmarusich <at> gmail.com>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 23194 <at> debbugs.gnu.org
Subject: Re: bug#23194: Benign error in installation image: "stty: standard
 input: Input/output error"
Date: Sat, 02 Apr 2016 23:52:46 -0700
[Message part 1 (text/plain, inline)]
Efraim Flashner <efraim <at> flashner.co.il> writes:

> I just did the install too and I noticed these also. tty1 is the install
> commandline, tty2 is the instructions, and the others aren't set so they give
> an error.

I don't quite understand.  The other ttys have login prompts, right?
They don't seem broken to me.  Why should they cause an error?

-- 
Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#23194; Package guix. (Mon, 04 Apr 2016 14:51:02 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: 23194 <at> debbugs.gnu.org
Subject: Re: bug#23194: Benign error in installation image: "stty: standard
 input: Input/output error"
Date: Mon, 04 Apr 2016 16:50:40 +0200
Chris Marusich <cmmarusich <at> gmail.com> skribis:

> In the installation image for GuixSD v0.10.0, I get some I/O errors on
> the terminal just before/during/after the MOTD is displayed:
>
> "stty: standard input: Input/output error"

These appear to come from the ‘unicode_start’ command, run by the
‘console-font’ services.  ‘unicode_start’ is a shell script in the ‘kbd’
package that does:

  stty iutf8

In a ‘guix system vm gnu/system/install.scm’ VM in current master, I
sometimes get a different message:

  unicode_start skipped on not a tty

The “not a tty” string comes from the ‘tty’ command (Coreutils).  We get
it when:

  ttyname (STDIN_FILENO);

returns NULL; this can happen if ‘tcgetattr’ returns NULL (see ttyname.c
in libc.)

The ‘stty’ error you mention also happens when ‘tcgetattr’ fails and
returns EIO (stty.c in Coreutils):

--8<---------------cut here---------------start------------->8---
    device_name = _("standard input");

  if (tcgetattr (STDIN_FILENO, &mode))
    error (EXIT_FAILURE, errno, "%s", device_name);
--8<---------------cut here---------------end--------------->8---

‘tcgetattr’ is actually an alias for the TCGETS ioctl.  Looking at the
kernel, I don’t see under what circumstances we can get EIO.

That’s all I have for now!

Thanks for your report.
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#23194; Package guix. (Mon, 04 Apr 2016 15:11:02 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: 23194 <at> debbugs.gnu.org
Subject: Re: bug#23194: Benign error in installation image: "stty: standard
 input: Input/output error"
Date: Mon, 04 Apr 2016 17:10:20 +0200
[Message part 1 (text/plain, inline)]
Chris Marusich <cmmarusich <at> gmail.com> skribis:

> In the installation image for GuixSD v0.10.0, I get some I/O errors on
> the terminal just before/during/after the MOTD is displayed:
>
> "stty: standard input: Input/output error"

With a patch like this, the issue vanishes:

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index b168543..aa34aa8 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -482,6 +482,7 @@ strings or string-valued gexps."
       (let ((pid (primitive-fork)))
         (case pid
           ((0)
+           (sleep 1)
            (close-fdes 0)
            (dup2 (open-fdes #$tty O_RDONLY) 0)
            (close-fdes 1)
[Message part 3 (text/plain, inline)]
This hints at a race condition.

I *think* that the problem is that at the time the ‘console-font-X’
service starts and invokes ‘unicode_start’, it may be that mingetty
hasn’t opened the tty yet.

Indeed, the ‘term-ttyX’ services are considered started as soon as
mingetty is running, but there’s a chance that it’s running and has not
opened the tty yet.

I think we should use another implementation that doesn’t have this
problem (agetty?).  Given that mingetty.c is 400 lines, we might as well
do it in Scheme.

Ludo’.

Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Thu, 07 Dec 2017 09:19:02 GMT) Full text and rfc822 format available.

Notification sent to Chris Marusich <cmmarusich <at> gmail.com>:
bug acknowledged by developer. (Thu, 07 Dec 2017 09:19:02 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: 23194-done <at> debbugs.gnu.org
Subject: Re: bug#23194: Benign error in installation image: "stty: standard
 input: Input/output error"
Date: Thu, 07 Dec 2017 10:18:16 +0100
Hi Chris,

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

> Chris Marusich <cmmarusich <at> gmail.com> skribis:
>
>> In the installation image for GuixSD v0.10.0, I get some I/O errors on
>> the terminal just before/during/after the MOTD is displayed:
>>
>> "stty: standard input: Input/output error"
>
> These appear to come from the ‘unicode_start’ command, run by the
> ‘console-font’ services.  ‘unicode_start’ is a shell script in the ‘kbd’
> package that does:
>
>   stty iutf8
>
> In a ‘guix system vm gnu/system/install.scm’ VM in current master, I
> sometimes get a different message:
>
>   unicode_start skipped on not a tty
>
> The “not a tty” string comes from the ‘tty’ command (Coreutils).  We get
> it when:
>
>   ttyname (STDIN_FILENO);
>
> returns NULL; this can happen if ‘tcgetattr’ returns NULL (see ttyname.c
> in libc.)

I’m happy to say that this is fixed in the 0.14.0 installation image:

  https://git.savannah.gnu.org/cgit/guix.git/commit/?h=version-0.14.0&id=787e8a80d54d8bd5320d76276dc5f4bafe5b86c0

We now use our ‘tcsetattr’ bindings directly instead of invoking
‘unicode_start’.  Additionally, we wait until the TTY really exists
(i.e., mingetty has become its session leader) by checking the return
value of ‘ttyname’.

Ludo’.




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

This bug report was last modified 6 years and 124 days ago.

Previous Next


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