[Bug 161457] New: kmail crashes when creating maildir folder on cifs mounted filesystem

Peter Parzer peter.parzer at med.uni-heidelberg.de
Wed Apr 30 10:06:42 BST 2008


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=161457         
           Summary: kmail crashes when creating maildir folder on cifs
                    mounted filesystem
           Product: kmail
           Version: 1.9.9
          Platform: Ubuntu Packages
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kdepim-bugs kde org
        ReportedBy: peter.parzer med uni-heidelberg de


Version:           1.9.9 (using KDE 3.5.9)
Installed from:    Ubuntu Packages
OS:                Linux

Looking at the strace it seems that kmail tries to rename a file to the name of an allready opened file. On the local file system this seem to work, but on an cifs mounted filesystem this doesn't. Kmail continues without checking for errors and crashes.

Here is my analysis of the strace:

# open .inbox.index (fd=13)

open("/home/parzerpeter/.kde/share/apps/kmail/mail/.inbox.index", O_RDWR|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 13
utime("/home/parzerpeter/.kde/share/apps/kmail/mail/inbox", NULL) = 0
utime("/home/parzerpeter/.kde/share/apps/kmail/mail/.inbox.index", NULL) = 0
utime("/home/parzerpeter/.kde/share/apps/kmail/mail/.inbox.index.ids", NULL) = -1 ENOENT (No such file or directory)
umask(022)                              = 077
fcntl64(13, F_SETFD, FD_CLOEXEC)        = 0
unlink("/home/parzerpeter/.kde/share/apps/kmail/mail/.inbox.index.temp") = -1 ENOENT (No such file or directory)
utime("/home/parzerpeter/.kde/share/apps/kmail/mail/inbox", NULL) = 0
umask(077)                              = 022

# open .inbox.index.temp (fd=14), .inbox.index is still open

open("/home/parzerpeter/.kde/share/apps/kmail/mail/.inbox.index.temp", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 14
umask(022)                              = 077
fstat64(14, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap2(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb550e000
write(14, "# KMail-Index V1506\n\0\10\0\0\0xV4\22\4\0\0"..., 33) = 33
_llseek(14, 0, [33], SEEK_CUR)          = 0
fsync(14)                               = 0

# close .inbox.index.temp

close(14)                               = 0
munmap(0xb550e000, 16384)               = 0

# rename .inbox.index.temp to .inbox.index, this fails since
# .inbox.index is still open

rename("/home/parzerpeter/.kde/share/apps/kmail/mail/.inbox.index.temp", "/home/parzerpeter/.kde/share/apps/kmail/mail/.inbox.index") = -1 EINVAL (Invalid argument)

# rename fails, maybe because .inbox.index is open,
# finally close .inbox.index, could have done before 
# trying to rename .inbox.index.temp to .inbox.index

close(13)                               = 0
open("/home/parzerpeter/.kde/share/apps/kmail/mail/.inbox.index", O_RDWR|O_LARGEFILE) = -1 ENOENT (No such file or directory)

# open fails, because .inbox.index is vanished, this is a bug
# in cifs which is also involved here, ignore all return codes
# and continue

--- SIGSEGV (Segmentation fault) @ 0 (0) ---



More information about the Kdepim-bugs mailing list