systemd[1]: Failed unmounting Runtime Directory.

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

systemd[1]: Failed unmounting Runtime Directory.

jcsl
Hi.

I'm getting the subject error on every shutdown in my two Tumbleweed systems.
The next lines following the error one are:

        phenom systemd[1]: Unmounted /datos.
        phenom systemd[1]: Reached target Unmount All Filesystems.

Any hints? Is it harmful?

Greetings.

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: systemd[1]: Failed unmounting Runtime Directory.

Andrei Borzenkov
21.05.2016 14:35, jcsl пишет:

> Hi.
>
> I'm getting the subject error on every shutdown in my two Tumbleweed systems.
> The next lines following the error one are:
>
> phenom systemd[1]: Unmounted /datos.
> phenom systemd[1]: Reached target Unmount All Filesystems.
>
> Any hints? Is it harmful?
>

Not really. It is /run directory which is lost after shutdown anyway, so
there is no harm leaving it "dirty".

It means some service did not stop and hold this directory busy. That
may indicate a bug, and may warrant investigation.
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: systemd[1]: Failed unmounting Runtime Directory.

Cristian Rodríguez-2
In reply to this post by jcsl
On Sat, May 21, 2016 at 7:35 AM, jcsl <[hidden email]> wrote:
> Hi.
>
> I'm getting the subject error on every shutdown in my two Tumbleweed systems.
> The next lines following the error one are:
>
>         phenom systemd[1]: Unmounted /datos.
>         phenom systemd[1]: Reached target Unmount All Filesystems.
>
> Any hints? Is it harmful?

Probably not harmful, but it may be cool to know which service keeps
/run busy as it might be shutting down improperly (and maybe loosing
data on the process)
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: systemd[1]: Failed unmounting Runtime Directory.

jcsl
El sábado, 21 de mayo de 2016 13:13:26 (CEST) Cristian Rodríguez escribió:

> On Sat, May 21, 2016 at 7:35 AM, jcsl <[hidden email]> wrote:
> > Hi.
> >
> > I'm getting the subject error on every shutdown in my two Tumbleweed
> > systems.>
> > The next lines following the error one are:
> >         phenom systemd[1]: Unmounted /datos.
> >         phenom systemd[1]: Reached target Unmount All Filesystems.
> >
> > Any hints? Is it harmful?
>
> Probably not harmful, but it may be cool to know which service keeps
> /run busy as it might be shutting down improperly (and maybe loosing
> data on the process)

How do I get what is keeping /run busy?


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: systemd[1]: Failed unmounting Runtime Directory.

Cristian Rodríguez-2
On Sat, May 21, 2016 at 5:08 PM, jcsl <[hidden email]> wrote:

> How do I get what is keeping /run busy?

Boot with

systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M

create /usr/lib/systemd/system-shutdown/debug.sh and make it
executable with the following content

#!/bin/sh
mount -o remount,rw /
lsof /run >  /shutdown-log.txt
dmesg >> /shutdown-log.txt
mount -o remount,ro /


Reboot the system

send /shutdown-log.txt back for analysis.
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: systemd[1]: Failed unmounting Runtime Directory.

Yamaban
On Sat, 21 May 2016 23:25, Cristian Rodríguez wrote:

> On Sat, May 21, 2016 at 5:08 PM, jcsl wrote:
>
>> How do I get what is keeping /run busy?
>
> Boot with
>
> systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M
>
> create /usr/lib/systemd/system-shutdown/debug.sh and make it
> executable with the following content
>
> #!/bin/sh
> mount -o remount,rw /
> lsof /run >  /shutdown-log.txt
> dmesg >> /shutdown-log.txt
> mount -o remount,ro /
>
>
> Reboot the system
>
> send /shutdown-log.txt back for analysis.
Yoink! This goes to the "HowTo Debug Shutdown" file.
Thank you very much.

IMHO worthy to be in the man-pages of systemd.

Have a nice sunday,
  - Yamaban
Reply | Threaded
Open this post in threaded view
|

Re: systemd[1]: Failed unmounting Runtime Directory.

Cristian Rodríguez-2
On Sat, May 21, 2016 at 5:39 PM, Yamaban <[hidden email]> wrote:

> IMHO worthy to be in the man-pages of systemd.
>
> Have a nice sunday,
>  - Yamaban

I took it from the documentation...can't memorize everything. ;)
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: systemd[1]: Failed unmounting Runtime Directory.

jcsl
In reply to this post by Cristian Rodríguez-2
El sábado, 21 de mayo de 2016 18:25:08 (CEST) Cristian Rodríguez escribió:

> On Sat, May 21, 2016 at 5:08 PM, jcsl <[hidden email]> wrote:
> > How do I get what is keeping /run busy?
>
> Boot with
>
> systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M
>
> create /usr/lib/systemd/system-shutdown/debug.sh and make it
> executable with the following content
>
> #!/bin/sh
> mount -o remount,rw /
> lsof /run >  /shutdown-log.txt
> dmesg >> /shutdown-log.txt
> mount -o remount,ro /
>
>
> Reboot the system
>
> send /shutdown-log.txt back for analysis.
Thanks for the detailed instructions. I have attached the shutdown log of my
desktop and my netbook.

shutdown-logs.tar.xz (174K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: systemd[1]: Failed unmounting Runtime Directory.

Andrei Borzenkov
22.05.2016 11:58, jcsl пишет:

> El sábado, 21 de mayo de 2016 18:25:08 (CEST) Cristian Rodríguez escribió:
>> On Sat, May 21, 2016 at 5:08 PM, jcsl <[hidden email]> wrote:
>>> How do I get what is keeping /run busy?
>>
>> Boot with
>>
>> systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M
>>
>> create /usr/lib/systemd/system-shutdown/debug.sh and make it
>> executable with the following content
>>
>> #!/bin/sh
>> mount -o remount,rw /
>> lsof /run >  /shutdown-log.txt
>> dmesg >> /shutdown-log.txt
>> mount -o remount,ro /
>>
>>
>> Reboot the system
>>
>> send /shutdown-log.txt back for analysis.
>
> Thanks for the detailed instructions. I have attached the shutdown log of my
> desktop and my netbook.
>

COMMAND    PID USER  FD   TYPE DEVICE SIZE/OFF  NODE NAME
plymouthd 1967 root mem    REG   0,19   217032 16798 /var/run/nscd/group


plymouthd is started to display splash screen during shutdown

[  198.372560] systemd[1]: Starting Show Plymouth Reboot Screen...
[  198.373926] systemd[1]: rc-local.service: Changed exited -> dead
[  198.374221] systemd[1959]: plymouth-reboot.service: Executing:
/usr/sbin/plymouthd --mode=shutdown --attach-to-session

As long as this is the only one left it should be OK. It is not clean,
but fixing it will probably require much more efforts than it is worth.
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: systemd[1]: Failed unmounting Runtime Directory.

Yamaban
On Sun, 22 May 2016 14:29, Andrei Borzenkov wrote:

> 22.05.2016 11:58, jcsl пишет:
>> El sábado, 21 de mayo de 2016 18:25:08 (CEST) Cristian Rodríguez escribió:
>>> On Sat, May 21, 2016 at 5:08 PM, jcsl wrote:
>>>> How do I get what is keeping /run busy?
>>>
>>> Boot with
>>>
>>> systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M
>>>
>>> create /usr/lib/systemd/system-shutdown/debug.sh and make it
>>> executable with the following content
>>>
>>> #!/bin/sh
>>> mount -o remount,rw /
>>> lsof /run >  /shutdown-log.txt
>>> dmesg >> /shutdown-log.txt
>>> mount -o remount,ro /
>>>
>>>
>>> Reboot the system
>>>
>>> send /shutdown-log.txt back for analysis.
>>
>> Thanks for the detailed instructions. I have attached the shutdown log of my
>> desktop and my netbook.
>>
>
> COMMAND    PID USER  FD   TYPE DEVICE SIZE/OFF  NODE NAME
> plymouthd 1967 root mem    REG   0,19   217032 16798 /var/run/nscd/group
>
>
> plymouthd is started to display splash screen during shutdown
>
> [  198.372560] systemd[1]: Starting Show Plymouth Reboot Screen...
> [  198.373926] systemd[1]: rc-local.service: Changed exited -> dead
> [  198.374221] systemd[1959]: plymouth-reboot.service: Executing:
> /usr/sbin/plymouthd --mode=shutdown --attach-to-session
>
> As long as this is the only one left it should be OK. It is not clean,
> but fixing it will probably require much more efforts than it is worth.
The correct way would be shutting down nscd BEFORE plymouthd is started
for shutdown-splash.

IMHO adding the following line to plymouth-reboot.service should end this.
[code]
ExecStartPre=/usr/bin/systemctl stop nscd.service
[/code]

  - Yamaban.
Reply | Threaded
Open this post in threaded view
|

Re: systemd[1]: Failed unmounting Runtime Directory.

jcsl
El domingo, 22 de mayo de 2016 14:38:05 (CEST) Yamaban escribió:
> On Sun, 22 May 2016 14:29, Andrei Borzenkov wrote:
> > 22.05.2016 11:58, jcsl пишет:
> >> El sábado, 21 de mayo de 2016 18:25:08 (CEST) Cristian Rodríguez
escribió:

> >>> On Sat, May 21, 2016 at 5:08 PM, jcsl wrote:
> >>>> How do I get what is keeping /run busy?
> >>>
> >>> Boot with
> >>>
> >>> systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M
> >>>
> >>> create /usr/lib/systemd/system-shutdown/debug.sh and make it
> >>> executable with the following content
> >>>
> >>> #!/bin/sh
> >>> mount -o remount,rw /
> >>> lsof /run >  /shutdown-log.txt
> >>> dmesg >> /shutdown-log.txt
> >>> mount -o remount,ro /
> >>>
> >>>
> >>> Reboot the system
> >>>
> >>> send /shutdown-log.txt back for analysis.
> >>
> >> Thanks for the detailed instructions. I have attached the shutdown log of
> >> my desktop and my netbook.
> >
> > COMMAND    PID USER  FD   TYPE DEVICE SIZE/OFF  NODE NAME
> > plymouthd 1967 root mem    REG   0,19   217032 16798 /var/run/nscd/group
> >
> >
> > plymouthd is started to display splash screen during shutdown
> >
> > [  198.372560] systemd[1]: Starting Show Plymouth Reboot Screen...
> > [  198.373926] systemd[1]: rc-local.service: Changed exited -> dead
> > [  198.374221] systemd[1959]: plymouth-reboot.service: Executing:
> > /usr/sbin/plymouthd --mode=shutdown --attach-to-session
> >
> > As long as this is the only one left it should be OK. It is not clean,
> > but fixing it will probably require much more efforts than it is worth.
>
> The correct way would be shutting down nscd BEFORE plymouthd is started
> for shutdown-splash.
>
> IMHO adding the following line to plymouth-reboot.service should end this.
> [code]
> ExecStartPre=/usr/bin/systemctl stop nscd.service
> [/code]
>
>   - Yamaban.

By adding that line to the file the output of lsof is empty but the "Failed
unmounting Runtime Directory" message remains. In addition, isn't the runtime
dir /run/user/<uid>? The output of lsof was /var/run/nscd/group...

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: systemd[1]: Failed unmounting Runtime Directory.

Andrei Borzenkov
In reply to this post by Yamaban
22.05.2016 15:38, Yamaban пишет:

> On Sun, 22 May 2016 14:29, Andrei Borzenkov wrote:
>> 22.05.2016 11:58, jcsl пишет:
>>> El sábado, 21 de mayo de 2016 18:25:08 (CEST) Cristian Rodríguez
>>> escribió:
>>>> On Sat, May 21, 2016 at 5:08 PM, jcsl wrote:
>>>>> How do I get what is keeping /run busy?
>>>>
>>>> Boot with
>>>>
>>>> systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M
>>>>
>>>> create /usr/lib/systemd/system-shutdown/debug.sh and make it
>>>> executable with the following content
>>>>
>>>> #!/bin/sh
>>>> mount -o remount,rw /
>>>> lsof /run >  /shutdown-log.txt
>>>> dmesg >> /shutdown-log.txt
>>>> mount -o remount,ro /
>>>>
>>>>
>>>> Reboot the system
>>>>
>>>> send /shutdown-log.txt back for analysis.
>>>
>>> Thanks for the detailed instructions. I have attached the shutdown
>>> log of my
>>> desktop and my netbook.
>>>
>>
>> COMMAND    PID USER  FD   TYPE DEVICE SIZE/OFF  NODE NAME
>> plymouthd 1967 root mem    REG   0,19   217032 16798 /var/run/nscd/group
>>
>>
>> plymouthd is started to display splash screen during shutdown
>>
>> [  198.372560] systemd[1]: Starting Show Plymouth Reboot Screen...
>> [  198.373926] systemd[1]: rc-local.service: Changed exited -> dead
>> [  198.374221] systemd[1959]: plymouth-reboot.service: Executing:
>> /usr/sbin/plymouthd --mode=shutdown --attach-to-session
>>
>> As long as this is the only one left it should be OK. It is not clean,
>> but fixing it will probably require much more efforts than it is worth.
>
> The correct way would be shutting down nscd BEFORE plymouthd is started
> for shutdown-splash.
>

Splash should be displayed as soon as possible, ideally as the very
first thing when shutdown is requested. Unfortunately systemd makes it
near to impossible.

> IMHO adding the following line to plymouth-reboot.service should end this.
> [code]
> ExecStartPre=/usr/bin/systemctl stop nscd.service

Adding explicit systemctl strat/stop to service definition is always
sign of design shortcomings (either service or systemd).

> [/code]
>
>  - Yamaban.

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Re: systemd[1]: Failed unmounting Runtime Directory.

Yamaban
On Sun, 22 May 2016 15:43, Andrei Borzenkov wrote:

> 22.05.2016 15:38, Yamaban пишет:
>> On Sun, 22 May 2016 14:29, Andrei Borzenkov wrote:
>>> 22.05.2016 11:58, jcsl пишет:
>>>> El sábado, 21 de mayo de 2016 18:25:08 (CEST) Cristian Rodríguez
>>>> escribió:
>>>>> On Sat, May 21, 2016 at 5:08 PM, jcsl wrote:
>>>>>> How do I get what is keeping /run busy?
>>>>>
>>>>> Boot with
>>>>>
>>>>> systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M
>>>>>
>>>>> create /usr/lib/systemd/system-shutdown/debug.sh and make it
>>>>> executable with the following content
>>>>>
>>>>> #!/bin/sh
>>>>> mount -o remount,rw /
>>>>> lsof /run >  /shutdown-log.txt
>>>>> dmesg >> /shutdown-log.txt
>>>>> mount -o remount,ro /
>>>>>
>>>>>
>>>>> Reboot the system
>>>>>
>>>>> send /shutdown-log.txt back for analysis.
>>>>
>>>> Thanks for the detailed instructions. I have attached the shutdown
>>>> log of my
>>>> desktop and my netbook.
>>>>
>>>
>>> COMMAND    PID USER  FD   TYPE DEVICE SIZE/OFF  NODE NAME
>>> plymouthd 1967 root mem    REG   0,19   217032 16798 /var/run/nscd/group
>>>
>>>
>>> plymouthd is started to display splash screen during shutdown
>>>
>>> [  198.372560] systemd[1]: Starting Show Plymouth Reboot Screen...
>>> [  198.373926] systemd[1]: rc-local.service: Changed exited -> dead
>>> [  198.374221] systemd[1959]: plymouth-reboot.service: Executing:
>>> /usr/sbin/plymouthd --mode=shutdown --attach-to-session
>>>
>>> As long as this is the only one left it should be OK. It is not clean,
>>> but fixing it will probably require much more efforts than it is worth.
>>
>> The correct way would be shutting down nscd BEFORE plymouthd is started
>> for shutdown-splash.
>>
>
> Splash should be displayed as soon as possible, ideally as the very
> first thing when shutdown is requested. Unfortunately systemd makes it
> near to impossible.
>
>> IMHO adding the following line to plymouth-reboot.service should end this.
>> [code]
>> ExecStartPre=/usr/bin/systemctl stop nscd.service
>> [/code]
>
> Adding explicit systemctl strat/stop to service definition is always
> sign of design shortcomings (either service or systemd).
Agreed, this is a shortcoming.

Sadly I've yet to find a combination of ordering hints to
apply to both nscd.service and plymouth-reboot.service
that give the same functionallity without pushing
plymouth-reboot.service even further back.
(using After, Before, Conflicts, Requires, Requisite)

During SysV init days, I would give nscd a S00nscd link.
How do we get nscd.service stopped as one of the first
things during shutdown / reboot?

I'm running against the wall in this, maybe I do not see
the tree before the forest here, but I'm stumped.

The ordering I'd like to get is:
=> shutdown / reboot is called
1. stop nscd
2. start plymouth-reboot.service
3. invoke rc-local.service
4. stop all other services
5. do maschine off / restart

  - - Or is that wrong?

PS:
How does one get a dependency / ordering tree from
systemd for the shutdown / reboot without doing the
"start with debug" dance?

"systemd-analyze" is great for boot, but for halt/reboot??
The options --from-pattern=, --to-pattern= do not cover that
reliably.

  - Yamaban.
Reply | Threaded
Open this post in threaded view
|

Re: systemd[1]: Failed unmounting Runtime Directory.

Cristian Rodríguez-2
In reply to this post by Andrei Borzenkov
On Sun, May 22, 2016 at 8:29 AM, Andrei Borzenkov <[hidden email]> wrote:
> 22.05.2016 11:58, jcsl пишет:

> As long as this is the only one left it should be OK. It is not clean,
> but fixing it will probably require much more efforts than it is worth.

Or figuring out why plymouthd wants to access the group database in
the first place.. or adding a public interface to glibc (I already
know about undocumented __nss_disable_nscd()) that permits an
application to disable the use of nscd  completely..
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]