Comment 10 for bug 970921

Revision history for this message
Milan (public-mjh) wrote :

I observe the very same behaviour on 12.04: The processes cleanup, rewrite and smtpd crash with signal 6 if they are within a chroot. (In the default configuration, chroots are used for these processes and it works here e.g. on Ubuntu 10.04).

Sample log message:

Apr 8 15:57:29 two postfix/master[7938]: warning: process /usr/lib/postfix/smtpd pid 7946 killed by signal 6
Apr 8 15:57:29 two postfix/master[7938]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling

I did an "strace -s 4096 -f" of the postfix master process with smtpd et al. in chroot, and I believe that these are the relevant parts:

(process 7938 is the postfix master process)

7938 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f71f2a439d0) = 7946
...
7946 execve("/usr/lib/postfix/smtpd", ["smtpd", "-n", "127.0.0.1:25", "-t", "inet", "-u", "-c", "-o", "smtpd_tls_auth_only=no"], [/* 4 vars */]) = 0
...
7946 chroot("/var/spool/postfix") = 0
...
7946 clone(child_stack=0x7f95d51cbff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f95d51cc9d0, tls=0x7f95d51cc700, child_tidptr=0x7f95d51cc9d0) = 7954
7954 set_robust_list(0x7f95d51cc9e0, 0x18) = 0
7954 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
...
7954 open("/dev/tty", O_RDWR|O_NOCTTY|O_NONBLOCK) = -1 ENOENT (No such file or directory)
7954 writev(2, [{"libgcc_s.so.1 must be installed for pthread_cancel to work\n", 59}], 1) = 59
7954 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f95d88ca000
7954 rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
7954 tgkill(7946, 7954, SIGABRT) = 0
7954 --- SIGABRT (Aborted) @ 0 (0) ---
...
7946 +++ killed by SIGABRT +++
...
7938 wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGABRT}], WNOHANG, NULL) = 7946
7938 sendto(3, "<20>Apr 8 15:57:29 postfix/master[7938]: warning: process /usr/lib/postfix/smtpd pid 7946 killed by signal 6", 109, MSG_NOSIGNAL, NULL, 0) = 109
7938 sendto(3, "<20>Apr 8 15:57:29 postfix/master[7938]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling", 108, MSG_NOSIGNAL, NULL, 0) = 108

However, I haven't investigated what to do about that.