LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-07-2016, 11:33 PM   #1
denydias
Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 297

Rep: Reputation: Disabled
Unhappy Sendmail delays boot in -current


Hi there,

I'm facing a VERY strange issue since around Thu Mar 17 22:09:16 UTC 2016 -current changelog. Although I stated that it's sendmail related in the post title, I really don't know if sendmail is the culprit.

Look at this, from my /var/boot/log, a log file for the boot messages provided by bootp:

Code:
Fri Apr  8 00:58:16 2016: Starting sendmail MTA daemon:  /usr/sbin/sendmail -L sm-mta -bd -q25m
Fri Apr  8 00:59:19 2016: Starting sendmail MSP queue runner:  /usr/sbin/sendmail -L sm-msp-queue -Ac -q25m
Now this:

Code:
Fri Apr  8 01:01:00 2016: Starting sendmail MTA daemon:  /usr/sbin/sendmail -L sm-mta -bd -q25m
Fri Apr  8 01:01:02 2016: Starting sendmail MSP queue runner:  /usr/sbin/sendmail -L sm-msp-queue -Ac -q25m
These are the outputs of two different boots. Pay attention to the time difference between MTA and MSP start. In the first one, the difference is about a minute. In the second one, the difference is two seconds.

Where those two boots differ? The first one was unattended. The second one I hit a random key as soon as "Starting sendmail MTA" appeared.

So, in a normal situation, with no user interaction, an unattended boot take about a minute more just waiting for something. What it is waiting for is unclear to me.

I have already investigated the issue. /var/log/maillog looks healthy:

Code:
Apr  8 00:59:19 minsky sm-mta[1359]: starting daemon (8.15.2): SMTP+queueing@00:25:00
Apr  8 00:59:19 minsky sm-msp-queue[1362]: starting daemon (8.15.2): queueing@00:25:00
Apr  8 01:01:02 minsky sm-mta[1351]: starting daemon (8.15.2): SMTP+queueing@00:25:00
Apr  8 01:01:02 minsky sm-msp-queue[1354]: starting daemon (8.15.2): queueing@00:25:00
dmesg output doesn't reveal nothing special either.

All of this looks very weird to me. My modest machine used to boot up in less than 20 seconds before this issue hit the ground. Now it takes about 1'20", being that minute wait an annoying visitor.

Does anybody out there have seen or faced something similar lately?

Thanks in advance for any word.

Last edited by denydias; 04-07-2016 at 11:35 PM. Reason: Add maillog related entries from the first boot.
 
Old 04-08-2016, 02:29 PM   #2
coldbeer
Member
 
Registered: May 2006
Location: Orion–Cygnus Arm, MWG
Distribution: Slackware, Ubuntu
Posts: 249

Rep: Reputation: 130Reputation: 130
I had put a sendmail command in one of the scripts to email me when my server booted up or shutdown. When I tried rebooting without a network connection, sendmail stalled because it could not connect. It would finally timeout and continue with the boot up.

Probably not much help. Just thought I would toss it out there.

Last edited by coldbeer; 04-08-2016 at 02:33 PM.
 
Old 04-08-2016, 02:58 PM   #3
denydias
Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 297

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by coldbeer View Post
I had put a sendmail command in one of the scripts to email me when my server booted up or shutdown. When I tried rebooting without a network connection, sendmail stalled because it could not connect. It would finally timeout and continue with the boot up.
I had a look in that too. No emails being sent upon boot up or shutdown. The issue happens regardless a network cable is attached or not.

I also took a look at /etc/hosts for the proper entries. localhost and its alias on the local network are there. /etc/mail/local-host-names matches the hostname for this particular machine.

Quote:
Originally Posted by coldbeer View Post
Probably not much help.
Any word is a kind of help, @coldbeer. ;]
 
Old 04-08-2016, 03:30 PM   #4
Fred-1.2.13
Member
 
Registered: Jan 2006
Location: Midwest USA
Distribution: Started with Slackware - 3.0 1995 Kernel 1.2.13 - Now Slackware Current. Also some FreeBSD.
Posts: 124

Rep: Reputation: 59
I ran into this some years past with a non-network connected machine. But you said it occurs connected or not.

I guess the obvious question is: Are you using Sendmail? I wasn't sure from your post.

If not:

To disable starting of sendmail when the system initializes, execute:

chmod -x /etc/rc.d/rc.sendmail

If nothing else disabling Sendmail will help narrow down the problem. Good luck!

Oh... and:

To start sendmail when the system initializes, execute:

chmod +x /etc/rc.d/rc.sendmail

Last edited by Fred-1.2.13; 04-08-2016 at 03:33 PM.
 
Old 04-08-2016, 03:32 PM   #5
denydias
Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 297

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Fred-1.2.13 View Post
I guess the obvious question is: Are you using Sendmail? I wasn't sure from your post.
Yes! I run some periodic verification tasks on this machine that reports results via email.
 
Old 04-08-2016, 03:50 PM   #6
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
If something in your sendmail configuration is using /dev/random, the system may be attempting to gain entropy. Keystrokes gain entropy.

Just a guess.
 
1 members found this post helpful.
Old 04-08-2016, 03:51 PM   #7
denydias
Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 297

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Richard Cranium View Post
If something in your sendmail configuration is using /dev/random, the system may be attempting to gain entropy. Keystrokes gain entropy.

Just a guess.
Hum! This worth a look! Thanks, @Richard Cranium!
 
Old 04-08-2016, 07:45 PM   #8
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware
Posts: 515

Rep: Reputation: 234Reputation: 234Reputation: 234
By any chance, are you also getting a message in your maillog saying something like "My unqualified host name (localhost) unknown; sleeping for retry"?
 
Old 04-08-2016, 08:12 PM   #9
speck
Member
 
Registered: Nov 2001
Location: US
Distribution: Slackware 14.2
Posts: 375

Rep: Reputation: 115Reputation: 115
I've had it happen a few times over the years and it's been related to an entry in /etc/hosts. Not sure if that's your issue, but it's probably worth checking.

Causes a delay during boot
Code:
192.168.19.1        myhost
Fixes the issue
Code:
192.168.19.1        myhost.localhost myhost
 
Old 04-09-2016, 09:38 AM   #10
imitheos
Member
 
Registered: May 2005
Location: Greece
Posts: 441

Rep: Reputation: 141Reputation: 141
Yeah i have the delay too since the upgrade. I haven't changed the sendmail config or hosts. At least in my case, the cause is what Richard Cranium said about entropy. Booting will stop until i press a key 4-5 times and the system gains enough entropy. The curious thing is why sendmail suddenly needs more entropy than before (or maybe the cause is another program from that upgrade that now "eats" entropy from the pool starving sendmail).
 
Old 04-09-2016, 09:52 AM   #11
prtn
LQ Newbie
 
Registered: Oct 2014
Posts: 2

Rep: Reputation: Disabled
FWIW: my small, 32-bit system breezes right through the sendmail portion of bootup, without any need to touch the keyboard. Maybe sendmail is not the culprit?
 
Old 04-09-2016, 03:59 PM   #12
denydias
Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 297

Original Poster
Rep: Reputation: Disabled
No, @Diantre. /var/log/maillog is clean as water.

@speck, I have just this entry in /etc/hosts:

Code:
127.0.0.1 localhost myhost myhost.local
I couldn't add a mapping to the machine IP as it is DHCP defined. Anyway, I'm going to check if adding the LAN IP temporarily fix the issue. If it does, then I need to investigate a way to deal with that.

@imitheos: finally someone shares the issue with me (although I fell sorry for us.) The strange thing with this possibility is that sendmail package itself is not updated since Thu Oct 29 20:12:14 UTC 2015 (n/sendmail-8.15.2-i586-2.txz: Rebuilt.) It looks very unlikely that entropy required by it has been changed since. I don't know what other things could correlate with this to cause the issue we're facing.

@prtn: that's why I stated "I really don't know if sendmail is the culprit" in the OP.

Last edited by denydias; 04-09-2016 at 04:00 PM. Reason: typo.
 
Old 04-09-2016, 06:43 PM   #13
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Hmm. I have two machines running 64 -current. One of them used LUKS, so there are plenty of keystrokes to seed entropy. The other one doesn't and I didn't see any delay in starting sendmail.

I'm using the stock sendmail as it comes out of the box. Did you configure sendmail to do something useful? If so, could you share what you did?
 
Old 04-10-2016, 08:47 AM   #14
imitheos
Member
 
Registered: May 2005
Location: Greece
Posts: 441

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by denydias View Post
No, @Diantre. /var/log/maillog is clean as water.

@imitheos: finally someone shares the issue with me (although I fell sorry for us.) The strange thing with this possibility is that sendmail package itself is not updated since Thu Oct 29 20:12:14 UTC 2015 (n/sendmail-8.15.2-i586-2.txz: Rebuilt.) It looks very unlikely that entropy required by it has been changed since. I don't know what other things could correlate with this to cause the issue we're facing.
Quote:
Originally Posted by Richard Cranium View Post
Hmm. I have two machines running 64 -current. One of them used LUKS, so there are plenty of keystrokes to seed entropy. The other one doesn't and I didn't see any delay in starting sendmail.
denydias are you per chance running NTPd ? It hadn't occured to me till now to watch the entropy pool size and see what program drains it. I tried "poor man's debug" and put several "cat /proc/sys/kernel/random/entropy_avail" together with echoing at which part of the rc.S and rc.M we are. The result is the following:

After udev runs, the available entropy is 85 (bits ?). LVM and cryptsetup do not eat any entropy and it is still 85 until after mounting filesystems which raises it to 205. Seeding /dev/urandom with /etc/random-seed doesn't seem to give any entropy and i still get 205. When udev runs for the second time, the entropy is again raised to 275.

When NTPd runs it eats much entropy and it goes down to 134 and then acpid eats some more and drops it to 6 which makes sendmail hang. Disabling ntpd from running makes sendmail run instantly which is weird because neither ntpd had an upgrade when the problem started occuring.
 
2 members found this post helpful.
Old 04-10-2016, 10:16 AM   #15
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
http://unix.stackexchange.com/questi...aining-entropy contains some interesting tidbits.
 
  


Reply

Tags
boot, delay, sendmail



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Linux Foundation UEFI Secure Boot key for Windows 8 PCs delays explained LXer Syndicated Linux News 0 11-23-2012 02:10 PM
"Delays beset the Linux Foundation's Secure Boot workaround" onebuck Linux - General 1 11-23-2012 10:35 AM
[SOLVED] Sendmail delays email delivery in Internal network mode ? Rohit_4739 Linux - Virtualization and Cloud 2 06-28-2012 08:25 AM
Cause of sendmail delivery delays tajamari Linux - Server 2 09-01-2008 06:03 AM
Fedora Core 2 Boot Delays benrose111488 Linux - Software 9 10-04-2004 05:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration