dbmail 2.0rc2 segfaults on my dual opteron system. I've tried using both MySQL and PostgreSQL to see if it was something tied to a particular RDBMS backend, but that doesn't seem to be the case.
dbmail-smtp segfaults as soon as it hits an empty line (the break of the header from the message body) when dbmail is trying to deliver to a local user's mailbox.
I've included backtraces from both mysql and postgresql. Looks like something messes with the header pointer to me. I tried tracking it down but wasn't able to put enough time into it. I hope this may give those of you who know the code better an idea of what might be happening. If you need more information let me know.
System:
SuSE Linux Enterprise Server 8.2 AMD64
Kernel 2.4.21
PostgreSQL 7.2.2
MySQL 3.23.52
dbmail 2.0rc2
postfix 1.1.12
backtrace from dbmail-smtp + mysql db gives:
#0 0x0000002a9567a399 in mysql_sub_escape_string () from /usr/lib64/libmysqlclient.so.10
#1 0x0000000040004dc1 in db_insert_message_block_physmessage (block=0x60 <Address 0x60 out of bounds>,
block_size=76, physmessage_id=7, messageblk_idnr=0x7fbffff1e8) at db.c:809
#2 0x0000000040004ee9 in db_insert_message_block (block=0x60 <Address 0x60 out of bounds>, block_size=76,
message_idnr=548682068456, messageblk_idnr=0x2a95f9a057) at db.c:850
#3 0x000000004000c3bd in store_message_temp (instream=0x7fbffff100,
header=0x60 <Address 0x60 out of bounds>, headersize=76, temp_message_idnr=0x7fbffff2a8) at pipe.c:570
#4 0x000000004000bf08 in insert_messages (instream=0x2a95e6b5c0,
header=0x4012a5a0 "From: polito@blackbeanie.net\nTo: polito@love.local\nSubject: this is a test\n\n",
headersize=76, users=0x2a95f9a057, errusers=0x4011d6e0, returnpath=0x7fbffff350, users_are_usernames=0,
deliver_to_mailbox=0x0, headerfields=0x4011d6a0) at pipe.c:339
#5 0x000000004000d2e6 in main (argc=-1778802601, argv=0x7fbffff3e8) at main.c:193
#6 0x0000002a95c80087 in __libc_start_main () from /lib64/libc.so.6
#7 0x0000000040001d5a in _start ()
backtrace from dbmail-smtp + postgresql db gives:
#0 0x0000002a95675287 in PQescapeString () from /usr/lib64/libpq.so.2
#1 0x0000000040004cd1 in db_insert_message_block_physmessage (block=0x60 <Address 0x60 out of bounds>,
block_size=76, physmessage_id=282, messageblk_idnr=0x7fbffff1e8) at db.c:809
#2 0x0000000040004df9 in db_insert_message_block (block=0x60 <Address 0x60 out of bounds>, block_size=76,
message_idnr=548682068456, messageblk_idnr=0x47) at db.c:850
#3 0x000000004000c2cd in store_message_temp (instream=0x7fbffff1e8,
header=0x60 <Address 0x60 out of bounds>, headersize=76, temp_message_idnr=0x7fbffff2a8) at pipe.c:570
#4 0x000000004000be18 in insert_messages (instream=0x2a959935c0,
header=0x4014ae70 "From: polito@blackbeanie.net\nTo: polito@love.local\nSubject: this is a test\n\n",
headersize=76, users=0x47, errusers=0x4011d340, returnpath=0x7fbffff350, users_are_usernames=0,
deliver_to_mailbox=0x0, headerfields=0x4011d300) at pipe.c:339
#5 0x000000004000d1f6 in main (argc=71, argv=0x7fbffff3e8) at main.c:193
#6 0x0000002a957a8087 in __libc_start_main () from /lib64/libc.so.6
#7 0x0000000040001c6a in _start ()
Blessings in Jesus,
Paul F. De La Cruz
dbmail-smtp segfaults as soon as it hits an empty line (the break of the header from the message body) when dbmail is trying to deliver to a local user's mailbox.
I've included backtraces from both mysql and postgresql. Looks like something messes with the header pointer to me. I tried tracking it down but wasn't able to put enough time into it. I hope this may give those of you who know the code better an idea of what might be happening. If you need more information let me know.
System:
SuSE Linux Enterprise Server 8.2 AMD64
Kernel 2.4.21
PostgreSQL 7.2.2
MySQL 3.23.52
dbmail 2.0rc2
postfix 1.1.12
backtrace from dbmail-smtp + mysql db gives:
#0 0x0000002a9567a399 in mysql_sub_escape_string () from /usr/lib64/libmysqlclient.so.10
#1 0x0000000040004dc1 in db_insert_message_block_physmessage (block=0x60 <Address 0x60 out of bounds>,
block_size=76, physmessage_id=7, messageblk_idnr=0x7fbffff1e8) at db.c:809
#2 0x0000000040004ee9 in db_insert_message_block (block=0x60 <Address 0x60 out of bounds>, block_size=76,
message_idnr=548682068456, messageblk_idnr=0x2a95f9a057) at db.c:850
#3 0x000000004000c3bd in store_message_temp (instream=0x7fbffff100,
header=0x60 <Address 0x60 out of bounds>, headersize=76, temp_message_idnr=0x7fbffff2a8) at pipe.c:570
#4 0x000000004000bf08 in insert_messages (instream=0x2a95e6b5c0,
header=0x4012a5a0 "From: polito@blackbeanie.net\nTo: polito@love.local\nSubject: this is a test\n\n",
headersize=76, users=0x2a95f9a057, errusers=0x4011d6e0, returnpath=0x7fbffff350, users_are_usernames=0,
deliver_to_mailbox=0x0, headerfields=0x4011d6a0) at pipe.c:339
#5 0x000000004000d2e6 in main (argc=-1778802601, argv=0x7fbffff3e8) at main.c:193
#6 0x0000002a95c80087 in __libc_start_main () from /lib64/libc.so.6
#7 0x0000000040001d5a in _start ()
backtrace from dbmail-smtp + postgresql db gives:
#0 0x0000002a95675287 in PQescapeString () from /usr/lib64/libpq.so.2
#1 0x0000000040004cd1 in db_insert_message_block_physmessage (block=0x60 <Address 0x60 out of bounds>,
block_size=76, physmessage_id=282, messageblk_idnr=0x7fbffff1e8) at db.c:809
#2 0x0000000040004df9 in db_insert_message_block (block=0x60 <Address 0x60 out of bounds>, block_size=76,
message_idnr=548682068456, messageblk_idnr=0x47) at db.c:850
#3 0x000000004000c2cd in store_message_temp (instream=0x7fbffff1e8,
header=0x60 <Address 0x60 out of bounds>, headersize=76, temp_message_idnr=0x7fbffff2a8) at pipe.c:570
#4 0x000000004000be18 in insert_messages (instream=0x2a959935c0,
header=0x4014ae70 "From: polito@blackbeanie.net\nTo: polito@love.local\nSubject: this is a test\n\n",
headersize=76, users=0x47, errusers=0x4011d340, returnpath=0x7fbffff350, users_are_usernames=0,
deliver_to_mailbox=0x0, headerfields=0x4011d300) at pipe.c:339
#5 0x000000004000d1f6 in main (argc=71, argv=0x7fbffff3e8) at main.c:193
#6 0x0000002a957a8087 in __libc_start_main () from /lib64/libc.so.6
#7 0x0000000040001c6a in _start ()
Blessings in Jesus,
Paul F. De La Cruz