Bug 279260 - 1 byte file makes kmail2 not display any emails in a folder
Summary: 1 byte file makes kmail2 not display any emails in a folder
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-03 06:44 UTC by S. Burmeister
Modified: 2015-09-11 12:32 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description S. Burmeister 2011-08-03 06:44:13 UTC
Version:           unspecified
OS:                Linux

Preliminary bug: kmail2/akonadi create 1 byte files in mail directories.

Those files cause kmail2 to not show any emails for that folder. The "loading" overlay icon keeps on spinning forever.

Taken from bug 263223 which is actually a different issue.

"I run akonadiconsole and got this output when clicking on the KMail folder:

posting retrieval request for item 63748  there are  1  queues and  0  items in
mine 
processing retrieval request for item 63748  parts: ("ENVELOPE")  of resource:
"akonadi_mixedmaildir_resource_1" 
request for item 63748 still pending - waiting 
akonadi_mixedmaildir_resource_1(29349)/akonadiresource (maildir): Failed to
read item "{869a924c-06ab-4538-97df-bbd3cffb991b}" in Maildir
"/home/mcv/Mail/inbox" 
akonadi_mixedmaildir_resource_1(29349)/akonadiresource (maildir): "Error while
reading mails from folder " 
continuing 
request for item 63748 "{869a924c-06ab-4538-97df-bbd3cffb991b}" failed:
"Resource was unable to deliver item" 
ItemRetrieverException :  Resource was unable to deliver item


Actually there is a file named like above (in ~/Mail/inbox/new), but it's only
one byte long, hexedit shows: 0x0a."



Reproducible: Always

Steps to Reproduce:
Create a 1 byte file in a local mail directory
alternative: find out how akonadi/kmail2 manages to do so

Actual Results:  
kmail2 does not display any emails in that folder

Expected Results:  
do not create 1 byte files
ignore 1 byte files and display the folder's content
Comment 1 Christophe Marin 2011-08-03 10:00:38 UTC
You also see this behaviour with the mixedmaildir resource ?
Comment 2 S. Burmeister 2011-08-03 16:15:49 UTC
(In reply to comment #1)
> You also see this behaviour with the mixedmaildir resource ?

In my case it's mixed maildir as well, i.e. my kmail folders resource.
Comment 3 auxsvr 2011-09-08 11:35:11 UTC
I imported every folder from Kmail1 to Kmail2 except for one, for which akonadi was issuing an error message. Moving emails to it was possible, yet all the old ones were inaccessible. I came across this report today, which lead me to search for irregular files in the directory, and found one old, empty file. After  removing it, the folder works fine in kmail2.
Comment 4 Wolfgang Rohdewald 2013-02-28 01:47:35 UTC
I can confirm this with current master. The folder only shows one mail without subject until I remove that one byte file again. I named it x, kmail renamed it to x:2,S
Comment 5 Wolfgang Rohdewald 2013-03-03 18:39:37 UTC
now I cannot reproduce it anymore. I went back, compiling an old akonadi server and tag v4.10.0 for kdepim, kdepimlibs, kdepim-runtime, but I still cannot reproduce it - should have debugged it right away.
Comment 6 Martin Steigerwald 2015-09-11 12:32:32 UTC
Sven, thank you for your report. As I haven´t seen 1-byte sized files since May 2013 and Wolfgang also cannot reproduce it anymore while I have seen some before, I am closing this. Feel free to reopen if it still happens for you. Please try to find a pattern that reproduces it and describe it step by step.