System hangs upon shutdown

Asked by sameer

Ubuntu 20.04 machine hangs or freeze while doing shutdown. Will have to do shutdown using the button.

[7921.330474] systemd-shutdown[1]: could not detach DM /dev/dm-0: Device or resource busy
[7921.340143] systemd-shutdown[1]: Failed to finalize DM devices, ignoring
[7924.300025] r8152 4-2.1.2:1.0 enx3ce1a1c5bfec: Tx timeout
[7929.164102] r8152 4-2.1.2:1.0 enx3ce1a1c5bfec: Tx timeout
[7934.404276] r8152 4-2.1.2:1.0 enx3ce1a1c5bfec: Tx timeout
[7939.404276] r8152 4-2.1.2:1.0 enx3ce1a1c5bfec: Tx timeout
[7945.292340] r8152 4-2.1.2:1.0 enx3ce1a1c5bfec: Tx timeout

any leads on this please.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
sameer
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

r8152 seems to be a USB Ethernet controller. Is this part of the system please?

Revision history for this message
sameer (mfaheem5697) said :
#2
Revision history for this message
sameer (mfaheem5697) said :
#3

Yes

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

If you pull it out, then shutdown, does it shutdown OK?

Revision history for this message
sameer (mfaheem5697) said :
#5

No....Its still hangs and I have to press button to do it

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

Do you initiate the shutdown with mouse-click on the top right icons and selecting the shutdown icon, or with the "sudo shutdown" command?
Do sou see the same behavior also with the other way?
Do you see the same behavior when you initiate a reboot?

Revision history for this message
sameer (mfaheem5697) said (last edit ):
#7

Hello Manfred Hampl,

    Yes, with mouse click on the top right icons.
     Yes, it behaves the same both with reboot and/or shutdown.

I tried to shutdown again and this time it took almost 10mints to shutdown.

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

"I tried to shutdown again and this time it took almost 10mints to shutdown."

So the system does shut down, but only with several minutes delay?

Suggestion for diagnostics:

Your log shows two different messages:
[7921.330474] systemd-shutdown[1]: could not detach DM /dev/dm-0: Device or resource busy
[7924.300025] r8152 4-2.1.2:1.0 enx3ce1a1c5bfec: Tx timeout

What happens if you deactivate the network first and then do the shutdown
https://linuxhint.com/ubuntu-enable-and-disable-the-network-interface/

Which messages are then shown in the system log?

Revision history for this message
sameer (mfaheem5697) said :
#9

What log files do you need?

Revision history for this message
Manfred Hampl (m-hampl) said :
#10

I would expect the most useful information at the end of the systemlog of the previous session, /var/log/syslog.1.gz

Revision history for this message
sameer (mfaheem5697) said :
#11

I didn't find syslog.1.gz but syslog.1
Jul 12 00:00:01 systemd[1]: Started CUPS Scheduler.
Jul 12 00:00:01 systemd[1]: cups.socket: Succeeded.
Jul 12 00:00:01 systemd[1]: Closed CUPS Scheduler.
Jul 12 00:00:01 systemd[1]: Stopping CUPS Scheduler.
Jul 12 00:00:01 systemd[1]: Listening on CUPS Scheduler.
Jul 12 00:00:01 systemd[1]: Started CUPS Scheduler.
Jul 12 00:00:01 systemd[1]: Started Make remote CUPS printers available locally.
Jul 12 00:00:01 falcon-sensor[909]: CrowdStrike(6): AFLAGS updated to 0. error_log is now OFF
Jul 12 00:00:01 falcon-sensor[909]: No traceLevel set via falconctl defaulting to none
Jul 12 00:00:01 falcon-sensor[909]: LogLevelUpdate: none = trace level 0.

Revision history for this message
Manfred Hampl (m-hampl) said :
#12

Unfortunately that output does not help identifying the root cause of your problem.

Revision history for this message
sameer (mfaheem5697) said :
#13

Can you please let me know what logs you need?

Revision history for this message
Manfred Hampl (m-hampl) said :
#14

I do not need any log, but you should try finding hints why the shutdown does not correctly happen.
I suggest that you dig through the logs in /var/log/
Look for time codes around the tome when you tried shutting down.

Revision history for this message
sameer (mfaheem5697) said :
#15

Hello Manfred Hampl , Can you please tell me whats happening when rebooting the system.....its something related to postgresql

Jul 12 01:52:29 nb-gk-lin-0001 systemd[3761]: run-user-278046-gvfs.mount: Succee
ded.
Jul 12 01:52:29 nb-gk-lin-0001 tracker-store[2069791]: Received signal:15->'Term
inated'
Jul 12 01:52:29 nb-gk-lin-0001 tracker-store[2069791]: OK
Jul 12 01:52:29 nb-gk-lin-0001 systemd[3761]: obex.service: Main process exited,
 code=exited, status=1/FAILURE
Jul 12 01:52:29 nb-gk-lin-0001 systemd[3761]: obex.service: Failed with result '
exit-code'.
Jul 12 01:52:29 nb-gk-lin-0001 systemd[1]: Stopped PostgreSQL RDBMS.
Jul 12 01:52:29 nb-gk-lin-0001 systemd[3761]: tracker-store.service: Succeeded.
Jul 12 01:52:29 nb-gk-lin-0001 systemd[1]: Stopping PostgreSQL Cluster 12-main..
.
Jul 12 01:58:44 nb-gk-lin-0001 systemd-modules-load[597]: Inserted module 'lp'
Jul 12 01:58:44 nb-gk-lin-0001 systemd-modules-load[597]: Inserted module 'ppdev
'

Revision history for this message
Manfred Hampl (m-hampl) said :
#16

This is a completely different topic and should better be dealt with in a separate question.

From the part from the logs I cannot see anything wrong with PostgreSQL. Are you using it? Do you expect it to run?
Are there more lines than just those two for PostgreSQL in the logs?

I see a failure message from obex (related to bluetooth)
For that I suggest checking the command
systemctl status obex.service

Revision history for this message
sameer (mfaheem5697) said :
#17

GRUB_CMDLINE_LINUX_DEFAULT="intel_pstate=enable quiet splash acpi=force" fixed the issue for me