zsh-workers
 help / color / mirror / code / Atom feed
From: John <da_audiophile@yahoo.com>
To: Peter Stephenson <p.w.stephenson@ntlworld.com>,
	 "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: Bug: ZSH crashes upon receiving SIGINT
Date: Tue, 10 Mar 2015 22:06:12 +0000 (UTC)	[thread overview]
Message-ID: <1396169464.3080953.1426025172139.JavaMail.yahoo@mail.yahoo.com> (raw)
In-Reply-To: <20150310104653.181bd618@ntlworld.com>





----- Original Message -----
> 
> From the report below it's obviously something more specific than this
> that's happening.
> 
>>  How to trigger the bug:
>>  1) Mount an Arch partition and install 'zsh' within it
>>  2) Execute the chroot command from another Arch env: arch-chroot
>>  /mnt/mini /bin/zsh
>>  3) Hit ctrl+c in the chroot
> 
> I'm afraid the fact this description appears to be specific to that
> distro and it looks like a lot of setting up of the chroot partition is
> presupposed, so it's unlikely anyone on this list who can actually help
> debug this is going to be able to reproduce it in this form.
> Nonetheless, it does look like we have enough information at least to
> start making suggestions, so if you're able to do a bit of further
> prodding it's not hopeless...
> 

Firstly, thank you for your thoughtful reply.

Yes, I didn't think I would be fortunate enough to have one of you guys running Arch Linux.  If you have a spare partition free, you can just boot from the live CD (www.archlinux.org) and execute a few commands to have an Arch partition only for the purpose of seeing this bug/troubleshooting.  If this is acceptable to you, I am glad to distill down exactly what you would type to do this.  Please let me know.

>>  # arch-chroot /mnt/mini /bin/zsh
>> 
>>  #
>>  <<hit ctrl-c>>
>>  # umount: /mnt/mini/dev/pts: target is busy
>>  (In some cases useful info about processes that
>>  use the device is found by lsof(8) or fuser(1).)
>>  umount: /mnt/mini/dev: target is busy
>>  (In some cases useful info about processes that
>>  use the device is found by lsof(8) or fuser(1).)
>>  %
>>  zsh: error on TTY read: Input/output error
> 
> Is that ^C happening at the command line, i.e. when no other
> programme than the shell is running?  That's how I read the above, but
> it would be good to be explicit.

Yes, that is correct.  Upon running the first line (arch-chroot ...) the chroot binary is called and the next prompt is INSIDE the partition target (/mnt/mini in my example).  You can run commands inside the chroot just fine, but it breaks if you hit ctrl+c as I have denoted with the <<hit ctrl-c>> which probably wasn't very obvious without this explanation.

> In that case, what does the umount stuff mean?  That's certainly got
> nothing to do with the shell's internal response to a Ctrl-C.

The umount and subsequent lines are all thrown when you hit ctrl+c.

> The error at the end comes from a specific point in the shell line
> editor: if it finds it can't read from the TTY, and the error isn't one
> of the small number it thinks are recoverable, it will exit.  In this
> case the error appears to be EIO.  So this certainly ties in with the
> behaviour you're seeing.
> 
> The question is where this error is coming from and it looks pretty
> likely it's somehow associated with that "umount 
> /mnt/mini/dev/pts" as
> that looks like an attempt to remove the devices providing the ttys (I'm
> guessing as is this is system stuff I don't know about).  The unmount
> may have failed but may also have left the tty in a bad state.  I think
> we need to know what's going on here.

I agree with you.  Most of the arch-chroot script is over my head.  I have linked it here if the code within is meaningful and if you have the time to read through it.  It is only 309 lines: http://pastebin.com/yDyuqxqi

<snip>

I'm afraid the comments from Dave in the Arch Linux bug report (https://bugs.archlinux.org/task/44073) are all I have to go on as to root cause.  I am happy to try to troubleshoot if you do not want to try to make a simple Arch partition on your system and try yourself from the live CD.  Please let me know and thanks again.


  parent reply	other threads:[~2015-03-10 22:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09 17:46 John
2015-03-10 10:46 ` Peter Stephenson
2015-03-10 11:16   ` Peter Stephenson
2015-03-10 22:06   ` John [this message]
2015-03-11  0:43     ` Bart Schaefer
2015-03-11  9:44       ` Peter Stephenson
2015-03-11 19:55         ` Peter Stephenson
2015-03-11 18:38       ` John
2015-03-11 20:09         ` Peter Stephenson
2015-03-11 23:23           ` John
2015-03-11 23:31             ` Bart Schaefer
2015-03-11 23:47               ` John
2015-03-12  5:11                 ` Andrew Janke
2015-03-12 19:06                   ` John
2015-03-12 19:58                 ` Peter Stephenson
2015-03-13  4:00                   ` Bart Schaefer
2015-03-13  6:44       ` Han Pingtian

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1396169464.3080953.1426025172139.JavaMail.yahoo@mail.yahoo.com \
    --to=da_audiophile@yahoo.com \
    --cc=p.w.stephenson@ntlworld.com \
    --cc=zsh-workers@zsh.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.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).