Bug#741031: I can confirm this bug, too

2014-05-06 Thread Robert Waldner

On Mon, 05 May 2014 10:13:51 +0200, Robert Waldner writes:
Trying to upgrade to current Jessie, eg. from 2.17-97 to 2.18-5, got 
 libc6-amd64:i386 into a state where it seems impossible to continue.
 Removing libc6-amd64:i386 fails because the package is in a bad 
 state, reinstalling doesn't work, either, nor das apt-get -f install:

At first failure, I tried with the steps outlined in #736097, and (like 
 Francesco) hosed my system - luckily I had sash installed and could 
 revocer via that.

Now it seems I'm stuck in a loop:

FWIW, after some experimentation in a chrooted copy of the system I was 
 able to revover, here's a snippet of my shell history:

  588  LD_LIBRARY_PATH=/lib/x86_64-linux-gnu/ apt-get -f install

Didn't help. every new process would just segfault, until (ldconfig 
 had been symlinked to /bin/true before):
  589  /sbin/ldconfig.real 

Seems the apt-get -f install with LD_LIBRARY_PATH set got me far enough 
 so that now it was possible to continue w/o errors:
  590  apt-get -f install
  591  apt-get -s remove libc6-amd64
  592  apt-get -s --purge remove libc6-amd64
  593  apt-get --purge remove libc6-amd64

Now I'm in a state without broken/half-installed libc6* packages, finally
 could get rid of libc6-amd64, and can continue with upgrading:

:) waldner@fsck-~ $ COLUMNS=72 dpkg -l | grep libc6 | egrep ^i
ii  libc6:amd642.18-5   amd64Embedded GNU C Library: Shared li
ii  libc6:i386 2.18-5   i386 Embedded GNU C Library: Shared li
ii  libc6-dbg:amd6 2.18-5   amd64Embedded GNU C Library: detached 
ii  libc6-dev:amd6 2.18-5   amd64Embedded GNU C Library: Developme
ii  libc6-dev:i386 2.18-5   i386 Embedded GNU C Library: Developme
ii  libc6-dev-i386 2.18-5   amd64Embedded GNU C Library: 32-bit de
ii  libc6-dev-x32  2.18-5   amd64Embedded GNU C Library: X32 ABI D
ii  libc6-i386 2.18-5   amd64Embedded GNU C Library: 32-bit sh
ii  libc6-x32  2.18-5   amd64Embedded GNU C Library: X32 ABI S

Kind regards,
robert
-- 
-- Too much is just enough.
-- Mark Twain (on whiskey)




signature.asc
Description: Digital Signature


Bug#741031: I can confirm this bug, too

2014-05-06 Thread Robert Waldner

On Tue, 06 May 2014 08:44:02 +0200, Aurelien Jarno writes:
On Mon, May 05, 2014 at 10:13:51AM +0200, Robert Waldner wrote:
 
 Trying to upgrade to current Jessie, eg. from 2.17-97 to 2.18-5, got 
  libc6-amd64:i386 into a state where it seems impossible to continue.
  Removing libc6-amd64:i386 fails because the package is in a bad 
  state, reinstalling doesn't work, either, nor das apt-get -f install:
 
 At first failure, I tried with the steps outlined in #736097, and (like 
  Francesco) hosed my system - luckily I had sash installed and could 
  revocer via that.
 
 Now it seems I'm stuck in a loop:

Before trying to provide any hint, but also to be able to understand and
fix the problem, we need to have a clear status of your system. Could
you please run the following commands and send us the output:

- dpkg -l libc*
- ls -l /lib /lib32 /lib64 /lib/i386-linux-gnu/ /lib/x86_64-linux-gnu/

Hi Aurelien,

sorry, your mail overlapped with me managing to get back to a working 
 system.

I've got most of the state of the libc6* (not libc*) packages still in 
 the scroll buffer, but not all of it (this is literally the top of the 
 scroll buffer):

iU  libc6-amd64   2.18-5
i386 Embedded GNU C Library: 64bit Shared libraries for AMD64
iU  libc6-dbg:amd64   2.18-5
amd64Embedded GNU C Library: detached debugging symbols
iU  libc6-dev:amd64   2.18-5
amd64Embedded GNU C Library: Development Libraries and Header Files
iU  libc6-dev:i3862.18-5
i386 Embedded GNU C Library: Development Libraries and Header Files
iU  libc6-dev-i3862.18-5
amd64Embedded GNU C Library: 32-bit development libraries for AMD64
iU  libc6-dev-x32 2.18-5
amd64Embedded GNU C Library: X32 ABI Development Libraries for AMD64
iU  libc6-i3862.18-5
amd64Embedded GNU C Library: 32-bit shared libraries for AMD64
rc  libc6-i686:i386   2.13-38   
i386 Embedded GNU C Library: Shared libraries [i686 optimized]
iU  libc6-x32 2.18-5
amd64Embedded GNU C Library: X32 ABI Shared libraries for AMD64
:) root@fsck-/usr/local/src/games # ls -la /lib/x86_64-linux-gnu/libdl-2.1*
-rw-r--r-- 1 root root 14664 Nov 29 18:00 /lib/x86_64-linux-gnu/libdl-2.17.so

I could get the rest of the output, but it'd be from the working 
 system, so I guess there wouldn't much of a point.

Thanks for taking the time and trying to help me out.

Kind regards,
robert
-- 
-- You're lost in the maze of /usr/ucb and /usr/xpg/bin. An evil
--  tset attacks you. - az about Solaris




signature.asc
Description: Digital Signature


Bug#741031: I can confirm this bug, too

2014-05-05 Thread Robert Waldner

Trying to upgrade to current Jessie, eg. from 2.17-97 to 2.18-5, got 
 libc6-amd64:i386 into a state where it seems impossible to continue.
 Removing libc6-amd64:i386 fails because the package is in a bad 
 state, reinstalling doesn't work, either, nor das apt-get -f install:

At first failure, I tried with the steps outlined in #736097, and (like 
 Francesco) hosed my system - luckily I had sash installed and could 
 revocer via that.

Now it seems I'm stuck in a loop:

 # apt-get -f install
Reading package lists... Done
Building dependency tree   
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  libc-bin libc6 libc6-amd64:i386
Suggested packages:
  glibc-doc
The following packages will be upgraded:
  libc-bin libc6 libc6-amd64:i386
3 upgraded, 0 newly installed, 0 to remove and 1235 not upgraded.
12 not fully installed or removed.
Need to get 0 B/8,518 kB of archives.
After this operation, 115 kB disk space will be freed.
Do you want to continue? [Y/n] 
Preconfiguring packages ...
(Reading database ... 294301 files and directories currently installed.)
Preparing to unpack .../libc6-amd64_2.18-5_i386.deb ...
Unpacking libc6-amd64 (2.18-5) over (2.17-97) ...
Replaced by files in installed package libc6:amd64 (2.17-97) ...
dpkg: warning: subprocess old post-removal script was killed by signal 
(Segmentation fault)
dpkg: trying script from the new package instead ...
dpkg: error processing archive 
/var/cache/apt/archives/libc6-amd64_2.18-5_i386.deb (--unpack):
 subprocess new post-removal script was killed by signal (Segmentation fault)
dpkg: error while cleaning up:
 subprocess installed pre-installation script was killed by signal 
(Segmentation fault)
Preparing to unpack .../libc6_2.18-5_amd64.deb ...
Checking for services that may need to be restarted...
Checking init scripts...
Warning: found a potentially broken dynamic loader symlink,
disabling ldconfig to avoid a possible system breakage. It
will be reenabled when a new version of libc-bin is unpacked.
Unpacking libc6:amd64 (2.18-5) over (2.17-97) ...
dpkg: warning: subprocess old post-removal script was killed by signal 
(Segmentation fault)
dpkg: trying script from the new package instead ...
dpkg: error processing archive /var/cache/apt/archives/libc6_2.18-5_amd64.deb 
(--unpack):
 subprocess new post-removal script was killed by signal (Segmentation fault)
dpkg: error while cleaning up:
 subprocess installed pre-installation script was killed by signal 
(Segmentation fault)
Errors were encountered while processing:
 /var/cache/apt/archives/libc6-amd64_2.18-5_i386.deb
 /var/cache/apt/archives/libc6_2.18-5_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
:( root@fsck-/usr/local/src/games # apt-get remove libc6-amd64:i386
Reading package lists... Done
Building dependency tree   
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libc-bin : Depends: libc6 ( 2.18) but 2.18-5 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a 
solution).
:( root@fsck-/usr/local/src/games # apt-get --reinstall install libc6-amd64- 
libc6 libc-bin
Reading package lists... Done
Building dependency tree   
Reading state information... Done
Suggested packages:
  glibc-doc
The following packages will be REMOVED:
  libc6-amd64:i386
The following packages will be upgraded:
  libc-bin libc6
2 upgraded, 0 newly installed, 1 to remove and 1235 not upgraded.
12 not fully installed or removed.
Need to get 0 B/5,927 kB of archives.
After this operation, 11.0 MB disk space will be freed.
Do you want to continue? [Y/n] 
Preconfiguring packages ...
dpkg: error processing package libc6-amd64 (--remove):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting a removal
E: Sub-process /usr/bin/dpkg returned an error code (1)
:( root@fsck-/usr/local/src/games # dpkg -r libc6-amd64 
dpkg: error processing package libc6-amd64 (--remove):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting a removal
Errors were encountered while processing:
 libc6-amd64
:( root@fsck-/usr/local/src/games # apt-get --reinstall install 
libc6-amd64:i386
Reading package lists... Done
Building dependency tree   
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libc-bin : Depends: libc6 ( 2.18) but 2.18-5 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a 
solution).
:( root@fsck-/usr/local/src/games # apt-get -f install
Reading package lists... Done
Building dependency tree   
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  libc-bin libc6 libc6-amd64:i386
Suggested packages:
  glibc-doc

Bug#736097: libc6:amd64: libc6 2.17-97 rm'ing ld.so.cache at inopportune moment, can not upgrade

2014-01-21 Thread Robert Waldner

On Mon, 20 Jan 2014 23:36:17 -0700, Adam Conrad writes:
On Sun, Jan 19, 2014 at 06:55:49PM +0100, Robert Waldner wrote:
 
 The problem is that as soon as ld.so.cache is gone, dpkg-deb stops working
 because it can't find libz.so.1 anymore. At the moment I don't have any
 idea on how to upgrade from stable (2.13-38) to testing (2.17-97). Any hints
 *greatly* appreciated.

Your analysis doesn't make much sense to me.  If libz.so.1 is on the
default search path (and it is, unless you've moved it), you don't
need ld.so.cache to exist to resolve it.  For things on the search
path, the cache only speeds up the lookup, it doesn't facilitate it.

Ok. My knowledge about libc and library-loading isn't great.

If this weren't true, literally *nothing* would run, because most of
the world depends on finding libc.so.6 on path.

So, I'd recommend sorting out where your libz.so.1 has gone to, and
that should get you going again.

I've prepared a copy of the system for testing via chroot. chroot'ed to 
 there, `apt-get upgrade`:

Preparing to replace libc6-dev-i386 2.13-38 (using 
.../libc6-dev-i386_2.17-97_amd64.deb) ...
Unpacking replacement libc6-dev-i386 ...
Preparing to replace libc6-i386 2.13-38 (using 
.../libc6-i386_2.17-97_amd64.deb) ...
Unpacking replacement libc6-i386 ...
Replaced by files in installed package libc6:i386 ...
Preparing to replace linux-libc-dev:amd64 3.2.51-1 (using 
.../linux-libc-dev_3.12.6-2_amd64.deb) ...
De-configuring linux-libc-dev:i386 ...
Unpacking replacement linux-libc-dev:amd64 ...
Preparing to replace linux-libc-dev:i386 3.2.51-1 (using 
.../linux-libc-dev_3.12.6-2_i386.deb) ...
Unpacking replacement linux-libc-dev:i386 ...
Can not write log, openpty() failed (/dev/pts not mounted?)
Setting up linux-libc-dev:amd64 (3.12.6-2) ...
Setting up linux-libc-dev:i386 (3.12.6-2) ...
Can not write log, openpty() failed (/dev/pts not mounted?)
(Reading database ... 288896 files and directories currently installed.)
Preparing to replace libc6-dev:i386 2.13-38 (using 
.../libc6-dev_2.17-97_i386.deb) ...
De-configuring libc6-dev:amd64 ...
Unpacking replacement libc6-dev:i386 ...
Preparing to replace libc6-dev:amd64 2.13-38 (using 
.../libc6-dev_2.17-97_amd64.deb) ...
Unpacking replacement libc6-dev:amd64 ...
Preparing to replace locales 2.13-38 (using .../locales_2.17-97_all.deb) ...
Unpacking replacement locales ...
Preparing to replace libc6:amd64 2.13-38 (using .../libc6_2.17-97_amd64.deb) ...
De-configuring libc6:i386 ...
Checking for services that may need to be restarted...
Checking init scripts...
Unpacking replacement libc6:amd64 ...
dpkg-deb: error while loading shared libraries: libz.so.1: cannot open shared 
object file: No such file or directory
dpkg: error processing /var/cache/apt/archives/libc6_2.17-97_amd64.deb 
(--unpack):
 subprocess dpkg-deb --fsys-tarfile returned error exit status 127
dpkg-deb: error while loading shared libraries: libz.so.1: cannot open shared 
object file: No such file or directory
dpkg: error processing /var/cache/apt/archives/libc6_2.17-97_i386.deb 
(--unpack):
 subprocess dpkg-deb --control returned error exit status 127
Processing triggers for man-db ...
/usr/bin/mandb: error while loading shared libraries: libgdbm.so.3: cannot open 
shared object file: No such file or directory
Errors were encountered while processing:
 /var/cache/apt/archives/libc6_2.17-97_amd64.deb
 /var/cache/apt/archives/libc6_2.17-97_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Now, at this point practically nothing works any more:

:( root@fsck-/ # ls -al ./usr/lib32/libz.so.1
ls: error while loading shared libraries: libselinux.so.1: cannot open shared 
object file: No such file or directory
:) root@fsck-/ # find . -name libz.so.1 | xargs file
file: error while loading shared libraries: libmagic.so.1: cannot open shared 
object file: No such file or directory

Looking from _outside_ the chroot it seems everything's still there:
 # find /mnt/container/ -name libz.so.1 | xargs file -L
/mnt/container/usr/lib32/libz.so.1: ELF 32-bit LSB shared 
object, Intel 80386, version 1 (SYSV), dynamically linked, 
BuildID[sha1]=0x3539dd7120554f14be8c3668d2bad45650192c5f, stripped
/mnt/container/lib/x86_64-linux-gnu/libz.so.1:  ELF 64-bit LSB shared 
object, x86-64, version 1 (SYSV), dynamically linked, 
BuildID[sha1]=0x1fb7fe1e239c99d4670d5707a44e723a6752d8e1, stripped
/mnt/container/lib/i386-linux-gnu/libz.so.1:ELF 32-bit LSB shared 
object, Intel 80386, version 1 (SYSV), dynamically linked, 
BuildID[sha1]=0x6619298726f5e0d5b293bbd09fc3de8c1e6881f8, stripped


Yet, once I run ldconfig:

:( root@fsck-/ # ldconfig
:) root@fsck-/ # ls -al ./usr/lib32/libz.so.1
lrwxrwxrwx 1 root root 13 Jan 21 01:33 ./usr/lib32/libz.so.1 - libz.so.1.2.7

Running dpkg through strace yields:

23397 open(/lib64/libz.so.1, O_RDONLY) = -1 ENOENT (No such file or directory)
23397 open(/usr/lib64/libz.so.1, O_RDONLY) = -1 ENOENT (No such file or 
directory