[Bug 44378] sent-mail folder corruption when appending mails (solaris, nfs)

Matthias Grossmann matthias.grossmann at informatik.uni-stuttgart.de
Sat Apr 26 11:19:20 BST 2008

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

------- Additional Comments From matthias.grossmann informatik uni-stuttgart de  2008-04-26 12:19 -------
The attached file kmailtest.cpp contains a code snippet from 
KMFolderMbox::addMsg (kmfoldermbox.cpp) with some debug output. Test run on 

matthias kermit:~/Programmieren/c++/test$ echo Test > test.mbox
matthias kermit:~/Programmieren/c++/test$ ./kmailtest
1: 5
2: 3
3: 5 740a
4: 6
matthias kermit:~/Programmieren/c++/test$ cat test.mbox

matthias kermit:~/Programmieren/c++/test$

This works as expected. Test run on Solaris:

matthias statler:~/Programmieren/c++/test$ echo Test > test.mbox
matthias statler:~/Programmieren/c++/test$ ./kmailtest 
1: 5
2: 3
3: 5 740a
4: -8184
matthias statler:~/Programmieren/c++/test$ cat test.mbox 

matthias statler:~/Programmieren/c++/test$ 

Shows the last-char-duplicated-behavior. The result of the last call to 
ftell() looks invalid. I think the reason is that a fread() on mStream is 
directly followed by fwrite(), and that Solaris requires a file positioning 
function between them as described in the fopen man page. Enabling the no-op 
fseek in kmailtest.cpp makes the test program work on Solaris as expected.

I ran the tests in local directories as well as NFS mounted ones. The results 
are the same, so this problem does not appear to be NFS specific.

More information about the Kdepim-bugs mailing list