grosjo / fts-xapian

Dovecot FTS plugin based on Xapian
GNU Lesser General Public License v2.1
97 stars 21 forks source link

rescan segfault #67

Closed slavkoja closed 3 years ago

slavkoja commented 3 years ago

I recently run rescan (by mistake) for root user and i got Segmentation fault:

doveadm fts rescan
doveadm(root): Error: chdir(/root/) failed: Permission denied (euid=20000(<unknown>) egid=20000(vmail) missing +x perm: /root, dir owned by 0:0 mode=0700)
doveadm(root): Error: stat(/root/Maildir) failed: Permission denied (euid=20000(<unknown>) egid=20000(vmail) missing +x perm: /root, dir owned by 0:0 mode=0700)
doveadm(root): Error: stat(/root/Maildir) failed: Permission denied (euid=20000(<unknown>) egid=20000(vmail) missing +x perm: /root, dir owned by 0:0 mode=0700)
doveadm(root): Error: FTS Xapian: can not create '/root/Maildir/xapian-indexes'
Segmentation fault

It is expected, that this command has no access to /root directory, but IMO this have to be properly handled.

grosjo commented 3 years ago

A gdb log would help very much

slavkoja commented 3 years ago

I am sorry, but it is a problem. I have no gdb experiences nor debug symbols available, but mainly it is simple testing dovecot under LXC, with minimal tools available...

grosjo commented 3 years ago

probably, but I can not tell whether the problem comes from dovecot core or the fts-xapian plugin

Can you kindly follow the procedure here : https://www.dovecot.org/bugreport-mail so we can see a gdb report ?

grosjo commented 3 years ago

The segment is the handling of -1 return from xxx_init function of the plugin, therefore you shall notice that to the dovecot ML about the bug. I am closing it for now