Package: crash
Version: 7.0.1-2
Severity: normal

Hi,

crash 7.0.1 seems to be truncating long filenames in error messages:

lindi3:~$ crash -e emacs /usr/lib/debug/boot/vmlinux-3.8-2-amd64 core

crash 7.0.1
Copyright (C) 2002-2013  Red Hat, Inc.
Copyright (C) 2004, 2005, 2006, 2010  IBM Corporation
Copyright (C) 1999-2006  Hewlett-Packard Co
Copyright (C) 2005, 2006, 2011, 2012  Fujitsu Limited
Copyright (C) 2006, 2007  VA Linux Systems Japan K.K.
Copyright (C) 2005, 2011  NEC Corporation
Copyright (C) 1999, 2002, 2007  Silicon Graphics, Inc.
Copyright (C) 1999, 2000, 2001, 2002  Mission Critical Linux, Inc.
This program is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions.  Enter "help copying" to see the conditions.
This program has absolutely no warranty.  Enter "help warranty" for details.
 
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu"...

/usr/bin/strings: '/usr/lib/debug/boot/vmlinux-3': No such file
WARNING: kernels compiled by different gcc versions:
  /usr/lib/debug/boot/vmlinux-3: (unknown)
  core kernel: 4.7.2

WARNING: kernel version inconsistency between vmlinux and dumpfile

crash: incompatible arguments: 
   /usr/lib/debug/boot/vmlinux-3 is not SMP -- core is SMP

Usage:

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

Enter "crash -h" for details.


However, if I rename the file it is perfectly happy:



lindi3:~$ cp /usr/lib/debug/boot/vmlinux-3.8-2-amd64 vmlinux
lindi3:~$ crash -e emacs vmlinux core

crash 7.0.1
Copyright (C) 2002-2013  Red Hat, Inc.
Copyright (C) 2004, 2005, 2006, 2010  IBM Corporation
Copyright (C) 1999-2006  Hewlett-Packard Co
Copyright (C) 2005, 2006, 2011, 2012  Fujitsu Limited
Copyright (C) 2006, 2007  VA Linux Systems Japan K.K.
Copyright (C) 2005, 2011  NEC Corporation
Copyright (C) 1999, 2002, 2007  Silicon Graphics, Inc.
Copyright (C) 1999, 2000, 2001, 2002  Mission Critical Linux, Inc.
This program is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions.  Enter "help copying" to see the conditions.
This program has absolutely no warranty.  Enter "help warranty" for details.
 
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu"...

      KERNEL: vmlinux                           
    DUMPFILE: core
        CPUS: 4
        DATE: Mon Jul 15 12:00:24 2013
      UPTIME: 54 days, 12:58:55
LOAD AVERAGE: 0.00, 0.10, 0.37
       TASKS: 185
    NODENAME: lindi3
     RELEASE: 3.8-2-amd64
     VERSION: #1 SMP Debian 3.8.13-1
     MACHINE: x86_64  (3210 Mhz)
      MEMORY: 1 GB
       PANIC: ""
         PID: 0
     COMMAND: "swapper/0"
        TASK: ffffffff81614400  (1 of 4)  [THREAD_INFO: ffffffff81600000]
         CPU: 0
       STATE: TASK_RUNNING (ACTIVE)
     WARNING: panic task not found

crash> 


The problem does not occur if I run crash under strace.

stap -e 'probe syscall.execve { printf("%s\n", argstr); }'

shows that crash runs

/usr/bin/strings "/usr/lib/debug/boot/vmlinux-3"

which means that the filename is truncated before it is passed to the
strings command.

The problem does not occur if I run crash under valgrind but there I
at least see the following:

==1460== Memcheck, a memory error detector
==1460== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==1460== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==1460== Command: crash -e emacs /usr/lib/debug/boot/vmlinux-3.8-2-amd64 core
==1460== Parent PID: 26631
==1460== 
==1460== Conditional jump or move depends on uninitialised value(s)
==1460==    at 0x4EADB3: kernel_init (kernel.c:227)
==1460==    by 0x463946: main_loop (main.c:650)
==1460==    by 0x74CE60: current_interp_command_loop (interps.c:326)
==1460==    by 0x74E10F: captured_command_loop (main.c:258)
==1460==    by 0x74BAFD: catch_errors (exceptions.c:557)
==1460==    by 0x74F731: captured_main (main.c:1064)
==1460==    by 0x74BAFD: catch_errors (exceptions.c:557)
==1460==    by 0x74F77F: gdb_main (main.c:1079)
==1460==    by 0x74F7D7: gdb_main_entry (main.c:1099)
==1460==    by 0x50FB8D: gdb_main_loop (gdb_interface.c:76)
==1460==    by 0x463856: main (main.c:613)
==1460== 
==1460== Source and destination overlap in strcpy(0x7fefffe92, 0x7fefffe94)
==1460==    at 0x4C2CA05: __GI_strcpy (mc_replace_strmem.c:439)
==1460==    by 0x479DB3: pages_to_size (tools.c:5312)
==1460==    by 0x4A80C4: get_memory_size (memory.c:11888)
==1460==    by 0x4FC15F: display_sys_stats (kernel.c:4698)
==1460==    by 0x463A64: main_loop (main.c:678)
==1460==    by 0x74CE60: current_interp_command_loop (interps.c:326)
==1460==    by 0x74E10F: captured_command_loop (main.c:258)
==1460==    by 0x74BAFD: catch_errors (exceptions.c:557)
==1460==    by 0x74F731: captured_main (main.c:1064)
==1460==    by 0x74BAFD: catch_errors (exceptions.c:557)
==1460==    by 0x74F77F: gdb_main (main.c:1079)
==1460==    by 0x74F7D7: gdb_main_entry (main.c:1099)
==1460== 

On line 227 of kernel.c gdb shows

(gdb) p p2
$1 = 0x7fffffffdf52 "8-2-amd64"


*** stack smashing detected ***: /usr/bin/crash terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x7ffff6da3d17]
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x0)[0x7ffff6da3ce0]
/usr/bin/crash(kernel_init+0x308d)[0x4ed3ea]
/usr/bin/crash(main_loop+0xdc)[0x463947]
/usr/bin/crash(current_interp_command_loop+0x1f)[0x74ce61]
/usr/bin/crash[0x74e110]
/usr/bin/crash(catch_errors+0x63)[0x74bafe]
/usr/bin/crash[0x74f732]
/usr/bin/crash(catch_errors+0x63)[0x74bafe]
/usr/bin/crash(gdb_main+0x3b)[0x74f780]
/usr/bin/crash(gdb_main_entry+0x51)[0x74f7d8]
/usr/bin/crash(gdb_main_loop+0x2c0)[0x50fb8e]
/usr/bin/crash(main+0x2c05)[0x463857]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7ffff6cc8995]
/usr/bin/crash[0x460b79]
======= Memory map: ========
00400000-00ba3000 r-xp 00000000 ca:00 708089                             
/usr/bin/crash
00da2000-00e61000 rw-p 007a2000 ca:00 708089                             
/usr/bin/crash
00e61000-02a53000 rw-p 00000000 00:00 0                                  [heap]
7fffeed44000-7fffefb3c000 r--p 05dce000 ca:00 847174                     
/usr/lib/debug/boot/vmlinux-3.8-2-amd64
7fffefb3c000-7ffff019d000 rw-p 00000000 00:00 0 
7ffff02b8000-7ffff02cd000 r-xp 00000000 ca:00 827469                     
/lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff02cd000-7ffff04cd000 ---p 00015000 ca:00 827469                     
/lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff04cd000-7ffff04ce000 rw-p 00015000 ca:00 827469                     
/lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff04ce000-7ffff0684000 r--p 05c19000 ca:00 847174                     
/usr/lib/debug/boot/vmlinux-3.8-2-amd64
7ffff0684000-7ffff0acf000 r--p 05693000 ca:00 847174                     
/usr/lib/debug/boot/vmlinux-3.8-2-amd64
7ffff0acf000-7ffff0cc4000 r--p 0549f000 ca:00 847174                     
/usr/lib/debug/boot/vmlinux-3.8-2-amd64
7ffff0cc4000-7ffff5617000 r--p 00b4d000 ca:00 847174                     
/usr/lib/debug/boot/vmlinux-3.8-2-amd64
7ffff5617000-7ffff6618000 rw-p 00000000 00:00 0 
7ffff670b000-7ffff696a000 rw-p 00000000 00:00 0 
7ffff696a000-7ffff6ca7000 r--p 00000000 ca:00 716266                     
/usr/lib/locale/locale-archive
7ffff6ca7000-7ffff6e49000 r-xp 00000000 ca:00 827993                     
/lib/x86_64-linux-gnu/libc-2.17.so
7ffff6e49000-7ffff7049000 ---p 001a2000 ca:00 827993                     
/lib/x86_64-linux-gnu/libc-2.17.so
7ffff7049000-7ffff704d000 r--p 001a2000 ca:00 827993                     
/lib/x86_64-linux-gnu/libc-2.17.so
7ffff704d000-7ffff704f000 rw-p 001a6000 ca:00 827993                     
/lib/x86_64-linux-gnu/libc-2.17.so
7ffff704f000-7ffff7053000 rw-p 00000000 00:00 0 
7ffff7053000-7ffff7075000 r-xp 00000000 ca:00 827510                     
/lib/x86_64-linux-gnu/liblzma.so.5.0.0
7ffff7075000-7ffff7274000 ---p 00022000 ca:00 827510                     
/lib/x86_64-linux-gnu/liblzma.so.5.0.0
7ffff7274000-7ffff7275000 r--p 00021000 ca:00 827510                     
/lib/x86_64-linux-gnu/liblzma.so.5.0.0
7ffff7275000-7ffff7276000 rw-p 00022000 ca:00 827510                     
/lib/x86_64-linux-gnu/liblzma.so.5.0.0
7ffff7276000-7ffff7372000 r-xp 00000000 ca:00 828515                     
/lib/x86_64-linux-gnu/libm-2.17.so
7ffff7372000-7ffff7572000 ---p 000fc000 ca:00 828515                     
/lib/x86_64-linux-gnu/libm-2.17.so
7ffff7572000-7ffff7573000 r--p 000fc000 ca:00 828515                     
/lib/x86_64-linux-gnu/libm-2.17.so
7ffff7573000-7ffff7574000 rw-p 000fd000 ca:00 828515                     
/lib/x86_64-linux-gnu/libm-2.17.so
7ffff7574000-7ffff758b000 r-xp 00000000 ca:00 827500                     
/lib/x86_64-linux-gnu/libz.so.1.2.8
7ffff758b000-7ffff778a000 ---p 00017000 ca:00 827500                     
/lib/x86_64-linux-gnu/libz.so.1.2.8
7ffff778a000-7ffff778b000 r--p 00016000 ca:00 827500                     
/lib/x86_64-linux-gnu/libz.so.1.2.8
7ffff778b000-7ffff778c000 rw-p 00017000 ca:00 827500                     
/lib/x86_64-linux-gnu/libz.so.1.2.8
7ffff778c000-7ffff77b1000 r-xp 00000000 ca:00 828056                     
/lib/x86_64-linux-gnu/libtinfo.so.5.9
7ffff77b1000-7ffff79b0000 ---p 00025000 ca:00 828056                     
/lib/x86_64-linux-gnu/libtinfo.so.5.9
7ffff79b0000-7ffff79b4000 r--p 00024000 ca:00 828056                     
/lib/x86_64-linux-gnu/libtinfo.so.5.9
7ffff79b4000-7ffff79b5000 rw-p 00028000 ca:00 828056                     
/lib/x86_64-linux-gnu/libtinfo.so.5.9
7ffff79b5000-7ffff79d6000 r-xp 00000000 ca:00 827417                     
/lib/x86_64-linux-gnu/libncurses.so.5.9
7ffff79d6000-7ffff7bd5000 ---p 00021000 ca:00 827417                     
/lib/x86_64-linux-gnu/libncurses.so.5.9
7ffff7bd5000-7ffff7bd6000 r--p 00020000 ca:00 827417                     
/lib/x86_64-linux-gnu/libncurses.so.5.9
7ffff7bd6000-7ffff7bd7000 rw-p 00021000 ca:00 827417                     
/lib/x86_64-linux-gnu/libncurses.so.5.9
7ffff7bd7000-7ffff7bda000 r-xp 00000000 ca:00 828514                     
/lib/x86_64-linux-gnu/libdl-2.17.so
7ffff7bda000-7ffff7dd9000 ---p 00003000 ca:00 828514                     
/lib/x86_64-linux-gnu/libdl-2.17.so
7ffff7dd9000-7ffff7dda000 r--p 00002000 ca:00 828514                     
/lib/x86_64-linux-gnu/libdl-2.17.so
7ffff7dda000-7ffff7ddb000 rw-p 00003000 ca:00 828514                     
/lib/x86_64-linux-gnu/libdl-2.17.so
7ffff7ddb000-7ffff7dfc000 r-xp 00000000 ca:00 827989                     
/lib/x86_64-linux-gnu/ld-2.17.so
7ffff7e46000-7ffff7fe0000 r--p 06bc5000 ca:00 847174                     
/usr/lib/debug/boot/vmlinux-3.8-2-amd64
7ffff7fe0000-7ffff7fe5000 rw-p 00000000 00:00 0 
7ffff7ff3000-7ffff7ffa000 rw-p 00000000 00:00 0 
7ffff7ffa000-7ffff7ffc000 r-xp 00000000 00:00 0                          [vdso]
7ffff7ffc000-7ffff7ffd000 r--p 00021000 ca:00 827989                     
/lib/x86_64-linux-gnu/ld-2.17.so
7ffff7ffd000-7ffff7fff000 rw-p 00022000 ca:00 827989                     
/lib/x86_64-linux-gnu/ld-2.17.so
7ffffffde000-7ffffffff000 rw-p 00000000 00:00 0                          [stack]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  
[vsyscall]


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.8-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages crash depends on:
ii  binutils     2.23.52.20130620-1
ii  libc6        2.17-7
ii  liblzma5     5.1.1alpha+20120614-2
ii  libncurses5  5.9+20130608-1
ii  libtinfo5    5.9+20130608-1
ii  zlib1g       1:1.2.8.dfsg-1

crash recommends no packages.

Versions of packages crash suggests:
pn  kexec-tools   <none>
pn  makedumpfile  <none>

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to