LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 07-07-2021, 08:51 AM   #1
vulcan59
Member
 
Registered: Sep 2007
Location: UK
Distribution: Slackware 14.2 & Current
Posts: 96

Rep: Reputation: 30
Current hangs in shutdown on fuser command


I have found a problem in rc.0/rc.6 on -current.

On 14.2 there is a command /usr/bin/fuser -k -m $dir & which works fine

On -current the command has changed to /usr/bin/fuser -k -M -m $dir & so -M has been added.

On my machine shutdown now hangs at the fuser command. If I run the command with -M and background it, it never returns without me pressing return to get back to the command prompt. Backgrounding the command without -M works fine.

Is anyone else seeing this?
 
Old 07-07-2021, 11:10 AM   #2
lovemeslk
Member
 
Registered: Feb 2020
Location: Rantoul IL
Distribution: Slackware
Posts: 350

Rep: Reputation: 72
Vulcan59 you do realize right Slackware current uses Elogind
and that is still being changed and rebuilt as we speak. And always will.
Why because it is tied to systemd as it changes.

Before people go off on this ask your self why we had to go to Elongind.
Many programs need that for loging. So Elogind takes the calls
that are needed by some programs that are built to use systemd.
we know it will be just like Pulseaudio take about 20 years to get it right.

It is a moving target.
 
1 members found this post helpful.
Old 07-07-2021, 12:04 PM   #3
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by lovemeslk View Post
Vulcan59 you do realize right Slackware current uses Elogind
and that is still being changed and rebuilt as we speak. And always will.
Why because it is tied to systemd as it changes.

Before people go off on this ask your self why we had to go to Elongind.
Many programs need that for loging. So Elogind takes the calls
that are needed by some programs that are built to use systemd.
we know it will be just like Pulseaudio take about 20 years to get it right.

It is a moving target.
What does this have to do with OP's hang during a shutdown? It shouldn't matter whether Slackware was using ConsoleKit2 or elogind, a hang during a shutdown is an issue.

@OP, I haven't had any issues with my system, but my NFS shares are being mounted within kodi and not separately in the filesystem. Have you tried adding a -v for verbose mode to see if it dumps anything beneficial to the CLI? What happens if you run the command without backgrounding and including your nfs mount points?
 
Old 07-08-2021, 06:58 AM   #4
vulcan59
Member
 
Registered: Sep 2007
Location: UK
Distribution: Slackware 14.2 & Current
Posts: 96

Original Poster
Rep: Reputation: 30
After a bit more investigation, I have found that rc.0 is not hanging on the fuser command as I originally thought. It actually hangs at the wait command further down.

# This is to ensure all processes have completed on SMP machines
wait

I am not on an SMP machine.
The hang only happens if I have an NFS mount at the time of the shutdown. It doesn't matter if is in use or not.

If I remove that wait my machine shuts down successfully with the NFS filesystem mounted.

At the moment I have no idea why this happens. Any ideas?
 
Old 07-08-2021, 09:43 AM   #5
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Rep: Reputation: 144Reputation: 144
have you tried since the kernel in current got updated to 5.12.15 yesterday. that should have fixed an kernel related nfs issue mentioned elsewhere, which might be related.
 
Old 07-08-2021, 10:59 AM   #6
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Try adding the below to rc.0 right above the wait command. That should show you any backgrounded jobs that have not closed yet, which will let us find out for sure what the command is causing the hang (although, based on your previous message, I imagine it is the fuser command since it hangs if you run it manually).

Code:
for i in $(jobs -p); do
  ps -hq $i -o command,user
done

Last edited by bassmadrigal; 07-08-2021 at 11:06 AM.
 
Old 07-08-2021, 12:38 PM   #7
vulcan59
Member
 
Registered: Sep 2007
Location: UK
Distribution: Slackware 14.2 & Current
Posts: 96

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by timsoft View Post
have you tried since the kernel in current got updated to 5.12.15 yesterday. that should have fixed an kernel related nfs issue mentioned elsewhere, which might be related.
Just tried 5.12.15 and it made no difference.
 
Old 07-08-2021, 12:46 PM   #8
vulcan59
Member
 
Registered: Sep 2007
Location: UK
Distribution: Slackware 14.2 & Current
Posts: 96

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by bassmadrigal View Post
Try adding the below to rc.0 right above the wait command. That should show you any backgrounded jobs that have not closed yet, which will let us find out for sure what the command is causing the hang (although, based on your previous message, I imagine it is the fuser command since it hangs if you run it manually).

Code:
for i in $(jobs -p); do
  ps -hq $i -o command,user
done
I added your code and it output

/usr/bin/fuser -k -M -m -v root

As suspected it is the fuser command.
 
Old 07-08-2021, 01:26 PM   #9
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Do you have NFS shares mounted? The fuser command doesn't show any directories after -m, which should be mount points for any NFS shares.

If you don't have NFS shares, can you add the red line to the for loop and see if that helps shutdown? It should exit the loop if dir is blank before running the fuser command.

Code:
for dir in $(/bin/mount | grep -e 'type nfs ' -e 'type nfs4 ' | sed -e 's|.* on ||g' | cut -d ' ' -f 1) ; do
  [ -z "$dir" ] && break   
  echo "Killing processes holding NFS mount $dir open..."
  # Background this to prevent fuser from also blocking shutdown:
  /usr/bin/fuser -k -M -m "$dir" &
  FUSER_DELAY=5
done
If you do have NFS shares, can you provide the output of the following command?

Code:
mount | grep -e 'type nfs ' -e 'type nfs4 '
 
Old 07-08-2021, 03:06 PM   #10
vulcan59
Member
 
Registered: Sep 2007
Location: UK
Distribution: Slackware 14.2 & Current
Posts: 96

Original Poster
Rep: Reputation: 30
Yes I do have one NFS mount. As I said earlier, the wait command doesn't hang unless there is an NFS mount.

mount | grep -e 'type nfs ' -e 'type nfs4 '

freenas:/mnt/pool1/slackware on /mnt/slackware type nfs (rw,vers=4,minorversion=1,addr=192.168.1.4,clientaddr=192.168.1.200)
 
Old 07-08-2021, 03:47 PM   #11
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
I'm not sure if you tried this, since your post doesn't specifically state it, but what happens if you run the fuser command with "/mnt/slackware" after the -m, does it still hang?

Code:
fuser -k -M -m /mnt/slackware &
It seems the command being run by the for loop doesn't include /mnt/slackware in it, so I'm curious why that's happening...
 
Old 07-08-2021, 04:03 PM   #12
lovemeslk
Member
 
Registered: Feb 2020
Location: Rantoul IL
Distribution: Slackware
Posts: 350

Rep: Reputation: 72
Quote:
Originally Posted by bassmadrigal View Post
What does this have to do with OP's hang during a shutdown? It shouldn't matter whether Slackware was using ConsoleKit2 or elogind, a hang during a shutdown is an issue.

@OP, I haven't had any issues with my system, but my NFS shares are being mounted within kodi and not separately in the filesystem. Have you tried adding a -v for verbose mode to see if it dumps anything beneficial to the CLI? What happens if you run the command without backgrounding and including your nfs mount points?
Did I miss read it bass sorry
I belive we are using that as an init now for slackware current correct me if I miss read.
this seems to be an init issue
Quote:
op I have found a problem in rc.0/rc.6 on -current.
clean my glasses.
your so kind.

Last edited by lovemeslk; 07-08-2021 at 04:08 PM.
 
Old 07-08-2021, 06:15 PM   #13
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by lovemeslk View Post
Did I miss read it bass sorry
I belive we are using that as an init now for slackware current correct me if I miss read.
this seems to be an init issue

clean my glasses.
your so kind.
elogind has nothing to do with the startup and shutdown of Slackware. It is used to help manage user logins. Here's an excerpt of their github README:

Quote:
Elogind is the systemd project's "logind", extracted out to be a standalone daemon. It integrates with PAM to know the set of users that are logged in to a system and whether they are logged in graphically, on the console, or remotely. Elogind exposes this information via the standard org.freedesktop.login1 D-Bus interface, as well as through the file system using systemd's standard /run/systemd layout. Elogind also provides "libelogind", which is a subset of the facilities offered by "libsystemd". There is a "libelogind.pc" pkg-config file as well.
 
Old 07-09-2021, 09:50 AM   #14
lovemeslk
Member
 
Registered: Feb 2020
Location: Rantoul IL
Distribution: Slackware
Posts: 350

Rep: Reputation: 72
Quote:
Originally Posted by bassmadrigal View Post
elogind has nothing to do with the startup and shutdown of Slackware. It is used to help manage user logins. Here's an excerpt of their github README:
Thanks Bass I learn something new everyday. I got it mixed up.
like duh.
 
Old 07-09-2021, 11:19 AM   #15
vulcan59
Member
 
Registered: Sep 2007
Location: UK
Distribution: Slackware 14.2 & Current
Posts: 96

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by bassmadrigal View Post
I'm not sure if you tried this, since your post doesn't specifically state it, but what happens if you run the fuser command with "/mnt/slackware" after the -m, does it still hang?

Code:
fuser -k -M -m /mnt/slackware &
It seems the command being run by the for loop doesn't include /mnt/slackware in it, so I'm curious why that's happening...
I did as you suggest and it still hangs.

I still have your code just before the wait to show background processes not closed. This is the output.

/usr/bin/fuser -k -M -m /mn root

Very odd!
 
  


Reply



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
what is the default powerstate (e.g. S3,S4,S5) for the command 'shutdown -hP' or 'shutdown -hH' or 'shutdown -h' badbetty Slackware 6 11-12-2017 12:18 AM
LXer: How to use and make the most of fuser command in Linux LXer Syndicated Linux News 0 12-05-2016 02:50 PM
Install Realtek ALC3223 drivers: X hangs on start, shutdown/reboot hangs? RatCorpseKing Slackware - Installation 1 04-27-2015 11:26 PM
fuser command imprise Linux - Newbie 3 06-06-2009 04:59 AM
Fuser command Gins Linux - General 3 08-09-2005 01:15 PM

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

All times are GMT -5. The time now is 11:48 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