Bug 68272

Summary: Unable to delete messages in mutt
Product: [Retired] Red Hat Public Beta Reporter: W. Michael Petullo <redhat>
Component: muttAssignee: Bill Nottingham <notting>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: limboCC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-07-09 16:05:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description W. Michael Petullo 2002-07-08 19:54:00 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/20020625

Description of problem:
When I try to quit mutt after I mark a message for deletion, mutt prints the
following error:

Write failed!  Saved partial mailbox to /tmp/mutt.xxxx-xxxx-xxxx



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


How reproducible:
Always

Steps to Reproduce:
1.  Run mutt.
2.  Tag a message to be deleted
3.  Quit mutt.
	

Actual Results:  The message is not deleted; mutt says:

Write failed!  Saved partial mailbox to /tmp/mutt.xxxx-xxxx-xxxx

Expected Results:  The message should be deleted, updating the corresponding
mailbox.

Additional info:

The problem seems to be in the file mbox.c.  Around line mbox.c:908, several
checks are made to ensure the mailbox is sane:

[...]
if (fseek (ctx->fp, offset, SEEK_SET) != 0 ||  /* seek the append location */      
      /* do a sanity check to make sure the mailbox looks ok */
      fgets (buf, sizeof (buf), ctx->fp) == NULL ||
      (ctx->magic == M_MBOX && mutt_strncmp ("From ", buf, 5) != 0) ||
      (ctx->magic == M_MMDF && mutt_strcmp (MMDF_SEP, buf) != 0) ||
      (ctx->magic == M_KENDRA && mutt_strcmp (KENDRA_SEP, buf) != 0))
[...]

The fgets in this check fails on my system.  If I stick a perror in the code
following the fgets, it prints "No such file or directory."  Because this check
fails, i is set to -1, causing the error message to be printed around line
mbox.c:962.

This "No such file or directory" error from fgets is strange.  None of the other
operations on ctx->fp fail, including the open operations.  Could there be a bug
in glibc?  Probably not.

I am having more trouble finding the source of this problem than I expected.  I
will update this bug report as I discover more.

Comment 1 W. Michael Petullo 2002-07-08 19:57:02 UTC
I still have these problems if I downgrade the mutt rpm on my system from the
limbo version (which has never worked) to the 7.3 version (which used to work
with 7.3).  This seems to support my theory that the problem is in a library
(glibc?), not mutt.

Comment 2 W. Michael Petullo 2002-07-09 08:00:41 UTC
Same as bug 67552, which has had more activity.

Comment 3 W. Michael Petullo 2002-07-09 16:05:33 UTC
I downgraded to 7.3's glibc, 2.2.5, and mutt now works fine.  Everything on my
system is limbo now except for glibc, glibc-common, and glibc-devel.

Comment 4 Bill Nottingham 2002-07-09 19:35:23 UTC

*** This bug has been marked as a duplicate of 67552 ***