Bug#953412: apt: segfault at 0 ip 00007f024bc54e6f sp 00007ffcc6b28d40 error 4 in libapt-pkg.so.5.0.2

2020-03-19 Thread Bernhard Übelacker
Hello,
I tried to locate the source line of the address shown
in the /var/log/messages output.
But that failed but I found in the strace output that
it loads for some reason two libapt-pkg.so files ...

...
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libapt-pkg.so.6.0", 
O_RDONLY|O_CLOEXEC) = 3
...
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libapt-pkg.so.5.0", 
O_RDONLY|O_CLOEXEC) = 3
...

Just in case if that helps.

Kind regards,
Bernhard



Bug#953412: apt: segfault at 0 ip 00007f024bc54e6f sp 00007ffcc6b28d40 error 4 in libapt-pkg.so.5.0.2

2020-03-09 Thread Félix Sipma

Note that "apt whatever" also crashes, so I can't install anything.

I manually (using dpkg -i) installed aptitude in the meantime, ran 
"aptitude upgrade" and it seems that apt is working again.


By chance, I already had systemd-coredump and gdb installed (but no 
debug symbols), and "sudo coredumpctl gdb" reports something:


   PID: 63290 (apt-config)
   UID: 0 (root)
   GID: 0 (root)
Signal: 11 (SEGV)
 Timestamp: Mon 2020-03-09 10:33:38 CET (9min ago)
  Command Line: apt-config shell ignore_regexp AptListbugs::IgnoreRegexp
Executable: /usr/bin/apt-config
 Control Group: /user.slice/user-1000.slice/session-2.scope
  Unit: session-2.scope
 Slice: user-1000.slice
   Session: 2
 Owner UID: 1000 (gueux)
   Boot ID: 0215de477f574da5a7db213494365237
Machine ID: bd1078e9de2113789ff1dde150518661
  Hostname: capeo
   Storage: 
/var/lib/systemd/coredump/core.apt-config.0.0215de477f574da5a7db213494365237.63290.1583746418.lz4
   Message: Process 63290 (apt-config) of user 0 dumped core.

Stack trace of thread 63290:

#0  0x7f3605ab2000 n/a (libapt-private.so.0.0 + 0x69000)
#1  0x56034fac30ac n/a (apt-config + 0x50ac)


So, maybe that can still help? If not, sorry. I'll try to follow your 
suggestions and do a better bug report next time.


--
Félix


signature.asc
Description: PGP signature


Bug#953412: apt: segfault at 0 ip 00007f024bc54e6f sp 00007ffcc6b28d40 error 4 in libapt-pkg.so.5.0.2

2020-03-09 Thread Julian Andres Klode
Control: tag -1 moreinfo

On Mon, Mar 09, 2020 at 10:10:29AM +0100, Félix Sipma wrote:
> Package: apt
> Version: 1.8.4
> Severity: important
> 
> Running "apt upgrade" I got:
> 
> Segmentation fault (core dumped)
> 
> /var/log/messages reports:
> 
> Mar  9 10:03:48 laptop kernel: [ 3262.779582] apt[44617]: segfault at 0 
> ip 7f024bc54e6f sp 7ffcc6b28d40 error 4 in 
> libapt-pkg.so.5.0.2[7f024bbe4000+148000]
> Mar  9 10:03:48 laptop kernel: [ 3262.779588] Code: 08 01 48 8d 35 1c b6 
> 0d 00 4c 89 fa 48 8b 38 e8 a7 04 f9 ff 41 89 c4 84 c0 74 50 45 84 ed 74 21 48 
> 8b 05 7c 7d 12 00 48 8b 38 <48> 8b 07 ff 10 41 89 c4 84 c0 0f 84 e3 00 00 00 
> 48 8b 43 08 c6 00
> 
> Attached is the error output of "strace apt upgrade".

What do you think an strace is going to tell us? Please Install gdb
and debug symbols for apt, libstdc++6, libc6, and produce
a backtrace. So libapt-pkg5.0-dbgsym, libstdc++6-dbgsym,
libc6-dbgsym at a minimum.

You might want to install systemd-coredump so that cores are
always dumped and stored and you can then analyze them with
coredumpctl gdb and get a backtrace there to send in bug report.


You probably want to configure gdb to log to a file and get
a full backtrace, then attach that file, e.g. 

$ gdb --args apt upgrade
set logging overwrite on
set logging file /tmp/apt-crash.log
set logging on
set pagination 0
run
backtrace full
quit

$ ... attach /tmp/apt-crash.log to bug report ...


The same thing without the run if you used coredumpctl gdb, because,
um, you are analysing a prior crash rather than making it crash again :)


-- 
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer  i speak de, en


signature.asc
Description: PGP signature


Bug#953412: apt: segfault at 0 ip 00007f024bc54e6f sp 00007ffcc6b28d40 error 4 in libapt-pkg.so.5.0.2

2020-03-09 Thread Félix Sipma
Package: apt
Version: 1.8.4
Severity: important

Running "apt upgrade" I got:

Segmentation fault (core dumped)

/var/log/messages reports:

Mar  9 10:03:48 laptop kernel: [ 3262.779582] apt[44617]: segfault at 0 ip 
7f024bc54e6f sp 7ffcc6b28d40 error 4 in 
libapt-pkg.so.5.0.2[7f024bbe4000+148000]
Mar  9 10:03:48 laptop kernel: [ 3262.779588] Code: 08 01 48 8d 35 1c b6 0d 
00 4c 89 fa 48 8b 38 e8 a7 04 f9 ff 41 89 c4 84 c0 74 50 45 84 ed 74 21 48 8b 
05 7c 7d 12 00 48 8b 38 <48> 8b 07 ff 10 41 89 c4 84 c0 0f 84 e3 00 00 00 48 8b 
43 08 c6 00

Attached is the error output of "strace apt upgrade".

Note that the apt script ran by reportbug also failed, feel free to ask 
for configuration files or other information if needed...


-- Package-specific info:

-- apt-config dump --


-- System Information:
Debian Release: bullseye/sid
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.4.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages apt depends on:
ii  adduser 3.118
ii  debian-archive-keyring  2019.1
ii  gpgv2.2.19-2
ii  gpgv1   1.4.23-1+b1
ii  gpgv2   2.2.19-2
ii  libapt-pkg5.0   1.8.4
ii  libc6   2.29-10
ii  libgcc-s1 [libgcc1] 10-20200304-1
ii  libgcc1 1:10-20200304-1
ii  libgnutls30 3.6.12-2
ii  libseccomp2 2.4.2-2
ii  libstdc++6  10-20200304-1

Versions of packages apt recommends:
ii  ca-certificates  20190110

Versions of packages apt suggests:
pn  apt-doc  
pn  aptitude | synaptic | wajig  
ii  dpkg-dev 1.19.7
ii  gnupg2.2.19-2
ii  gnupg2   2.2.19-2
ii  powermgmt-base   1.36

-- Configuration Files:
/etc/apt/apt.conf.d/01autoremove changed:
APT
{
  NeverAutoRemove
  {
"^firmware-linux.*";
"^linux-firmware$";
"^linux-image-[a-z0-9]*$";
"^linux-image-[a-z0-9]*-[a-z0-9]*$";
  };
  VersionedKernelPackages
  {
# kernels
"linux-.*";
"kfreebsd-.*";
"gnumach-.*";
# (out-of-tree) modules
".*-modules";
".*-kernel";
  };
  Never-MarkAuto-Sections
  {
"metapackages";
"contrib/metapackages";
"non-free/metapackages";
"restricted/metapackages";
"universe/metapackages";
"multiverse/metapackages";
  };
  Move-Autobit-Sections
  {
"oldlibs";
"contrib/oldlibs";
"non-free/oldlibs";
"restricted/oldlibs";
"universe/oldlibs";
"multiverse/oldlibs";
  };
};


-- no debconf information

-- 
Félix
execve("/bin/apt", ["apt", "upgrade"], 0x7fffe8f747c8 /* 60 vars */) = 0
brk(NULL)   = 0x559cb0879000
access("/etc/ld.so.preload", R_OK)  = 0
openat(AT_FDCWD, "/etc/ld.so.preload", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
close(3)= 0
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=179726, ...}) = 0
mmap(NULL, 179726, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f8360d78000
close(3)= 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libapt-private.so.0.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`\371\0\0\0\0\0\0"..., 
832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=428120, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f8360d76000
mmap(NULL, 431520, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8360d0c000
mprotect(0x7f8360d1a000, 364544, PROT_NONE) = 0
mmap(0x7f8360d1a000, 299008, PROT_READ|PROT_EXEC, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe000) = 0x7f8360d1a000
mmap(0x7f8360d63000, 61440, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 
0x57000) = 0x7f8360d63000
mmap(0x7f8360d73000, 12288, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x66000) = 0x7f8360d73000
close(3)= 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libapt-pkg.so.6.0", 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\301\4\0\0\0\0\0"..., 
832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=1944888, ...}) = 0
mmap(NULL, 1949688, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8360b3
mmap(0x7f8360b77000, 1318912, PROT_READ|PROT_EXEC, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x47000) = 0x7f8360b77000
mmap(0x7f8360cb9000, 299008, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 
0x189000) = 0x7f8360cb9000
mmap(0x7f8360d02000, 40960, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d1000) = 0x7f8360d02000
close(3)= 0
openat(