2

Today I tried to sudo apt upgrade, and got the following error: E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. .

However, when I run dpkg --configure -a (as root), it gets stuck at update-initramfs: Generating /boot/initrd.img-4.4.6-3-surface for hours.

I'm running Ubuntu 16.04 on a MS Surface Pro 3 (dual boot with Windows 10, but I've never had problems with it before).

I also noticed that if I try to turn off my computer using the GUI, it simply hangs on the shutdown screen and I have to power it off manually. Could that problem be related to the first one?


Here is the output of sudo strace dpkg --configure -a (I only included the beginning and end):

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)

// Abbreviated

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, 

Additionally, ps -p 6312 yields

PID TTY          TIME CMD
6312 pts/17   00:00:00 initramfs-tools

1 Answer 1

1

This seems to be a known bug:

https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1667512

My suggestions: kill the update process, unmount all drives except absolute essentials -- root and home -- and try again. I suggest not rebooting until you do that.

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .