今日、私はSudo apt upgrade
を試みましたが、次のエラーが発生しました:E: dpkg was interrupted, you must manually run 'Sudo dpkg --configure -a' to correct the problem.
。
ただし、dpkg --configure -a
(ルートとして)を実行すると、update-initramfs: Generating /boot/initrd.img-4.4.6-3-surface
で数時間スタックします。
私はMS Surface Pro 3でUbuntu 16.04を実行しています(Windows 10でのデュアルブートですが、これまでに問題が発生したことはありません)。
また、GUIを使用してコンピューターの電源をオフにしようとすると、シャットダウン画面でハングし、手動で電源をオフにする必要があることに気付きました。その問題は最初の問題と関係があるのでしょうか?
Sudo strace dpkg --configure -a
の出力は次のとおりです(開始と終了のみを含めました)。
execve("/usr/bin/dpkg", ["dpkg", "--configure", "-a"], [/* 31 vars */]) = 0
brk(NULL) = 0x1938000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
//短縮形
wait4(6308, update-initramfs: deferring update (trigger activated)
[{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 6308
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=6308, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
rt_sigaction(SIGQUIT, {SIG_DFL, [], SA_RESTORER, 0x7f1caac934b0}, NULL, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7f1caac934b0}, NULL, 8) = 0
open("/var/lib/dpkg/diversions", O_RDONLY) = 9
fcntl(9, F_GETFD) = 0
fcntl(9, F_SETFD, FD_CLOEXEC) = 0
fstat(9, {st_mode=S_IFREG|0644, st_size=1280, ...}) = 0
close(9) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2971, ...}) = 0
write(7, "2018-04-22 16:11:04 status insta"..., 73) = 73
write(4, "Package: initramfs-tools\nStatus:"..., 1251) = 1251
ftruncate(4, 1251) = 0
fsync(4) = 0
close(4) = 0
rename("/var/lib/dpkg/updates/tmp.i", "/var/lib/dpkg/updates/0001") = 0
open("/var/lib/dpkg/updates/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fsync(4) = 0
close(4) = 0
open("/var/lib/dpkg/updates/tmp.i", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
fcntl(4, F_GETFD) = 0
fcntl(4, F_SETFD, FD_CLOEXEC) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
write(4, "#padding\n#padding\n#padding\n#padd"..., 4096) = 4096
write(4, "padding\n#padding\n#padding\n#paddi"..., 512) = 512
lseek(4, 0, SEEK_SET) = 0
fcntl(5, F_GETFD) = 0x1 (flags FD_CLOEXEC)
fcntl(5, F_SETFD, FD_CLOEXEC) = 0
fcntl(5, F_SETLKW, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0
close(6) = 0
open("/var/lib/dpkg/triggers/Unincorp", O_RDONLY) = 6
fcntl(6, F_GETFD) = 0
fcntl(6, F_SETFD, FD_CLOEXEC) = 0
fstat(6, {st_mode=S_IFREG|0644, st_size=19, ...}) = 0
open("/var/lib/dpkg/triggers/Unincorp.new", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 9
fcntl(9, F_GETFD) = 0
fcntl(9, F_SETFD, FD_CLOEXEC) = 0
ioctl(6, TCGETS, 0x7ffd02841050) = -1 ENOTTY (Inappropriate ioctl for device)
fstat(6, {st_mode=S_IFREG|0644, st_size=19, ...}) = 0
read(6, "update-initramfs -\n", 8192) = 19
read(6, "", 4096) = 0
open("/var/lib/dpkg/triggers/update-initramfs", O_RDONLY) = 10
fstat(10, {st_mode=S_IFREG|0644, st_size=16, ...}) = 0
lseek(10, 0, SEEK_SET) = 0
read(10, "initramfs-tools\n", 4096) = 16
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2971, ...}) = 0
write(7, "2018-04-22 16:11:04 status trigg"..., 80) = 80
write(4, "Package: initramfs-tools\nStatus:"..., 1293) = 1293
ftruncate(4, 1293) = 0
fsync(4) = 0
close(4) = 0
rename("/var/lib/dpkg/updates/tmp.i", "/var/lib/dpkg/updates/0002") = 0
open("/var/lib/dpkg/updates/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fsync(4) = 0
close(4) = 0
open("/var/lib/dpkg/updates/tmp.i", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
fcntl(4, F_GETFD) = 0
fcntl(4, F_SETFD, FD_CLOEXEC) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
write(4, "#padding\n#padding\n#padding\n#padd"..., 4096) = 4096
write(4, "padding\n#padding\n#padding\n#paddi"..., 512) = 512
lseek(4, 0, SEEK_SET) = 0
read(10, "", 4096) = 0
read(6, "", 8192) = 0
close(10) = 0
ioctl(6, TCGETS, 0x7ffd028410d0) = -1 ENOTTY (Inappropriate ioctl for device)
close(6) = 0
close(9) = 0
rename("/var/lib/dpkg/triggers/Unincorp.new", "/var/lib/dpkg/triggers/Unincorp") = 0
open("/var/lib/dpkg/triggers", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 6
fstat(6, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fsync(6) = 0
close(6) = 0
fcntl(5, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0
write(1, "Processing triggers for initramf"..., 62) = 62
Processing triggers for initramfs-tools (0.122ubuntu8.11) ...
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2971, ...}) = 0
write(7, "2018-04-22 16:11:04 trigproc ini"..., 72) = 72
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2971, ...}) = 0
write(7, "2018-04-22 16:11:04 status half-"..., 79) = 79
write(4, "Package: initramfs-tools\nStatus:"..., 1289) = 1289
ftruncate(4, 1289) = 0
fsync(4) = 0
close(4) = 0
rename("/var/lib/dpkg/updates/tmp.i", "/var/lib/dpkg/updates/0003") = 0
open("/var/lib/dpkg/updates/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fsync(4) = 0
close(4) = 0
open("/var/lib/dpkg/updates/tmp.i", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
fcntl(4, F_GETFD) = 0
fcntl(4, F_SETFD, FD_CLOEXEC) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
write(4, "#padding\n#padding\n#padding\n#padd"..., 4096) = 4096
write(4, "padding\n#padding\n#padding\n#paddi"..., 512) = 512
lseek(4, 0, SEEK_SET) = 0
stat("/var/lib/dpkg/info/initramfs-tools.postinst", {st_mode=S_IFREG|0755, st_size=282, ...}) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f1cab442ad0) = 6312
rt_sigaction(SIGQUIT, {SIG_IGN, [], SA_RESTORER, 0x7f1caac934b0}, {SIG_DFL, [], SA_RESTORER, 0x7f1caac934b0}, 8) = 0
rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0x7f1caac934b0}, {SIG_DFL, [], SA_RESTORER, 0x7f1caac934b0}, 8) = 0
wait4(6312, update-initramfs: Generating /boot/initrd.img-4.4.6-3-surface
0x7ffd02840f84, 0, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
wait4(6312,
さらに、ps -p 6312
は次を生成します
PID TTY TIME CMD
6312 pts/17 00:00:00 initramfs-tools
これは既知のバグのようです:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1667512
私の提案:更新プロセスを強制終了し、絶対に必要なもの(ルートとホーム)を除くすべてのドライブをアンマウントして、再試行してください。あなたがそれをするまで、notリブートすることをお勧めします。