LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-06-2019, 10:07 AM   #1
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Rep: Reputation: Disabled
error-message when shutting down system, yet shutdown works well


Hi altogether,

when shutting down my system I use the terminal-command "shutdown -H -P +0" or "poweroff". For me thatīs a good way of achieving that goal
and it works well.
I changed my grub-config from GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="noplymouth" in order to get screen output of the logs.

An here I saw an entry reading "failed unmounting /home" (in red). After that came some more messages which all were O.K. Everything else was in green with an "O.K." in front.

I donīt know why I get this message because the shutdown works well. In fact it shuts down really fast.

journalctl shows me:

Code:
[...]
Apr 05 18:16:19 rosika-Lenovo-H520e umount[25556]: umount: /home: das Ziel wird gerade benutzt.
Apr 05 18:16:19 rosika-Lenovo-H520e systemd[1]: Unmounting /media/rosika/28BC-DAFC...
Apr 05 18:16:19 rosika-Lenovo-H520e systemd[1]: Unmounting /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1...
Apr 05 18:16:19 rosika-Lenovo-H520e systemd[1]: home.mount: Mount process exited, code=exited status=32
Apr 05 18:16:19 rosika-Lenovo-H520e systemd[1]: Failed unmounting /home.
[...]
So some process is still using /home.
Now I issued the command
Code:
fuser -mv /home
in order to find out more.
So at the time of shutdown it looks like this:

Code:
rosika@rosika-Lenovo-H520e ~> fuser -mv /home 

                     BEN.        PID ZUGR.  BEFEHL
/home:               root     kernel mount /home
                     rosika     1490 F.c.. lxsession
                     rosika     1533 ..c.. dbus-daemon
                     rosika     1587 ..c.. gvfsd
                     rosika     1592 ..c.. gvfsd-fuse
                     rosika     1603 F.c.. openbox
                     rosika     1605 F.c.m lxpanel
                     rosika     1609 F.c.. pcmanfm
                     rosika     1610 F.c.. lxpolkit
                     rosika     1620 ..c.m at-spi-bus-laun
                     rosika     1625 ..c.. dbus-daemon
                     rosika     1628 ..c.. at-spi2-registr
                     rosika     1631 ..c.. xfconfd
                     rosika     1638 F.c.m indicator-multi
                     rosika     1657 ..c.. xfce4-notifyd
                     rosika     1664 F.c.m nm-applet
                     rosika     1667 F.c.m light-locker
                     rosika     1669 F.c.m update-notifier
                     rosika     1676 ..c.. dconf-service
                     rosika     1682 F.c.. alarm-clock-app
                     rosika     1688 F.c.. xpad
                     rosika     1692 F...m pulseaudio
                     rosika     1787 ..c.. gvfs-udisks2-vo
                     rosika     1791 ..c.. gvfs-gphoto2-vo
                     rosika     1796 ..c.. gvfs-goa-volume
                     rosika     1800 ..c.. gvfs-afc-volume
                     rosika     1805 ..c.. gvfs-mtp-volume
                     rosika     1812 ..c.m indicator-sound
                     rosika     1814 ..c.. indicator-appli
                     rosika     1820 ..c.. gvfsd-trash
                     rosika     2018 F.c.m gvfsd-metadata
                     rosika     3328 F...m pulseaudio
                     rosika     5127 F.c.. x-terminal-emul
                     rosika     5130 ..c.m fish
It might be that the culprit is to be found here. But I donīt know......
Can someone help me?

Thanks a lot in advance.
Rosika


P.S.:
my system: Linux/Lubuntu 18.04.2 LTS, 64 bit
 
Old 04-06-2019, 10:11 AM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
If you're running a GUI then the safest way to shut down is through the desktop environment.

Why risk experiencing corruption to your system for the sake of a few seconds trimmed off the shutdown time?
 
Old 04-07-2019, 05:14 AM   #3
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
Hi hydrurga,

Quote:
If you're running a GUI then the safest way to shut down is through the desktop environment.
O.K., now Iīve tried this option, too. But thereīs no difference. The problem remains.

Is there another way of finding out what keeps /home busy so that unmounting fails?
 
Old 04-07-2019, 05:28 AM   #4
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by Rosika View Post
Hi hydrurga,

O.K., now Iīve tried this option, too. But thereīs no difference. The problem remains.

Is there another way of finding out what keeps /home busy so that unmounting fails?
Just so I can understand, when you select Shut Down from the desktop environment menu, does it (i) take its time shutting down but you still see error messages in the logs, or (ii) produce a warning message that something is keeping the system busy? If the latter, which option do you select (keep waiting or force shutdown)?
 
Old 04-07-2019, 05:56 AM   #5
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
Hi hydrurga,

itīs this one:
Quote:
it (i) take its time shutting down but you still see error messages in the logs
So I get no options to choose from. It just shuts down with the already described error-message.
 
Old 04-07-2019, 06:18 AM   #6
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Ok. I assume you're running Lubuntu or similar. Which version of systemd?

Can you try starting up the system from scratch, log in, wait 5 minutes without doing anything at all, and then log out through the main menu and see if the problem occurs. Thanks.
 
1 members found this post helpful.
Old 04-07-2019, 06:55 AM   #7
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
Hi,

yes, Iīm running Lubuntu 18.04.2 LTS, 64 bit.
Systemd-version: 237-3ubuntu10.15

Quote:
Can you try starting up the system from scratch, log in, wait 5 minutes without doing anything at all, and then log out through the main menu and see if the problem occurs. Thanks.
O.K., Iīm going to do that now and then report back to you.
 
Old 04-07-2019, 07:13 AM   #8
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
So Iīm here again after doing what you suggested.

It worked this time with no error-message at all.
journalctl says:

Code:
Apr 07 13:56:34 rosika-Lenovo-H520e systemd[1]: Unmounting /home...
Apr 07 13:56:34 rosika-Lenovo-H520e systemd[1]: Unmounting /run/user/1000...
Apr 07 13:56:34 rosika-Lenovo-H520e systemd[1]: Unmounting /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1...
Apr 07 13:56:34 rosika-Lenovo-H520e systemd[1]: Unmounting /media/rosika/A492-CD29...
Apr 07 13:56:34 rosika-Lenovo-H520e systemd[1]: Unmounted /media/rosika/28BC-DAFC.
Apr 07 13:56:34 rosika-Lenovo-H520e systemd[1]: Stopping Clean the /media/rosika/28BC-DAFC mount point...
Apr 07 13:56:34 rosika-Lenovo-H520e systemd[1]: Stopped Clean the /media/rosika/28BC-DAFC mount point.
Apr 07 13:56:34 rosika-Lenovo-H520e systemd[1]: Unmounted /media/rosika/74C1-30C7.
Apr 07 13:56:34 rosika-Lenovo-H520e systemd[1]: Stopping Clean the /media/rosika/74C1-30C7 mount point...
Apr 07 13:56:34 rosika-Lenovo-H520e systemd[1]: Unmounted /run/user/1000.
Apr 07 13:56:34 rosika-Lenovo-H520e systemd[1]: Unmounted /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1.
Apr 07 13:56:34 rosika-Lenovo-H520e systemd[1]: Unmounted /home.
Iīve also got additional info but donīt know whether this might be relevant:

Logging out and then logging into a virtual console. Then sudo systemctl stop lightdm.service; after that fuser -mv /home

produces

Code:
root kernel   mount /home
[...]

dbus-daemon
gvfsd
gvfsd-fuse
at-spi-bus-laun
dbus-deamon
dconf-service
xfconfd
gvfs-udisks2-vo
gvfs-gphoto2-vo
gvfs-goa-volume
gvfs-afc-volume
gvfs-mtp-volume
gvfsd-trash
gvfsd-metadata
fish
after having used the system for a short time (about 5 mins).

Whereas the same command yields an additional entry after extensive use, namely pulseaudio.

Cheers
Rosika
 
Old 04-07-2019, 09:09 AM   #9
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
Iīve just issued the command fuser -mv /home in the running system:

Code:
rosika@rosika-Lenovo-H520e ~> fuser -mv /home

                     BEN.        PID ZUGR.  BEFEHL
/home:               root     kernel mount /home
                     rosika     1501 ..c.. dbus-daemon
                     rosika     1555 ..c.. gvfsd
                     rosika     1560 ..c.. gvfsd-fuse
                     rosika     1628 ..c.m at-spi-bus-laun
                     rosika     1643 ..c.. dconf-service
                     rosika     1645 ..c.. dbus-daemon
                     rosika     1673 ..c.. xfconfd
                     rosika     1750 ..c.. gvfs-udisks2-vo
                     rosika     1756 ..c.. gvfs-gphoto2-vo
                     rosika     1761 ..c.. gvfs-goa-volume
                     rosika     1766 ..c.. gvfs-afc-volume
                     rosika     1771 ..c.. gvfs-mtp-volume
                     rosika     1779 ..c.. gvfsd-trash
                     rosika     1970 F...m pulseaudio       <-------------------------
                     rosika     2228 F.c.m gvfsd-metadata
                     rosika     7463 F.c.. lxsession
                     rosika     7537 F.c.. openbox
                     rosika     7539 F.c.m lxpanel
                     rosika     7542 F.c.. pcmanfm
                     rosika     7543 F.c.. lxpolkit
                     rosika     7559 F.c.m indicator-multi
                     rosika     7567 ..c.. at-spi2-registr
                     rosika     7581 ..c.. xfce4-notifyd
                     rosika     7592 F.c.m nm-applet
                     rosika     7598 F.c.m light-locker
                     rosika     7605 F.c.m update-notifier
                     rosika     7612 F.c.. alarm-clock-app
                     rosika     7622 F...m pulseaudio     <-------------------------
                     rosika     7633 F.c.. xpad
                     rosika     7675 ..c.m indicator-sound
                     rosika     7677 ..c.. indicator-appli
                     rosika     7716 F.c.. x-terminal-emul
                     rosika     7719 ..c.m fish
So: two entries of pulseaudio!
After that I logged out and issued the same command in a virtual console:

Code:
rosika     1970 F...m pulseaudio
is still running.
It would be interesting to know why there are two instances of pulseaudio running in the first place. And
why keeps the one with PID 1970 running?

Could this possibly account for the problem?

Cheers
Rosika
 
Old 04-07-2019, 11:14 AM   #10
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Ah, now. I have to admit that I'm no expert on this and was just hoping to see if we could narrow it down to which application or combination of applications was causing the problem by trial and error, i.e. rebooting the computer and starting different "usual" applications and then shutting down to see if the error is generated. It could be pulseaudio. If you shutdown when those double pulseaudio processes are running, do you get the shutdown error?
 
1 members found this post helpful.
Old 04-08-2019, 05:52 AM   #11
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
Hi hydrurga,

Quote:
It could be pulseaudio. If you shutdown when those double pulseaudio processes are running, do you get the shutdown error?
It seems that pulseaudio is the culprit.
Under normal circumstances there are those two pulseaudio-instances running. During the shutdown-process one of them gets cancelled but not the other one. And this one seems to be responsible for still accessing /home.

I tried this method: Before shutting down I identified the pulseaudio-processes with
Code:
ps aux | grep pulseaudio
and the killed both of them with kill .

After that I shut down the system and didnīt get the error-message.
Iīve just looked up my journalctl-log :

Code:
Unmounting /run/user/1000...
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Unmounting /home...  <----------------------------
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Unmounting /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1...
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Unmounting /media/rosika/74C1-30C7...
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Unmounted /media/rosika/A492-CD29.
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Unmounted /media/rosika/28BC-DAFC.
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Unmounted /run/user/1000.
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Stopped target Swap.
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Deactivating swap /swapfile...
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Stopping Clean the /media/rosika/28BC-DAFC mount point...
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Stopping Clean the /media/rosika/A492-CD29 mount point...
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Unmounted /media/rosika/74C1-30C7.
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Stopped Clean the /media/rosika/28BC-DAFC mount point.
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Stopped Clean the /media/rosika/A492-CD29 mount point.
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Stopping Clean the /media/rosika/74C1-30C7 mount point...
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Stopped Clean the /media/rosika/74C1-30C7 mount point.
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Unmounted /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1.
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Stopping Clean the /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1 mount point...
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Stopped Clean the /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1 mount point.
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Removed slice system-clean\x2dmount\x2dpoint.slice.
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Deactivated swap /swapfile.
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Unmounted /home.  <--------------------- !!!!!!!!!!!!!
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Reached target Unmount All Filesystems.
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Stopped File System Check on /dev/disk/by-uuid/f1b9eb35-0d28-40ba-999d-3ac8a8b9dff5.
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Stopped target Local File Systems (Pre).
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Stopped Create Static Device Nodes in /dev.
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Stopped Remount Root and Kernel File Systems.
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Removed slice system-systemd\x2dfsck.slice.
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Reached target Shutdown.
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Reached target Final Step.
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Starting Power-Off...
Apr 07 17:38:41 rosika-Lenovo-H520e systemd[1]: Shutting down.
And that was after extensive use of the system (about 2 hs). So it seems like we really could norrow it down.
Iīve still got to look at the shutdown-messages in the near future to verify it, but it looks promising.


Thank you very much for your help.

Greetings.
Rosika
 
Old 04-08-2019, 06:58 AM   #12
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
I'm afraid I'm not au fait with the inner workings of pulseaudio. Perhaps the Ubuntu forums might be able to help?

From having a look through the web, perhaps the first instance of pulseaudio is a system-wide one, whereas the second one is a per-user one.

What is the autospawn setting in /etc/pulse/client.conf?
 
Old 04-08-2019, 07:11 AM   #13
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
Hi again,

Quote:
From having a look through the web, perhaps the first instance of pulseaudio is a system-wide one, whereas the second one is a per-user one.
That sounds reasonable.
These are the config-settings:

Code:
; default-sink =
; default-source =
; default-server =
; default-dbus-server =

; autospawn = yes
; daemon-binary = /usr/bin/pulseaudio
; extra-arguments = --log-target=syslog

; cookie-file =

; enable-shm = yes
; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB

; auto-connect-localhost = no
; auto-connect-display = no
So, autospawn = yes
 
Old 04-08-2019, 08:23 AM   #14
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Thanks. If you don't mind experimenting, try setting autospawn to no (remove the ; comment character at the start of the line), reboot and see if there is any difference.
 
Old 04-08-2019, 10:38 AM   #15
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
Hi hydrurga,

thanks a lot.

Quote:
If you don't mind experimenting, try setting autospawn to no
Iīll look into that.
For now I tried that in my VM (xubuntu 16.04.5 LTS, 64 bit).

There seems to be no difference:

Code:
[autospawn = yes]

rosika    3688  0.2  0.9 168100  9764 ?        S<l  17:25   0:00 /usr/bin/pulseaudio --start --log-target=syslog
rosika    4540  0.0  0.0   6352   832 pts/5    S    17:29   0:00 grep --color=auto pulseaudio

-------------------------------------------------------------------------------------------------------------------------
[autospawn = no]

rosika    2244  0.5  0.9 168100  9564 ?        S<l  17:30   0:00 /usr/bin/pulseaudio --start --log-target=syslog
rosika    3587  0.0  0.0   6352   892 pts/1    S    17:32   0:00 grep --color=auto pulseaudio
Well, I have to try it with my main system.

Greetings and thanks again.

Rosika
 
  


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
Shutting down and non shutting down x windows golden_boy615 Linux - General 1 03-01-2010 06:28 AM
Database doesn't shutdown during shutting down the server shipon_97 Linux - Enterprise 0 08-11-2007 11:12 AM
Well well well..what do we have here? DaBlade Linux - News 4 10-03-2005 10:07 AM
Shutdown not shutting down completely jrdioko Linux - Newbie 19 10-12-2003 11:47 AM
Connection not shutting down on shutdown or restart tyrann Linux - Networking 2 07-12-2003 11:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:18 PM.

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