3

Whenever I try to use apt to install or upgrade and also when I try to launch Synaptic Package Manager I get an error that says:

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

Then when I run the command It stalls always at:

***update-initramfs: Generating /boot/initrd.img-4.8.0-58-generic***

$ sudo dpkg --configure -a

[sudo] password for dusty: 
Setting up linux-image-4.8.0-53-generic (4.8.0-53.56~16.04.1) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
initrd.img(/boot/initrd.img-4.8.0-53-generic
) points to /boot/initrd.img-4.8.0-53-generic
 (/boot/initrd.img-4.8.0-53-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.8.0-53-generic.postinst line 491.
vmlinuz(/boot/vmlinuz-4.8.0-53-generic
) points to /boot/vmlinuz-4.8.0-53-generic
 (/boot/vmlinuz-4.8.0-53-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.8.0-53-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.8.0-53-generic /boot/vmlinuz-4.8.0-53-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.8.0-53-generic /boot/vmlinuz-4.8.0-53-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.8.0-53-generic /boot/vmlinuz-4.8.0-53-generic

update-initramfs: Generating /boot/initrd.img-4.8.0-53-generic STALLS HERE EVERYTIME

$ sudo apt-get remove wine
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

When trying to install updates from update manager I receive this error also

$ sudo apt-get install -f

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

sudo strace dpkg --configure -a

The following listing doesn't have all the content just the beginning and end as it was too long.

execve("/usr/bin/dpkg", ["dpkg", "--configure", "-a"], [/* 16 vars */]) = 0
brk(NULL)                               = 0xec0000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0e5fe07000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=174638, ...}) = 0
mmap(NULL, 174638, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f0e5fddc000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260Z\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=130224, ...}) = 0
mmap(NULL, 2234080, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0e5f9c2000
mprotect(0x7f0e5f9e1000, 2093056, PROT_NONE) = 0
mmap(0x7f0e5fbe0000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f0e5fbe0000
mmap(0x7f0e5fbe2000, 5856, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f0e5fbe2000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\t\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1868984, ...}) = 0
mmap(NULL, 3971488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0e5f5f8000
mprotect(0x7f0e5f7b8000, 2097152, PROT_NONE) = 0
mmap(0x7f0e5f9b8000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c0000) = 0x7f0e5f9b8000
mmap(0x7f0e5f9be000, 14752, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f0e5f9be000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libpcre.so.3", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\25\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=464824, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0e5fddb000
mmap(NULL, 2560264, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0e5f386000
mprotect(0x7f0e5f3f7000, 2093056, PROT_NONE) = 0
mmap(0x7f0e5f5f6000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x70000) = 0x7f0e5f5f6000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240\r\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14608, ...}) = 0
mmap(NULL, 2109680, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0e5f182000
mprotect(0x7f0e5f185000, 2093056, PROT_NONE) = 0
mmap(0x7f0e5f384000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f0e5f384000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260`\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=138696, ...}) = 0
mmap(NULL, 2212904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0e5ef65000


update-initramfs: Generating /boot/initrd.img-4.8.0-53-generic
0x7ffc54bcfc14, 0, NULL)   = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
wait4(11838, 0x7ffc54bcfc14, 0, NULL)   = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
wait4(11838, 0x7ffc54bcfc14, 0, NULL)   = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
wait4(11838, 0x7ffc54bcfc14, 0, NULL)   = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
wait4(11838, 0x7ffc54bcfc14, 0, NULL)   = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
wait4(11838, 
user3561766
  • 55
  • 1
  • 1
  • 10
techie716
  • 31
  • 1
  • 4
  • It's saying '/etc/udev/udev.conf' does not exist. Very peculiar. Please post the output of `dpkg -C` in the question. Thanks. – Faheem Mitha Sep 04 '17 at 06:48
  • And you need to run `strace dpkg --configure -a` as root, not as user. If you don't, of course it will exit with a permission error. – Faheem Mitha Sep 04 '17 at 06:49
  • Hi. This is getting very messy. The idea of using `strace` is to try to understand why a hanging process is hanging. But it seems your process is not currently hanging (is that correct?) so in that case, I suggest you remove all the `strace` output. None of it seems to have useful information anyway. And if you can't run `dpkg -C` you have a problem - your next step should be to figure out why it is not working. If you run `ps aux | grep apt` so you see any stuck processes? – Faheem Mitha Sep 05 '17 at 04:12
  • FYI I killed all the processes but still have a lock. – techie716 Sep 08 '17 at 04:15
  • Ok. Check `ps aux | grep dpkg` as well. Also note that `dpkg -C` also needs to be run as root, and using `sudo`. All commands involving the packaging system do. – Faheem Mitha Sep 08 '17 at 06:03
  • Any other suggestions sir? or anyone? – techie716 Sep 15 '17 at 02:10
  • This question is now *very* messy. Please spend some time cleaning it up. In no particular order: (a) Check that all the information given is currently valid. (b) Make sure you are avoiding duplication (c) Put commands run on a separate line, please. (d) Please format commands as code (you can select the text and then use the `{ }` button). (e) If someone asks you for more information, you can notify them that you've updated the question by sending them a comment using @username. (f) Please avoid adding `**` before and after commands - I'm not sure what the point of this is. – Faheem Mitha Sep 15 '17 at 06:49
  • So, what is the current status? Do you still have a `dpkg` lock? If so, try rebooting and see if that gets rid of it. And (g) Avoid lines like `dusty-HP-Z220-CMT-Workstation dusty #` that don't do anything. They just add extra clutter. – Faheem Mitha Sep 15 '17 at 06:51
  • I would like to clean it up but I really don't know what is of use to someone trying to help or not. I am still having the same problems, If you want I can delete most of the results and start where you suggest. Please let me know what you suggest the best thing to do is? – techie716 Sep 19 '17 at 23:11
  • My current status is, I don't have a lock after rebooting. I added the first line with dusty -HP .... because I wanted to show it was at the command prompt. I didn't know it should not be done ty. I think I will delete everything almost and show my current problem which is **stalled at***update-initramfs: Generating /boot/initrd.img-4.8.0-58-generic – techie716 Sep 19 '17 at 23:14
  • That sounds sensible. If you are still getting that error, then running the stalled command (and only the stalled command) with `strace` makes sense. If you get different results with `strace` and not, then mention that as well. – Faheem Mitha Sep 20 '17 at 08:20
  • I unfortunately gave up and ended up formatting and reinstalling. This is one of those times when I think about going back to Windows, but then I think about all the times when Windows had to be formatted and re installed. I would have rather fixed the problem, but I just got way to frustrated. – techie716 Aug 11 '18 at 14:50

1 Answers1

0

This may be related to a high I/O usage preventing sync bug and some suggest to unmount all but essential drives, other to replace /bin/sync by /bin/ls during the update.

McX
  • 101
  • 2