Timo,
Output of gdb session on the core file attached. This
one only produced the following syslog:
IMAP(user): UIDs broken with partial sync in mbox file /var/mail/r/user
with no assert. Setup: Solaris 9, gcc 4.0.1 for dovecot build.
Jeff Earickson
Colby College
-------------- next part --------------
Script started on Thu Sep 08 10:05:53 2005
%gdb imap core.rtohara
GNU gdb 6.3
Copyright 2004 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.9"...
Core was generated by `imap'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libsocket.so.1...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/lib/libnsl.so.1...done.
Loaded symbols for /usr/lib/libnsl.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 /usr/lib/libmp.so.2...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from /usr/lib/libaio.so.1...done.
Loaded symbols for /usr/lib/libaio.so.1
Reading symbols from /usr/lib/libmd5.so.1...done.
Loaded symbols for /usr/lib/libmd5.so.1
Reading symbols from /usr/platform/SUNW,Ultra-1/lib/libc_psr.so.1...done.
Loaded symbols for /usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1
#0 mail_cache_lookup_headers (view=0xc9e78, dest=0xb8280, seq=21,
fields=Variable "fields" is not available.
)
at mail-cache-lookup.c:499
499 if (*p == '\n' &&
(gdb) backtrace
#0 mail_cache_lookup_headers (view=0xc9e78, dest=0xb8280, seq=21,
fields=Variable "fields" is not available.
)
at mail-cache-lookup.c:499
#1 0x000420bc in index_mail_get_header_stream (_mail=Variable "_mail"
is not available.
) at index-mail-headers.c:614
#2 0x0005ae34 in mail_get_header_stream (mail=Variable "mail" is not
available.
) at mail.c:97
#3 0x0004192c in index_mail_headers_get_envelope (mail=0xae448) at
index-mail-headers.c:401
#4 0x00040674 in index_mail_get_special (_mail=Variable "_mail" is
not available.
) at index-mail.c:679
#5 0x00035b08 in mbox_mail_get_special (_mail=0xae448,
field=MAIL_FETCH_IMAP_ENVELOPE)
at mbox-mail.c:140
#6 0x0005ae70 in mail_get_special (mail=Variable "mail" is not
available.
) at mail.c:113
#7 0x00022854 in fetch_envelope (ctx=0xa51a8, mail=Variable "mail" is
not available.
) at imap-fetch.c:412
#8 0x00022410 in imap_fetch (ctx=0xa51a8) at imap-fetch.c:265
#9 0x0001d870 in cmd_fetch (cmd=0xa2ee8) at cmd-fetch.c:166
#10 0x00020c60 in client_handle_input (cmd=0xa2ee8) at client.c:334
#11 0x00020d68 in _client_input (context=Variable "context" is not
available.
) at client.c:386
#12 0x0006e850 in io_loop_handler_run (ioloop=0xa0db0) at ioloop-poll.c:184
#13 0x0006e11c in io_loop_run (ioloop=0xa0db0) at ioloop.c:230
#14 0x00029348 in main (argc=0, argv=0xffbffba4, envp=0xffbffbac) at main.c:229
(gdb) print *p
Cannot access memory at address 0xff11259c
(gdb) print *view
$1 = {cache = 0xaaca0, view = 0xaaa88, trans_view = 0xc8e58, transaction =
0xcb2a0,
trans_seq1 = 21, trans_seq2 = 21, tmp_offsets = {buffer = 0xa2088,
element_size = 4},
cached_exists_buf = 0xa2178, cached_exists_value = 1 '\001',
cached_exists_seq = 21,
cached_offset = 75084, cached_offset_seq = 21}
(gdb) print *dest
$2 = {data = 0xb82a0, used = 0}
(gdb) print fields
Variable "fields" is not available.
(gdb) print view-> *(view->cache)
$3 = {index = 0xa9328, ext_id = 3,
filepath = 0xaad30
"/home/students/r/rtohara/.imap/INBOX/dovecot.index.cache", fd = 6,
mmap_base = 0xff100000, data = 0xff100000, mmap_length = 26712, file_cache =
0x0,
dotlock_settings = {temp_prefix = 0x0, lock_suffix = 0x0, timeout = 120,
stale_timeout = 60,
immediate_stale_timeout = 300, callback = 0, context = 0x0}, dotlock = 0x0,
hdr = 0xff100000, hdr_copy = {version = 1 '\001', unused =
"\000\000", indexid = 1124149513,
file_seq = 1124149515, continued_record_count = 51, hole_offset = 0,
used_file_size = 81884, deleted_space = 0, field_header_offset =
2155918518},
field_pool = 0xaad88, fields = 0xabcb0, field_file_map = 0xabb58, fields_count
= 26,
field_name_hash = 0xab180, file_field_map = 0xab6e0, file_fields_count = 26,
locked = 0,
need_compress = 0, hdr_modified = 0, field_header_write_pending = 0}
(gdb) print *(view->view)
$4 = {refcount = 1, methods = {close = 0x4f448 <_tview_close>,
get_messages_count = 0x4f46c <_tview_get_message_count>,
get_header = 0x4f494 <_tview_get_header>, lookup_full = 0x4f4b0
<_tview_lookup_full>,
lookup_uid = 0x4f508 <_tview_lookup_uid>,
lookup_uid_range = 0x4f554 <_tview_lookup_uid_range>,
lookup_first = 0x4f584 <_tview_lookup_first>,
lookup_ext_full = 0x4f688 <_tview_lookup_ext_full>,
get_header_ext = 0x4f870 <_tview_get_header_ext>}, index = 0xa9328,
log_view = 0xb37f8,
indexid = 1124149513, map = 0xac940, new_map = 0x0, map_refs = 0xa21a0, hdr =
{
major_version = 7 '\a', minor_version = 0 '\0',
base_header_size = 120, header_size = 200,
record_size = 40, compat_data = "\000\b\004", indexid =
1124149513, flags = 2,
uid_validity = 1122257472, next_uid = 271, messages_count = 31,
recent_messages_count = 0,
seen_messages_count = 9, deleted_messages_count = 0,
first_recent_uid_lowwater = 0,
first_unseen_uid_lowwater = 0, first_deleted_uid_lowwater = 240,
log_file_seq = 1,
log_file_int_offset = 24240, log_file_ext_offset = 24240, sync_size =
13022941,
sync_stamp = 1126108845, day_stamp = 1126065600, day_first_uid = {231, 205,
192, 192, 192,
158, 158, 158}}, log_file_seq = 1, log_file_offset = 24240, log_syncs =
0x0,
transactions = 0, lock_id = 314, inconsistent = 0, syncing = 0}
(gdb) print (*view->trans_view)
$5 = {refcount = 1, methods = {close = 0x4f448 <_tview_close>,
get_messages_count = 0x4f46c <_tview_get_message_count>,
get_header = 0x4f494 <_tview_get_header>, lookup_full = 0x4f4b0
<_tview_lookup_full>,
lookup_uid = 0x4f508 <_tview_lookup_uid>,
lookup_uid_range = 0x4f554 <_tview_lookup_uid_range>,
lookup_first = 0x4f584 <_tview_lookup_first>,
lookup_ext_full = 0x4f688 <_tview_lookup_ext_full>,
get_header_ext = 0x4f870 <_tview_get_header_ext>}, index = 0xa9328,
log_view = 0xcb3e8,
indexid = 1124149513, map = 0xac940, new_map = 0x0, map_refs = 0xa2218, hdr =
{
major_version = 7 '\a', minor_version = 0 '\0',
base_header_size = 120, header_size = 200,
record_size = 40, compat_data = "\000\b\004", indexid =
1124149513, flags = 2,
uid_validity = 1122257472, next_uid = 271, messages_count = 31,
recent_messages_count = 0,
seen_messages_count = 9, deleted_messages_count = 0,
first_recent_uid_lowwater = 0,
first_unseen_uid_lowwater = 0, first_deleted_uid_lowwater = 240,
log_file_seq = 1,
log_file_int_offset = 24240, log_file_ext_offset = 24240, sync_size =
13022941,
sync_stamp = 1126108845, day_stamp = 1126065600, day_first_uid = {231, 205,
192, 192, 192,
158, 158, 158}}, log_file_seq = 1, log_file_offset = 24240, log_syncs =
0x0,
transactions = 0, lock_id = 314, inconsistent = 0, syncing = 0}
(gdb) print *(view->transaction)
$6 = {cache = 0xaaca0, view = 0xc9e78, trans = 0xaa840, cache_file_seq =
1124149515,
cache_data = 0xa21c8, cache_data_seq = {buffer = 0xa21f0, element_size = 4},
prev_seq = 21,
prev_pos = 0, reservations = 0xa2128, reserved_space_offset = 0,
reserved_space = 0,
last_grow_size = 0, changes = 1}
(gdb) print *dest
$7 = {data = 0xb82a0, used = 0}
(gdb) print dest->data
$8 = (const void *) 0xb82a0
(gdb) print *(dest->data)
Attempt to dereference a generic pointer.
(gdb) print &(dest->data)
$9 = (const void **) 0xb8280
(gdb) quit