[Dovecot] Dovecot 2.0beta3: Crash with mail_log plugin enabled

Thomas Leuxner tlx at leuxner.net
Tue Mar 16 21:56:40 EET 2010


Am 16.03.2010 um 20:35 schrieb Pascal Volk:

> The CFLAGS env variable is also honored. e.g.:
> CFLAGS="-g3 -O0" DEB_BUILD_OPTIONS="nostrip debug" dpkg-buildpackage

Thanks Pascal, that did the trick. Core dump attached:

[20:52] root spectre:/tmp# gdb /usr/lib/dovecot/imap /tmp/core
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /usr/lib/dovecot/libdovecot-storage.so.0...done.
Loaded symbols for /usr/lib/dovecot/libdovecot-storage.so.0
Reading symbols from /usr/lib/dovecot/libdovecot.so.0...done.
Loaded symbols for /usr/lib/dovecot/libdovecot.so.0
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/librt.so.1...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /usr/lib/dovecot/modules/lib01_acl_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/lib01_acl_plugin.so
Reading symbols from /usr/lib/dovecot/modules/lib02_imap_acl_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/lib02_imap_acl_plugin.so
Reading symbols from /usr/lib/dovecot/modules/lib10_quota_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/lib10_quota_plugin.so
Reading symbols from /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so
Reading symbols from /usr/lib/dovecot/modules/lib15_notify_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/lib15_notify_plugin.so
Reading symbols from /usr/lib/dovecot/modules/lib20_mail_log_plugin.so...done.
Loaded symbols for /usr/lib/dovecot/modules/lib20_mail_log_plugin.so
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Core was generated by `dovecot/imap'.
Program terminated with signal 6, Aborted.
[New process 31462]

#0  0x00007feb99a2fed5 in raise () from /lib/libc.so.6#0  0x00007feb99a2fed5 in raise () from /lib/libc.so.6
No symbol table info available.
#1  0x00007feb99a313f3 in abort () from /lib/libc.so.6
No symbol table info available.
#2  0x00007feb9a19efca in default_fatal_finish (type=LOG_TYPE_PANIC, status=0) at failures.c:164
	backtrace = 0x628660 "/usr/lib/dovecot/libdovecot.so.0 [0x7feb9a19efa6] -> /usr/lib/dovecot/libdovecot.so.0 [0x7feb9a1a02eb] -> /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7feb9a19f31a] -> /usr/lib/dovecot/libdovecot-st"...
#3  0x00007feb9a1a02eb in i_internal_fatal_handler (type=LOG_TYPE_PANIC, status=0, fmt=0x7feb9a4b9f18 "file %s: line %d (%s): assertion failed: (%s)", args=0x7fffffffba90) at failures.c:592
No locals.
#4  0x00007feb9a19f31a in i_panic (format=0x7feb9a4b9f18 "file %s: line %d (%s): assertion failed: (%s)") at failures.c:230
	args = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7fffffffbb70, reg_save_area = 0x7fffffffbab0}}
#5  0x00007feb9a44c531 in view_lookup_uid (view=0x66a950, seq=0, uid_r=0x7fffffffbc2c) at mail-index-view.c:210
	__PRETTY_FUNCTION__ = "view_lookup_uid"
#6  0x00007feb9a43fb82 in tview_lookup_uid (view=0x66a950, seq=0, uid_r=0x7fffffffbc2c) at mail-index-transaction-view.c:163
	tview = (struct mail_index_view_transaction *) 0x66a950
#7  0x00007feb9a44ce6e in mail_index_lookup_uid (view=0x66a950, seq=0, uid_r=0x7fffffffbc2c) at mail-index-view.c:474
No locals.
#8  0x00007feb9a428180 in mail_cache_decision_state_update (view=0x66ac70, seq=0, field=12) at mail-cache-decisions.c:82
	cache = (struct mail_cache *) 0x668090
	hdr = (const struct mail_index_header *) 0x7feb9a901548
	uid = 0
	__PRETTY_FUNCTION__ = "mail_cache_decision_state_update"
#9  0x00007feb9a42adcf in mail_cache_lookup_headers_real (view=0x66ac70, dest=0x685278, seq=0, field_idxs=0x7fffffffbdfc, fields_count=1) at mail-cache-lookup.c:484
	cache = (struct mail_cache *) 0x668090
	iter = {view = 0x7feb9a3f8760, remap_counter = 2593133896, seq = 32747, rec = 0x80, pos = 4294967295, rec_size = 0, offset = 4294950208, stop = 1, failed = 1, appends_checked = 1}
	field = {field_idx = 4294950128, data = 0x80, size = 6836816}
	ctx = {view = 0x669b10, lines = {arr = {buffer = 0x6692c0, element_size = 1011198389976563728}, v = 0x6692c0, v_modifiable = 0x6692c0}}
	lines = (struct header_lookup_line *) 0x7fffffffc570
	p = (const unsigned char *) 0x0
	start = (const unsigned char *) 0x0
	end = (const unsigned char *) 0x7feb9a3eb000 <Address 0x7feb9a3eb000 out of bounds>
	field_state = (uint8_t *) 0x7f009a6f51da <Address 0x7f009a6f51da out of bounds>
	i = 0
	count = 32747
	max_field = 0
	hdr_size = 140649879426561
	want = 1 '\001'
	buf = (buffer_t *) 0x7fffffffbd60
	ret = 5
#10 0x00007feb9a42b22e in mail_cache_lookup_headers (view=0x66ac70, dest=0x685278, seq=0, field_idxs=0x7fffffffbdfc, fields_count=1) at mail-cache-lookup.c:560
	_data_stack_cur_id = 5
	ret = 32747
#11 0x00007feb9a46b6f7 in index_mail_get_raw_headers (mail=0x684a68, field=0x7feb98bb1024 "Message-ID", value_r=0x7fffffffbe88) at index-mail-headers.c:614
	headers = {0x7feb98bb101c "uid=", 0x6284d8 "\020\205b"}
	value = 0x7feb9a1c0c8c "H\211? ???H\215\2050????"
	headers_ctx = (struct mailbox_header_lookup_ctx *) 0x7fffffffbe50
	data = (unsigned char *) 0x3000000010 <Address 0x3000000010 out of bounds>
	field_idx = 12
	dest = (string_t *) 0x685278
	i = 140737488338496
	len = 140737488338672
	ret = 0
	header_values = {arr = {buffer = 0x1c, element_size = 140647294042116}, v = 0x1c, v_modifiable = 0x1c}
	__PRETTY_FUNCTION__ = "index_mail_get_raw_headers"
#12 0x00007feb9a46bd82 in index_mail_get_first_header (_mail=0x684a68, field=0x7feb98bb1024 "Message-ID", decode_to_utf8=false, value_r=0x7fffffffbf18) at index-mail-headers.c:771
	mail = (struct index_mail *) 0x684a68
	list = (const char * const *) 0x2
	ret = -1709586105
	i = 0
#13 0x00007feb9a41390f in mail_get_first_header (mail=0x684a68, field=0x7feb98bb1024 "Message-ID", value_r=0x7fffffffbf18) at mail.c:122
	p = (struct mail_private *) 0x684a68
#14 0x00007feb98bb0653 in mail_log_append_mail_header (str=0x6284d8, mail=0x684a68, name=0x7feb98bb0f28 "msgid", header=0x7feb98bb1024 "Message-ID") at mail-log-plugin.c:174
	value = 0x6284d8 "\020\205b"
#15 0x00007feb98bb0815 in mail_log_append_mail_message_real (ctx=0x66b318, mail=0x684a68, event=MAIL_LOG_EVENT_SAVE, desc=0x6284b0 "copy from INBOX") at mail-log-plugin.c:219
	msg = (struct mail_log_message *) 0x66b330
	text = (string_t *) 0x6284d8
	size = 64
#16 0x00007feb98bb0a77 in mail_log_append_mail_message (ctx=0x66b318, mail=0x684a68, event=MAIL_LOG_EVENT_SAVE, desc=0x6284b0 "copy from INBOX") at mail-log-plugin.c:270
	_data_stack_cur_id = 4
#17 0x00007feb98bb0b64 in mail_log_mail_copy (txn=0x66b318, src=0x66cb48, dst=0x684a68) at mail-log-plugin.c:303
	ctx = (struct mail_log_mail_txn_context *) 0x66b318
	desc = 0x6284b0 "copy from INBOX"
#18 0x00007feb98db3602 in notify_contexts_mail_copy (src=0x66cb48, dst=0x684a68) at notify-plugin.c:69
	ctx = (struct notify_context *) 0x64b310
	mail_txn = (struct notify_mail_txn *) 0x66b2a0
#19 0x00007feb98db40a7 in notify_copy (ctx=0x671320, mail=0x66cb48) at notify-storage.c:113
	lt = (struct notify_transaction_context *) 0x66b280
	lbox = (union mailbox_module_context *) 0x666998
	ret = 0
#20 0x00007feb9a41c6d5 in mailbox_copy (_ctx=0x7fffffffc130, mail=0x66cb48) at mail-storage.c:1330
	ctx = (struct mail_save_context *) 0x671320
	box = (struct mailbox *) 0x666048
	keywords = (struct mail_keywords *) 0x6847e0
	ret = 32747
#21 0x0000000000409dab in fetch_and_copy (client=0x6597d8, t=0x66a510, search_args=0x665038, src_uidset_r=0x7fffffffc1c8, copy_count_r=0x7fffffffc18c) at cmd-copy.c:66
	search_ctx = (struct mail_search_context *) 0x66c940
	src_trans = (struct mailbox_transaction_context *) 0x66b6e0
	save_ctx = (struct mail_save_context *) 0x0
	mail = (struct mail *) 0x66cb48
	copy_count = 1
	srcset_ctx = {str = 0x628378, first_uid = 0, last_uid = 4294967295}
	src_uidset = (string_t *) 0x628378
	ret = 1
#22 0x000000000040a06a in cmd_copy (cmd=0x659f38) at cmd-copy.c:151
	client = (struct client *) 0x6597d8
	dest_ns = (struct mail_namespace *) 0x64a0d0
	dest_storage = (struct mail_storage *) 0x7fffffffc230
	destbox = (struct mailbox *) 0x666048
	t = (struct mailbox_transaction_context *) 0x66a510
	search_args = (struct mail_search_args *) 0x665038
	messageset = 0x65b888 "4914"
	mailbox = 0x65b890 "Trash"
	storage_name = 0x65b890 "Trash"
	src_uidset = 0x7feb9a19b32b "??\220\220\220UH\211?H\203?0H\211}?H\213\005E?$"
	status = MAILBOX_NAME_EXISTS_MAILBOX
	sync_flags = 0
	imap_flags = 0
	changes = {pool = 0x0, uid_validity = 9, saved_uids = {arr = {buffer = 0x7feb99b053a0, element_size = 0}, v = 0x7feb99b053a0, v_modifiable = 0x7feb99b053a0}, ignored_uid_changes = 4294952304, 
  ignored_modseq_changes = 32767}
	copy_count = 0
	msg = (string_t *) 0x633f65
	ret = 1
	__PRETTY_FUNCTION__ = "cmd_copy"
#23 0x000000000041101b in cmd_uid (cmd=0x659f38) at cmd-uid.c:27
	command = (struct command *) 0x6317a0
	cmd_name = 0x65b880 "COPY"
#24 0x0000000000412a2d in client_command_input (cmd=0x659f38) at imap-client.c:647
	client = (struct client *) 0x6597d8
	command = (struct command *) 0x0
	__PRETTY_FUNCTION__ = "client_command_input"
#25 0x0000000000412c5d in client_command_input (cmd=0x659f38) at imap-client.c:697
	client = (struct client *) 0x6597d8
	command = (struct command *) 0x631788
	__PRETTY_FUNCTION__ = "client_command_input"
#26 0x0000000000412d7f in client_handle_next_command (client=0x6597d8, remove_io_r=0x7fffffffc34d) at imap-client.c:738
	size = 26
#27 0x0000000000412e00 in client_handle_input (client=0x6597d8) at imap-client.c:750
	_data_stack_cur_id = 3
	ret = false
	remove_io = false
	handled_commands = false
	__PRETTY_FUNCTION__ = "client_handle_input"
#28 0x0000000000412f5f in client_input (client=0x6597d8) at imap-client.c:789
	cmd = (struct client_command_context *) 0xffffc3bc
	output = (struct ostream *) 0x659db8
	bytes = 26
	__PRETTY_FUNCTION__ = "client_input"
#29 0x00007feb9a1af88a in io_loop_handler_run (ioloop=0x6305c0) at ioloop-epoll.c:208
	ctx = (struct ioloop_handler_context *) 0x6307d0
	events = (struct epoll_event *) 0x630840
	event = (const struct epoll_event *) 0x630840
	list = (struct io_list *) 0x659e90
	io = (struct io_file *) 0x664c10
	tv = {tv_sec = 1799, tv_usec = 999774}
	events_count = 5
	t_id = 2
	msecs = 1800000
	ret = 1
	i = 0
	j = 0
	call = true
#30 0x00007feb9a1ae693 in io_loop_run (ioloop=0x6305c0) at ioloop.c:350
No locals.
#31 0x00007feb9a1982ad in master_service_run (service=0x630490, callback=0x41e0a7 <client_connected>) at master-service.c:478
No locals.
#32 0x000000000041e297 in main (argc=1, argv=0x630370) at main.c:313
	service_flags = MASTER_SERVICE_FLAG_KEEP_CONFIG_OPEN
	storage_service_flags = MAIL_STORAGE_SERVICE_FLAG_DISALLOW_ROOT
	postlogin_socket_path = 0x0
	set_roots = {0x422060, 0x0}



More information about the dovecot mailing list