[Bug 741469] New: sendmail initialization delays boot by 5 seconds
https://bugzilla.novell.com/show_bug.cgi?id=741469 https://bugzilla.novell.com/show_bug.cgi?id=741469#c0 Summary: sendmail initialization delays boot by 5 seconds Classification: openSUSE Product: openSUSE 12.1 Version: Final Platform: x86-64 OS/Version: SuSE Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: jdelvare@suse.com QAContact: qa@suse.de CC: werner@suse.com, fcrozat@suse.com Found By: Community User Blocker: --- On a freshly installed, up-to-date openSUSE 12.1 system: $ systemd-analyze blame | head -n 1 5209ms sendmail.service And I can see in /var/log/messages: Jan 15 11:50:07 endymion echo[1692]: Initializing SMTP port (sendmail) Jan 15 11:50:12 endymion systemd[1]: PID file /var/run/sendmail.pid not readable (yet?) after start. Jan 15 11:50:13 endymion systemd[1]: PID file /var/spool/clientmqueue/sm-client.pid not readable (yet?) after start. This looks surprisingly similar to bug #732912, although this one was closed as fixed. My take is that systemd tries to read the PID files for 5 seconds and finally gives up. And I suspect this is caused by wrong permissions on the PID files. All pid files in /var/run have permissions 644 except for sendmail.pid (and sm-notify.pid.) /var/spool/clientmqueue/sm-client.pid is also not world-readable. Another suspicious thing is that both pid files contain more than just the pid value, contrary to all other pid files. This is with: sendmail-8.14.5-72.1.3.x86_64 systemd-37-3.6.1.x86_64 Surprisingly, if I stop then start sendmail.service manually using systemctl, I get the same messages in /var/log/messages but without the 5 second delay. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c1
Dr. Werner Fink
sudo ls -l /var/spool/clientmqueue/sm-client.pid -rw------- 1 mail mail 54 Sep 20 18:23 /var/spool/clientmqueue/sm-client.pid sudo ls -ld /var/spool/clientmqueue/ drwxrwx--- 2 mail mail 45 Jan 16 10:58 /var/spool/clientmqueue/
and this will not be changed for security reasons. And yes the pid files of sendmail processes also include the full command in the second line which is well known for sendmail. This is a major feature of sendmail as sendmail does rewrite its command line:
ps aux | grep sendmail root 17395 0.0 0.0 11504 772 ? Ss 2011 2:48 sendmail: accepting connections mail 17401 0.0 0.0 7588 420 ? Ss 2011 0:00 sendmail: Queue control mail 17402 0.0 0.1 39508 2584 ? S 2011 4:09 sendmail: running queue: /var/spool/clientmqueue
the question rises if systemd system uses other ownerships than root and/or can not handle a second or more lines in a pid file. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c2
--- Comment #2 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c3
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c4
--- Comment #4 from Jean Delvare
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c5
--- Comment #5 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c6
--- Comment #6 from Neil Rickert
At least /var/spool/clientmqueue is owner mail:mail and it is not wordreadable and the pid is stored exactly there.
The readability of the pid file was never an issue in that placement. I think it was my suggestion (to sendmail.org) to put the pid file in the clientmqueue directory. The problem (as best I remember it) was that sendmail would start as root, write the file, then change to mail:mail (or whatever user is defined for that). But, if restarted by sending a SIGHUP, it was unable to write to update its pidfile. So the pidfile had to be placed somewhere that the limited privilege sendmail daemon could write to it. And the clientmqueue directory was an obvious choice. I don't know of any reason why there's a problem reading the file. There's probably some other bug involved. Looking at "lsof" output, sendmail has a write lock on the pidfile. It's an advisory lock so can be ignored. But if systemd is attempting to lock the file before reading, it might well be locked out. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c7
--- Comment #7 from Jean Delvare
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c8
Jean Delvare
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c9
--- Comment #9 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c10
--- Comment #10 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c11
--- Comment #11 from Jean Delvare
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c12
--- Comment #12 from Jean Delvare
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c13
--- Comment #13 from Jean Delvare
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c14
--- Comment #14 from Neil Rickert
As a side note, I wonder why cron and sendmail think their pid files need writing-locking when all other daemons do not.
I think that's for prevention of a second running daemon. On startup, if it cannot claim the lock it should log a message and go away. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c15
--- Comment #15 from Jean Delvare
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c16
--- Comment #16 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c17
--- Comment #17 from Jean Delvare
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c18
--- Comment #18 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c19
Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c21
Jean Delvare
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c22
--- Comment #22 from Jean Delvare
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c23
--- Comment #23 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c
Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=741469
https://bugzilla.novell.com/show_bug.cgi?id=741469#c24
Dr. Werner Fink
participants (1)
-
bugzilla_noreply@novell.com