Bug 138620 - /bin/mail panics and core dumps when /tmp full.
/bin/mail panics and core dumps when /tmp full.
Product: Fedora
Classification: Fedora
Component: mailx (Show other bugs)
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Ivana Varekova
Depends On:
  Show dependency treegraph
Reported: 2004-11-10 05:11 EST by James Hunt
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-08-31 09:17:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description James Hunt 2004-11-10 05:11:06 EST
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):

How reproducible:

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 11:00:37 EDT
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 05:49:28 EDT
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 09:17:05 EDT
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.