[Aptitude-devel] Bug#824441: Bug#824441: aptitude segfaults when marking texlive-generic-extra as auto-installed

Manuel A. Fernandez Montecelo manuel.montezelo at gmail.com
Fri Jun 10 23:26:22 UTC 2016


Control: tags -1 + pending


Hi,

2016-05-20 08:39 David Kalnischkies:
>Hi,
>
>(disclaimer: apt, not aptitude, maintainer talking)
>
>On Fri, May 20, 2016 at 09:54:23AM +1000, James Tocknell wrote:
>> 0x00007ffff7b3feed in debVersioningSystem::CheckDep(char const*, int, char
>> const*) () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0
>> #0  0x00007ffff7b3feed in debVersioningSystem::CheckDep(char const*, int,
>> char const*) () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0
>> #1  0x00005555557767c1 in infer_reason (pkg=..., reasons=std::set with 1
>> elements = {...}) at ../../../../src/generic/apt/infer_reason.cc:178
>
>[It is a bit confusing that the code of frame #1 is actually calling
>IsSatisfied(), but it is just a wrapper around CheckDep() so lets just
>ignore that for the moment]
>
>10f0cf4a04b2526e9dea65facde865d993396417 adds this code, which passes
>the candidate version to IsSatisfied – but not all packages have
>a candidate! So that code should be adapted to test first if the package
>has a candidate and only if so check if the candidate satisfies the
>dependency.
>
>
>Now, we could ask why IsSatisfied requires a valid version and the
>answer is: nobody (aka me) thought anybody would pass it an invalid
>version as the soul reason for the one-line IsSatisfied is to hide the
>call to CheckDep behind a slightly nicer interface (1 vs 3 parameters)
>and all existing calls in apt passed only valid versions in…
>
>I am not sure it is a good idea to add checks to that method as its in
>various hot paths for apt & it has the potential of hiding bugs (at the
>expense of opening some like here). Either way, that needs more thought
>than I can shell out at the moment & adapting the call site should be
>easy.

Thanks for the dignosis.

Since I couldn't find an easy way to reproduce it (the texlive packages
are huge for my wrongly-called broadband), I am basing this fix on the
diagnosis above.


2016-05-24 05:03 James Tocknell:
>I've got a more useful backtrace (had to build apt to get its debug
>symbols). The issue seems to be line 178 in infer_reason.cc, which
>got introduced in 0.8. Somehow (I'm not sure, everything seems to have been
>inlined...), it's calling debVersioningSystem::CheckDep with an invalid
>address.

It probably happens for the reasons that David explained.

I think that it has to do with the reverse dependencies of virtual
packages.  I tried to reproduce it with csh|tcsh (virtual package
c-shell) and some -perl reverse dependency, but I tried to remove them
and mark as auto in different combinations for many minutes, and I
couldn't trigger it.

If you still experience this problem, it would be very nice if you
confirm that it's indeed fixed when we release the next version.


Cheers.
-- 
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>



More information about the Aptitude-devel mailing list