Bug 227565 - shells/zsh 5.5: core dump during serial login
Summary: shells/zsh 5.5: core dump during serial login
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Baptiste Daroussin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-16 22:15 UTC by pvoigt
Modified: 2018-04-23 07:34 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (bapt)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pvoigt 2018-04-16 22:15:18 UTC
Two days ago I upgraded shells/zsh to version 5.5 on my FreeBSD 11.1-RELEASE-p9
(amd64) machine.

During a login over serial line (wired or IPMI-SOL) I am immediately
kicked out after a successful login. Syslogd shows:

<kern.info> xxx kernel: pid xxx (zsh), uid 0: exited on signal 8 (core dumped)
 
I immediately downgraded to zsh-5.4.2_1 and the error disappeared.
Comment 1 Jeremy Chadwick 2018-04-18 23:10:31 UTC
5.5 release commit: https://github.com/zsh-users/zsh/commit/f9e9dce5443f323b340303596406f9d3ce11d23a
5.5.1 release commit: https://github.com/zsh-users/zsh/commit/fd4056f4edb12000ac5b0181aef8bb741e60801c

You can dig through the delta commits to see what changed, but this is almost certainly the commit that fixes the problem:

https://github.com/zsh-users/zsh/commit/68d9526220d77466a75928fc6a20008cf64e0590

In my experience, on serial console (thus also IPMI serial), terminal size is 0x0.  I believe stty -a used to show this, as I remember having to manually run 'stty rows Y columns X' manually when on serial console.  There may be tput/etc. stuff that can figure this out, but doing that automatically is not always reliable/dangerous (i.e. shouldn't be in dotfiles by default, especially considering that it shouldn't be run for non-interactive sessions).  Not all serial consoles/multiplexers are the same.

HTH, and provides a most-likely root cause commit.

P.S. -- I do not use zsh, I just know a lot about serial terminals.  :)
Comment 2 pvoigt 2018-04-19 17:20:42 UTC
(In reply to Jeremy Chadwick from comment #1)
Thank you very much for your detailed analysis.

In a parallel way I have been told by Baptiste via the mailing list that he could not reproduce (anymore) the error with version 5.5.1. He asked me to test myself.

Meanwhile, I could have tested version 5.5.1 and can confirm that the error has been fixed.