Bug 138620 - /bin/mail panics and core dumps when /tmp full.
Summary: /bin/mail panics and core dumps when /tmp full.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: mailx
Version: 4
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
Assignee: Ivana Varekova
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-11-10 10:11 UTC by James Hunt
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-08-31 13:17:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description James Hunt 2004-11-10 10:11:06 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7)
Gecko/20040808 Firefox/0.9.3

Description of problem:
If the /tmp filesystem is full, running /bin/mail when you _do_ have
mails in your mail spool file results in the following:

# /bin/mail
panic: Message temporary file corrupted
Abortado (core dumped)
# 


Version-Release number of selected component (if applicable):
mailx-8.1.1-32

How reproducible:
Always

Steps to Reproduce:
1. echo a mail|mail root
2. dd if=/dev/zero of=/tmp/large_file
3. /bin/mail
    

Actual Results:  Got a core file generated in current directory (not
in /tmp).


Expected Results:  I expected mail to handle the situation gracefully
- if the copy of the mail spool file in /tmp/ is zero size or
non-existent, or not parsable (if it was truncated), /bin/mail should
display a sensible error message and exit with a non-zero exit code.

Additional info:

If nothing else, I suggest changing the message from:

    "panic: Message temporary file corrupted"

... to something like:

    "panic: Message temporary file (/tmp/wibble) corrupted, missing or
zero size."

where /tmp/wibble should be replaced with the name of the temporary
mail spool file that /bin/mail was attempting to read. This would give
the user a pointer to go and check out /tmp. The current error message
doesn't provide anything like enough detail.

Comment 1 Matthew Miller 2005-04-26 15:00:37 UTC
Fedora Core 2 is now maintained by the Fedora Legacy project for
security updates only. If this problem is a security issue, please
reopen and reassign to the Fedora Legacy product. If it is not a
security issue and hasn't been resolved in the current FC3 updates or
in the FC4 test release, reopen and change the version to match.

Comment 2 James Hunt 2005-06-17 09:49:28 UTC
Problem still occurs in FC3 and FC4. Interestingly, problem is not seen if
running as root, maybe because extra inodes/space are reserved for root when a
partition is at "100%"??



Comment 3 Ivana Varekova 2005-08-31 13:17:05 UTC
Hello, 
thank you for your notice.
Mailx error message "Message temporary file corrupted" looks right. This error
message describes problem quite enough (tmp file was created - so this file is
not missing, but the problem is its content, this file must not have zero size -
but it is possible). 


Note You need to log in before you can comment on or make changes to this bug.