apt-get always crash with Segmentation fault (core dumped) if /var/log/apt doesn't exist.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Lucid |
Fix Released
|
Undecided
|
Unassigned | ||
Maverick |
Fix Released
|
Medium
|
Unassigned |
Bug Description
TEST CASE:
1. get rid of the log directory
2. $ sudo mv /var/log/apt /var/log/apt.bak
3 try to install/remove a package (I'll use htop here)
$ sudo apt-get install htop
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
strace ltrace
The following NEW packages will be installed:
htop
0 upgraded, 1 newly installed, 0 to remove and 35 not upgraded.
Need to get 66.1kB of archives.
After this operation, 217kB of additional disk space will be used.
Get:1 https:/
Fetched 66.1kB in 1s (57.1kB/s)
Selecting previously deselected package htop.
(Reading database ... 65298 files and directories currently installed.)
Unpacking htop (from ../htop_
Setting up htop (0.8.3-1ubuntu1)
Segmentation fault
4. verify the that it segfaults
5. install apt from lucid-proposed
6. repeat step 3 and verify that the segfault is gone
Binary package hint: apt
Description: Ubuntu lucid (development branch)
Release: 10.04
apt:
Installed: 0.7.25.3ubuntu1
Candidate: 0.7.25.3ubuntu1
Version table:
*** 0.7.25.3ubuntu1 0
500 http://
100 /var/lib/
If you try to run apt and /var/log/apt doesn't exist (because you mounted /var/log as a tmpfs for example) apt will segfault at the end when trying to save the logs.
The fixed package doesn't segfault anymore and tells you "E: Directory '/var/log/apt/' missing" instead.
Related branches
- Michael Vogt (community): Approve
-
Diff: 15 lines (+5/-0)1 file modifiedapt-pkg/deb/dpkgpm.cc (+5/-0)
tags: | added: apt apt-get aptitude core crash dump |
Changed in apt (Ubuntu): | |
status: | New → Confirmed |
summary: |
- apt-get always crash with Segmentation fault (core dumped) + apt-get always crash with Segmentation fault (core dumped) if + /var/log/apt doesn't exist. |
Changed in apt (Ubuntu): | |
status: | Confirmed → Fix Committed |
Changed in apt (Ubuntu): | |
importance: | Undecided → Medium |
Changed in apt (Ubuntu Lucid): | |
status: | New → In Progress |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Same problem here. With strace I figured out that it stops while checking the history in /var/log/ apt/history. log.
If there is no directory /var/log/apt/ you will get a segmentation fault. Can you please check this?