[Dovecot] Segmentation Fault in doveadm move under Solaris 10
Hi all
I want to move mails from folder test-ein to another folder test-aus
with the new "doveadm move" command in dovecot 2.0.12. When I try the
following I get a "Segmentation Fault" after the mail was copied to
the new folder:
# doveadm -v -f flow search -u g033 mailbox test-ein all 56779e33a911b84db22900005451a966 1
# doveadm -v -f flow search -u g033 mailbox test-aus all
# doveadm -v -f flow move -u g033 test-aus mailbox test-ein all Segmentation Fault
# doveadm -v -f flow search -u g033 mailbox test-aus all 57779e33a911b84db22900005451a966 26
# doveadm -v -f flow search -u g033 mailbox test-ein all 56779e33a911b84db22900005451a966 1
The mail now is in both the source folder and the destination folder.
With truss under Solaris 10 we can see what happens (only the last few
lines are shown):
open64("/home/hrz/g033/Mail/test-ein", O_RDWR) = 12
fstat64(12, 0xFFBFEBA0) = 0
time() = 1303911414
alarm(5) = 0
fcntl(12, F_SETLKW64, 0xFFBFED38) = 0
alarm(0) = 5
stat64("/home/hrz/g033/Mail/test-ein", 0xFFBFEF80) = 0
stat64("/home/hrz/g033/Mail/.imap/test-ein/dovecot.index.log", 0xFFBFEA28) = 0
pread64(11, 0x00083090, 8192, 4440) = 0
stat64("/home/hrz/g033/Mail/.imap/test-ein/dovecot.index.log", 0xFFBFEEC0) = 0
pread64(11, 0x00083090, 8192, 4440) = 0
fstat64(12, 0xFFBFF1F0) = 0
brk(0x00092498) = 0
brk(0x00094498) = 0
pread64(12, " F r o m O l i v e r .".., 8192, 0) = 5135
open("/var/run/tzsync", O_RDONLY) = 13
mmap(0x00000000, 4, PROT_READ, MAP_SHARED, 13, 0) = 0xFF250000
close(13) = 0
brk(0x00094498) = 0
brk(0x00096498) = 0
open("/usr/share/lib/zoneinfo/MET", O_RDONLY) = 13
fstat64(13, 0xFFBFEE68) = 0
read(13, " T Z i f\0\0\0\0\0\0\0\0".., 765) = 765
close(13) = 0
stat64("/home/hrz/g033/Mail/.imap/test-ein/dovecot.index.log", 0xFFBFEE58) = 0
pread64(11, 0x00083090, 8192, 4440) = 0
brk(0x00096498) = 0
brk(0x00098498) = 0
open64("/home/hrz/g033/Mail/.imap/test-ein/dovecot.index.cache", O_RDWR) = 13
fstat64(13, 0xFFBFF060) = 0
mmap64(0x00000000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON,
-1, 0) = 0xFEC90000
pread64(13, "01\b\0\0 MB811C2 MB811C2".., 8192, 0) = 8192
pread64(13, "808080D0\0\0011F\0\0\0\r", 12, 32) = 12
pread64(13, "80808998\0\001 8\0\0\00E", 12, 320) = 12
pread64(13, "80808DB6\0\001 N\0\0\00F", 12, 4704) = 12
pread64(13, "\0\0\0\0\0\002A1\0\0\01D", 12, 6872) = 12
pread64(13, "01\b\0\0 MB811C2 MB811C2".., 8192, 0) = 8192
pread64(13, " c h r i c h t " " q u".., 8192, 24576) = 8192
pread64(13, "\0\0\0\0\0\0\0\0\0\0\0\0".., 8192, 32768) = 8192
pread64(13, " l e r " < K a r l - H".., 8192, 8192) = 8192
time() = 1303911414
time() = 1303911414
time() = 1303911414
lstat64("/home/hrz/g033/Mail/test-aus.lock", 0xFFBFED28) Err#2 ENOENT
open64("/home/hrz/g033/Mail/test-aus.lock", O_RDWR|O_CREAT|O_EXCL, 0666) = 14
write(14, " 8 8 2 2 : f t p s e r v", 12) = 12
fdsync(14, FDSYNC) = 0
fstat64(14, 0xFFBFEE68) = 0
close(14) = 0
lstat64("/home/hrz/g033/Mail/test-aus.lock", 0xFFBFEFC8) = 0
open64("/home/hrz/g033/Mail/test-aus", O_RDWR) = 14
fstat64(14, 0xFFBFEF40) = 0
time() = 1303911414
alarm(5) = 0
fcntl(14, F_SETLKW64, 0xFFBFF120) = 0
alarm(0) = 5
stat64("/home/hrz/g033/Mail/test-aus", 0xFFBFF208) = 0
stat64("/home/hrz/g033/Mail/.imap/test-aus/dovecot.index.log", 0xFFBFECF0) = 0
pread64(9, 0x0007622C, 8192, 8484) = 0
stat64("/home/hrz/g033/Mail/test-aus", 0xFFBFEF38) = 0
stat64("/home/hrz/g033/Mail/.imap/test-aus/dovecot.index.log", 0xFFBFE9E0) = 0
pread64(9, 0x0007622C, 8192, 8484) = 0
stat64("/home/hrz/g033/Mail/.imap/test-aus/dovecot.index.log.2",
0xFFBFEBF8) Err#2 ENOENT
alarm(180) = 0
fcntl(9, F_SETLKW64, 0xFFBFEBA0) = 0
alarm(0) = 180
time() = 1303911414
rmdir("/home/hrz/g033/Mail/.imap/test-aus") Err#17 EEXIST
stat64("/home/hrz/g033/Mail/.imap/test-aus/dovecot.index.log", 0xFFBFECF8) = 0
pread64(9, 0x0007622C, 8192, 8484) = 0
time() = 1303911414
fcntl(9, F_SETLK64, 0xFFBFED68) = 0
stat64("/home/hrz/g033/Mail/.imap/test-aus/dovecot.index.log", 0xFFBFEE10) = 0
pread64(9, 0x0007622C, 8192, 8484) = 0
fstat64(14, 0xFFBFF208) = 0
llseek(14, 5671, SEEK_SET) = 5671
read(14, "\n", 1) = 1
fstat64(14, 0xFFBFF208) = 0
brk(0x00098498) = 0
brk(0x0009A498) = 0
brk(0x0009A498) = 0
brk(0x0009C498) = 0
brk(0x0009C498) = 0
brk(0x0009E498) = 0
open64("/home/hrz/g033/Mail/.imap/test-aus/dovecot.index.cache", O_RDWR) = 15
fstat64(15, 0xFFBFEF28) = 0
mmap64(0x00000000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON,
-1, 0) = 0xFEC80000
pread64(15, "01\b\0\0 MB811D4 MB811D4".., 8192, 0) = 8192
pread64(15, "808080D0\0\0011F\0\0\0\r", 12, 32) = 12
pread64(15, "80808998\0\001 8\0\0\00E", 12, 320) = 12
pread64(15, "80808DBA\0\001 N\0\0\00F", 12, 4704) = 12
pread64(15, "\0\0\0\0\0\002A1\0\0\01D", 12, 6888) = 12
pread64(15, "01\b\0\0 MB811D4 MB811D4".., 8192, 0) = 8192
brk(0x0009E498) = 0
brk(0x000A0498) = 0
pread64(12, " X - S p a m - C h e c k".., 8192, 65) = 5070
brk(0x000A0498) = 0
brk(0x000A2498) = 0
brk(0x000A2498) = 0
brk(0x000AA498) = 0
pread64(12, 0x00092D26, 3122, 5135) = 0
pread64(12, 0x00092D26, 3122, 5135) = 0
pread64(12, 0x00092D26, 3122, 5135) = 0
pread64(12, 0x00092D26, 3122, 5135) = 0
pread64(12, 0x00092D26, 3122, 5135) = 0
pread64(12, 0x00092D26, 3122, 5135) = 0
write(14, " F r o m O l i v e r .".., 5101) = 5101
pwrite64(14, "\n C o n t e n t - L e n".., 21, 7666) = 21
pread64(12, 0x00092D26, 3122, 5135) = 0
Incurred fault #6, FLTBOUNDS %pc = 0xFEE32370
siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
Received signal #11, SIGSEGV [default]
siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
Greetings, Juergen
Hochschulrechenzentrum der | Mail: Juergen.Obermann@hrz.uni-giessen.de Justus-Liebig-Universitaet | WWW: http://www.uni-giessen.de/obermann/ Heinrich-Buff-Ring 44 | Tel: 0641-99-13054 (0641-99-13001) D-35392 Giessen, Germany | Fax: 0641-99-13009
On 27.4.2011, at 17.03, Jürgen Obermann wrote:
# doveadm -v -f flow move -u g033 test-aus mailbox test-ein all Segmentation Fault
Can you get gdb backtrace?
gdb --args doveadm -v ... run bt full
Or if that doesn't produce valid output:
ulimit -c unlimited doveadm -v ... gdb doveadm core bt full
If you don't have gdb, I guess dbx backtrace works too, but I'm not entirely sure how that thing works.
Quoting Timo Sirainen <tss@iki.fi>:
On 27.4.2011, at 17.03, Jürgen Obermann wrote:
# doveadm -v -f flow move -u g033 test-aus mailbox test-ein all Segmentation Fault
Can you get gdb backtrace?
gdb --args doveadm -v ... run bt full
Or if that doesn't produce valid output:
ulimit -c unlimited doveadm -v ... gdb doveadm core bt full
If you don't have gdb, I guess dbx backtrace works too, but I'm not
entirely sure how that thing works.
I compiled with Suns Studio compiler so there are no symbols, but I
hope this helps a bit anyway:
# gdb --args doveadm -v -f flow move -u g033 test-aus mailbox test-ein all
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.8"...
(gdb) run
Starting program: /usr/local/etc/doveadm -v -f flow move -u g033
test-aus mailbox test-ein all
Program received signal SIGSEGV, Segmentation fault.
0xfee32370 in strlen () from /lib/libc.so.1
(gdb) bt full
#0 0xfee32370 in strlen () from /lib/libc.so.1
No symbol table info available.
#1 0xff29a9a8 in mail_generate_guid_128_hash () from
/opt/local/lib/dovecot/libdovecot-storage.so.0
No symbol table info available.
#2 0xff2c2088 in index_mail_expunge () from
/opt/local/lib/dovecot/libdovecot-storage.so.0
No symbol table info available.
#3 0x0001af1c in cmd_move_run ()
No symbol table info available.
#4 0x00016778 in doveadm_mail_next_user ()
No symbol table info available.
#5 0x00016844 in doveadm_mail_single_user ()
No symbol table info available.
#6 0x00016c5c in doveadm_mail_cmd ()
No symbol table info available.
#7 0x000172b4 in doveadm_mail_try_run ()
No symbol table info available.
#8 0x0001db28 in main ()
No symbol table info available.
(gdb) quit
The program is running. Exit anyway? (y or n) y
-- Hochschulrechenzentrum der | Mail: Juergen.Obermann@hrz.uni-giessen.de Justus-Liebig-Universitaet | WWW: http://www.uni-giessen.de/obermann/ Heinrich-Buff-Ring 44 | Tel: 0641-99-13054 (0641-99-13001) D-35392 Giessen, Germany | Fax: 0641-99-13009
On Wed, 2011-04-27 at 16:53 +0200, Jürgen Obermann wrote:
#0 0xfee32370 in strlen () from /lib/libc.so.1 No symbol table info available. #1 0xff29a9a8 in mail_generate_guid_128_hash () from
/opt/local/lib/dovecot/libdovecot-storage.so.0 No symbol table info available. #2 0xff2c2088 in index_mail_expunge () from
I wonder if I just happened to fix it today: http://hg.dovecot.org/dovecot-2.0/rev/36025cbfec3b
participants (2)
-
Jürgen Obermann
-
Timo Sirainen