Re: [Dovecot] Segfault in ACL Plugin + user shared folders
On Sat, 2009-04-18 at 14:46 +0200, Markus Werner wrote: On Thu, Apr 16, 2009 at 08:10:00PM -0400, Timo Sirainen wrote: On Wed, 2009-04-08 at 01:03 +0200, Markus Werner wrote: With list = children the namespace ist still not listed, but that's no Fixed: http://hg.dovecot.org/dovecot-1.2/rev/163c3f85a3aa problem for me. With list = all now there is a folder named % listed, directly under #User/, additionaly to mar...@example.com. Talking IMAP manually, this looks like this: a003 LIST #User/% * LIST (\Noselect \HasChildren) / #User/% Fixed: http://hg.dovecot.org/dovecot-1.2/rev/6a4cccf11702 signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Segfault in ACL Plugin + user shared folders
On Mon, Apr 20, 2009 at 01:28:47PM -0400, Timo Sirainen wrote: On Sat, 2009-04-18 at 14:46 +0200, Markus Werner wrote: On Thu, Apr 16, 2009 at 08:10:00PM -0400, Timo Sirainen wrote: On Wed, 2009-04-08 at 01:03 +0200, Markus Werner wrote: With list = children the namespace ist still not listed, but that's no Fixed: http://hg.dovecot.org/dovecot-1.2/rev/163c3f85a3aa problem for me. With list = all now there is a folder named % listed, directly under #User/, additionaly to mar...@example.com. Talking IMAP manually, this looks like this: a003 LIST #User/% * LIST (\Noselect \HasChildren) / #User/% Fixed: http://hg.dovecot.org/dovecot-1.2/rev/6a4cccf11702 Both fixes work. Thanks.
Re: [Dovecot] Segfault in ACL Plugin + user shared folders
On Thu, Apr 16, 2009 at 08:10:00PM -0400, Timo Sirainen wrote: On Wed, 2009-04-08 at 01:03 +0200, Markus Werner wrote: With list = children the namespace ist still not listed, but that's no problem for me. With list = all now there is a folder named % listed, directly under #User/, additionaly to mar...@example.com. Talking IMAP manually, this looks like this: a003 LIST #User/% * LIST (\Noselect \HasChildren) / #User/% * LIST (\Noselect \HasChildren) / #User/t...@example.com * LIST (\Noselect \HasChildren) / #User/stefa...@example.com a003 OK List completed. a004 LIST #User/%/% * LIST (\HasNoChildren) / #User/t...@example.com/Shared * LIST (\HasNoChildren) / #User/stefa...@example.com/Software * LIST (\HasNoChildren) / #User/stefa...@example.com/Junk * LIST (\HasNoChildren) / #User/stefa...@example.com/Apple a004 OK List completed. or with *: a003 LIST #User/* * LIST (\Noselect \HasChildren) / #User/* * LIST (\Noselect \HasChildren) / #User/t...@example.com * LIST (\Noselect \HasChildren) / #User/stefa...@example.com * LIST (\HasNoChildren) / #User/t...@example.com/Shared * LIST (\HasNoChildren) / #User/stefa...@example.com/Software * LIST (\HasNoChildren) / #User/stefa...@example.com/Junk * LIST (\HasNoChildren) / #User/stefa...@example.com/Apple a003 OK List completed. a004 LIST #User/*/* * LIST (\HasNoChildren) / #User/t...@example.com/Shared * LIST (\HasNoChildren) / #User/stefa...@example.com/Software * LIST (\HasNoChildren) / #User/stefa...@example.com/Junk * LIST (\HasNoChildren) / #User/stefa...@example.com/Apple a004 OK List completed.
Re: [Dovecot] Segfault in ACL Plugin + user shared folders
On Thu, Apr 16, 2009 at 07:49:17PM -0400, Timo Sirainen wrote: On Wed, 2009-04-08 at 14:40 +0200, Markus Werner wrote: #6 0x080b50eb in mail_user_init (username=0x829854e ) at mail-user.c:30 Fixed, although I don't really understand why any IMAP client would do that. That fixed it. Thanks. Just for your information: Felamimail, the mail client of EGroupware, seems to do that.
Re: [Dovecot] Segfault in ACL Plugin + user shared folders
On Thu, Apr 16, 2009 at 08:10:00PM -0400, Timo Sirainen wrote: With list = children the namespace ist still not listed, but that's no problem for me. With list = all now there is a folder named % listed, directly under #User/, additionaly to mar...@example.com. Neither should be happening.. What does shared-mailboxes.db file contain? shared/shared-boxes/user/mar...@example.com/t...@example.com 1 shared/shared-boxes/user/t...@example.com/mar...@example.com 1 Accessing the folder mar...@example.com/ForTest with Thunderbird results in a segfault. Mutt works. Oh. This was a stupid bug. Fixed: http://hg.dovecot.org/dovecot-1.2/rev/d7847f03ae65 Thanks.
Re: [Dovecot] Segfault in ACL Plugin + user shared folders
On Wed, 2009-04-08 at 01:03 +0200, Markus Werner wrote: Hi Timo, http://hg.dovecot.org/dovecot-1.2/rev/7d484e0f0789 http://hg.dovecot.org/dovecot-1.2/rev/3a30d73fc463 http://hg.dovecot.org/dovecot-1.2/rev/b6abc84440df With list = children the namespace ist still not listed, but that's no problem for me. With list = all now there is a folder named % listed, directly under #User/, additionaly to mar...@example.com. Neither should be happening.. What does shared-mailboxes.db file contain? Accessing the folder mar...@example.com/ForTest with Thunderbird results in a segfault. Mutt works. Oh. This was a stupid bug. Fixed: http://hg.dovecot.org/dovecot-1.2/rev/d7847f03ae65 signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Segfault in ACL Plugin + user shared folders
Another one: #0 0xb7fbf424 in __kernel_vsyscall () No symbol table info available. #1 0xb7e7a640 in raise () from /lib/i686/cmov/libc.so.6 No symbol table info available. #2 0xb7e7c018 in abort () from /lib/i686/cmov/libc.so.6 No symbol table info available. #3 0x080ee9a5 in default_fatal_finish (type=value optimized out, status=0) at failures.c:161 backtrace = 0x8282480 imap [0x80ee991] - imap [0x80eea12] - imap [0x80ee399] - imap [0x80b50eb] - imap(shared_storage_get_namespace+0x2bf) [0x8075fff] - imap [0x80757d7] - imap [0x8063034] - imap(cmd_list_full+0x514... #4 0x080eea12 in i_internal_fatal_handler (type=LOG_TYPE_PANIC, status=0, fmt=0x810632c file %s: line %d (%s): assertion failed: (%s), args=0xbfbda674 \017\v\021\b\036) at failures.c:441 No locals. #5 0x080ee399 in i_panic (format=0x810632c file %s: line %d (%s): assertion failed: (%s)) at failures.c:208 No locals. #6 0x080b50eb in mail_user_init (username=0x829854e ) at mail-user.c:30 user = value optimized out pool = value optimized out __PRETTY_FUNCTION__ = mail_user_init #7 0x08075fff in shared_storage_get_namespace (_storage=0x82929d0, _name=0xbfbda724, ns_r=0xbfbda728) at shared-storage.c:224 user = (struct mail_user *) 0x828e270 ns = (struct mail_namespace *) 0x0 owner = value optimized out domain = 0x0 username = 0x829854e userdomain = 0x829854e name = 0x810fc97 INBOX p = value optimized out dest = value optimized out error = value optimized out prefix = (string_t *) 0x82823b0 location = value optimized out ret = value optimized out static_tab = {{key = 117 'u', value = 0x0, long_key = 0x8110b32 user}, {key = 110 'n', value = 0x0, long_key = 0x8109830 username}, { key = 100 'd', value = 0x0, long_key = 0x8109839 domain}, {key = 104 'h', value = 0x0, long_key = 0x8109807 home}, {key = 0 '\0', value = 0x0, long_key = 0x0}} __PRETTY_FUNCTION__ = shared_storage_get_namespace #8 0x080757d7 in shared_list_join_refpattern (list=0x8292dd8, ref=0x8298548 #User/, pattern=0x8298550 *) at shared-list.c:148 ns = value optimized out ns_ref = 0x829854e prefix = 0x8292998 #User/ #9 0x08063034 in cmd_list_continue (cmd=0x8293448) at cmd-list.c:672 _data_stack_cur_id = 4 ctx = (struct cmd_list_context *) 0x82934e0 #10 0x08063a04 in cmd_list_full (cmd=0x8293448, lsub=false) at cmd-list.c:903 client = (struct client *) 0x82931b8 args = (const struct imap_arg *) 0x82984e8 arg = value optimized out ctx = (struct cmd_list_context *) 0x82934e0 patterns = {arr = {buffer = 0x8293508, element_size = 4}, v = 0x8293508, v_modifiable = 0x8293508} pattern = 0x8298550 * #11 0x08063d09 in cmd_list (cmd=0x8293448) at cmd-list.c:918 No locals. #12 0x0806700c in client_command_input (cmd=0x8293448) at client.c:603 client = (struct client *) 0x82931b8 command = value optimized out __PRETTY_FUNCTION__ = client_command_input #13 0x080670a9 in client_command_input (cmd=0x8293448) at client.c:652 client = (struct client *) 0x82931b8 command = value optimized out __PRETTY_FUNCTION__ = client_command_input #14 0x080676ed in client_handle_input (client=0x82931b8) at client.c:693 _data_stack_cur_id = 3 ret = value optimized out remove_io = value optimized out handled_commands = false #15 0x08067ba3 in client_input (client=0x82931b8) at client.c:748 cmd = value optimized out output = (struct ostream *) 0x829336c bytes = value optimized out __PRETTY_FUNCTION__ = client_input #16 0x080f73a0 in io_loop_handler_run (ioloop=0x828aae0) at ioloop-epoll.c:208 ctx = (struct ioloop_handler_context *) 0x828abe8 event = (const struct epoll_event *) 0x828ac28 list = (struct io_list *) 0x82933f0 io = (struct io_file *) 0x82933c8 tv = {tv_sec = 1799, tv_usec = 999778} t_id = 2 msecs = value optimized out ret = 1 i = 0 j = 0 call = value optimized out #17 0x080f6830 in io_loop_run (ioloop=0x828aae0) at ioloop.c:338 No locals. #18 0x080704c5 in main (argc=Cannot access memory at address 0x4c2f ) at main.c:320
[Dovecot] Segfault in ACL Plugin + user shared folders
Hi Timo, I have another problem, this time with user shared folders: User markus shared the folder ForTest to test: SETACL INBOX/ForTest test akxeilrwts dovecot-acl and shared-mailboxes.db have been successfully updated. As user test the folder (and #User namespace) is not visible. When I configure the shared namespace with list = yes, the namespace and folder became visible and accessible, but lines like this are logged: Apr 7 22:08:58 asterix dovecot: IMAP(test): acl vfile: reading file /var/spool/dovecot/users/test/Maildir/.Shared/dovecot-acl Apr 7 22:09:03 asterix dovecot: IMAP(test): Invalid namespace prefix %u/ vs % Apr 7 22:09:03 asterix dovecot: IMAP(test): auth input: uid=2000 Apr 7 22:09:03 asterix dovecot: IMAP(test): auth input: gid=2000 Apr 7 22:09:03 asterix dovecot: IMAP(test): auth input: home=/var/spool/dovecot/users/markus Apr 7 22:09:03 asterix dovecot: IMAP(test): maildir: data=/var/spool/dovecot/users/markus/Maildir:INDEX=~/Maildir/index/shared/markus Apr 7 22:09:03 asterix dovecot: IMAP(test): maildir++: root=/var/spool/dovecot/users/markus/Maildir, index=/var/spool/dovecot/users/markus/Maildir, index=/var/spool/dovecot/users/test/Maildir/index/shared/markus, control=, inbox=/var/spool/dovecot/users/markus/Maildir Apr 7 22:09:03 asterix dovecot: IMAP(test): acl: initializing backend with data: vfile Apr 7 22:09:03 asterix dovecot: IMAP(test): acl: acl username = test Apr 7 22:09:03 asterix dovecot: IMAP(test): acl: owner = 0 Apr 7 22:09:03 asterix dovecot: IMAP(test): acl vfile: Global ACL directory: (null) Apr 7 22:09:03 asterix dovecot: IMAP(test): acl vfile: reading file /var/spool/dovecot/users/markus/Maildir/.ForTest/dovecot-acl Apr 7 22:09:08 asterix dovecot: IMAP(test): Invalid namespace prefix %u/ vs markus When I try to access the folder directly with list = children set, then dovecot segfaults. Last lines in logfile: Apr 7 22:28:04 asterix dovecot: IMAP(test): acl: initializing backend with data: vfile Apr 7 22:28:04 asterix dovecot: IMAP(test): acl: acl username = test Apr 7 22:28:04 asterix dovecot: IMAP(test): acl: owner = 0 Apr 7 22:28:04 asterix dovecot: IMAP(test): acl vfile: Global ACL directory: (null) Apr 7 22:28:04 asterix dovecot: child 5441 (imap) killed with signal 11 (core dumped) The backtrace looks like the one I got with your first quota fix, but quota works now and this error is reproducible with or without the quota plugin: 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 i486-linux-gnu... warning: Can't read pathname for load map: Input/output error. Reading symbols from /lib/i686/cmov/libdl.so.2...done. Loaded symbols for /lib/i686/cmov/libdl.so.2 Reading symbols from /lib/i686/cmov/libc.so.6...done. Loaded symbols for /lib/i686/cmov/libc.so.6 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /opt/dovecot/lib/dovecot/imap/lib01_acl_plugin.so...done. Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib01_acl_plugin.so Reading symbols from /opt/dovecot/lib/dovecot/imap/lib02_imap_acl_plugin.so...done. Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib02_imap_acl_plugin.so Reading symbols from /opt/dovecot/lib/dovecot/imap/lib10_quota_plugin.so...done. Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib10_quota_plugin.so Reading symbols from /opt/dovecot/lib/dovecot/imap/lib11_imap_quota_plugin.so...done. Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib11_imap_quota_plugin.so Reading symbols from /opt/dovecot/lib/dovecot/imap/lib20_fts_plugin.so...done. Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib20_fts_plugin.so Reading symbols from /opt/dovecot/lib/dovecot/imap/lib21_fts_squat_plugin.so...done. Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib21_fts_squat_plugin.so Reading symbols from /lib/i686/cmov/libnss_compat.so.2...done. Loaded symbols for /lib/i686/cmov/libnss_compat.so.2 Reading symbols from /lib/i686/cmov/libnsl.so.1...done. Loaded symbols for /lib/i686/cmov/libnsl.so.1 Reading symbols from /lib/i686/cmov/libnss_nis.so.2...done. Loaded symbols for /lib/i686/cmov/libnss_nis.so.2 Reading symbols from /lib/i686/cmov/libnss_files.so.2...done. Loaded symbols for /lib/i686/cmov/libnss_files.so.2 Core was generated by `imap'. Program terminated with signal 11, Segmentation fault. [New process 5441] #0 0xb7ee43f1 in acl_mailbox_get_aclobj (box=0x8693488) at acl-mailbox.c:49 49 struct acl_mailbox *abox = ACL_CONTEXT(box); (gdb) bt full #0 0xb7ee43f1 in acl_mailbox_get_aclobj (box=0x8693488) at acl-mailbox.c:49 No locals. #1 0xb7d77c89 in cmd_myrights (cmd=0x8658b90) at imap-acl-plugin.c:305 storage = (struct mail_storage
Re: [Dovecot] Segfault in ACL Plugin + user shared folders
On Tue, 2009-04-07 at 23:01 +0200, Markus Werner wrote: I have another problem, this time with user shared folders: http://hg.dovecot.org/dovecot-1.2/rev/7d484e0f0789 http://hg.dovecot.org/dovecot-1.2/rev/3a30d73fc463 http://hg.dovecot.org/dovecot-1.2/rev/b6abc84440df signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Segfault in ACL Plugin + user shared folders
Hi Timo, http://hg.dovecot.org/dovecot-1.2/rev/7d484e0f0789 http://hg.dovecot.org/dovecot-1.2/rev/3a30d73fc463 http://hg.dovecot.org/dovecot-1.2/rev/b6abc84440df With list = children the namespace ist still not listed, but that's no problem for me. With list = all now there is a folder named % listed, directly under #User/, additionaly to mar...@example.com. Accessing the folder mar...@example.com/ForTest with Thunderbird results in a segfault. Mutt works. (FYI: I changed the usernames, now they include @domain, if that matters) Apr 8 00:50:41 asterix dovecot: imap-login: Login: user=t...@example.com, method=PLAIN, rip=192.168.128.151, lip=192.168.128.151, secured Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): Loading modules from directory: /opt/dovecot/lib/dovecot/imap Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): Module loaded: /opt/dovecot/lib/dovecot/imap/lib01_acl_plugin.so Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): Module loaded: /opt/dovecot/lib/dovecot/imap/lib02_imap_acl_plugin.so Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): Module loaded: /opt/dovecot/lib/dovecot/imap/lib10_quota_plugin.so Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): Module loaded: /opt/dovecot/lib/dovecot/imap/lib11_imap_quota_plugin.so Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): Module loaded: /opt/dovecot/lib/dovecot/imap/lib20_fts_plugin.so Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): Module loaded: /opt/dovecot/lib/dovecot/imap/lib21_fts_squat_plugin.so Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): Effective uid=2000, gid=2000, home=/var/spool/dovecot/users/example.com/test Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): Quota root: name=user backend=dict args=:file:/var/spool/dovecot/users/example.com/test/Maildir/dovecot-quota Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): Quota rule: root=user mailbox=* bytes=2147483648 messages=5 Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): dict quota: user=t...@example.com, uri=file:/var/spool/dovecot/users/example.com/test/Maildir/dovecot-quota, noenforcing=0 Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): Namespace: type=private, prefix=INBOX/, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): maildir: data=~/Maildir Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): maildir++: root=/var/spool/dovecot/users/example.com/test/Maildir, index=, control=, inbox=/var/spool/dovecot/users/example.com/test/Maildir Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): acl: initializing backend with data: vfile Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): acl: acl username = t...@example.com Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): acl: owner = 1 Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): acl vfile: Global ACL directory: (null) Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): Namespace: type=public, prefix=#Shared/, sep=/, inbox=no, hidden=no, list=yes, subscriptions=yes Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): maildir: data=/var/spool/dovecot/sharedfolders:INDEX=~/Maildir/index/public:CONTROL=~/Maildir/control/public Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): maildir++: root=/var/spool/dovecot/sharedfolders, index=/var/spool/dovecot/users/example.com/test/Maildir/index/public, control=/var/spool/dovecot/users/example.com/test/Maildir/control/public, inbox= Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): acl: initializing backend with data: vfile Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): acl: acl username = t...@example.com Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): acl: owner = 0 Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): acl vfile: Global ACL directory: (null) Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): Namespace: type=shared, prefix=#User/%u/, sep=/, inbox=no, hidden=no, list=yes, subscriptions=no Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): shared: root=, index=, control=, inbox= Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): dict quota: user=mar...@example.com, uri=file:/var/spool/dovecot/users/example.com/test/Maildir/dovecot-quota, noenforcing=0 Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): auth input: uid=2000 Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): auth input: gid=2000 Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): auth input: home=/var/spool/dovecot/users/example.com/markus Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): auth input: quota_rule=*:storage=20G:messages=50 Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): maildir: data=/var/spool/dovecot/users/example.com/markus/Maildir:INDEX=~/Maildir/index/shared/mar...@example.com Apr 8 00:50:41 asterix dovecot: IMAP(t...@example.com): maildir++: