Hi all!

Seeing that dbmail-2.1.0 was out I couldn't resist to immediately try it out 
and upgrade from my previous 2.0.3 :-)

At first, everything went smooth: shut down the DB, make a backup, add header 
tables, restart DB.

After that, just to be on the safe side, I ran "dbmail-util -a -v" which found 
nothing wrong except lots of incorrect is_header flags and uncached 
physmessages. I assumed that these came up due to the changes in version 
2.1.0.

On running "dbmail-util -a -v -y" the incorrect is_header flags were all 
corrected but then dbmail-util received a segfault:

-------- snipped from a later run ----------
[...]
Deleting messages with DELETE status...
Ok. [0] messages deleted.

Repairing DBMAIL for incorrect is_header flags...
Ok. Found [0] incorrect is_header flags.
--- checking is_header flags took 0 seconds

Repairing DBMAIL for cached header values...
Ok. Found [4491] un-cached physmessages.
Segmentation fault
-------- snip ----------

An strace reveals that, when repairing the uncached physmessages, dbmail-util 
pulls the first message from the DB and then crashes. The last query issued 
is:

SELECT messageblk FROM dbmail_messageblks WHERE physmessage_id = '94' AND 
is_header = '1'

It seems that dbmail-utils correctly receives the reply:

recv(3, "[bla bla bla]"..., 16384, 0) = 1677   (which is the correct size)

For the subsequent events see below for an strace excerpt.

I am quite puzzled: did I actually find a bug (would be my first time *g*) or 
am I missing something obvious? Interestingly, IMAP and LMTP access work 
flawlessly *except* for one folder. (POP is untested)

For the record:
- sufficient hardware: dual Xeon, 1.5GB RAM, enough diskspace
- current Gentoo Linux
- kernel 2.6.11.6
- PostgreSQL-8.0.1  (Gentoo ebuild: postgresql-8.0.1-r2)
- 3 users
- a few 10,000 messages in the DB
- Postfix-2.1.5
- KMail from KDE-3.3.2

I have experience with the usual development tools and would happily help with 
debugging.
 
Thanks in advance for your time,
Florian Weber

---------------- strace -s 60 dbmail-util -a -v -y -------------------
[...]

write(2, "Ok. Found [4491] un-cached physmessages.\n", 41Ok. Found [4491] 
un-cached physmessages.
) = 41
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}, 8) = 0
send(3, "Q\0\0\0\nBEGIN\0", 11, 0)      = 11
rt_sigaction(SIGPIPE, {SIG_DFL}, {SIG_IGN}, 8) = 0
poll([{fd=3, events=POLLIN|POLLERR, revents=POLLIN}], 1, -1) = 1
recv(3, "C\0\0\0\nBEGIN\0Z\0\0\0\5T", 16384, 0) = 17
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}, 8) = 0
send(3, "Q\0\0\0^SELECT messageblk FROM dbmail_messageblks WHERE physmes"..., 
95, 0) = 95
rt_sigaction(SIGPIPE, {SIG_DFL}, {SIG_IGN}, 8) = 0
poll([{fd=3, events=POLLIN|POLLERR, revents=POLLIN}], 1, -1) = 1
recv(3, 
"T\0\0\0#\0\1messageblk\0\0\f\2\224\0\3\0\0\0\31\377\377\377\377\377\377\0\0D\0\0\6V\0\1\0\0\6LReturn-Path:
 
"..., 16384, 0) = 1677
open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=21544, ...}) = 0
mmap2(NULL, 21544, PROT_READ, MAP_SHARED, 4, 0) = 0xb7f97000
close(4)                                = 0
open("/usr/lib/gconv/ISO8859-1.so", O_RDONLY) = 4
read(4, 
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\4\0\0004\0\0\0000\"\0\0\0\0\0\0004\0
 
\0\7\0(\0\31\0\30\0\1"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=9752, ...}) = 0
mmap2(NULL, 12324, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 
0xb7f93000
mprotect(0xb7f94000, 8228, PROT_NONE)   = 0
mmap2(0xb7f95000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 4, 0x1) = 0xb7f95000
close(4)                                = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

Reply via email to