Public bug reported:

== Comment: #0 - Balamuruhan S  - 2016-09-20 10:54:39 ==
---Problem Description---
dpkg crashing when apt-get upgrade got interrupted during "python-pyasn1" and 
it couldn't recovered

Tried to recover by following way and also tried by rebooting,
# apt-get clean

# apt-get update
Hit:1 yakkety InRelease
Hit:2 trusty InRelease     
Hit:3 yakkety-updates InRelease        
Hit:4 yakkety-security InRelease    
Hit:5 yakkety-backports InRelease
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct 
the problem. 

# dpkg --configure -a
dpkg: error processing package python-pyasn1 (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Errors were encountered while processing:

# apt-get remove python-pyasn1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libjs-sphinxdoc python-cffi-backend python-idna python-ipaddress python-nose
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  fabric python-cryptography python-ndg-httpsclient python-openssl
  python-paramiko python-pyasn1
0 upgraded, 0 newly installed, 6 to remove and 59 not upgraded.
1 not fully installed or removed.
After this operation, 4,529 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 152861 files and directories currently installed.)
Removing python-ndg-httpsclient (0.4.2-1) ...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: error processing package python-ndg-httpsclient (--remove):
 subprocess installed pre-removal script returned error exit status 1
E: Sub-process /usr/bin/dpkg exited unexpectedly

# apt-get update
Hit:1 yakkety-security InRelease
Hit:2 yakkety InRelease
Hit:3 yakkety-updates InRelease        
Hit:4 yakkety-backports InRelease      
Hit:5 trusty InRelease
Reading package lists... Done

# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  bc ftp gawk gdb gnupg libguestfs-hfsplus libguestfs-perl libguestfs-reiserfs
  libguestfs-tools libguestfs-xfs libguestfs0 libmirclient9 libmirprotobuf3
  libparted-dev libparted-fs-resize0 libparted2 libreadline-dev libreadline6
  libvirt-bin libvirt-clients libvirt-daemon libvirt-daemon-system libvirt-dev
  libvirt0 lxd-client parted python3-software-properties
  software-properties-common virt-viewer
The following packages will be upgraded:
  grub-legacy-ec2 libhivex0 libnetcf-dev libnetcf1 libnss-resolve
  libpam-systemd libsystemd-dev libsystemd0 libudev-dev libudev1
  libwin-hivex-perl python-cryptography python-gi python-openssl python-pyasn1
  python3-cryptography python3-pyasn1 qemu qemu-kvm qemu-system
  qemu-system-arm qemu-system-mips qemu-system-misc qemu-system-ppc
  qemu-system-sparc qemu-system-x86 qemu-user qemu-user-binfmt ssh-import-id
  systemd systemd-sysv ubuntu-mono udev
33 upgraded, 0 newly installed, 0 to remove and 29 not upgraded.
2 not fully installed or removed.
Need to get 36.7 MB of archives.
After this operation, 59.4 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 yakkety/main ppc64el 
python-pyasn1 all 0.1.9-2 [45.4 kB]
Get:2 yakkety/main ppc64el 
python-cryptography ppc64el 1.5-1ubuntu1 [172 kB]
Get:3 yakkety/main ppc64el 
python-openssl all 16.1.0-1 [37.6 kB]
Get:4 yakkety/main ppc64el systemd-sysv 
ppc64el 231-6git1 [14.1 kB]
Get:5 yakkety/main ppc64el 
libpam-systemd ppc64el 231-6git1 [115 kB]
Get:6 yakkety/main ppc64el 
libsystemd-dev ppc64el 231-6git1 [163 kB]
Get:7 yakkety/main ppc64el 
libnss-resolve ppc64el 231-6git1 [114 kB]
Get:8 yakkety/main ppc64el libudev-dev 
ppc64el 231-6git1 [181 kB]
Get:9 yakkety/main ppc64el libsystemd0 
ppc64el 231-6git1 [203 kB]
Get:10 yakkety/main ppc64el systemd 
ppc64el 231-6git1 [2,093 kB]
Get:11 yakkety/main ppc64el udev 
ppc64el 231-6git1 [1,010 kB]
Get:12 yakkety/main ppc64el libudev1 
ppc64el 231-6git1 [54.5 kB]
Get:13 yakkety/main ppc64el python-gi 
ppc64el 3.21.92-1 [189 kB]
Get:14 yakkety/main ppc64el 
python3-pyasn1 all 0.1.9-2 [28.1 kB]
Get:15 yakkety/main ppc64el 
python3-cryptography ppc64el 1.5-1ubuntu1 [172 kB]
Get:16 yakkety/universe ppc64el 
qemu-system-misc ppc64el 1:2.6.1+dfsg-0ubuntu3 [5,791 kB]
Get:17 yakkety/universe ppc64el 
qemu-system-sparc ppc64el 1:2.6.1+dfsg-0ubuntu3 [1,888 kB]
Get:18 yakkety/main ppc64el 
qemu-system-x86 ppc64el 1:2.6.1+dfsg-0ubuntu3 [3,533 kB]
Get:19 yakkety/universe ppc64el 
qemu-user-binfmt ppc64el 1:2.6.1+dfsg-0ubuntu3 [2,612 B]
Get:20 yakkety/universe ppc64el 
qemu-user ppc64el 1:2.6.1+dfsg-0ubuntu3 [4,354 kB]
Get:21 yakkety/main ppc64el 
qemu-system-arm ppc64el 1:2.6.1+dfsg-0ubuntu3 [3,987 kB]
Get:22 yakkety/main ppc64el qemu-kvm 
ppc64el 1:2.6.1+dfsg-0ubuntu3 [6,634 B]
Get:23 yakkety/main ppc64el 
qemu-system-ppc ppc64el 1:2.6.1+dfsg-0ubuntu3 [5,346 kB]
Get:24 yakkety/universe ppc64el 
qemu-system-mips ppc64el 1:2.6.1+dfsg-0ubuntu3 [6,729 kB]
Get:25 yakkety/universe ppc64el 
qemu-system ppc64el 1:2.6.1+dfsg-0ubuntu3 [6,090 B]
Get:26 yakkety/universe ppc64el qemu 
ppc64el 1:2.6.1+dfsg-0ubuntu3 [86.7 kB]
Get:27 yakkety/main ppc64el ubuntu-mono 
all 16.10+16.10.20160908-0ubuntu1 [160 kB]
Get:28 yakkety/main ppc64el 
grub-legacy-ec2 all 0.7.8-1-g3705bb5-0ubuntu1 [21.6 kB]
Get:29 yakkety/universe ppc64el 
libhivex0 ppc64el 1.3.13-2build1 [28.2 kB]
Get:30 yakkety/main ppc64el 
libnetcf-dev ppc64el 1:0.2.8-1ubuntu2 [37.8 kB]
Get:31 yakkety/main ppc64el libnetcf1 
ppc64el 1:0.2.8-1ubuntu2 [46.5 kB]
Get:32 yakkety/universe ppc64el 
libwin-hivex-perl ppc64el 1.3.13-2build1 [36.2 kB]
Get:33 yakkety/main ppc64el 
ssh-import-id all 5.6-0ubuntu1 [10.2 kB]
Fetched 36.7 MB in 11s (3,318 kB/s)                                            
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 152862 files and directories currently installed.)
Preparing to unpack .../0-python-pyasn1_0.1.9-2_all.deb ...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: error processing archive 
/tmp/apt-dpkg-install-dSIkJi/0-python-pyasn1_0.1.9-2_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site

*** Error in `/usr/bin/dpkg': free(): invalid pointer: 0x00003fffcce20990 ***

======= Backtrace: =========

======= Memory map: ========
2c290000-2c2f0000 r-xp 00000000 08:22 57167443                           
2c2f0000-2c300000 r--p 00050000 08:22 57167443                           
2c300000-2c310000 rw-p 00060000 08:22 57167443                           
2c310000-2c520000 rw-p 00000000 00:00 0 
100026f0000-10004450000 rw-p 00000000 00:00 0                            [heap]
3fff885a0000-3fff885b0000 r-xp 00000000 08:22 56754586                   
3fff885b0000-3fff885c0000 r--p 00000000 08:22 56754586                   
3fff885c0000-3fff885d0000 rw-p 00010000 08:22 56754586                   
3fff885d0000-3fff885e0000 r-xp 00000000 08:22 56754599                   
3fff885e0000-3fff885f0000 r--p 00000000 08:22 56754599                   
3fff885f0000-3fff88600000 rw-p 00010000 08:22 56754599                   
3fff88600000-3fff88620000 r-xp 00000000 08:22 56754348                   
3fff88620000-3fff88630000 r--p 00010000 08:22 56754348                   
3fff88630000-3fff88640000 rw-p 00020000 08:22 56754348                   
3fff88640000-3fff88650000 r-xp 00000000 08:22 56754349                   
3fff88650000-3fff88660000 r--p 00000000 08:22 56754349                   
3fff88660000-3fff88670000 rw-p 00010000 08:22 56754349                   
3fff88670000-3fff88950000 r--p 00000000 08:22 57157222                   
3fff88950000-3fff88970000 r-xp 00000000 08:22 56755116                   
3fff88970000-3fff88980000 r--p 00010000 08:22 56755116                   
3fff88980000-3fff88990000 rw-p 00020000 08:22 56755116                   
3fff88990000-3fff889a0000 r-xp 00000000 08:22 56754275                   
3fff889a0000-3fff889b0000 r--p 00000000 08:22 56754275                   
3fff889b0000-3fff889c0000 rw-p 00010000 08:22 56754275                   
3fff889c0000-3fff88a40000 r-xp 00000000 08:22 56754277                   
3fff88a40000-3fff88a50000 r--p 00070000 08:22 56754277                   
3fff88a50000-3fff88a60000 rw-p 00080000 08:22 56754277                   
3fff88a60000-3fff88c20000 r-xp 00000000 08:22 56754236                   
3fff88c20000-3fff88c30000 r--p 001b0000 08:22 56754236                   
3fff88c30000-3fff88c40000 rw-p 001c0000 08:22 56754236                   
3fff88c40000-3fff88c70000 r-xp 00000000 08:22 56754265                   
3fff88c70000-3fff88c80000 r--p 00020000 08:22 56754265                   
3fff88c80000-3fff88c90000 rw-p 00030000 08:22 56754265                   
3fff88ca0000-3fff88cb0000 rw-p 00000000 00:00 0 
3fff88cb0000-3fff88cd0000 r-xp 00000000 00:00 0                          [vdso]
3fff88cd0000-3fff88d10000 r-xp 00000000 08:22 56754225                   
3fff88d10000-3fff88d20000 r--p 00030000 08:22 56754225                   
3fff88d20000-3fff88d30000 rw-p 00040000 08:22 56754225                   
3fffcce00000-3fffcce30000 rw-p 00000000 00:00 0                          [stack]
E: Sub-process /usr/bin/dpkg exited unexpectedly

---uname output---
Linux 4.4.0-33-generic #52-Ubuntu SMP Fri Jul 22 19:16:08 UTC 2016 ppc64le 
ppc64le ppc64le GNU/Linux
Userspace tool common name: apt-get, dpkg 

== Comment: #3 - Balamuruhan S - 2016-09-21 02:49:30 ==
Couldn't take sosreport, as I am getting the following error

# sosreport 
Traceback (most recent call last):
  File "/usr/bin/sosreport", line 20, in <module>
    from sos.sosreport import main
  File "/usr/share/sosreport/sos/", line 30, in <module>
    from sos.plugins import import_plugin
  File "/usr/share/sosreport/sos/plugins/", line 21, in <module>
    from sos.utilities import (sos_get_command_output, import_module, grep,
  File "/usr/share/sosreport/sos/", line 30, in <module>
    import six
ImportError: No module named 'six'

** Affects: dpkg (Ubuntu)
     Importance: Undecided
     Assignee: Taco Screen team (taco-screen-team)
         Status: New

** Tags: architecture-ppc64le bugnameltc-146532 severity-medium 

** Tags added: architecture-ppc64le bugnameltc-146532 severity-medium

You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

  dpkg crashes after apt-get upgrade got interrupted while upgrading
  "python-pyasn1" and it couldn't recovered

To manage notifications about this bug go to:

ubuntu-bugs mailing list

Reply via email to