apt search coredumping

Bug #1877987 reported by netmonk
28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
Search sometimes crashes if no translated description is available, as the translated description object was used without a check as to whether it exists.

[Test case]
No reproducer available at the moment.

[Where problems could occur]
In search command only, and only when looking at descriptions

[Original bug report]
root@citoyx:/var/crash# apt search jdk
Sorting... Done
Segmentation fault (core dumped)

May 11 12:34:25 citoyx kernel: [ 1354.337907] apt[10418]: segfault at 7f67292dcfc0 ip 00007f6309ce4997 sp 00007ffdab880930 error 4 in libapt-pkg.so.6.0.0[7f6309bb5000+147000]
May 11 12:34:25 citoyx kernel: [ 1354.337916] Code: 48 8b 45 18 48 8b 04 d0 48 83 c4 08 5b 5d c3 0f 1f 40 00 f3 0f 1e fa 55 48 89 fd 53 48 89 f3 48 83 ec 08 48 8b 06 48 8b 4e 08 <8b> 10 48 8d 04 d5 00 00 00 00 48 29 d0 48 8b 51 60 48 8d 04 c2 0f

root@citoyx:/var/crash# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04 LTS"

apt search is coredumping
While apt install/upgrade/update is running fine

crash file in attachment.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Marking this as private for now. No crash file attached yet

information type: Public → Private
Revision history for this message
netmonk (netmonk) wrote :
Revision history for this message
netmonk (netmonk) wrote :

(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/bin/apt search jdk
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Detaching after fork from child process 25180]
[Detaching after fork from child process 25181]
Sorting... Done
Full Text Search... 50%
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7ec9997 in pkgRecords::Lookup(pkgCache::DescFileIterator const&) () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.6.0

Revision history for this message
Julian Andres Klode (juliank) wrote :

FWIW, pointing apport-bug at the crash file makes it create a proper bug report with backtraces and stuff.

information type: Private → Private Security
Revision history for this message
netmonk (netmonk) wrote :

Well, beside telling me it uploaded something i dont see how i can link apport-bug to this ticket.

Revision history for this message
Julian Andres Klode (juliank) wrote :

So

> the "oops id" can be found in /var/crash/$mycrash.uploaded

so I guess paste that and we can then lookup the crash on the error tracker

Revision history for this message
Julian Andres Klode (juliank) wrote :
information type: Private Security → Private
information type: Private → Public
Revision history for this message
Julian Andres Klode (juliank) wrote :
Revision history for this message
Julian Andres Klode (juliank) wrote :

Fixed in 2.1.3, will look into adding a test case and backporting this to 2.0 shortly.

Changed in apt (Ubuntu):
status: New → Fix Committed
no longer affects: apt (Ubuntu Bionic)
Changed in apt (Ubuntu Focal):
status: New → Triaged
Revision history for this message
dragonhahney (dragonhahney) wrote : Re: [Bug 1877987] Re: apt search coredumping

Sir,
My has been crushed about over one month with the google, I think... CA is
cannot reboot... Thank you...

On Mon, May 18, 2020, 4:35 PM Julian Andres Klode <
<email address hidden>> wrote:

> Fixed in 2.1.3, will look into adding a test case and backporting this
> to 2.0 shortly.
>
> ** Changed in: apt (Ubuntu)
> Status: New => Fix Committed
>
> ** Also affects: apt (Ubuntu Bionic)
> Importance: Undecided
> Status: New
>
> ** Also affects: apt (Ubuntu Focal)
> Importance: Undecided
> Status: New
>
> ** No longer affects: apt (Ubuntu Bionic)
>
> ** Changed in: apt (Ubuntu Focal)
> Status: New => Triaged
>
> --
> You received this bug notification because you are subscribed to apt in
> Ubuntu.
> Matching subscriptions: dragonhahney
> https://bugs.launchpad.net/bugs/1877987
>
> Title:
> apt search coredumping
>
> Status in apt package in Ubuntu:
> Fix Committed
> Status in apt source package in Focal:
> Triaged
>
> Bug description:
> root@citoyx:/var/crash# apt search jdk
> Sorting... Done
> Segmentation fault (core dumped)
>
> May 11 12:34:25 citoyx kernel: [ 1354.337907] apt[10418]: segfault at
> 7f67292dcfc0 ip 00007f6309ce4997 sp 00007ffdab880930 error 4 in
> libapt-pkg.so.6.0.0[7f6309bb5000+147000]
> May 11 12:34:25 citoyx kernel: [ 1354.337916] Code: 48 8b 45 18 48 8b 04
> d0 48 83 c4 08 5b 5d c3 0f 1f 40 00 f3 0f 1e fa 55 48 89 fd 53 48 89 f3 48
> 83 ec 08 48 8b 06 48 8b 4e 08 <8b> 10 48 8d 04 d5 00 00 00 00 48 29 d0 48
> 8b 51 60 48 8d 04 c2 0f
>
>
> root@citoyx:/var/crash# cat /etc/lsb-release
> DISTRIB_ID=Ubuntu
> DISTRIB_RELEASE=20.04
> DISTRIB_CODENAME=focal
> DISTRIB_DESCRIPTION="Ubuntu 20.04 LTS"
>
>
> apt search is coredumping
> While apt install/upgrade/update is running fine
>
> crash file in attachment.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1877987/+subscriptions
>

Revision history for this message
netmonk (netmonk) wrote :

how can i update my apt package on my focal desktop to get the latest version ?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 2.1.6

---------------
apt (2.1.6) unstable; urgency=medium

  [ David Kalnischkies ]
  * Fix small memory leak in MethodConfig
  * Consider protected packages for removal if they are marked as such
  * Consider if a fix is successful before claiming it is
  * Allow 20 instead of 10 loops for pkgProblemResolver
  * Deal with duplicates in the solution space of a dep

 -- Julian Andres Klode <email address hidden> Wed, 03 Jun 2020 18:25:22 +0200

Changed in apt (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Pavel Bludov (pbludov) wrote :

This bug affects apt 2.0.3

$ apt search openjdk
Sorting... Done
Segmentation fault (core dumped)

$ apt --version
apt 2.0.3 (amd64)

Revision history for this message
Julian Andres Klode (juliank) wrote :

Does anyone have a reproducer in focal?

description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello netmonk, or anyone else affected,

Accepted apt into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apt/2.0.5 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in apt (Ubuntu Focal):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (apt/2.0.5)

All autopkgtests for the newly accepted apt (2.0.5) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

reprotest/0.7.14 (s390x, ppc64el)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#apt

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Julian Andres Klode (juliank) wrote :

Can't exactly verify as we did not get another reproducer, but marking it as verified anyway

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Chris Halse Rogers (raof) wrote :

apt 2.0.5 hasn't appeared in the errors.ubuntu.com crash bin, so that seems a reasonable assertion.

Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for apt has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 2.0.5

---------------
apt (2.0.5) focal; urgency=medium

  [ Julian Andres Klode ]
  * private-search: Only use V.TranslatedDescription() if good (LP: #1877987)
  * Implement update --error-on=any (Closes: #594813) (LP: #1693900)
  * Include all translations when building the cache (LP: #1907850)
  * Add basic support for the Protected field, and do not require force-loopbreak
    on Protected/Important packages (Closes: #983014) (LP: #1916725)
  * Protect currently running kernel at run-time (LP: #1615381)
  * Make ADDARG{,C}() macros expand to single statements
  * Default Acquire::AllowReleaseInfoChange::Suite to "true" (Closes: #931566)
    (LP: #1918907)

  [ David Kalnischkies ]
  * Fix incorrect base64 encoding due to int promotion (LP: #1916050)
  * Harden test for no new acquires after transaction abort (Closes: #984966)
    (LP: #1918920)

 -- Julian Andres Klode <email address hidden> Fri, 12 Mar 2021 12:47:30 +0100

Changed in apt (Ubuntu Focal):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.