#977041 libapt-pkg5.0: apt install segfaults

Package:
libapt-pkg5.0
Source:
apt
Submitter:
Harald Welte
Date:
2025-07-28 19:59:04 UTC
Severity:
important
Tags:
#977041#5
Date:
2020-12-10 14:13:36 UTC
From:
To:
Dear Maintainer,

Using a clean debian:stretch container of today (2020-12-10) from
hub.docker.com suddenly makes "apt install" of a single dpkg package
segfault:

root@5a1043034f18:/tmp# apt-get install
/tmp/libfftranscode0_0.3_amd64.deb
Reading package lists... Done
Segmentation fault (core dumped)

with backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x00007f4e926c4140 in pkgPolicy::InitDefaults() () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0
(gdb) bt full
#0  0x00007f4e926c4140 in pkgPolicy::InitDefaults() () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0
No symbol table info available.
#1  0x00007f4e926c5e74 in pkgPolicy::pkgPolicy(pkgCache*) ()
   from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0
No symbol table info available.
#2  0x00007f4e92601d6c in pkgCacheFile::BuildPolicy(OpProgress*) ()
   from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0
No symbol table info available.
#3  0x00007f4e92602d23 in pkgCacheFile::Open(OpProgress*, bool) ()
   from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0
No symbol table info available.
#4  0x00007f4e9294f0cc in DoInstall(CommandLine&) () from /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0
No symbol table info available.
#5  0x00007f4e92619056 in CommandLine::DispatchArg(CommandLine::Dispatch const*, bool) ()
   from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0
No symbol table info available.
#6  0x00007f4e929402ae in DispatchCommandLine(CommandLine&, std::vector<CommandLine::Dispatch, std::allocator<CommandLine::Dispatch> > const&) () from /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0
No symbol table info available.
#7  0x00005581226c6726 in ?? ()
No symbol table info available.
#8  0x00007f4e91c5a2e1 in __libc_start_main (main=0x5581226c6660, argc=3, argv=0x7ffdd841ce58,
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffdd841ce48)
    at ../csu/libc-start.c:291
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -7075202461956481313, 94013116672000,
                140728231644752, 0, 0, -3947932273984315681, -4012509856963535137},
              mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x7ffdd841ce78, 0x7f4e92da6170}, data = {
              prev = 0x0, cleanup = 0x0, canceltype = -666775944}}}
        not_first_call = <optimized out>
#9  0x00005581226c682a in ?? ()
No symbol table info available.


Unfortunately there's no -dbg package available for libapt-pkg, so I
cannot get symbol intformation for the backtrace.

There is nothing special about this system.  The very same dpkg package
could be installed without any problems for many months, but suddenly
there is a regresion.  Our CI jobs perform this package installation on
debian:stretch many times each day.  It always worked before.

The package is available from
https://ftp.osmocom.org/binaries/libfftranscode/libfftranscode0_0.3_amd64.deb
it's source cdoe is not available but it was built like any normal
debian packge.

Installing it straight away via dpkg works fine:


root@5a1043034f18:/tmp# dpkg -i ./libfftranscode0_0.3_amd64.deb
Selecting previously unselected package libfftranscode0:amd64.
(Reading database ... 20865 files and directories currently installed.)
Preparing to unpack .../libfftranscode0_0.3_amd64.deb ...
Unpacking libfftranscode0:amd64 (0.3) ...
Setting up libfftranscode0:amd64 (0.3) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...

#977041#10
Date:
2020-12-10 15:52:14 UTC
From:
To:
Control: tag -1 unreproducible moreinfo

This backtrace is useless, install libapt-pkg5.0-dbgsym and apt-dbgsym
from the dbgsym repository and try again.

This is crashing in the policy, so it's unlikely to be the new stuff in
1.4.11.

#977041#17
Date:
2021-03-20 09:59:38 UTC
From:
To:
Hello Julian,


Unfortunately there are just dbgsym packages for 1.4.10.
I guess the dbgsym packages for 1.4.11 never got published,
because they originate from a security update [1].
Even snapshot.debian.org [2] lists no dbgsym package for 1.4.11.
Debian Bug [894081] seems related.

Kind regards,
Bernhard

[1] http://deb.debian.org/debian-debug/pool/main/a/apt/ -> http://debug.mirrors.debian.org/debian-debug/pool/main/a/apt/
[2] https://snapshot.debian.org/package/apt/1.4.11/
[894081] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894081