Re: dotlock causing crashes

2017-08-18 Thread Aki Tuomi


On 16.08.2017 21:17, Ian Bobbitt wrote:
> OS: CentOS 7 x86_64
> Dovecot version: 2.2.31 (65cde28) (GhettoForge RPM)
> Filesystem: GlusterFS, but working on changing that. Only one server is 
> receiving activity.
>
> Was getting messages about corrupt dovecot.map.index files. Changed to 
> dotlock from fcntl to try to fix that.
>
> Reading symbols from /usr/libexec/dovecot/imap...(no debugging symbols 
> found)...done.
> [New LWP 74012]
> Core was generated by `dovecot/imap'.
> Program terminated with signal 6, Aborted.
> #0  0x7fa262c741d7 in __GI_raise (sig=sig@entry=6) at 
> ../nptl/sysdeps/unix/sysv/linux/raise.c:56
> 56  return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
> (gdb) bt full
> #0  0x7fa262c741d7 in __GI_raise (sig=sig@entry=6) at 
> ../nptl/sysdeps/unix/sysv/linux/raise.c:56
> resultvar = 0
> pid = 74012
> selftid = 74012
> #1  0x7fa262c758c8 in __GI_abort () at abort.c:90
> save_stage = 2
> act = {__sigaction_handler = {sa_handler = 0x7ffd7009f401, 
> sa_sigaction = 0x7ffd7009f401}, sa_mask = {__val =
> {0, 0, 140335431377968, 140335423109592, 140335422613219, 4246482, 
> 140335418575669, 12278048, 4192326493288016896,
> 12278592, 140335423192931, 0, 0, 140335425698848, 12280232, 
> 140726483153732}}, sa_flags = 1657305400, sa_restorer = 0x79a}
> sigs = {__val = {32, 0 }}
> #2  0x7fa26309eac6 in default_fatal_finish (type=, 
> status=status@entry=0) at failures.c:201
> backtrace = 0xbb5958 "/usr/lib64/dovecot/libdovecot.so.0(+0x9eace) 
> [0x7fa26309eace] ->
> /usr/lib64/dovecot/libdovecot.so.0(+0x9ebae) [0x7fa26309ebae] -> 
> /usr/lib64/dovecot/libdovecot.so.0(i_fatal+0)
> [0x7fa26303012c] -> /usr"...
> #3  0x7fa26309ebae in i_internal_fatal_handler (ctx=0x7ffd7009f4d0, 
> format=, args=) at
> failures.c:670
> status = 0
> #4  0x7fa26303012c in i_panic (format=format@entry=0x7fa2630d11de "file 
> %s: line %d: unreached") at failures.c:275
> ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0, 
> timestamp_usecs = 0}
> args = {{gp_offset = 24, fp_offset = 48, overflow_arg_area = 
> 0x7ffd7009f5d0, reg_save_area = 0x7ffd7009f510}}
> #5  0x7fa2630a344f in file_lock_do (fd=fd@entry=20, 
> path=path@entry=0xbb5868
> "/gnoc/mail/home/bgeels/mail/mailboxes/Junk/dbox-Mails/.vsize.lock23f657caa43d8796",
>  lock_type=lock_type@entry=1,
> lock_method=lock_method@entry=FILE_LOCK_METHOD_DOTLOCK, timeout_secs=0, 
> error_r=error_r@entry=0x7ffd7009f768) at
> file-lock.c:285
> lock_type_str = 0x7fa2630e6948 "write-lock"
> started = 1502905468
> ret = 
> __FUNCTION__ = "file_lock_do"
> #6  0x7fa2630a3796 in file_wait_lock_error (fd=20, path=0xbb5868
> "/gnoc/mail/home/bgeels/mail/mailboxes/Junk/dbox-Mails/.vsize.lock23f657caa43d8796",
>  lock_type=1,
> lock_method=FILE_LOCK_METHOD_DOTLOCK, timeout_secs=, 
> lock_r=0xc4ec10, error_r=0x7ffd7009f768) at
> file-lock.c:314
> ret = 
> #7  0x7fa2630a3813 in file_try_lock_error (fd=, 
> path=, lock_type=lock_type@entry=1,
> lock_method=lock_method@entry=FILE_LOCK_METHOD_DOTLOCK, 
> lock_r=lock_r@entry=0xc4ec10,
> error_r=error_r@entry=0x7ffd7009f768) at file-lock.c:66
> No locals.
> #8  0x7fa2630a0955 in try_create_new (error_r=0x7ffd7009f768, 
> lock_r=0xc4ec10, fd_r=0x7ffd7009f700,
> set=0x7ffd7009f770, path=0xc2f930 
> "/gnoc/mail/home/bgeels/mail/mailboxes/Junk/dbox-Mails/.vsize.lock") at
> file-create-locked.c:65
> fd = 20
> orig_errno = 
> ret = -1
> temp_path = 0xbb5830
> mode = 0
> uid = 
> gid = 4294967295
> #9  file_create_locked (path=0xc2f930 
> "/gnoc/mail/home/bgeels/mail/mailboxes/Junk/dbox-Mails/.vsize.lock",
> set=set@entry=0x7ffd7009f770, lock_r=lock_r@entry=0xc4ec10, 
> created_r=created_r@entry=0x7ffd7009f767,
> error_r=error_r@entry=0x7ffd7009f768) at file-create-locked.c:118
> i = 0
> fd = 
> ret = 
> __FUNCTION__ = "file_create_locked"
> #10 0x7fa2633e8f80 in vsize_update_lock_full (update=0xc4ebd0, 
> lock_secs=lock_secs@entry=0) at index-mailbox-size.c:150
> box = 0xc2e268
> perm = 0xc2e440
> set = {lock_timeout_secs = 0, lock_method = FILE_LOCK_METHOD_DOTLOCK, 
> mode = 384, uid = 0, gid = 4294967295,
> gid_origin = 0xc2ea58 "/gnoc/mail/home/bgeels/mail/mailboxes/Junk"}
> error = 0x7fa2633f2062  
> "1\300[]A\\\303\017\037\200"
> created = false
> #11 0x7fa2633e9057 in index_mailbox_vsize_update_try_lock 
> (update=) at index-mailbox-size.c:167
> No locals.
> #12 0x7fa2633e9755 in index_mailbox_vsize_update_appends (box= out>) at index-mailbox-size.c:479
> update = 0xc4ebd0
> status = {messages = 1323, recent = 0, unseen = 0, uidvalidity = 
> 1413091786, uidnext = 6750, first_unseen_seq =
> 0, first_recent_uid = 5886, last_cached_seq = 0, highest_modseq = 0, 
> highest_pvt_modseq 

dotlock causing crashes

2017-08-16 Thread Ian Bobbitt
OS: CentOS 7 x86_64
Dovecot version: 2.2.31 (65cde28) (GhettoForge RPM)
Filesystem: GlusterFS, but working on changing that. Only one server is 
receiving activity.

Was getting messages about corrupt dovecot.map.index files. Changed to dotlock 
from fcntl to try to fix that.

Reading symbols from /usr/libexec/dovecot/imap...(no debugging symbols 
found)...done.
[New LWP 74012]
Core was generated by `dovecot/imap'.
Program terminated with signal 6, Aborted.
#0  0x7fa262c741d7 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
56return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
(gdb) bt full
#0  0x7fa262c741d7 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
resultvar = 0
pid = 74012
selftid = 74012
#1  0x7fa262c758c8 in __GI_abort () at abort.c:90
save_stage = 2
act = {__sigaction_handler = {sa_handler = 0x7ffd7009f401, sa_sigaction 
= 0x7ffd7009f401}, sa_mask = {__val =
{0, 0, 140335431377968, 140335423109592, 140335422613219, 4246482, 
140335418575669, 12278048, 4192326493288016896,
12278592, 140335423192931, 0, 0, 140335425698848, 12280232, 140726483153732}}, 
sa_flags = 1657305400, sa_restorer = 0x79a}
sigs = {__val = {32, 0 }}
#2  0x7fa26309eac6 in default_fatal_finish (type=, 
status=status@entry=0) at failures.c:201
backtrace = 0xbb5958 "/usr/lib64/dovecot/libdovecot.so.0(+0x9eace) 
[0x7fa26309eace] ->
/usr/lib64/dovecot/libdovecot.so.0(+0x9ebae) [0x7fa26309ebae] -> 
/usr/lib64/dovecot/libdovecot.so.0(i_fatal+0)
[0x7fa26303012c] -> /usr"...
#3  0x7fa26309ebae in i_internal_fatal_handler (ctx=0x7ffd7009f4d0, 
format=, args=) at
failures.c:670
status = 0
#4  0x7fa26303012c in i_panic (format=format@entry=0x7fa2630d11de "file %s: 
line %d: unreached") at failures.c:275
ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0, 
timestamp_usecs = 0}
args = {{gp_offset = 24, fp_offset = 48, overflow_arg_area = 
0x7ffd7009f5d0, reg_save_area = 0x7ffd7009f510}}
#5  0x7fa2630a344f in file_lock_do (fd=fd@entry=20, path=path@entry=0xbb5868
"/gnoc/mail/home/bgeels/mail/mailboxes/Junk/dbox-Mails/.vsize.lock23f657caa43d8796",
 lock_type=lock_type@entry=1,
lock_method=lock_method@entry=FILE_LOCK_METHOD_DOTLOCK, timeout_secs=0, 
error_r=error_r@entry=0x7ffd7009f768) at
file-lock.c:285
lock_type_str = 0x7fa2630e6948 "write-lock"
started = 1502905468
ret = 
__FUNCTION__ = "file_lock_do"
#6  0x7fa2630a3796 in file_wait_lock_error (fd=20, path=0xbb5868
"/gnoc/mail/home/bgeels/mail/mailboxes/Junk/dbox-Mails/.vsize.lock23f657caa43d8796",
 lock_type=1,
lock_method=FILE_LOCK_METHOD_DOTLOCK, timeout_secs=, 
lock_r=0xc4ec10, error_r=0x7ffd7009f768) at
file-lock.c:314
ret = 
#7  0x7fa2630a3813 in file_try_lock_error (fd=, 
path=, lock_type=lock_type@entry=1,
lock_method=lock_method@entry=FILE_LOCK_METHOD_DOTLOCK, 
lock_r=lock_r@entry=0xc4ec10,
error_r=error_r@entry=0x7ffd7009f768) at file-lock.c:66
No locals.
#8  0x7fa2630a0955 in try_create_new (error_r=0x7ffd7009f768, 
lock_r=0xc4ec10, fd_r=0x7ffd7009f700,
set=0x7ffd7009f770, path=0xc2f930 
"/gnoc/mail/home/bgeels/mail/mailboxes/Junk/dbox-Mails/.vsize.lock") at
file-create-locked.c:65
fd = 20
orig_errno = 
ret = -1
temp_path = 0xbb5830
mode = 0
uid = 
gid = 4294967295
#9  file_create_locked (path=0xc2f930 
"/gnoc/mail/home/bgeels/mail/mailboxes/Junk/dbox-Mails/.vsize.lock",
set=set@entry=0x7ffd7009f770, lock_r=lock_r@entry=0xc4ec10, 
created_r=created_r@entry=0x7ffd7009f767,
error_r=error_r@entry=0x7ffd7009f768) at file-create-locked.c:118
i = 0
fd = 
ret = 
__FUNCTION__ = "file_create_locked"
#10 0x7fa2633e8f80 in vsize_update_lock_full (update=0xc4ebd0, 
lock_secs=lock_secs@entry=0) at index-mailbox-size.c:150
box = 0xc2e268
perm = 0xc2e440
set = {lock_timeout_secs = 0, lock_method = FILE_LOCK_METHOD_DOTLOCK, 
mode = 384, uid = 0, gid = 4294967295,
gid_origin = 0xc2ea58 "/gnoc/mail/home/bgeels/mail/mailboxes/Junk"}
error = 0x7fa2633f2062  
"1\300[]A\\\303\017\037\200"
created = false
#11 0x7fa2633e9057 in index_mailbox_vsize_update_try_lock 
(update=) at index-mailbox-size.c:167
No locals.
#12 0x7fa2633e9755 in index_mailbox_vsize_update_appends (box=) at index-mailbox-size.c:479
update = 0xc4ebd0
status = {messages = 1323, recent = 0, unseen = 0, uidvalidity = 
1413091786, uidnext = 6750, first_unseen_seq =
0, first_recent_uid = 5886, last_cached_seq = 0, highest_modseq = 0, 
highest_pvt_modseq = 0, keywords = 0x0,
permanent_flags = 0, flags = 0, permanent_keywords = 0, allow_new_keywords = 0, 
nonpermanent_modseqs = 0,
no_modseq_tracking = 0, have_guids = 1,
  have_save_guids = 1, have_only_guid128 = 0}
#13 0x7fa2633f633c in