Posts: 148
chrispop99
Joined: 21 Apr 2011
#1
(Only reported in case it affects other users - not an issue for me.)

A 32-bit install on a Thinkpad T41 takes a long time to shutdown. It waits at:

Code: Select all

Stopping enhanced syslogd: rsyslogd
for 105 seconds.

A 32-bit install on other hardware does not do this.

Hardware affected:

Code: Select all

chris@antix6-32RC1:~
$ inxi -F
System:    Host: antix6-32RC1 Kernel: 4.4.10-antix.1-486-smp i686 (32 bit)
           Desktop: IceWM 1.3.8
           Distro: antiX-16-RC1_386-full Berta Cáceres 13 June 2016
Machine:   System: IBM (portable) product: 23748RG v: ThinkPad T41
           Mobo: IBM model: 23748RG
           Bios: IBM v: 1RETDGWW (3.12 ) date: 10/18/2004
Battery    BAT0: charge: 35.2 Wh 98.9% condition: 35.6/47.5 Wh (75%)
CPU:       Single core Intel Pentium M (-UP-) cache: 1024 KB
           speed: 1600 MHz (max)
Graphics:  Card: Advanced Micro Devices [AMD/ATI] RV200/M7 [Mobility Radeon 7500]
           Display Server: X.Org 1.16.4 drivers: ati,radeon (unloaded: fbdev,vesa)
           Resolution: 1024x768@60.00hz
           GLX Renderer: Mesa DRI R100 (RV200 4C57) x86/MMX/SSE2 DRI2
           GLX Version: 1.3 Mesa 10.3.2
Audio:     Card Intel 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller
           driver: snd_intel8x0
           Sound: ALSA v: k4.4.10-antix.1-486-smp
Network:   Card-1: Intel 82540EP Gigabit Ethernet Controller (Mobile)
           driver: e1000
           IF: eth0 state: down mac: 00:0d:60:7a:ff:a3
           Card-2: Qualcomm Atheros AR5212 802.11abg NIC driver: ath5k
           IF: wlan0 state: up mac: 00:05:4e:46:db:02
Drives:    HDD Total Size: 31.9GB (15.1% used)
           ID-1: /dev/sda model: KingSpec_KSD size: 31.9GB
Partition: ID-1: / size: 28G used: 2.6G (10%) fs: ext4 dev: /dev/sda1
           ID-2: swap-1 size: 2.17GB used: 0.00GB (0%) fs: swap dev: /dev/sda2
Sensors:   System Temperatures: cpu: 71.0C mobo: 45.0C
           Fan Speeds (in rpm): cpu: 3560
Info:      Processes: 129 Uptime: 2:16 Memory: 139.6/1002.9MB
           Client: Shell (bash) inxi: 2.3.0 
Chris
Posts: 148
chrispop99
Joined: 21 Apr 2011
#2
Further info discovered:

Perusal of /var/log/syslog shows delay seems related to network. Disabling wireless and connecting via Ethernet made shutdown behave normally.

I will try to test on other hardware later this week.

Chris
Posts: 2,238
dolphin_oracle
Joined: 16 Dec 2007
#3
Do you have an network shares mounted when you shutdown and expierence the long shutdown time?
Posts: 1,028
SamK
Joined: 21 Aug 2011
#4
dolphin_oracle wrote:Do you have an network shares mounted when you shutdown and expierence the long shutdown time?
You beat me to asking the same question.
Posts: 148
chrispop99
Joined: 21 Apr 2011
#5
dolphin_oracle wrote:Do you have an network shares mounted when you shutdown and expierence the long shutdown time?
Yes; I will test with the share disconnected, and report.

Chris
Posts: 148
chrispop99
Joined: 21 Apr 2011
#6
The circumstances needed to recreate the extended shut-down are mounted network shares, and a wireless connection.

If connected by Ethernet, shut-down is normal even with a connected share.

I will test on other hardware tomorrow; if others are affected, perhaps Disconnectshares should run automatically on shut-down?

Chris
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#7
Since I do not use network sharing, I might be wrong here, but I would have thought that user would manually disconnect shares before shutting down or rebooting?
Posts: 2,238
dolphin_oracle
Joined: 16 Dec 2007
#8
anticapitalista wrote:Since I do not use network sharing, I might be wrong here, but I would have thought that user would manually disconnect shares before shutting down or rebooting?
often that is not the case. you just shutdown. they are easy to forget after all.

we fixed this in antiX 13 and 15. sam reminded me. I'm looking for the fix as we speak.
Posts: 2,238
dolphin_oracle
Joined: 16 Dec 2007
#9
I sent the fix to anti, and test here OK. chris if you wouldn't mind testing.

extract the attached and place in / etc/init.d

run

Code: Select all

sudo update-rc.d umountnfs-alternative.sh defaults
you might have to reboot for changes to go into effect. I'm not sure about that.

thanks to samk for reminding me of this.
Last edited by dolphin_oracle on 15 Jun 2016, 20:36, edited 1 time in total.
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#10
I never got that fix, or I don't remember getting it.
Will include in upgraded deb
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#11
New connectshares deb soon to appear in repo to (hopefully) fix this problem
Posts: 148
chrispop99
Joined: 21 Apr 2011
#12
dolphin_oracle wrote:I sent the fix to anti, and test here OK. chris if you wouldn't mind testing.
Tested and working fine now; thanks.

Chris
Posts: 1,028
SamK
Joined: 21 Aug 2011
#13
chrispop99 wrote:The circumstances needed to recreate the extended shut-down are mounted network shares, and a wireless connection.
[...]
Tested and working fine now; thanks.
dolphin_oracle wrote:we fixed this in antiX 13 and 15. sam reminded me. I'm looking for the fix as we speak.
Thanks for picking up the ball on this.


BACKGROUND
Referring back to February 2014; at that time a web search revealed large numbers of Debian users were reporting the problem of a pause during shut-down. A fix was not introduced by Debian and is unlikely to be following the move to systemD. antiX inherited the unwanted behaviour because of its Debian parentage, and it remains in place because of our retention of sysvinit.

Connectshares cannot avoid a problem of that nature and is not causing it. Shares mounted via standard Linux mount techniques (i.e. not using helpers such as Connectshares) also exhibit the pause symptoms at shut-down if they are not unmounted before beforehand. The unwanted behaviour originates from upstream Debian.

The problem stems from the sequence in which the Debian init.d system stops services. The short version is, wireless networking is stopped before shares are unmounted. In turn this generates the time-out delay later in reboot/shut-down process.

The standard Debian file at the heart of the problem is / etc/init.d/umountnfs.sh. Its purpose is shown in the following abstract from the file.

Code: Select all

Abstract starts
# Short-Description: Unmount all network filesystems except the root fs.
# Description:       Also unmounts all virtual filesystems (proc,
#                    devpts, usbfs, sysfs) that are not mounted at the
#                    top level.
Abstract ends
The previously submitted fix is named unmountnfs-alternative.sh. It is identical to unmountnfs.sh except for one minor amendment. Towards the head of the file,"Provides" now indicates"umountnfs-alternative". The fix runs its links earlier in the init.d sequence which prevents the pause condition and allows the reboot/shut-down to continue without a delay.

The result is neutral for systems that do not have the initial problem, beneficial for those that do, and transparent for all.


SUGGESTION
anticapitalista wrote:New connectshares deb soon to appear in repo to (hopefully) fix this problem
Probably it is best to implement the fix outside of Connectshares. Because this problem is not caused by Connectshares, it will be of most benefit when the fix is not tied to it. In that way the fix will be available to systems which use share mounting techniques other than Connectshares. Perhaps incorporating it into the basic antiX build might be a better approach.