linux-crashdump: missing binutils dependancy for "strings"

Bug #1092911 reported by Peter Petrakis
This bug report is a duplicate of:  Bug #251288: Crash should depend on binutils. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
crash (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

SUMMARY:
crash needs strings to interrogate the dump, it's not installed by default.

SOLUTION:

I install binutils and can now read the dump. Please add binutils
to the dependency list.

DETAILS:

# apt-get install linux-crashdump
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  crash kexec-tools libdw1 makedumpfile
Suggested packages:
  kernel-patch-lkcd dumputils
The following NEW packages will be installed:
  crash kexec-tools libdw1 linux-crashdump makedumpfile
0 upgraded, 5 newly installed, 0 to remove and 2 not upgraded.

# crash vmlinux-3.2.0-34-generic vmcore
...
sh: 1: /usr/bin/strings: not found
WARNING: kernels compiled by different gcc versions:
  vmlinux-3.2.0-34-generic: (unknown)
  vmcore kernel: 4.6.3

WARNING: kernel version inconsistency between vmlinux and dumpfile

crash: incompatible arguments:
   vmlinux-3.2.0-34-generic is not SMP -- vmcore is SMP

Usage:

  crash [OPTION]... NAMELIST MEMORY-IMAGE (dumpfile form)
  crash [OPTION]... [NAMELIST] (live system form)

Enter "crash -h" for details.
root@juju-canonistack-1-instance-1:/home/ubuntu/dumps#

strings
The program 'strings' can be found in the following packages:
 * binutils

REPRODUCTION:

On a pristine system without any development tools installed,
# apt-get install linux-crashdump

and try to read a vmcore

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: linux-crashdump 3.2.0.35.40
ProcVersionSignature: Ubuntu 3.2.0-35.55-virtual 3.2.34
Uname: Linux 3.2.0-35-virtual x86_64
AlsaDevices:
 total 0
 crw-rw---T 1 root audio 116, 1 Dec 19 14:17 seq
 crw-rw---T 1 root audio 116, 33 Dec 19 14:17 timer
AplayDevices: Error: [Errno 2] No such file or directory
ApportVersion: 2.0.1-0ubuntu15.1
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
CurrentDmesg:
 [172191.831863] SGI XFS Quota Management subsystem
 [172191.991981] Btrfs loaded
Date: Fri Dec 21 14:31:28 2012
Ec2AMI: ami-000000bf
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.medium
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
IwConfig:
 lo no wireless extensions.

 eth0 no wireless extensions.
Lsusb:
 Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
MachineType: Bochs Bochs
MarkForUpload: True
PciMultimedia:

ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-35-virtual root=UUID=c60d1715-05ce-4654-bf80-46eebe5fc416 ro console=ttyS0
RelatedPackageVersions:
 linux-restricted-modules-3.2.0-35-virtual N/A
 linux-backports-modules-3.2.0-35-virtual N/A
 linux-firmware 1.79.1
RfKill: Error: [Errno 2] No such file or directory
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 01/01/2007
dmi.bios.vendor: Bochs
dmi.bios.version: Bochs
dmi.chassis.type: 1
dmi.chassis.vendor: Bochs
dmi.modalias: dmi:bvnBochs:bvrBochs:bd01/01/2007:svnBochs:pnBochs:pvr:cvnBochs:ct1:cvr:
dmi.product.name: Bochs
dmi.sys.vendor: Bochs

Revision history for this message
Peter Petrakis (peter-petrakis) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Do you happen to know if this bug exists in newer releases as well, such as Quantal and Raring?

Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: kernel-da-key
Revision history for this message
Peter Petrakis (peter-petrakis) wrote :

Nope, just look at the dsc, if the dep isn't there, it's still broken.

Revision history for this message
Peter Petrakis (peter-petrakis) wrote :

SUMARRY : module-init-tools and binutils must be added to "Depends"

$ bzr branch lp:ubuntu/crash
Most recent Ubuntu version: 6.1.0-1ubuntu1

$ cd crash

<01:21:16>crash$ bzr grep Depends debian/
debian/changelog: libncurses in ${shlibs:Depends} (Closes: #318367)
debian/control:Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1), quilt (>= 0.47), binutils, binutils-dev, zlib1g-dev, libncurses5-dev
debian/control:Depends: ${shlibs:Depends}, ${misc:Depends}

So it's a build depend but it was left to library auto-resolution to determine shared
library depends. "strings" is being called as a normal process. We have explicitly
add binutils to Depends.

kernel.c: sprintf(command, "/usr/bin/strings %s", namelist);
kernel.c: sprintf(command, "/usr/bin/strings %s", namelist);

In addition to that:
filesys.c: sprintf(command, "/sbin/modprobe %s", pc->memory_module);
filesys.c: sprintf(command, "/sbin/rmmod %s", pc->memory_module);

We get these for free as basic kernel utils are always expected to be installed.

and that's just from grepping the code for 5 mins.

Brad Figg (brad-figg)
affects: linux (Ubuntu) → crash (Ubuntu)
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.