[Dovecot] imap core dumping on signal 10
We are just trying to bring up a new server and chose to use Dovecot rather than the uw-imap from our previous servers. At this point I am just testing with some throw away accounts using squirrelmail. I can load my inbox, but then the imap connection is lost. I presume you need some real information to get your teeth into, so this is going to get a little long. I'll give you three things below:
- a piece of /var/adm/dovecot.log,
- the output of
dovecot -n
, and then - the full gdb trace back on the core file.
I'm hoping that, aside from there being a bug that causes core dumps, we might have a straightforward misconfiguration that we could fix and have a working installation.
All info at end.
--
Chris Hoogendyk
- O__ ---- Systems Administrator c/ /'_ --- Biology & Geology Departments (*) \(*) -- 140 Morrill Science Center
<hoogendyk@bio.umass.edu>
---------------
Erdös 4
-----------------------------------------------
following is the complete log of the connection
-----------------------------------------------
Jul 20 17:34:05 imladris dovecot: [ID 583609 local2.info] auth(default): client in: AUTH 1 PLAIN service=imap secured lip=127.0.0.1 rip=127.0.0.1 lport=993 rport=65462 resp=AGNocmlzaG8AMG5XMHJEPyE=
Jul 20 17:34:05 imladris dovecot: [ID 583609 local2.info] auth(default): shadow(chrisho,127.0.0.1): lookup
Jul 20 17:34:05 imladris dovecot: [ID 583609 local2.info] auth(default): client out: OK 1 user=chrisho
Jul 20 17:34:05 imladris dovecot: [ID 583609 local2.info] auth(default): master in: REQUEST 1 22961 1
Jul 20 17:34:05 imladris dovecot: [ID 583609 local2.info] auth(default): passwd(chrisho,127.0.0.1): lookup
Jul 20 17:34:05 imladris dovecot: [ID 583609 local2.info] auth(default): master out: USER 1 chrisho system_groups_user=chrisho uid=2295 gid=102 home=/u1/home/bio/hoogendyk
Jul 20 17:34:05 imladris dovecot: [ID 583609 local2.info] imap-login: Login: user=<chrisho>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS
Jul 20 17:34:05 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): Effective uid=2295, gid=102, home=/u1/home/bio/hoogendyk
Jul 20 17:34:05 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): mbox: data=~/mail:INBOX=/var/mail/chrisho
Jul 20 17:34:05 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): fs: root=/u1/home/bio/hoogendyk/mail, index=, control=, inbox=/var/mail/chrisho
Jul 20 17:34:05 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): Disconnected: Logged out bytes=44/697
Jul 20 17:34:05 imladris dovecot: [ID 583609 local2.info] auth(default): new auth connection: pid=22968
Jul 20 17:34:06 imladris dovecot: [ID 583609 local2.info] auth(default): client in: AUTH 1 PLAIN service=imap secured lip=127.0.0.1 rip=127.0.0.1 lport=993 rport=65465 resp=AGNocmlzaG8AMG5XMHJEPyE=
Jul 20 17:34:06 imladris dovecot: [ID 583609 local2.info] auth(default): shadow(chrisho,127.0.0.1): lookup
Jul 20 17:34:06 imladris dovecot: [ID 583609 local2.info] auth(default): client out: OK 1 user=chrisho
Jul 20 17:34:06 imladris dovecot: [ID 583609 local2.info] auth(default): master in: REQUEST 2 22959 1
Jul 20 17:34:06 imladris dovecot: [ID 583609 local2.info] auth(default): passwd(chrisho,127.0.0.1): lookup
Jul 20 17:34:06 imladris dovecot: [ID 583609 local2.info] auth(default): master out: USER 2 chrisho system_groups_user=chrisho uid=2295 gid=102 home=/u1/home/bio/hoogendyk
Jul 20 17:34:06 imladris dovecot: [ID 583609 local2.info] imap-login: Login: user=<chrisho>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS
Jul 20 17:34:06 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): Effective uid=2295, gid=102, home=/u1/home/bio/hoogendyk
Jul 20 17:34:06 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): mbox: data=~/mail:INBOX=/var/mail/chrisho
Jul 20 17:34:06 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): fs: root=/u1/home/bio/hoogendyk/mail, index=, control=, inbox=/var/mail/chrisho
Jul 20 17:34:06 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): Namespace : Using permissions from /u1/home/bio/hoogendyk/mail: mode=0700 gid=-1
Jul 20 17:34:06 imladris dovecot: [ID 583609 local2.info] auth(default): new auth connection: pid=22970
Jul 20 17:34:06 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): Disconnected: Logged out bytes=386/1304
Jul 20 17:34:07 imladris dovecot: [ID 583609 local2.info] auth(default): client in: AUTH 1 PLAIN service=imap secured lip=127.0.0.1 rip=127.0.0.1 lport=993 rport=65467 resp=AGNocmlzaG8AMG5XMHJEPyE=
Jul 20 17:34:07 imladris dovecot: [ID 583609 local2.info] auth(default): shadow(chrisho,127.0.0.1): lookup
Jul 20 17:34:07 imladris dovecot: [ID 583609 local2.info] auth(default): client out: OK 1 user=chrisho
Jul 20 17:34:07 imladris dovecot: [ID 583609 local2.info] auth(default): master in: REQUEST 3 22968 1
Jul 20 17:34:07 imladris dovecot: [ID 583609 local2.info] auth(default): passwd(chrisho,127.0.0.1): lookup
Jul 20 17:34:07 imladris dovecot: [ID 583609 local2.info] auth(default): master out: USER 3 chrisho system_groups_user=chrisho uid=2295 gid=102 home=/u1/home/bio/hoogendyk
Jul 20 17:34:07 imladris dovecot: [ID 583609 local2.info] imap-login: Login: user=<chrisho>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS
Jul 20 17:34:07 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): Effective uid=2295, gid=102, home=/u1/home/bio/hoogendyk
Jul 20 17:34:07 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): mbox: data=~/mail:INBOX=/var/mail/chrisho
Jul 20 17:34:07 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): fs: root=/u1/home/bio/hoogendyk/mail, index=, control=, inbox=/var/mail/chrisho
Jul 20 17:34:07 imladris dovecot: [ID 583609 local2.error] dovecot: child 22971 (imap) killed with signal 10 (core dumped)
Jul 20 17:34:07 imladris dovecot: [ID 583609 local2.info] auth(default): new auth connection: pid=22973
Jul 20 17:34:07 imladris dovecot: [ID 583609 local2.warning] dovecot: Killed with signal 15 (by pid=22974 uid=0 code=kill)
Jul 20 17:34:08 imladris dovecot: [ID 583609 local2.info] Dovecot v1.2.12 starting up
----------------------------------------------------------------------------------
following is the complete output of ( ulimit -n 1024; /usr/local/sbin/dovecot -n )
----------------------------------------------------------------------------------
# ( ulimit -n 1024; /usr/local/sbin/dovecot -n )
# 1.2.12: /usr/local/etc/dovecot.conf
# OS: SunOS 5.10 sun4v
base_dir: /var/run/dovecot/
syslog_facility: local2
protocols: imaps pop3s
ssl_listen: *
ssl: required
ssl_cert_file: /etc/mail/certs/sendmail.pem
ssl_key_file: /etc/mail/certs/sendmail.pem
login_dir: /var/run/dovecot/login
login_executable(default): /usr/local/libexec/dovecot/imap-login
login_executable(imap): /usr/local/libexec/dovecot/imap-login
login_executable(pop3): /usr/local/libexec/dovecot/pop3-login
login_greeting: ready.
mail_max_userip_connections(default): 10
mail_max_userip_connections(imap): 10
mail_max_userip_connections(pop3): 3
first_valid_uid: 1000
first_valid_gid: 98
mail_privileged_group: mail
mail_location: mbox:~/mail:INBOX=/var/mail/%u
mail_debug: yes
mail_executable(default): /usr/local/libexec/dovecot/imap
mail_executable(imap): /usr/local/libexec/dovecot/imap
mail_executable(pop3): /usr/local/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/local/lib/dovecot/imap
mail_plugin_dir(imap): /usr/local/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3
pop3_reuse_xuidl(default): no
pop3_reuse_xuidl(imap): no
pop3_reuse_xuidl(pop3): yes
pop3_uidl_format(default): %08Xu%08Xv
pop3_uidl_format(imap): %08Xu%08Xv
pop3_uidl_format(pop3): %08Xv%08Xu
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
auth default:
username_chars: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_
verbose: yes
debug: yes
debug_passwords: yes
passdb:
driver: shadow
userdb:
driver: passwd
#
--------------------------------------------
and finally the complete trace back from gdb
--------------------------------------------
# gdb /usr/local/libexec/dovecot/imap /var/core/core_imladris_imap_2295_102_1279661647_22971
GNU gdb 6.6
Copyright (C) 2006 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.10"...
Reading symbols from /opt/coolstack/lib/libiconv.so.2...done.
Loaded symbols for /opt/coolstack/lib/libiconv.so.2
Reading symbols from /usr/lib/libnsl.so.1...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libsocket.so.1...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/lib/librt.so.1...done.
Loaded symbols for /usr/lib/librt.so.1
Reading symbols from /usr/lib/libsendfile.so.1...done.
Loaded symbols for /usr/lib/libsendfile.so.1
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /lib/libaio.so.1...done.
Loaded symbols for /lib/libaio.so.1
Reading symbols from /lib/libmd.so.1...done.
Loaded symbols for /lib/libmd.so.1
Reading symbols from /platform/sun4v/lib/libc_psr.so.1...done.
Loaded symbols for /platform/SUNW,SPARC-Enterprise-T5220/lib/libc_psr.so.1
Reading symbols from /lib/ld.so.1...done.
Loaded symbols for /lib/ld.so.1
Core was generated by `imap'.
Program terminated with signal 10, Bus error.
#0 0x000aa19c in mail_index_map (index=0x489, type=0) at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-index//mail-index-map.c:502
502 map->hdr = *hdr;
(gdb) bt full
#0 0x000aa19c in mail_index_map (index=0x489, type=0) at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-index//mail-index-map.c:502
ret = 2
old_map = (struct mail_index_map *) 0x162338
new_map = (struct mail_index_map *) 0x162338
st = {st_dev = 8388615, st_pad1 = {0, 0, 0}, st_ino = 30370, st_mode = 33152, st_nlink = 1, st_uid = 2295, st_gid = 102, st_rdev = 0,
st_pad2 = {0, 0}, st_size = 18736, st_atim = {tv_sec = 1279661646, tv_nsec = 937908000}, st_mtim = {tv_sec = 1279661646, tv_nsec = 938505000},
st_ctim = {tv_sec = 1279661646, tv_nsec = 963091000}, st_blksize = 8192, st_blocks = 38, st_fstype = "ufs", '\0' <repeats 12 times>, st_pad4 = {0,
0, 0, 0, 0, 0, 0, 0}}
lock_id = 4
file_size = 9223434923765923840
use_mmap = 48
unusable = 116
ret = 112
try = 0
_data_stack_cur_id = 4282335512
index = (struct mail_index *) 0x489
ext_hdr = (const struct mail_index_ext_header *) 0x0
i = 1450816
old_count = 187472
offset = 0
name = 0x70 <Address 0x70 out of bounds>
error = 0x7fffffff <Address 0x7fffffff out of bounds>
ext_id = 1177832
ext_offset = 1450992
index = (struct mail_index *) 0x70
rec_map = (struct mail_index_record_map *) 0xa0
hdr = (const struct mail_index_header *) 0x0
index = (struct mail_index *) 0x1606d0
handlers = (mail_index_sync_lost_handler_t * const *) 0x0
st = {st_dev = 0, st_pad1 = {0, 0, 0}, st_ino = 0, st_mode = 0, st_nlink = 0, st_uid = 0, st_gid = 0, st_rdev = 0, st_pad2 = {0, 0},
st_size = 0, st_atim = {tv_sec = 0, tv_nsec = 0}, st_mtim = {tv_sec = 0, tv_nsec = 0}, st_ctim = {tv_sec = 0, tv_nsec = 0}, st_blksize = 0,
st_blocks = 0, st_fstype = '\0' <repeats 15 times>, st_pad4 = {0, 0, 0, 0, 0, 0, 0, 0}}
i = 4290764916
count = 1161
ret = 1452352
try_retry = 160
retry = 222
index = (struct mail_index *) 0x1606d0
hdr = (const struct mail_index_header *) 0x8000000
read_buf = "\a\002\000x\000\000\000?\000\000\000\020\000\000\000\000LF\026N\000\000\000\000K?!?\000\002??\000\000\004\211\000\000\000\000\000\000\004\211\000\000\000\000\000\002??\000\002??\000\000\000\000\000\000\000\002\000\000[?\000\000[?", '\0' <repeats 12 times>, "LE\037@\000\002??", '\0' <repeats 31 times>, "\020\000\000\000\000\000\b\000\b\000\b\000\004mbox\000\000\000\000\000\000\000\000\000?o5LE?/\001\000\000\000\000\002??\b\000\000\000\000\000\000\000\000\000\002\032\000\002??\b\000\000\000\000\000\000\000\000\000\020V\000\002??\b\000\000\000\000\000\000\000\000\000#\237\000\002??\b\000\000\000\000\000\000\000\000\000F"...
buf = (const void *) 0x0
data = (void *) 0x0
ret = -4202380
pos = 1161
records_size = 14640
initial_buf_pos = 1450992
records_count = 1161
extra = 3936
pos = 1161
ret = -4202380
#1 0x000a5adc in mail_index_try_open (index=0x160820) at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-index//mail-index.c:300
ret = -1
#2 0x000a5fb0 in mail_index_open (index=0x8a040, flags=17, lock_method=FILE_LOCK_METHOD_DOTLOCK)
at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-index//mail-index.c:365
ret = 1969648384
ret = 1443536
created = false
#3 0x00089c34 in index_storage_mailbox_open (ibox=0x600) at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-storage/index//index-storage.c:406
storage = (struct mail_storage *) 0x15ad18
index_flags = 17
ret = 565312
cache = (struct mail_cache *) 0x0
cache_env = 0x0
never_env = 0x4000000 <Address 0x4000000 out of bounds>
env = 0x100001 ""
---Type <return> to continue, or q <return> to quit---
#4 0x0008a134 in index_storage_mailbox_init (ibox=0x0, name=0x0, flags=0, move_to_memory=false)
at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-storage/index//index-storage.c:475
storage = (struct mail_storage *) 0x11
box = (struct mailbox *) 0x0
dir_gid = -1
origin = 0x15b140 "/var/mail/chrisho"
dir_origin = 0x15b140 "/var/mail/chrisho"
buffer = (buffer_t *) 0x0
buffer = (buffer_t *) 0x1615c8
#5 0x00064ad8 in mbox_alloc_mailbox (storage=0x3164c, index=0x1606d0, name=0x11f8e8 "INBOX", path=0x15b140 "/var/mail/chrisho", flags=0)
at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-storage/index/mbox//mbox-storage.c:608
mbox = (struct mbox_mailbox *) 0x0
pool = (pool_t) 0x0
env = 0xffea0950 <Address 0xffea0950 out of bounds>
st = {st_dev = 0, st_pad1 = {0, 1374345, -4197072}, st_ino = 0, st_mode = 0, st_nlink = 0, st_uid = 16, st_gid = 1, st_rdev = 4290769692,
st_pad2 = {-13172344, -4196552}, st_size = 1007998744081760, st_atim = {tv_sec = -15531076, tv_nsec = -1431216}, st_mtim = {tv_sec = 1431216,
tv_nsec = -1431216}, st_ctim = {tv_sec = -1431216, tv_nsec = 1431216}, st_blksize = 1, st_blocks = 4279457448,
st_fstype = "\000\025ְ\000\a?|\000\025ְ?7*", st_pad4 = {-15531076, -1447600, 1447600, -1439408, -1439408, 1439408, 1, -15489704}}
min_size = 4282335320
#6 0x00066628 in mbox_open (storage=0x15af28, name=0x11f8e8 "INBOX", flags=0)
at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-storage/index/mbox//mbox-storage.c:626
_storage = (struct mail_storage *) 0x0
mbox = (struct mbox_mailbox *) 0x0
index = (struct mail_index *) 0x0
path = 0x0
rootdir = 0x0
#7 0x0009863c in mailbox_open (_storage=0xff1392e4, name=0x124b08 "INBOX", input=0x0, flags=0)
at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-storage//mail-storage.c:478
storage = (struct mail_storage *) 0x15ad18
box = (struct mailbox *) 0x124b08
#8 0x0002be9c in cmd_select_full (cmd=0x0, readonly=false) at /usr/local/src/dovecot/dovecot-1.2.12/src/imap//cmd-select.c:261
client = (struct client *) 0x15b400
box = (struct mailbox *) 0x1be8b
ctx = (struct imap_select_context *) 0xffbff358
args = (const struct imap_arg *) 0x15df10
mailbox = 0x124b08 "INBOX"
ret = 0
name = 0x0
seqset = {arr = {buffer = 0x0, element_size = 0}, v = 0x0, v_modifiable = 0x0}
uidset = {arr = {buffer = 0x99b88f8, element_size = 240}, v = 0x99b88f8, v_modifiable = 0x99b88f8}
count = 1
buffer = (buffer_t *) 0x15ad18
buffer = (buffer_t *) 0x15ad18
buffer = (buffer_t *) 0xff1303bc
buffer = (buffer_t *) 0x10
seq_range = (const struct seq_range *) 0x0
uid_range = (const struct seq_range *) 0x0
seq_iter = {array = 0x0, prev_n = 0, prev_idx = 4096}
i = 2147483648
seq_count = 10240
uid_count = 1422984
diff = 2147498290
n = 10048
seq = 1366052
buffer = (buffer_t *) 0x15ad18
buffer = (buffer_t *) 0x15ad18
client = (struct client *) 0x15b400
status = {messages = 1366064, recent = 1366052, unseen = 0, uidvalidity = 0, uidnext = 0, first_unseen_seq = 0, highest_modseq = 0,
keywords = 0x0, sync_delayed_expunges = 0, nonpermanent_modseqs = 0}
open_flags = 0
fetch_ctx = (struct imap_fetch_context *) 0x0
search_args = (struct mail_search_args *) 0x0
#9 0x0002c3b0 in cmd_select (cmd=0xfa2bc) at /usr/local/src/dovecot/dovecot-1.2.12/src/imap//cmd-select.c:388
No locals.
#10 0x0002ef20 in client_command_input (cmd=0x6) at /usr/local/src/dovecot/dovecot-1.2.12/src/imap//client.c:612
client = (struct client *) 0x15b400
command = (struct command *) 0x80000000
#11 0x0002f190 in client_command_input (cmd=0x15b688) at /usr/local/src/dovecot/dovecot-1.2.12/src/imap//client.c:661
client = (struct client *) 0x15b400
---Type <return> to continue, or q <return> to quit---
command = (struct command *) 0x14f940
#12 0x0002f8b4 in client_handle_input (client=0x80000000) at /usr/local/src/dovecot/dovecot-1.2.12/src/imap//client.c:458
ret = false
remove_io = false
handled_commands = false
#13 0x000303e4 in client_input (client=0x0) at /usr/local/src/dovecot/dovecot-1.2.12/src/imap//client.c:753
cmd = (struct client_command_context *) 0x707
output = (struct ostream *) 0x15b600
bytes = 21
#14 0x000fc2e8 in io_loop_handler_run (ioloop=0x0) at /usr/local/src/dovecot/dovecot-1.2.12/src/lib//ioloop-poll.c:203
ctx = (struct ioloop_handler_context *) 0x159318
pollfd = (struct pollfd *) 0x159b28
tv = {tv_sec = 1799, tv_usec = 999491}
io = (struct io_file *) 0x158488
t_id = 2
msecs = 288
ret = 1
call = true
#15 0x000fb680 in io_loop_run (ioloop=0xffbffa3e) at /usr/local/src/dovecot/dovecot-1.2.12/src/lib//ioloop.c:335
No locals.
#16 0x0003c190 in main (argc=0, argv=0x1, envp=0x0) at /usr/local/src/dovecot/dovecot-1.2.12/src/imap//main.c:327
version = 0x80000000 <Address 0x80000000 out of bounds>
plugin_dir = 0x14f400 ""
user = 0x3b800 "\232 "
env = 0xffbff808 ""
client = (struct client *) 0x14f400
output = (struct ostream *) 0x158280
user = (struct mail_user *) 0x1
username = 0xffbffa3e "A001"
home = 0x14d800 ""
str = 0x15a6c8 ""
tag = 0x14f400 ""
_data_stack_cur_id = 0
buf = (buffer_t *) 0x15b400
list = (struct client_workaround_list *) 0x1
env = 0x5 <Address 0x5 out of bounds>
str = (const char * const *) 0x14f730
(gdb) quit
#
--------------
and that's all
--------------
On Tue, 2010-07-20 at 18:53 -0400, Chris Hoogendyk wrote:
We are just trying to bring up a new server and chose to use Dovecot rather than the uw-imap from our previous servers. At this point I am just testing with some throw away accounts using squirrelmail. I can load my inbox, but then the imap connection is lost.
This happens always? For all users?
Program terminated with signal 10, Bus error.
Signal 10 usually means unaligned memory access or accessing mmap()ed file past the end of file.
#0 0x000aa19c in mail_index_map (index=0x489, type=0) at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-index//mail-index-map.c:502 502 map->hdr = *hdr; .. hdr = (const struct mail_index_header *) 0x8000000
This hdr alignment looks ok. Also I can't really figure out from the code how it could be crashing here. And -O2 has optimized the backtrace and some variables in a way that it's a bit difficult to figure out what's actually going on.
Could you compile without -O2 (but I think -O is required or it won't crash)? Easiest way would be to do something like:
- cd src/lib-index/Makefile
- Change -O2 to -O in Makefile
- make clean && make
- cd ../imap && make && make install
Then it would be helpful to know at least the output of:
bt full p hdr p *hdr p &map->hdr p *map->rec_map
Timo Sirainen wrote:
On Tue, 2010-07-20 at 18:53 -0400, Chris Hoogendyk wrote:
We are just trying to bring up a new server and chose to use Dovecot rather than the uw-imap from our previous servers. At this point I am just testing with some throw away accounts using squirrelmail. I can load my inbox, but then the imap connection is lost.
This happens always? For all users?
Program terminated with signal 10, Bus error.
Signal 10 usually means unaligned memory access or accessing mmap()ed file past the end of file.
#0 0x000aa19c in mail_index_map (index=0x489, type=0) at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-index//mail-index-map.c:502 502 map->hdr = *hdr;
..
hdr = (const struct mail_index_header *) 0x8000000
This hdr alignment looks ok. Also I can't really figure out from the code how it could be crashing here. And -O2 has optimized the backtrace and some variables in a way that it's a bit difficult to figure out what's actually going on.
Could you compile without -O2 (but I think -O is required or it won't crash)? Easiest way would be to do something like:
- cd src/lib-index/Makefile
- Change -O2 to -O in Makefile
- make clean && make
- cd ../imap && make && make install
Then it would be helpful to know at least the output of:
bt full p hdr p *hdr p &map->hdr p *map->rec_map
OK. Steps 1-4 completed without any problems.
Does it happen with all users? We are just in the development, immediate
pre-transition stage. We had hoped to bring the server up early this
week. At the moment, I only have a couple of users we are playing with.
I used my account with only a minimal amount in /var/mail/chrisho based
on playing on this machine. Then I copied my /var/mail from the server
we are going to replace. It is substantially larger, but I have no
trouble with it using uw-imap on that server. I placed it on this
server, did an rm -r ~chrisho/mail
to give a clean start on that, and
then connected with squirrelmail. I've repeated this same process, back
and forth. Interesting thing is that when I did it this morning, after
the steps 1-4 above, I was clicking all over in squirrelmail with my
smaller /var/mail/chrisho and couldn't cause any errors. Then I logged
out, swapped in the larger /var/mail/chrisho, rm'd ~chrisho/mail, and
reconnected with squirrelmail. It brought up my inbox without any
errors. However, when I clicked on a message, it core dumped.
gdb output is below.
--
Chris Hoogendyk
- O__ ---- Systems Administrator c/ /'_ --- Biology & Geology Departments (*) \(*) -- 140 Morrill Science Center
<hoogendyk@bio.umass.edu>
---------------
Erdös 4
-----------------------------------------------------------------------------------------
following is the dovecot.log just for the final session with the larger /var/mail/chrisho
-----------------------------------------------------------------------------------------
Jul 21 11:43:08 imladris dovecot: [ID 583609 local2.info] auth(default): client in: AUTH 1 PLAIN service=imap secured lip=127.0.0.1 rip=127.0.0.1 lport=993 rport=61462 resp=AGNocmlzaG8AMG5XMHJEPyE=
Jul 21 11:43:08 imladris dovecot: [ID 583609 local2.info] auth(default): shadow(chrisho,127.0.0.1): lookup
Jul 21 11:43:08 imladris dovecot: [ID 583609 local2.info] auth(default): client out: OK 1 user=chrisho
Jul 21 11:43:08 imladris dovecot: [ID 583609 local2.info] auth(default): master in: REQUEST 20 1570 1
Jul 21 11:43:08 imladris dovecot: [ID 583609 local2.info] auth(default): passwd(chrisho,127.0.0.1): lookup
Jul 21 11:43:08 imladris dovecot: [ID 583609 local2.info] auth(default): master out: USER 20 chrisho system_groups_user=chrisho uid=2295 gid=102 home=/u1/home/bio/hoogendyk
Jul 21 11:43:08 imladris dovecot: [ID 583609 local2.info] imap-login: Login: user=<chrisho>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS
Jul 21 11:43:08 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): Effective uid=2295, gid=102, home=/u1/home/bio/hoogendyk
Jul 21 11:43:08 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): mbox: data=~/mail:INBOX=/var/mail/chrisho
Jul 21 11:43:08 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): fs: root=/u1/home/bio/hoogendyk/mail, index=, control=, inbox=/var/mail/chrisho
Jul 21 11:43:08 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): Disconnected: Logged out bytes=44/697
Jul 21 11:43:08 imladris dovecot: [ID 583609 local2.info] auth(default): new auth connection: pid=1641
Jul 21 11:43:09 imladris dovecot: [ID 583609 local2.info] auth(default): client in: AUTH 1 PLAIN service=imap secured lip=127.0.0.1 rip=127.0.0.1 lport=993 rport=61464 resp=AGNocmlzaG8AMG5XMHJEPyE=
Jul 21 11:43:09 imladris dovecot: [ID 583609 local2.info] auth(default): shadow(chrisho,127.0.0.1): lookup
Jul 21 11:43:09 imladris dovecot: [ID 583609 local2.info] auth(default): client out: OK 1 user=chrisho
Jul 21 11:43:09 imladris dovecot: [ID 583609 local2.info] auth(default): master in: REQUEST 21 1572 1
Jul 21 11:43:09 imladris dovecot: [ID 583609 local2.info] auth(default): passwd(chrisho,127.0.0.1): lookup
Jul 21 11:43:09 imladris dovecot: [ID 583609 local2.info] auth(default): master out: USER 21 chrisho system_groups_user=chrisho uid=2295 gid=102 home=/u1/home/bio/hoogendyk
Jul 21 11:43:09 imladris dovecot: [ID 583609 local2.info] imap-login: Login: user=<chrisho>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS
Jul 21 11:43:09 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): Effective uid=2295, gid=102, home=/u1/home/bio/hoogendyk
Jul 21 11:43:09 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): mbox: data=~/mail:INBOX=/var/mail/chrisho
Jul 21 11:43:09 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): fs: root=/u1/home/bio/hoogendyk/mail, index=, control=, inbox=/var/mail/chrisho
Jul 21 11:43:09 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): Namespace : Using permissions from /u1/home/bio/hoogendyk/mail: mode=0700 gid=-1
Jul 21 11:43:09 imladris dovecot: [ID 583609 local2.error] IMAP(chrisho): chown(/u1/home/bio/hoogendyk/mail/.imap/INBOX, -1, 6(mail)) failed: Operation not permitted (egid=102(biostaff), group based on /var/mail/chrisho)
Jul 21 11:43:09 imladris dovecot: [ID 583609 local2.error] IMAP(chrisho): mkdir(/u1/home/bio/hoogendyk/mail/.imap/INBOX) failed: Not owner
Jul 21 11:43:09 imladris dovecot: [ID 583609 local2.info] auth(default): new auth connection: pid=1643
Jul 21 11:43:10 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): Disconnected: Logged out bytes=386/1304
Jul 21 11:43:10 imladris dovecot: [ID 583609 local2.info] auth(default): client in: AUTH 1 PLAIN service=imap secured lip=127.0.0.1 rip=127.0.0.1 lport=993 rport=61467 resp=AGNocmlzaG8AMG5XMHJEPyE=
Jul 21 11:43:10 imladris dovecot: [ID 583609 local2.info] auth(default): shadow(chrisho,127.0.0.1): lookup
Jul 21 11:43:10 imladris dovecot: [ID 583609 local2.info] auth(default): client out: OK 1 user=chrisho
Jul 21 11:43:10 imladris dovecot: [ID 583609 local2.info] auth(default): master in: REQUEST 22 1641 1
Jul 21 11:43:10 imladris dovecot: [ID 583609 local2.info] auth(default): passwd(chrisho,127.0.0.1): lookup
Jul 21 11:43:10 imladris dovecot: [ID 583609 local2.info] auth(default): master out: USER 22 chrisho system_groups_user=chrisho uid=2295 gid=102 home=/u1/home/bio/hoogendyk
Jul 21 11:43:10 imladris dovecot: [ID 583609 local2.info] imap-login: Login: user=<chrisho>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS
Jul 21 11:43:10 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): Effective uid=2295, gid=102, home=/u1/home/bio/hoogendyk
Jul 21 11:43:10 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): mbox: data=~/mail:INBOX=/var/mail/chrisho
Jul 21 11:43:10 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): fs: root=/u1/home/bio/hoogendyk/mail, index=, control=, inbox=/var/mail/chrisho
Jul 21 11:43:10 imladris dovecot: [ID 583609 local2.error] IMAP(chrisho): fchown(/u1/home/bio/hoogendyk/mail/.imap/INBOX/dovecot.index.log.newlock, -1, 6(mail)) failed: Operation not permitted (egid=102(biostaff), group based on /var/mail/chrisho)
Jul 21 11:43:10 imladris dovecot: [ID 583609 local2.info] auth(default): new auth connection: pid=1645
Jul 21 11:43:11 imladris dovecot: [ID 583609 local2.error] IMAP(chrisho): fchown(/u1/home/bio/hoogendyk/mail/.imap/INBOX/dovecot.index.tmp, -1, 6(mail)) failed: Operation not permitted (egid=102(biostaff), group based on /var/mail/chrisho)
Jul 21 11:43:11 imladris dovecot: [ID 583609 local2.error] IMAP(chrisho): fchown(/u1/home/bio/hoogendyk/mail/.imap/INBOX/dovecot.index.cache.lock, -1, 6(mail)) failed: Operation not permitted (egid=102(biostaff), group based on /var/mail/chrisho)
Jul 21 11:43:11 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): Disconnected: Logged out bytes=351/16932
Jul 21 11:43:45 imladris dovecot: [ID 583609 local2.info] auth(default): client in: AUTH 1 PLAIN service=imap secured lip=127.0.0.1 rip=127.0.0.1 lport=993 rport=61520 resp=AGNocmlzaG8AMG5XMHJEPyE=
Jul 21 11:43:45 imladris dovecot: [ID 583609 local2.info] auth(default): shadow(chrisho,127.0.0.1): lookup
Jul 21 11:43:45 imladris dovecot: [ID 583609 local2.info] auth(default): client out: OK 1 user=chrisho
Jul 21 11:43:45 imladris dovecot: [ID 583609 local2.info] auth(default): master in: REQUEST 23 1643 1
Jul 21 11:43:45 imladris dovecot: [ID 583609 local2.info] auth(default): passwd(chrisho,127.0.0.1): lookup
Jul 21 11:43:45 imladris dovecot: [ID 583609 local2.info] auth(default): master out: USER 23 chrisho system_groups_user=chrisho uid=2295 gid=102 home=/u1/home/bio/hoogendyk
Jul 21 11:43:45 imladris dovecot: [ID 583609 local2.info] imap-login: Login: user=<chrisho>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS
Jul 21 11:43:45 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): Effective uid=2295, gid=102, home=/u1/home/bio/hoogendyk
Jul 21 11:43:45 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): mbox: data=~/mail:INBOX=/var/mail/chrisho
Jul 21 11:43:45 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): fs: root=/u1/home/bio/hoogendyk/mail, index=, control=, inbox=/var/mail/chrisho
Jul 21 11:43:45 imladris dovecot: [ID 583609 local2.info] auth(default): new auth connection: pid=1668
Jul 21 11:43:45 imladris dovecot: [ID 583609 local2.error] dovecot: child 1667 (imap) killed with signal 10 (core dumped)
Jul 21 11:43:45 imladris dovecot: [ID 583609 local2.warning] dovecot: Killed with signal 15 (by pid=1669 uid=0 code=kill)
Jul 21 11:43:46 imladris dovecot: [ID 583609 local2.info] Dovecot v1.2.12 starting up
Jul 21 11:43:47 imladris dovecot: [ID 583609 local2.info] auth(default): new auth connection: pid=1681
Jul 21 11:43:47 imladris dovecot: [ID 583609 local2.info] auth(default): new auth connection: pid=1682
Jul 21 11:43:47 imladris dovecot: [ID 583609 local2.info] auth(default): new auth connection: pid=1683
Jul 21 11:43:47 imladris dovecot: [ID 583609 local2.info] auth(default): new auth connection: pid=1685
Jul 21 11:43:47 imladris dovecot: [ID 583609 local2.info] auth(default): new auth connection: pid=1684
Jul 21 11:43:47 imladris dovecot: [ID 583609 local2.info] auth(default): new auth connection: pid=1686
Jul 21 11:53:10 imladris dovecot: [ID 583609 local2.info] auth(default): client in: AUTH 1 PLAIN service=imap secured lip=127.0.0.1 rip=127.0.0.1 lport=993 rport=62350 resp=AGNocmlzaG8AMG5XMHJEPyE=
Jul 21 11:53:10 imladris dovecot: [ID 583609 local2.info] auth(default): shadow(chrisho,127.0.0.1): lookup
Jul 21 11:53:10 imladris dovecot: [ID 583609 local2.info] auth(default): client out: OK 1 user=chrisho
Jul 21 11:53:10 imladris dovecot: [ID 583609 local2.info] auth(default): master in: REQUEST 1 1685 1
Jul 21 11:53:10 imladris dovecot: [ID 583609 local2.info] auth(default): passwd(chrisho,127.0.0.1): lookup
Jul 21 11:53:10 imladris dovecot: [ID 583609 local2.info] auth(default): master out: USER 1 chrisho system_groups_user=chrisho uid=2295 gid=102 home=/u1/home/bio/hoogendyk
Jul 21 11:53:10 imladris dovecot: [ID 583609 local2.info] imap-login: Login: user=<chrisho>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS
Jul 21 11:53:10 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): Effective uid=2295, gid=102, home=/u1/home/bio/hoogendyk
Jul 21 11:53:10 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): mbox: data=~/mail:INBOX=/var/mail/chrisho
Jul 21 11:53:10 imladris dovecot: [ID 583609 local2.info] IMAP(chrisho): fs: root=/u1/home/bio/hoogendyk/mail, index=, control=, inbox=/var/mail/chrisho
Jul 21 11:53:11 imladris dovecot: [ID 583609 local2.info] auth(default): new auth connection: pid=1865
Jul 21 11:53:11 imladris dovecot: [ID 583609 local2.error] dovecot: child 1864 (imap) killed with signal 10 (core dumped)
Jul 21 11:53:11 imladris dovecot: [ID 583609 local2.warning] dovecot: Killed with signal 15 (by pid=1866 uid=0 code=kill)
Jul 21 11:53:11 imladris dovecot: [ID 583609 local2.info] Dovecot v1.2.12 starting up
---------------------------------------------
following is the gdb output for that coredump
---------------------------------------------
imladris:/var/core# gdb /usr/local/libexec/dovecot/imap core_imladris_imap_2295_102_1279727025_1667
GNU gdb 6.6
Copyright (C) 2006 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.10"...
Reading symbols from /opt/coolstack/lib/libiconv.so.2...done.
Loaded symbols for /opt/coolstack/lib/libiconv.so.2
Reading symbols from /usr/lib/libnsl.so.1...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libsocket.so.1...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/lib/librt.so.1...done.
Loaded symbols for /usr/lib/librt.so.1
Reading symbols from /usr/lib/libsendfile.so.1...done.
Loaded symbols for /usr/lib/libsendfile.so.1
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /lib/libaio.so.1...done.
Loaded symbols for /lib/libaio.so.1
Reading symbols from /lib/libmd.so.1...done.
Loaded symbols for /lib/libmd.so.1
Reading symbols from /platform/sun4v/lib/libc_psr.so.1...done.
Loaded symbols for /platform/SUNW,SPARC-Enterprise-T5220/lib/libc_psr.so.1
Reading symbols from /lib/ld.so.1...done.
Loaded symbols for /lib/ld.so.1
Core was generated by `imap'.
Program terminated with signal 10, Bus error.
#0 0x000aa19c in mail_index_map (index=0x489, type=0) at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-index//mail-index-map.c:502
502 map->hdr = *hdr;
(gdb) bt full
#0 0x000aa19c in mail_index_map (index=0x489, type=0) at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-index//mail-index-map.c:502
ret = 2
old_map = (struct mail_index_map *) 0x162338
new_map = (struct mail_index_map *) 0x162338
st = {st_dev = 8388615, st_pad1 = {0, 0, 0}, st_ino = 30376, st_mode = 33152, st_nlink = 1, st_uid = 2295, st_gid = 102, st_rdev = 0,
st_pad2 = {0, 0}, st_size = 18736, st_atim = {tv_sec = 1279726991, tv_nsec = 345785000}, st_mtim = {tv_sec = 1279726991, tv_nsec = 346718000},
st_ctim = {tv_sec = 1279726991, tv_nsec = 372338000}, st_blksize = 8192, st_blocks = 38, st_fstype = "ufs", '\0' <repeats 12 times>, st_pad4 = {0,
0, 0, 0, 0, 0, 0, 0}}
lock_id = 4
file_size = 9223434923765923840
use_mmap = 48
unusable = 52
ret = 112
try = 0
_data_stack_cur_id = 4282335512
index = (struct mail_index *) 0x489
ext_hdr = (const struct mail_index_ext_header *) 0x0
i = 1450816
old_count = 187472
offset = 0
name = 0x70 <Address 0x70 out of bounds>
error = 0x7fffffff <Address 0x7fffffff out of bounds>
ext_id = 1177832
ext_offset = 1450992
index = (struct mail_index *) 0x70
rec_map = (struct mail_index_record_map *) 0xa0
hdr = (const struct mail_index_header *) 0x0
index = (struct mail_index *) 0x1606d0
handlers = (mail_index_sync_lost_handler_t * const *) 0x0
st = {st_dev = 0, st_pad1 = {0, 0, 0}, st_ino = 0, st_mode = 0, st_nlink = 0, st_uid = 0, st_gid = 0, st_rdev = 0, st_pad2 = {0, 0},
st_size = 0, st_atim = {tv_sec = 0, tv_nsec = 0}, st_mtim = {tv_sec = 0, tv_nsec = 0}, st_ctim = {tv_sec = 0, tv_nsec = 0}, st_blksize = 0,
st_blocks = 0, st_fstype = '\0' <repeats 15 times>, st_pad4 = {0, 0, 0, 0, 0, 0, 0, 0}}
i = 4290764852
count = 1161
ret = 1452352
try_retry = 160
retry = 222
index = (struct mail_index *) 0x1606d0
hdr = (const struct mail_index_header *) 0x8000000
read_buf = "\a\002\000x\000\000\000?\000\000\000\020\000\000\000\000LG\025\216\000\000\000\000K?!?\000\002??\000\000\004\211\000\000\000\000\000\000\004\211\000\000\000\000\000\002??\000\002??\000\000\000\000\000\000\000\002\000\000[?\000\000[?", '\0' <repeats 12 times>, "LFp?\000\002??", '\0' <repeats 31 times>, "\020\000\000\000\000\000\b\000\b\000\b\000\004mbox\000\000\000\000\000\000\000\000\000?o5LE?/\000\000\000\000\000\002??\b\000\000\000\000\000\000\000\000\000\002\032\000\002??\b\000\000\000\000\000\000\000\000\000\020V\000\002??\b\000\000\000\000\000\000\000\000\000#\237\000\002??\b\000\000\000\000\000\000\000\000\000F"...
buf = (const void *) 0x0
data = (void *) 0x0
ret = -4202444
pos = 1161
records_size = 14640
initial_buf_pos = 1450992
records_count = 1161
extra = 3936
pos = 1161
ret = -4202444
#1 0x000a5adc in mail_index_try_open (index=0x160820) at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-index//mail-index.c:300
ret = -1
#2 0x000a5fb0 in mail_index_open (index=0x8a040, flags=17, lock_method=FILE_LOCK_METHOD_DOTLOCK)
at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-index//mail-index.c:365
ret = 1969648384
ret = 1443536
created = false
#3 0x00089c34 in index_storage_mailbox_open (ibox=0x600) at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-storage/index//index-storage.c:406
storage = (struct mail_storage *) 0x15ad18
index_flags = 17
ret = 565312
cache = (struct mail_cache *) 0x0
cache_env = 0x0
never_env = 0x4000000 <Address 0x4000000 out of bounds>
env = 0x100001 ""
---Type <return> to continue, or q <return> to quit---
#4 0x0008a134 in index_storage_mailbox_init (ibox=0x0, name=0x0, flags=0, move_to_memory=false)
at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-storage/index//index-storage.c:475
storage = (struct mail_storage *) 0x11
box = (struct mailbox *) 0x0
dir_gid = 6
origin = 0x15b140 "/var/mail/chrisho"
dir_origin = 0x15b140 "/var/mail/chrisho"
buffer = (buffer_t *) 0x0
buffer = (buffer_t *) 0x1615c8
#5 0x00064ad8 in mbox_alloc_mailbox (storage=0x3164c, index=0x1606d0, name=0x11f8e8 "INBOX", path=0x15b140 "/var/mail/chrisho", flags=0)
at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-storage/index/mbox//mbox-storage.c:608
mbox = (struct mbox_mailbox *) 0x0
pool = (pool_t) 0x0
env = 0xffea0950 <Address 0xffea0950 out of bounds>
st = {st_dev = 0, st_pad1 = {0, 1374345, -4197136}, st_ino = 0, st_mode = 0, st_nlink = 0, st_uid = 16, st_gid = 1, st_rdev = 4290769628,
st_pad2 = {-13172344, -4196616}, st_size = 1007998744081760, st_atim = {tv_sec = -15531076, tv_nsec = -1431216}, st_mtim = {tv_sec = 1431216,
tv_nsec = -1431216}, st_ctim = {tv_sec = -1431216, tv_nsec = 1431216}, st_blksize = 1, st_blocks = 4279457448,
st_fstype = "\000\025ְ\000\a?|\000\025ְ?7*", st_pad4 = {-15531076, -1447600, 1447600, -1439408, -1439408, 1439408, 1, -15489704}}
min_size = 4282335320
#6 0x00066628 in mbox_open (storage=0x15af28, name=0x11f8e8 "INBOX", flags=0)
at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-storage/index/mbox//mbox-storage.c:626
_storage = (struct mail_storage *) 0x0
mbox = (struct mbox_mailbox *) 0x0
index = (struct mail_index *) 0x0
path = 0x0
rootdir = 0x0
#7 0x0009863c in mailbox_open (_storage=0xff1392e4, name=0x124b08 "INBOX", input=0x0, flags=0)
at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-storage//mail-storage.c:478
storage = (struct mail_storage *) 0x15ad18
box = (struct mailbox *) 0x124b08
#8 0x0002be9c in cmd_select_full (cmd=0x0, readonly=false) at /usr/local/src/dovecot/dovecot-1.2.12/src/imap//cmd-select.c:261
client = (struct client *) 0x15b400
box = (struct mailbox *) 0x1be8b
ctx = (struct imap_select_context *) 0xffbff318
args = (const struct imap_arg *) 0x15df10
mailbox = 0x124b08 "INBOX"
ret = 0
name = 0x0
seqset = {arr = {buffer = 0x0, element_size = 0}, v = 0x0, v_modifiable = 0x0}
uidset = {arr = {buffer = 0x99b88f8, element_size = 240}, v = 0x99b88f8, v_modifiable = 0x99b88f8}
count = 1
buffer = (buffer_t *) 0x15ad18
buffer = (buffer_t *) 0x15ad18
buffer = (buffer_t *) 0xff1303bc
buffer = (buffer_t *) 0x10
seq_range = (const struct seq_range *) 0x0
uid_range = (const struct seq_range *) 0x0
seq_iter = {array = 0x0, prev_n = 0, prev_idx = 4096}
i = 2147483648
seq_count = 10240
uid_count = 1422984
diff = 2147498290
n = 10048
seq = 1366052
buffer = (buffer_t *) 0x15ad18
buffer = (buffer_t *) 0x15ad18
client = (struct client *) 0x15b400
status = {messages = 1366064, recent = 1366052, unseen = 0, uidvalidity = 0, uidnext = 0, first_unseen_seq = 0, highest_modseq = 0,
keywords = 0x0, sync_delayed_expunges = 0, nonpermanent_modseqs = 0}
open_flags = 0
fetch_ctx = (struct imap_fetch_context *) 0x0
search_args = (struct mail_search_args *) 0x0
#9 0x0002c3b0 in cmd_select (cmd=0xfa2bc) at /usr/local/src/dovecot/dovecot-1.2.12/src/imap//cmd-select.c:388
No locals.
#10 0x0002ef20 in client_command_input (cmd=0x6) at /usr/local/src/dovecot/dovecot-1.2.12/src/imap//client.c:612
client = (struct client *) 0x15b400
command = (struct command *) 0x80000000
#11 0x0002f190 in client_command_input (cmd=0x15b688) at /usr/local/src/dovecot/dovecot-1.2.12/src/imap//client.c:661
client = (struct client *) 0x15b400
---Type <return> to continue, or q <return> to quit---
command = (struct command *) 0x14f940
#12 0x0002f8b4 in client_handle_input (client=0x80000000) at /usr/local/src/dovecot/dovecot-1.2.12/src/imap//client.c:458
ret = false
remove_io = false
handled_commands = false
#13 0x000303e4 in client_input (client=0x0) at /usr/local/src/dovecot/dovecot-1.2.12/src/imap//client.c:753
cmd = (struct client_command_context *) 0x707
output = (struct ostream *) 0x15b600
bytes = 21
#14 0x000fc2e8 in io_loop_handler_run (ioloop=0x0) at /usr/local/src/dovecot/dovecot-1.2.12/src/lib//ioloop-poll.c:203
ctx = (struct ioloop_handler_context *) 0x159318
pollfd = (struct pollfd *) 0x159b28
tv = {tv_sec = 1799, tv_usec = 999269}
io = (struct io_file *) 0x158488
t_id = 2
msecs = 288
ret = 1
call = true
#15 0x000fb680 in io_loop_run (ioloop=0xffbff9fe) at /usr/local/src/dovecot/dovecot-1.2.12/src/lib//ioloop.c:335
No locals.
#16 0x0003c190 in main (argc=0, argv=0x1, envp=0x0) at /usr/local/src/dovecot/dovecot-1.2.12/src/imap//main.c:327
version = 0x80000000 <Address 0x80000000 out of bounds>
plugin_dir = 0x14f400 ""
user = 0x3b800 "\232 "
env = 0xffbff7c8 ""
client = (struct client *) 0x14f400
output = (struct ostream *) 0x158280
user = (struct mail_user *) 0x1
username = 0xffbff9fe "A001"
home = 0x14d800 ""
str = 0x15a6c8 ""
tag = 0x14f400 ""
_data_stack_cur_id = 0
buf = (buffer_t *) 0x15b400
list = (struct client_workaround_list *) 0x1
env = 0x5 <Address 0x5 out of bounds>
str = (const char * const *) 0x14f730
(gdb) p hdr
$1 = (const struct mail_index_header *) 0x0
(gdb) p *hdr
Cannot access memory at address 0x0
(gdb) p &map->hdr
No symbol "map" in current context.
(gdb) p *map->rec_map
No symbol "map" in current context.
(gdb) p &imap->hdr
No symbol "imap" in current context.
(gdb)
----------------------------
and that's all there is here
----------------------------
On Wed, 2010-07-21 at 12:05 -0400, Chris Hoogendyk wrote:
#0 0x000aa19c in mail_index_map (index=0x489, type=0) at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-index//mail-index-map.c:502 .. #1 0x000a5adc in mail_index_try_open (index=0x160820) at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-index//mail-index.c:300
There is still too much optimization.. There should have been at least 2 functions between these two.
(gdb) p hdr
$1 = (const struct mail_index_header *) 0x0
(gdb) p *hdr
Cannot access memory at address 0x0
(gdb) p &map->hdr
No symbol "map" in current context.
(gdb) p *map->rec_map
No symbol "map" in current context.
These also fail because of the optimization. Well, maybe just try it the other way:
CFLAGS=-g ./configure make clean make
That should at least get rid of the optimizations. But I'm not sure if it crashes anymore with that. If it doesn't, try
CFLAGS='-g -O' ./configure
Timo Sirainen wrote:
On Wed, 2010-07-21 at 12:05 -0400, Chris Hoogendyk wrote:
#0 0x000aa19c in mail_index_map (index=0x489, type=0) at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-index//mail-index-map.c:502
..
#1 0x000a5adc in mail_index_try_open (index=0x160820) at /usr/local/src/dovecot/dovecot-1.2.12/src/lib-index//mail-index.c:300
There is still too much optimization.. There should have been at least 2 functions between these two.
(gdb) p hdr
$1 = (const struct mail_index_header *) 0x0
(gdb) p *hdr
Cannot access memory at address 0x0
(gdb) p &map->hdr
No symbol "map" in current context.
(gdb) p *map->rec_map
No symbol "map" in current context.
These also fail because of the optimization. Well, maybe just try it the other way:
CFLAGS=-g ./configure make clean make
That should at least get rid of the optimizations. But I'm not sure if it crashes anymore with that. If it doesn't, try
CFLAGS='-g -O' ./configure
Well, bummer. ;-)
Once I got rid of the optimization (it still has -O) within that subdirectory of the source, I can't get it to fail. It seems to be just working.
Part of the reason my first attempt back to you didn't work as expected was that I had CFLAGS in my build environment with -g -fast, which, on Sun, translates into a couple of different things, including, I believe, -O2. So, I had to get rid of -fast in my environment, and I also had to remove -fast from the Makefile down in src/lib-index. Once I had gone through steps 1-4 from your earlier email with those changes and restarted Dovecot, I poked at it from Squirrelmail for quite some time without any errors or failures. I did a search through my inbox, displayed 133 found emails, sorted them, read through a couple, deleted a bunch, wen back to the inbox, read a few more, paged forward, deleted a couple, etc.
So, . . .
I'm not sure what you want to make of that. It appeared when the error was happening, that the initial creation of ~chrisho/mail and the display of my inbox worked; but, after that, anything I tried to do failed with a crash and an error in squirrelmail. If I rm'd ~chrisho/mail, I could get a fresh start. Maybe from all of that you can surmise something useful.
If anything else turns up, I'll let you know.
For now, I'm off to fix issues with mimedefang.
Maybe we'll be up and running and in service tomorrow.
--
Chris Hoogendyk
- O__ ---- Systems Administrator c/ /'_ --- Biology & Geology Departments (*) \(*) -- 140 Morrill Science Center
<hoogendyk@bio.umass.edu>
---------------
Erdös 4
On Wed, 2010-07-21 at 13:52 -0400, Chris Hoogendyk wrote:
Once I got rid of the optimization (it still has -O) within that subdirectory of the source, I can't get it to fail. It seems to be just working.
If you enable optimizations again, does it start breaking? Instead of the gdb prints, I could also give a patch to make it log the same things.
I've anyway been running Dovecot on Solaris/Sparc for years and I haven't gotten this same signal 10, even though this is in the generic index file handling code..
Timo Sirainen wrote:
On Wed, 2010-07-21 at 13:52 -0400, Chris Hoogendyk wrote:
Once I got rid of the optimization (it still has -O) within that subdirectory of the source, I can't get it to fail. It seems to be just working.
If you enable optimizations again, does it start breaking? Instead of the gdb prints, I could also give a patch to make it log the same things.
I've anyway been running Dovecot on Solaris/Sparc for years and I haven't gotten this same signal 10, even though this is in the generic index file handling code..
Sorry for the delay in responding. We switched servers and were totally caught up in the switch and getting things worked out through the end of Friday. Recovered now. The server is in full service now. Still some glitches to be worked out.
Anyway, the testing I did with Dovecot before we went into production was a bit hurried. When we went into production, there were other components doing the same thing with signal 10 and core dumping. I went back and recompiled all of Dovecot with optimization dropped back to -O only. Then everything worked, and it has proved to be one of the faster, more reliable pieces of the transition.
I should note that we are using gccfss, and I had been using -g -fast in my build environment. That -fast translates into a couple of different things. Anyway, gccfss is the CoolTools implementation that is a gcc front end to the Sun Studio backend. So, the actual code generation is being done with Sun Studio, even though the front end is gcc, gnu make, etc. I also had -xtarget=ultraT2. So our environment may be different from your past experience with Solaris/Sparc.
Since we are now in production, we can't do any tests to see if they re-introduce errors. I think it's pretty clear that the -O2 and -fast with gccfss caused problems.
--
Chris Hoogendyk
- O__ ---- Systems Administrator c/ /'_ --- Biology & Geology Departments (*) \(*) -- 140 Morrill Science Center
<hoogendyk@bio.umass.edu>
---------------
Erdös 4
On Wed, 2010-07-21 at 12:05 -0400, Chris Hoogendyk wrote:
Jul 21 11:43:09 imladris dovecot: [ID 583609 local2.error] IMAP(chrisho): chown(/u1/home/bio/hoogendyk/mail/.imap/INBOX, -1, 6(mail)) failed: Operation not permitted (egid=102(biostaff), group based on /var/mail/chrisho)
Also you can get rid of these with
chmod 0600 /var/mail/*
participants (2)
-
Chris Hoogendyk
-
Timo Sirainen