[Dovecot] stats + fts squat plugins, indexer-worker error on message indexing

Timo Sirainen tss at iki.fi
Wed Apr 25 17:43:06 EEST 2012


On 25.4.2012, at 17.20, David Warden wrote:

> Apr 25 09:56:26 wardentest3 dovecot: service=indexer-worker user=warden rip= Error: open(/proc/self/io) failed: Permission
..
> Based on http://wiki2.dovecot.org/Services#indexer-worker it seems like this is because the indexer-worker process is created as root but at the time of indexing the indexer-worker drops privs to the mail user. In /proc/<indexer-worker pid>/, io is mode 0400 and owned by root, so it makes sense that the mail user would be unable to read that file.

Does the attached patch fix it?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff
Type: application/octet-stream
Size: 2639 bytes
Desc: not available
URL: <http://dovecot.org/pipermail/dovecot/attachments/20120425/63f4f2f1/attachment-0004.obj>
-------------- next part --------------

> The strange thing is it looks like the stats are still collected (unless I am reading the output of the stats dump incorrectly):
> 
> [root at wardentest3 mailtest]# doveadm stats dump -s /var/run/dovecot/mailtest/stats command user=warden
> cmd	args	session	user	last_update	user_cpu	sys_cpu	min_faults	maj_faults	vol_cs	invol_cs	disk_input	disk_output	read_count	read_bytes	write_count	write_bytes	mail_lookup_path	mail_lookup_attr	mail_read_count	mail_read_bytes	mail_cache_hits
> select	inbox	27fb87218302984f084c0000ae899e04	warden	1335362182.950250	0.000000	0.000000	172	0	46	0	0	12288	13	7883	4	381	0	0	0	0	0
> search	text "warden"	27fb87218302984f084c0000ae899e04	warden	1335362186.588023	0.001000	0.000000	32	0	4	1	0	0	4	108	1	43	0	0	0	0	0
> logout		27fb87218302984f084c0000ae899e04	warden	1335362189.161790	0.000000	0.000000	1	0	0	3	0	0	1	108	3	157	0	0	0	0	0

These are IMAP command statistics. The problem was only with indexer-worker.


More information about the dovecot mailing list