systemd 关闭:90 秒延迟,journalctl 显示停止 /dev 和 session-5.scope 超时

systemd 关闭:90 秒延迟,journalctl 显示停止 /dev 和 session-5.scope 超时

我的 Kubuntu 16.04 关闭速度异常缓慢,并且journalctl -b-1在一些超时错误周围显示 90 秒的延迟。如何找到这些关闭问题的原因并(希望)解决问题?

时间线:

  • 关机开始:13:00:38
  • 出现错误之前的最后一次活动:13:00:40
  • 错误期间:13:00:50-13:02:08(见下面的日志)
  • 关机完成:13:02:09

journalctl -b-1摘录(搜索FailedTimed Out):

Feb 27 13:00:39 eclectic thermald[1203]: terminating on user request ..
Feb 27 13:00:39 eclectic audit[2607]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=5 pid=2607 comm="kwin_x11" exe="/usr/bin/kwin_x11" sig=11
Feb 27 13:00:40 eclectic systemd[1]: Stopped Thermal Daemon Service.
Feb 27 13:00:40 eclectic audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=thermald comm="systemd" exe="/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Feb 27 13:00:50 eclectic systemd[1]: Requested transaction contradicts existing jobs: Transaction is destructive.
Feb 27 13:00:50 eclectic systemd-logind[1213]: Failed to start [email protected]: Transaction is destructive.
Feb 27 13:02:08 eclectic systemd[1]: dev-dm\x2d7.device: Job dev-dm\x2d7.device/stop timed out.
Feb 27 13:02:08 eclectic systemd[1]: Timed out stoppping /dev/dm-7.
Feb 27 13:02:08 eclectic systemd[1]: dev-dm\x2d7.device: Job dev-dm\x2d7.device/stop failed with result 'timeout'.
Feb 27 13:02:08 eclectic systemd[1]: dev-disk-by\x2did-dm\x2dname\x2dcryptswap1.device: Job dev-disk-by\x2did-dm\x2dname\x2dcryptswap1.device/stop timed out.
Feb 27 13:02:08 eclectic systemd[1]: Timed out stoppping /dev/disk/by-id/dm-name-cryptswap1.
Feb 27 13:02:08 eclectic systemd[1]: dev-disk-by\x2did-dm\x2dname\x2dcryptswap1.device: Job dev-disk-by\x2did-dm\x2dname\x2dcryptswap1.device/stop failed with result 'timeout'.
Feb 27 13:02:08 eclectic systemd[1]: dev-disk-by\x2duuid-e841897a\x2d34d4\x2d4846\x2d9c52\x2dcd0c6a5bf4d6.device: Job dev-disk-by\x2duuid-e841897a\x2d34d4\x2d4846\x2d9c52\x2dcd0c6a5bf4d6.device/stop timed out.
Feb 27 13:02:08 eclectic systemd[1]: Timed out stoppping /dev/disk/by-uuid/e841897a-34d4-4846-9c52-cd0c6a5bf4d6.
Feb 27 13:02:08 eclectic systemd[1]: dev-disk-by\x2duuid-e841897a\x2d34d4\x2d4846\x2d9c52\x2dcd0c6a5bf4d6.device: Job dev-disk-by\x2duuid-e841897a\x2d34d4\x2d4846\x2d9c52\x2dcd0c6a5bf4d6.device/stop failed with result 'timeout'.
Feb 27 13:02:08 eclectic systemd[1]: session-5.scope: Stopping timed out. Killing.
Feb 27 13:02:08 eclectic systemd[1]: dev-disk-by\x2did-dm\x2duuid\x2dCRYPT\x2dPLAIN\x2dcryptswap1.device: Job dev-disk-by\x2did-dm\x2duuid\x2dCRYPT\x2dPLAIN\x2dcryptswap1.device/stop timed out.
Feb 27 13:02:08 eclectic systemd[1]: Timed out stoppping /dev/disk/by-id/dm-uuid-CRYPT-PLAIN-cryptswap1.
Feb 27 13:02:08 eclectic systemd[1]: dev-disk-by\x2did-dm\x2duuid\x2dCRYPT\x2dPLAIN\x2dcryptswap1.device: Job dev-disk-by\x2did-dm\x2duuid\x2dCRYPT\x2dPLAIN\x2dcryptswap1.device/stop failed with result 'timeout'.
Feb 27 13:02:08 eclectic systemd[1]: sys-devices-virtual-block-dm\x2d7.device: Job sys-devices-virtual-block-dm\x2d7.device/stop timed out.
Feb 27 13:02:08 eclectic systemd[1]: Timed out stoppping /sys/devices/virtual/block/dm-7.
Feb 27 13:02:08 eclectic systemd[1]: sys-devices-virtual-block-dm\x2d7.device: Job sys-devices-virtual-block-dm\x2d7.device/stop failed with result 'timeout'.
Feb 27 13:02:08 eclectic systemd[1]: Stopped Session 5 of user oleg.
Feb 27 13:02:08 eclectic systemd[1]: session-5.scope: Unit entered failed state.
Feb 27 13:02:08 eclectic systemd[1]: Removed slice User Slice of oleg.
Feb 27 13:02:08 eclectic systemd[1]: Stopping Permit User Sessions...
Feb 27 13:02:08 eclectic systemd[1]: Stopping Login Service...
Feb 27 13:02:08 eclectic systemd[1]: Stopped Permit User Sessions.
Feb 27 13:02:08 eclectic audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-user-sessions comm="systemd" exe="/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Feb 27 13:02:08 eclectic systemd[1]: Stopped target Remote File Systems.
Feb 27 13:02:08 eclectic systemd[1]: Stopped target Remote File Systems (Pre).
Feb 27 13:02:08 eclectic systemd[1]: Stopped Login Service.
Feb 27 13:02:08 eclectic audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-logind comm="systemd" exe="/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Feb 27 13:02:08 eclectic systemd[1]: Stopped target Basic System.
Feb 27 13:02:08 eclectic systemd[1]: Stopped target Paths.
Feb 27 13:02:08 eclectic systemd[1]: Stopped Trigger resolvconf update for networkd DNS.
Feb 27 13:02:08 eclectic systemd[1]: Stopped ACPI Events Check.
Feb 27 13:02:08 eclectic systemd[1]: Stopped Dispatch Password Requests to Console Directory Watch.
Feb 27 13:02:08 eclectic systemd[1]: Stopped CUPS Scheduler.
Feb 27 13:02:08 eclectic systemd[1]: Stopped Forward Password Requests to Wall Directory Watch.
Feb 27 13:02:08 eclectic systemd[1]: Stopped target Sockets.
Feb 27 13:02:08 eclectic systemd[1]: Closed CUPS Scheduler.
Feb 27 13:02:08 eclectic systemd[1]: Closed Socket activation for snappy daemon.
Feb 27 13:02:08 eclectic systemd[1]: Closed Avahi mDNS/DNS-SD Stack Activation Socket.
Feb 27 13:02:08 eclectic systemd[1]: Closed Syslog Socket.
Feb 27 13:02:08 eclectic systemd[1]: Closed D-Bus System Message Bus Socket.
Feb 27 13:02:08 eclectic systemd[1]: Closed ACPID Listen Socket.
Feb 27 13:02:08 eclectic systemd[1]: Closed UUID daemon activation socket.
Feb 27 13:02:08 eclectic systemd[1]: Stopped target Slices.
Feb 27 13:02:08 eclectic systemd[1]: Removed slice User and Session Slice.
Feb 27 13:02:08 eclectic systemd[1]: Stopped target User and Group Name Lookups.
Feb 27 13:02:08 eclectic systemd[1]: Stopped target System Initialization.
Feb 27 13:02:08 eclectic systemd[1]: Stopping Network Time Synchronization...
Feb 27 13:02:08 eclectic systemd[1]: Stopped target Encrypted Volumes.
Feb 27 13:02:08 eclectic systemd[1]: Stopping Cryptography Setup for cryptswap1...
Feb 27 13:02:08 eclectic systemd[1]: Stopping Load/Save Screen Backlight Brightness of backlight:intel_backlight...
Feb 27 13:02:08 eclectic systemd[1]: Stopping Security Auditing Service...
Feb 27 13:02:08 eclectic audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-sysctl comm="systemd" exe="/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Feb 27 13:02:08 eclectic systemd[1]: Stopping Load/Save Screen Backlight Brightness of backlight:acpi_video0...
Feb 27 13:02:08 eclectic audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-modules-load comm="systemd" exe="/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Feb 27 13:02:08 eclectic systemd[1]: Stopped Apply Kernel Variables.
Feb 27 13:02:08 eclectic systemd[1]: Stopped Load Kernel Modules.
Feb 27 13:02:08 eclectic systemd[1]: Stopped target Swap.
Feb 27 13:02:08 eclectic systemd[1]: Deactivating swap /dev/dm-7...
Feb 27 13:02:08 eclectic systemd[1]: Stopping Load/Save Screen Backlight Brightness of leds:tpacpi::kbd_backlight...
Feb 27 13:02:08 eclectic systemd[1]: Stopped Network Time Synchronization.
Feb 27 13:02:08 eclectic audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-timesyncd comm="systemd" exe="/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Feb 27 13:02:08 eclectic systemd[1]: Stopped Load/Save Screen Backlight Brightness of backlight:intel_backlight.
Feb 27 13:02:08 eclectic audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-backlight@backlight:intel_backlight comm="systemd" exe="/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Feb 27 13:02:08 eclectic systemd[1]: Stopped Load/Save Screen Backlight Brightness of backlight:acpi_video0.
Feb 27 13:02:08 eclectic audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-backlight@backlight:acpi_video0 comm="systemd" exe="/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Feb 27 13:02:08 eclectic systemd[1]: Stopped Load/Save Screen Backlight Brightness of leds:tpacpi::kbd_backlight.
Feb 27 13:02:08 eclectic audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-backlight@leds:tpacpi::kbd_backlight comm="systemd" exe="/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Feb 27 13:02:08 eclectic audit: CONFIG_CHANGE audit_pid=0 old=1006 auid=4294967295 ses=4294967295 res=1
Feb 27 13:02:08 eclectic auditd[1006]: The audit daemon is exiting.
Feb 27 13:02:08 eclectic kernel: audit: type=1305 audit(1488229328.468:986): audit_pid=0 old=1006 auid=4294967295 ses=4294967295 res=1
Feb 27 13:02:08 eclectic systemd[1]: Stopped Security Auditing Service.
Feb 27 13:02:08 eclectic audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=auditd comm="systemd" exe="/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Feb 27 13:02:08 eclectic kernel: audit: type=1131 audit(1488229328.472:987): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=auditd comm="systemd" exe="/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Feb 27 13:02:08 eclectic systemd[1]: Deactivated swap /dev/disk/by-uuid/e841897a-34d4-4846-9c52-cd0c6a5bf4d6.
Feb 27 13:02:08 eclectic systemd[1]: Deactivated swap /dev/disk/by-id/dm-uuid-CRYPT-PLAIN-cryptswap1.
Feb 27 13:02:08 eclectic systemd[1]: Deactivated swap /dev/disk/by-id/dm-name-cryptswap1.
Feb 27 13:02:08 eclectic systemd[1]: Deactivated swap /dev/dm-7.
Feb 27 13:02:08 eclectic systemd[1]: Deactivated swap /dev/mapper/cryptswap1.
Feb 27 13:02:08 eclectic systemd[1]: Removed slice system-systemd\x2dbacklight.slice.
Feb 27 13:02:08 eclectic systemd[1]: Stopped Create Volatile Files and Directories.
Feb 27 13:02:08 eclectic audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-tmpfiles-setup comm="systemd" exe="/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Feb 27 13:02:08 eclectic systemd[1]: Stopped target Local File Systems.
Feb 27 13:02:08 eclectic systemd[1]: Unmounting /home...

答案1

根据您发布的日志,关闭过程中的挂起之一与停止加密交换磁盘有关。

您使用的是加密交换磁盘吗?您最近是否测试过安装、使用和卸载/停止它?

相关内容