Univention Bugzilla – Full Text Bug Listing |
Summary: | Dovecot does not close its fds | ||
---|---|---|---|
Product: | UCS | Reporter: | Stefan Gohmann <gohmann> |
Component: | Assignee: | Daniel Tröder <troeder> | |
Status: | CLOSED FIXED | QA Contact: | Philipp Hahn <hahn> |
Severity: | normal | ||
Priority: | P5 | CC: | gulden, hahn, walkenhorst |
Version: | UCS 4.0 | ||
Target Milestone: | UCS 4.0-3-errata | ||
Hardware: | Other | ||
OS: | Linux | ||
What kind of report is it?: | --- | What type of bug is this?: | --- |
Who will be affected by this bug?: | --- | How will those affected feel about the bug?: | --- |
User Pain: | Enterprise Customer affected?: | ||
School Customer affected?: | ISV affected?: | ||
Waiting Support: | Flags outvoted (downgraded) after PO Review: | ||
Ticket number: | Bug group (optional): | ||
Max CVSS v3 score: |
Description
Stefan Gohmann
2015-08-11 14:12:05 CEST
Should this command also fail? DEBIAN_FRONTEND=noninteractive apt-get install univention-mail-dovecot | tee -a logfile The dovecot daemon is also restarted during the installation. (In reply to Stefan Gohmann from comment #1) > Should this command also fail? > > DEBIAN_FRONTEND=noninteractive apt-get install univention-mail-dovecot | tee > -a logfile > > The dovecot daemon is also restarted during the installation. OK, it is stderr. To reproduce use: root@master401:~# /etc/init.d/dovecot restart 2>&1 | tee -a logfile Restarting IMAP/POP3 mail server: dovecot. Redirect to a file works: root@master401:~# /etc/init.d/dovecot restart 2>/tmp/a root@master401:~# r62950 | Bug #39148 test: 01/11 daemonize FDs tests/01_base/11restart_services > * Testing /etc/init.d/dovecot restart ... > COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME > dovecot 12747 root 2w REG 253,0 0 391212 /tmp/tmp.GQjI7zdF8b/2 > log 12750 root 2w REG 253,0 0 391212 /tmp/tmp.GQjI7zdF8b/2 Also does not close other inherited FDs; see `grep -A10 ^close_fds /etc/init.d/apache2` (In reply to Philipp Hahn from comment #3) > r62950 | Bug #39148 test: 01/11 daemonize FDs > tests/01_base/11restart_services > > > * Testing /etc/init.d/dovecot restart ... > > COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME > > dovecot 12747 root 2w REG 253,0 0 391212 /tmp/tmp.GQjI7zdF8b/2 > > log 12750 root 2w REG 253,0 0 391212 /tmp/tmp.GQjI7zdF8b/2 > > Also does not close other inherited FDs; > see `grep -A10 ^close_fds /etc/init.d/apache2` The test case failed, please check. I'm not sure we should restart every service at the beginning of our Jenkins tests (01/11). Can you move it to the end of the tests? There is a bug filed in upstream: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=734897 Dovecot 2.0 did receive an official patch to close stderr: http://hg.dovecot.org/dovecot-2.0/rev/08e4280e5bfd But it seems in Dovecot 2.2 only stdin and stdout are closed: http://hg.dovecot.org/dovecot-2.2/file/7378ab8e3b4d/src/master/main.c#l845 The init script now simply redirects stderr to /dev/null. All error messages are sent to /var/log/dovecot.* anyway. Commit: 63410 YAML (r63411): 2015-09-02-univention-mail-dovecot.yaml OK: r63410 OK: r63411 OK: /etc/init.d/dovecot restart OK: lsof `tty` OK: DEBIAN_FRONTEND=noninteractive aptitude -y install '?source-package(^univention-mail-dovecot$)~i' OK: lsof -a -p `pgrep dovecot` -d 1-3 FIXED: errata-announce -V 2015-09-02-univention-mail-dovecot.yaml r63547 | YAML Bug #39302 OK 2015-09-02-univention-mail-dovecot.yaml |