apt-get crashed with SIGSEGV in __fprintf_chk()

Bug #520194 reported by Ubfan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Binary package hint: apt

Manual purge of an old set of kernel files did not totally clean out the /lib/modules/2.6.32-10-generic directory, leaving file modules.builtin.bin. Noticed that a previous kernel ...9 removal left the same file and directory.

sudo apt-get purge `apt-cache pkgnames |fgrep 32-10`
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libnunit2.4-cil libappindicator0-cil libmono-system-runtime2.0-cil
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  linux-headers-2.6.32-10* linux-headers-2.6.32-10-generic* linux-image-2.6.32-10-generic*
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
After this operation, 207MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 155387 files and directories currently installed.)
Removing linux-headers-2.6.32-10-generic ...
Removing linux-headers-2.6.32-10 ...
Removing linux-image-2.6.32-10-generic ...
Running postrm hook script /usr/sbin/update-grub.
....snip...

Found initrd image: /boot/initrd.img-2.6.32-11-generic
Found memtest86+ image: /boot/memtest86+.bin
done
dpkg: warning: while removing linux-image-2.6.32-10-generic, directory '/lib/modules/2.6.32-10-generic' not empty so not removed.
Segmentation fault (core dumped)

$ ls /lib/modules/*10*
modules.builtin.bin

ProblemType: Crash
Architecture: amd64
Date: Wed Feb 10 16:01:30 2010
DistroRelease: Ubuntu 10.04
ExecutablePath: /usr/bin/apt-get
Package: apt 0.7.25ubuntu4
ProcAttrCurrent: unconfined (enforce)
ProcCmdline: apt-get purge linux-headers-2.6.32-10-generic linux-headers-2.6.32-10 linux-image-2.6.32-10-generic
ProcEnviron:
 PATH=(custom, no user)
 LANG=C
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-12.17-generic
SegvAnalysis:
 Segfault happened at: 0x7f77542cc56f <__fprintf_chk+95>: cmpw $0x0,(%rdi)
 PC (0x7f77542cc56f) ok
 source "$0x0" ok
 destination "(%rdi)" (0x00000000) not located in a known VMA region (needed writable region)!
SegvReason: writing NULL VMA
Signal: 11
SourcePackage: apt
StacktraceTop:
 __fprintf_chk () from /lib/libc.so.6
 pkgDPkgPM::CloseLog() ()
 pkgDPkgPM::Go(int) ()
 pkgPackageManager::DoInstallPostFork(int) ()
 ?? ()
Title: apt-get crashed with SIGSEGV in __fprintf_chk()
Uname: Linux 2.6.32-12-generic x86_64
UserGroups:

Revision history for this message
Ubfan (ubfan1) wrote :
Revision history for this message
Torsten Spindler (tspindler) wrote :

I just tried to reproduce this problem with
$ sudo apt-get purge `apt-cache pkgnames | fgrep 32-12`
but it did not crash for me. Do you have more crashes with apt?

Changed in apt (Ubuntu):
status: New → Incomplete
Revision history for this message
Ubfan (ubfan1) wrote :

The crash apparently happened on the 32-9 manual remove too. The 32-9 and 32-10 removals were the only ones I have seen with the error. I do not even see the modules.buildin.bin in my 9.10 system. At some point, I lost the graphics on the Lucid alpha, so I deleted it. The Lucid installation was on a 4G usb stick, so maybe a slow file system exposed a race condition, but
I have not seen this type of error on the many other usb sticks with Intrepid, Jaunty, and Karmic.

Revision history for this message
Ubfan (ubfan1) wrote :
Download full text (5.1 KiB)

Here's another incomplete purge of kernel files, which did not cause a crash (different file this time, modules.seriomap).
This installation was on a hard disk, in a usb 2.0 enclosure.

Intrepid patched to date March 10, 2010 showed the manual kernel cleanup
problem. Same file, modules.seriomap was left.
No proprietary drivers in use.

$ uname -a
Linux laptop 2.6.27-17-generic #1 SMP Wed Jan 27 23:14:44 UTC 2010 i686 GNU/Linux

sudo apt-get purge `apt-cache pkgnames |fgrep 27-15`
[sudo] password for xxx:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package linux-headers-lbm-2.6.27-15-server is not installed, so not removed
Package linux-backports-modules-2.6.27-15-generic is not installed, so not removed
Package linux-backports-modules-2.6.27-15-server is not installed, so not removed
Package linux-image-2.6.27-15-virtual is not installed, so not removed
Package linux-restricted-modules-2.6.27-15-server is not installed, so not removed
Package linux-headers-lbm-2.6.27-15-generic is not installed, so not removed
Package linux-headers-2.6.27-15-server is not installed, so not removed
Package linux-image-2.6.27-15-server is not installed, so not removed
The following packages will be REMOVED:
  linux-headers-2.6.27-15* linux-headers-2.6.27-15-generic* linux-image-2.6.27-15-generic* linux-restricted-modules-2.6.27-15-generic*
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
After this operation, 150MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 156348 files and directories currently installed.)
Removing linux-headers-2.6.27-15-generic ...
Removing linux-headers-2.6.27-15 ...
Removing linux-restricted-modules-2.6.27-15-generic ...
update-initramfs: Generating /boot/initrd.img-2.6.27-15-generic
Purging configuration files for linux-restricted-modules-2.6.27-15-generic ...
Removing linux-image-2.6.27-15-generic ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms
run-parts: executing /etc/kernel/prerm.d/last-good-boot
Running postrm hook script /sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... found but preserving previous setting: splashimage=/boot/grub/digging.xpm.gz
Found kernel: /boot/vmlinuz-2.6.27-17-generic
Found kernel: /boot/vmlinuz-2.6.27-16-generic
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done

Purging configuration files for linux-image-2.6.27-15-generic ...
Running postrm hook script /sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... found but preserving previous setting: splashimage=/boot/grub/digging.xpm.gz
Found kernel: /boot/vmlinuz-2.6.27-17-generic
Found kernel: /boot/vmlinuz-2.6.27-16-generic
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done

rmdir: failed to remove `/...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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