[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#867997: marked as done (jessie->stretch, all apt clients break with /var/lib/dpkg/status realpath error)



Your message dated Tue, 11 Jul 2017 20:27:00 +0000
with message-id <9743dd59-1e84-7908-66e1-3669eb73f680@thykier.net>
and subject line Re: Bug#867997: jessie->stretch, all apt clients break with /var/lib/dpkg/status realpath error
has caused the Debian Bug report #867997,
regarding jessie->stretch, all apt clients break with /var/lib/dpkg/status realpath error
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
867997: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=867997
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: upgrade-reports
Version: 9
Severity: grave

Followed the Debian 9 release notes to upgrade a jessie i386 (686) machine to stretch. No apt sources except official debian ones. Following the apt-get dist-upgrade step, attempts to use apt-get, apt-cache, aptitude
produce the following error:

# apt-get update
Hit:1 http://ftp.us.debian.org/debian stretch-updates InRelease
Ign:2 http://ftp.debian.org/debian stretch InRelease
Get:3 http://security.debian.org stretch/updates InRelease [62.9 kB]
Hit:4 http://ftp.debian.org/debian stretch Release
Fetched 62.9 kB in 1s (38.2 kB/s)
Reading package lists... Error!
E: flAbsPath on /var/lib/dpkg/status failed - realpath (22: Invalid argument)
E: Could not open file  - open (2: No such file or directory)
E: Problem opening
E: The package lists or status file could not be parsed or opened.


Error persists after reboot of the system.

However, dpkg -l and similar still work. The /var/lib/dpkg structure appears to be intact:

$ ls -l /var/lib/dpkg
total 6904
drwxr-xr-x 2 root root    4096 Jul  7 16:39 alternatives
-rw-r--r-- 1 root root 1379057 Apr 28  2015 available
-rw-r--r-- 1 root root 1361618 Apr 28  2015 available-old
-rw-r--r-- 1 root root       8 Feb 20  2006 cmethopt
-rw-r--r-- 1 root root     953 Jul  7 15:54 diversions
-rw-r--r-- 1 root root    1034 Jul  7 15:54 diversions-old
drwxr-xr-x 2 root root  339968 Jul  7 16:03 info
-rw-r----- 1 root root       0 Jul  7 16:44 lock
-rw-r----- 1 root root       0 Feb 20  2006 methlock
drwxr-xr-x 7 root root    4096 Feb  7  2011 methods
drwxr-xr-x 2 root root    4096 May 26  2005 parts
-rw-r--r-- 1 root root     460 Jul  7 16:40 statoverride
-rw-r--r-- 1 root root     421 Jul  7 16:40 statoverride-old
-rw-r--r-- 1 root root 1961225 Jul  7 16:44 status
-rw-r--r-- 1 root root 1961225 Jul  7 16:44 status-old
drwxr-xr-x 2 root root    4096 Jul  7 16:43 triggers
drwxr-xr-x 2 root root    4096 Jul  7 16:44 updates


I am using Debian GNU/Linux 2.2, kernel 2.2.17-pre-patch-13 and libc6 2.1.3-10.

Earlier in the week, I did a similar upgrade on another system with same hardware and didn't experience a problem.



--- End Message ---
--- Begin Message ---
Alan Schwartz:
> Quoting Niels Thykier (niels@thykier.net):
>>
>> FTR; I don't think that "apt-get check" is supposed to work as non-root.
>>
>>>>   - If it fails, please attempt to figure out where the permission
>>>>     fails (e.g. [dir-test])
>>>
>>> # ls -ld / /var /var/lib /var/lib/dpkg /var/lib/dpkg/status
>>> drwxr-xr-x 21 root root    1024 Jul 10 11:21 /
>>> drwxr-xr-x 13 root root    4096 May  7  2013 /var
>>> drwxr-xr-x 74 root root    4096 Jul  7 16:01 /var/lib
>>> drwxr-xr-x  8 root root    4096 Jul 11 08:48 /var/lib/dpkg
>>> -rw-r--r--  1 root root 1961225 Jul 11 08:48 /var/lib/dpkg/status
>>>
>>> As you can see, none of these are writable by _apt; however, these are
>>> the same permissions I see on the other (working)
>>
>> Indeed, and _apt does not need write access to the status file.
>>
>> Does it work if you disable the sandbox user, e.g. by using:
>>  apt-get -o APT::Sandbox::User=root update
> 
> No, same error:
> 
> [...]

Hi,

I talked with the APT developers and while debugging, we noticed the
following remark in your opening message:

> 
> I am using Debian GNU/Linux 2.2, kernel 2.2.17-pre-patch-13 and libc6
> 2.1.3-10.


We realised that apt relies on a feature that requires glibc 2.3 or
later[1].  Debian does not support any version of glibc prior to 2.19.

Sorry, I am afraid that we cannot help you unless you upgrade glibc and
the kernel to supported versions from stretch. :-/

Thanks,
~Niels

[1] It uses "realpath" with a "resolved_path" set to NULL as permitted
by POSIX.1-2008.  The glibc implementation prior to 2.3 returns "EINVAL"
(the error you see) for that, while later versions support the extension.

https://manpages.debian.org/stretch/manpages-dev/realpath.3.en.html

--- End Message ---

Reply to: