A NOTE has been added to this issue. ====================================================================== http://dbmail.org/mantis/view.php?id=1077 ====================================================================== Reported By: Bloody Assigned To: ====================================================================== Project: DBMail Issue ID: 1077 Category: IMAP daemon Reproducibility: always Severity: crash Priority: normal Status: new target: ====================================================================== Date Submitted: 10-Dec-15 20:18 CET Last Modified: 11-Dec-15 10:39 CET ====================================================================== Summary: IMAP daemon crashes Description: Signal: 6 (ABRT) Timestamp: Fri 2015-12-04 10:17:05 MSK (6 days ago) Command Line: /usr/sbin/dbmail-imapd -p /run/dbmail/dbmail-imapd.pid Executable: /usr/sbin/dbmail-imapd Control Group: /system.slice/dbmail-imapd.service Unit: dbmail-imapd.service Slice: system.slice Boot ID: 8fe10738c7f9465a89898d7d6e7c9d18 Machine ID: eb160cb337a55d413d9a55c14f125ea3 Hostname: mail.dm.int Message: Process 3619 (dbmail-imapd) of user 0 dumped core. Stack trace of thread 3629: http://dbmail.org/mantis/view.php?id=0 0x00007f9b146158d7 raise (libc.so.6) http://dbmail.org/mantis/view.php?id=1 0x00007f9b1461753a abort (libc.so.6) http://dbmail.org/mantis/view.php?id=2 0x00007f9b14658da3 __libc_message (libc.so.6) http://dbmail.org/mantis/view.php?id=3 0x00007f9b146f2db7 __fortify_fail (libc.so.6) http://dbmail.org/mantis/view.php?id=4 0x00007f9b146f0f30 __chk_fail (libc.so.6) http://dbmail.org/mantis/view.php?id=5 0x00007f9b146f03c9 __strncpy_chk (libc.so.6) http://dbmail.org/mantis/view.php?id=6 0x00007f9b14e49b5c imap_append_hash_as_string.part.5 (libdbmail.so.0) http://dbmail.org/mantis/view.php?id=7 0x00007f9b14e4a0c3 _structure_basic (libdbmail.so.0) http://dbmail.org/mantis/view.php?id=8 0x00007f9b14e4a1aa _structure_part_text (libdbmail.so.0) http://dbmail.org/mantis/view.php?id=9 0x00007f9b14e4b5e5 _structure_part_multipart (libdbmail.so.0) http://dbmail.org/mantis/view.php?id=10 0x00007f9b14e4b8ce imap_get_structure (libdbmail.so.0) http://dbmail.org/mantis/view.php?id=11 0x00000000004129a2 _do_fetch (dbmail-imapd) http://dbmail.org/mantis/view.php?id=12 0x00007f9b162f3644 g_tree_foreach (libglib-2.0.so.0) http://dbmail.org/mantis/view.php?id=13 0x00000000004114b7 dbmail_imap_session_fetch_get_items (dbmail-imapd) http://dbmail.org/mantis/view.php?id=14 0x000000000040ea9b _ic_fetch_enter (dbmail-imapd) http://dbmail.org/mantis/view.php?id=15 0x00007f9b162edd68 g_thread_pool_thread_proxy (libglib-2.0.so.0) http://dbmail.org/mantis/view.php?id=16 0x00007f9b162ed3d5 g_thread_proxy (libglib-2.0.so.0) http://dbmail.org/mantis/view.php?id=17 0x00007f9b149a552a start_thread (libpthread.so.0) http://dbmail.org/mantis/view.php?id=18 0x00007f9b146e122d __clone (libc.so.6) Stack trace of thread 3630: http://dbmail.org/mantis/view.php?id=0 0x00007f9b146db939 syscall (libc.so.6) http://dbmail.org/mantis/view.php?id=1 0x00007f9b1630b2fc g_cond_wait (libglib-2.0.so.0) http://dbmail.org/mantis/view.php?id=2 0x00007f9b1629b95b g_async_queue_pop_intern_unlocked (libglib-2.0.so.0) http://dbmail.org/mantis/view.php?id=3 0x00007f9b162edda5 g_thread_pool_thread_proxy (libglib-2.0.so.0) http://dbmail.org/mantis/view.php?id=4 0x00007f9b162ed3d5 g_thread_proxy (libglib-2.0.so.0) http://dbmail.org/mantis/view.php?id=5 0x00007f9b149a552a start_thread (libpthread.so.0) http://dbmail.org/mantis/view.php?id=6 0x00007f9b146e122d __clone (libc.so.6) Stack trace of thread 3631: http://dbmail.org/mantis/view.php?id=0 0x00007f9b146db939 syscall (libc.so.6) http://dbmail.org/mantis/view.php?id=1 0x00007f9b1630b2fc g_cond_wait (libglib-2.0.so.0) http://dbmail.org/mantis/view.php?id=2 0x00007f9b1629b95b g_async_queue_pop_intern_unlocked (libglib-2.0.so.0) http://dbmail.org/mantis/view.php?id=3 0x00007f9b162edda5 g_thread_pool_thread_proxy (libglib-2.0.so.0) http://dbmail.org/mantis/view.php?id=4 0x00007f9b162ed3d5 g_thread_proxy (libglib-2.0.so.0) http://dbmail.org/mantis/view.php?id=5 0x00007f9b149a552a start_thread (libpthread.so.0) http://dbmail.org/mantis/view.php?id=6 0x00007f9b146e122d __clone (libc.so.6) Stack trace of thread 3632: http://dbmail.org/mantis/view.php?id=0 0x00007f9b146db939 syscall (libc.so.6) http://dbmail.org/mantis/view.php?id=1 0x00007f9b1630b2fc g_cond_wait (libglib-2.0.so.0) http://dbmail.org/mantis/view.php?id=2 0x00007f9b1629b95b g_async_queue_pop_intern_unlocked (libglib-2.0.so.0) http://dbmail.org/mantis/view.php?id=3 0x00007f9b162edda5 g_thread_pool_thread_proxy (libglib-2.0.so.0) http://dbmail.org/mantis/view.php?id=4 0x00007f9b162ed3d5 g_thread_proxy (libglib-2.0.so.0) http://dbmail.org/mantis/view.php?id=5 0x00007f9b149a552a start_thread (libpthread.so.0) http://dbmail.org/mantis/view.php?id=6 0x00007f9b146e122d __clone (libc.so.6) Stack trace of thread 3633: http://dbmail.org/mantis/view.php?id=0 0x00007f9b146db939 syscall (libc.so.6) http://dbmail.org/mantis/view.php?id=1 0x00007f9b1630b2fc g_cond_wait (libglib-2.0.so.0) http://dbmail.org/mantis/view.php?id=2 0x00007f9b1629b95b g_async_queue_pop_intern_unlocked (libglib-2.0.so.0) http://dbmail.org/mantis/view.php?id=3 0x00007f9b162edda5 g_thread_pool_thread_proxy (libglib-2.0.so.0) http://dbmail.org/mantis/view.php?id=4 0x00007f9b162ed3d5 g_thread_proxy (libglib-2.0.so.0) http://dbmail.org/mantis/view.php?id=5 0x00007f9b149a552a start_thread (libpthread.so.0) http://dbmail.org/mantis/view.php?id=6 0x00007f9b146e122d __clone (libc.so.6) Stack trace of thread 3620: http://dbmail.org/mantis/view.php?id=0 0x00007f9b149aa939 pthread_cond_timedwait@@GLIBC_2.3.2 (libpthread.so.0) http://dbmail.org/mantis/view.php?id=1 0x00007f9b1508cf43 doSweep (libzdb.so.11) http://dbmail.org/mantis/view.php?id=2 0x00007f9b149a552a start_thread (libpthread.so.0) http://dbmail.org/mantis/view.php?id=3 0x00007f9b146e122d __clone (libc.so.6) Stack trace of thread 3619: http://dbmail.org/mantis/view.php?id=0 0x00007f9b146e17da epoll_ctl (libc.so.6) http://dbmail.org/mantis/view.php?id=1 0x00007f9b159224a9 epoll_apply_one_change.isra.0 (libevent-2.0.so.5) http://dbmail.org/mantis/view.php?id=2 0x00007f9b15922a76 epoll_nochangelist_add (libevent-2.0.so.5) http://dbmail.org/mantis/view.php?id=3 0x00007f9b1591d5a9 evmap_io_add (libevent-2.0.so.5) http://dbmail.org/mantis/view.php?id=4 0x00007f9b1590db1e event_add (libevent-2.0.so.5) http://dbmail.org/mantis/view.php?id=5 0x0000000000407771 socket_write_cb (dbmail-imapd) http://dbmail.org/mantis/view.php?id=6 0x00007f9b1590e3cc event_base_loop (libevent-2.0.so.5) http://dbmail.org/mantis/view.php?id=7 0x00007f9b14e52c98 server_run (libdbmail.so.0) http://dbmail.org/mantis/view.php?id=8 0x00007f9b14e53751 server_mainloop (libdbmail.so.0) http://dbmail.org/mantis/view.php?id=9 0x0000000000407038 main (dbmail-imapd) http://dbmail.org/mantis/view.php?id=10 0x00007f9b14600fe0 __libc_start_main (libc.so.6) http://dbmail.org/mantis/view.php?id=11 0x00000000004070bc _start (dbmail-imapd)
====================================================================== ---------------------------------------------------------------------- (0003714) Bloody (reporter) - 11-Dec-15 05:51 http://dbmail.org/mantis/view.php?id=1077#c3714 ---------------------------------------------------------------------- possible solution (now in testing) in file dm_misc.c in function imap_append_hash_as_string increase array size: char name[4096]; char value[4096]; ---------------------------------------------------------------------- (0003715) Bloody (reporter) - 11-Dec-15 10:39 http://dbmail.org/mantis/view.php?id=1077#c3715 ---------------------------------------------------------------------- Not helped, but this helped: diff --git a/src/dm_mailbox.c b/src/dm_mailbox.c index 3558b8e..7729008 100644 --- a/src/dm_mailbox.c +++ b/src/dm_mailbox.c @@ -475,7 +475,7 @@ char * dbmail_mailbox_sorted_as_string(DbmailMailbox *self) uint64_t *msn; l = g_list_first(self->sorted); - if (! g_list_length(l)>0) + if (! (g_list_length(l)>0)) return s; t = g_string_new(""); diff --git a/src/dm_mailboxstate.c b/src/dm_mailboxstate.c index 2ef3fd3..4ec911e 100644 --- a/src/dm_mailboxstate.c +++ b/src/dm_mailboxstate.c @@ -977,7 +977,7 @@ int MailboxState_hasPermission(T M, uint64_t userid, const char *right_flag) if (! owner_id) { result = db_get_mailbox_owner(mboxid, &owner_id); MailboxState_setOwner(M, owner_id); - if (! result > 0) + if (! (result > 0)) return result; } diff --git a/src/dm_misc.c b/src/dm_misc.c index e6ca9a0..a474dc1 100644 --- a/src/dm_misc.c +++ b/src/dm_misc.c @@ -1029,7 +1029,7 @@ int g_tree_merge(GTree *a, GTree *b, int condition) type=g_strdup("AND"); - if (! g_tree_nnodes(a) > 0) + if (! (g_tree_nnodes(a) > 0)) break; /* delete from A all keys not in B */ @@ -1053,7 +1053,7 @@ int g_tree_merge(GTree *a, GTree *b, int condition) case IST_SUBSEARCH_OR: type=g_strdup("OR"); - if (! g_tree_nnodes(b) > 0) + if (! (g_tree_nnodes(b) > 0)) break; merger->tree = a; @@ -1081,7 +1081,7 @@ int g_tree_merge(GTree *a, GTree *b, int condition) case IST_SUBSEARCH_NOT: type=g_strdup("NOT"); - if (! g_tree_nnodes(b) > 0) + if (! (g_tree_nnodes(b) > 0)) break; keys = g_tree_keys(b); @@ -1341,8 +1341,8 @@ static GList * imap_append_hash_as_string(GList *list, const char *type) { size_t i = 0; char curr = 0; - char name[512]; - char value[1024]; + char name[4096]; + char value[4096*1024]; char *head = (char *)type; GList *l = NULL; Issue History Date Modified Username Field Change ====================================================================== 10-Dec-15 20:18 Bloody New Issue 11-Dec-15 05:51 Bloody Note Added: 0003714 11-Dec-15 10:39 Bloody Note Added: 0003715 ====================================================================== _______________________________________________ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev