Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug: ZSH crashes upon receiving SIGINT
- X-seq: zsh-workers 34696
- From: John <da_audiophile@xxxxxxxxx>
- To: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>, "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Re: Bug: ZSH crashes upon receiving SIGINT
- Date: Tue, 10 Mar 2015 22:06:12 +0000 (UTC)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1426025177; bh=On8kvSGIknxfIdnDnuuEcI9LCqL0JwpGEClBxNJzHSM=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=X+ICZ2xwhaFF2jVlT7UlPfMvtXi/GCZXcwjx5KISZimxxvTLQaHw9niEsFKiITJrp7bk0/5cb/KhBpdeOyCPQl0xHaNK7xtXLvxv2hNPHK10PKX4jQ4XcqBRAvolosqkpBIbp8//PsylC+/7Ml8pP96YZLB6KAUzEDL3UevEFE5cEjTZ8gcDFMfrvJEradlISxWlYaqn5uXF0CmStJbRsHz/EY259OmvYMd3iDcTuOT8ye3tBkiDjDxZgPYLngveFzTu4A0evXEtQWQ4q3O+nzt0EBrC6u3zaFbyDVlfot4gFuLlan3NMwwJ918rXFPFfmmtb59ypkikqTyOD6Rlpg==
- In-reply-to: <20150310104653.181bd618@ntlworld.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20150310104653.181bd618@ntlworld.com>
- Reply-to: John <da_audiophile@xxxxxxxxx>
----- 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author