kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* how to debug problem with "failing unmounting"
@ 2020-07-09 12:22 Tomek The Messenger
  2020-07-09 13:51 ` Abu Rasheda
  2020-07-09 20:22 ` Valdis Klētnieks
  0 siblings, 2 replies; 3+ messages in thread
From: Tomek The Messenger @ 2020-07-09 12:22 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 734 bytes --]

Hi
On the soc on which I work there is issue with unmouting some
partitions/directories during /sbin/reboot, here is some example:

[   OK   ]  Stopped target Local File System.
Unmouting Temporary Directory (/tmp)...
Unmouting /run/user/0...
...
[   FAILED  ]  Failed unmouting Temporary Directory (/tmp).
[   FAILED  ]  Failed unmouting  /run/user/0.
....

Unfortunately like it is typical in kernel information about why
unmouting failed doesn't appear.  So seems like searching in darkness what
is going on. Is any way how to search in darkness? Firstly I should make
sure /tmp or /run/user/0 is really a partition and was mount at linux
startup. Then maybe I should check access rights if it is rwx. What else
can be tried here?

[-- Attachment #1.2: Type: text/html, Size: 920 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: how to debug problem with "failing unmounting"
  2020-07-09 12:22 how to debug problem with "failing unmounting" Tomek The Messenger
@ 2020-07-09 13:51 ` Abu Rasheda
  2020-07-09 20:22 ` Valdis Klētnieks
  1 sibling, 0 replies; 3+ messages in thread
From: Abu Rasheda @ 2020-07-09 13:51 UTC (permalink / raw)
  To: Tomek The Messenger, Linux Kernel List


[-- Attachment #1.1: Type: text/plain, Size: 1081 bytes --]

On Thu, Jul 9, 2020 at 5:24 AM Tomek The Messenger <
tomekthemessenger@gmail.com> wrote:

> Hi
> On the soc on which I work there is issue with unmouting some
> partitions/directories during /sbin/reboot, here is some example:
>
> [   OK   ]  Stopped target Local File System.
> Unmouting Temporary Directory (/tmp)...
> Unmouting /run/user/0...
> ...
> [   FAILED  ]  Failed unmouting Temporary Directory (/tmp).
> [   FAILED  ]  Failed unmouting  /run/user/0.
> ....
>
> Unfortunately like it is typical in kernel information about why
> unmouting failed doesn't appear.  So seems like searching in darkness what
> is going on. Is any way how to search in darkness? Firstly I should make
> sure /tmp or /run/user/0 is really a partition and was mount at linux
> startup. Then maybe I should check access rights if it is rwx. What else
> can be tried here?
> _______________________________________________
>
> make sure there is no process which has these directories open (cd into it
or open a file), you can I put some printk in the code to debug what leads
to this condition.

[-- Attachment #1.2: Type: text/html, Size: 1559 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: how to debug problem with "failing unmounting"
  2020-07-09 12:22 how to debug problem with "failing unmounting" Tomek The Messenger
  2020-07-09 13:51 ` Abu Rasheda
@ 2020-07-09 20:22 ` Valdis Klētnieks
  1 sibling, 0 replies; 3+ messages in thread
From: Valdis Klētnieks @ 2020-07-09 20:22 UTC (permalink / raw)
  To: Tomek The Messenger; +Cc: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 1488 bytes --]

On Thu, 09 Jul 2020 14:22:00 +0200, Tomek The Messenger said:

> On the soc on which I work there is issue with unmouting some
> partitions/directories during /sbin/reboot, here is some example:
>
> [   OK   ]  Stopped target Local File System.
> Unmouting Temporary Directory (/tmp)...
> Unmouting /run/user/0...
> ...
> [   FAILED  ]  Failed unmouting Temporary Directory (/tmp).
> [   FAILED  ]  Failed unmouting  /run/user/0.
> ....
>
> Unfortunately like it is typical in kernel information about why
> unmouting failed doesn't appear. 

Those aren't kernel messages, they're messages issued by your init system.
(Based on OK/FAILED, you're probably using a sysvinit rather than systemd, and
the messages are coming from scripts in /etc/rc.d/rc6/ which is the 'reboot'
runlevel - rc6 has symlinks to the actual script.  The main shutdown/reboot
script basically does a 'for $script in /etc/rc.d/rc6; do $script stop; done'.

The most common reason for a filesystem to fail to unmount is that a process still
has a file open on the file system.

And for this, lsof is your friend.   Stick an '/bin/lsof /tmp' in the script at the appropriate
place to find out what's still got /tmp busy.

(Depending on the system, it may not be worth looking into - often /tmp
and /run are tmpfs systems that are going to evaporate *anyhow*, so there's
no actual danger of a filesystem or data getting corrupted due to a hard
dismount while the file system is active)

[-- Attachment #1.2: Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-09 20:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-09 12:22 how to debug problem with "failing unmounting" Tomek The Messenger
2020-07-09 13:51 ` Abu Rasheda
2020-07-09 20:22 ` Valdis Klētnieks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).