8

I am using Ubuntu 18.04 LTS and I am new in Ubuntu.

A crash file with name _usr_bin_gnome-shell.121.crash is getting generated inside /var/crash.

I read many posts that how to read/open .crash files for debugging but I am unable to open or read using apport-retrace and couldn't figure out what -dgb packages need to be installed and how to use them after installing them.

Also I tried apport-unpack but couldn't read the file.

Can anyone please describe all steps that how to read a .crash file or what another tool can be used which is easy for new user to read .crash files from /var/crash.

Please answer this question if anyone knows anything, I am really unable to read with all available solutions so far.

Thank you.

AJM
  • 205

2 Answers2

8

It depends on what you are trying to read. If you will be satisfied with text-only contents - use Parto's answer.

If you need to dig deeper - you have to use special applications apport-unpack (see its help via man apport-unpack or online). You can use it as follows:

# copy crash report somewhere
cp /var/crash/_usr_bin_gnome-shell.121.crash /tmp

# extract it
cd /tmp
apport-unpack _usr_bin_gnome-shell.121.crash _usr_bin_gnome-shell.121.crash-dir/

and you will get text user-friendly text-files with coredump separated from them:

$ ls -l _usr_bin_gnome-shell.121.crash-dir/ 
ApportVersion        _MarkForUpload        SourcePackage Architecture 
Package               Stacktrace CoreDump            
PackageArchitecture   StacktraceTop Date                 ProblemType  
Tags Dependencies         ProcCmdline           ThreadStacktrace
Disassembly          ProcCpuinfoMinimal    Title DistroRelease       
ProcCwd               Uname ExecutablePath       ProcMaps             
UnreportableReason ExecutableTimestamp  ProcStatus           
UpgradeStatus InstallationDate     ProcVersionSignature  UserGroups
InstallationMedia    Registers             XsessionErrors
JournalErrors        Signal 

Pages to read:

  1. https://wiki.ubuntu.com/Apport
  2. https://wiki.ubuntu.com/DebuggingProgramCrash
N0rbert
  • 103,263
4

The .crash file under /var/crash is a simple text file, just a really big text file. Any text editor can open it but preferably look for a text editor capable of opening large files.

I have been able to open one that is 38.3 Mbs using Sublime Text 3.

PS: If there is a special program to read and open such files, I am not aware of it.

enter image description here enter image description here

Parto
  • 15,647