Subject: bin/4644: /usr/bin/Mail cores at exit when new mail arrived while running
To: None <gnats-bugs@gnats.netbsd.org>
From: Ken Wellsch <kwellsch@link.link-systems.com>
List: netbsd-bugs
Date: 12/05/1997 09:58:55
>Number:         4644
>Category:       bin
>Synopsis:       /usr/bin/Mail cores at exit when new mail arrived while running
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec  5 07:05:01 1997
>Last-Modified:
>Originator:     Ken Wellsch
>Organization:
Link-Systems International Inc.
>Release:        NetBSD 1.3_BETA (from Dec 3 tar_files)
>Environment:
i386 (Dell P6/200 box)
System:		NetBSD antigone 1.3_BETA NetBSD 1.3_BETA (ANTIGONE) #0: Thu Dec  4 00:53:45 EST 1997     kwellsch@antigone:/usr/src/sys/arch/i386/compile/ANTIGONE i386


>Description:

For folks that choose to use the trusty old "mail" command, if you are
using it to read your mail, new mail arrives, then on exit from the mail
command it faults, and the worse part is that it leaves the lock file
in place (which users tend not to know about).

>How-To-Repeat:

With something in your mailbox, go into "mail".  Then elsewhere, send
yourself an e-mail message.  I presume that if you're making changes
to the mailbox, e.g. as I do below by deleting, then trying to resolve
the differing mailboxes is blowing mail away.  On exit what you see below
happens and seems to be easy to reproduce (I've done so twice now).

% mail
Mail version 8.1 6/6/93.  Type ? for help.
"/var/mail/kwellsch": 1 message 1 new
>Fix:

I suppose should try it with an unstrip'ed binary and do a traceback to
see if there is anything useful to be found at the place it is faulting.
>Audit-Trail:
>Unformatted:
& dp
No more messages
& q
New mail has arrived.
Segmentation fault (core dumped)

% uname -a
NetBSD antigone 1.3_BETA NetBSD 1.3_BETA (ANTIGONE) #0: Thu Dec  4 00:53:45 EST 1997     kwellsch@antigone:/usr/src/sys/arch/i386/compile/ANTIGONE i386
%