Control: tags 922943 + upstream fixed-upstream patch Control: tags 319221 + upstream fixed-upstream
Dear Maintainer, this bug seems to be a duplicate of #319221, which got forwarded and fixed upstream. Attached is a targetted patch, slightly changed from upstream [1] to apply, just resolving this crash, if this should be fixed in Buster. Also attached is a patch to generate useful debug information in the dbgsym package. Kind regards, Bernhard #319221 https://bugs.debian.org/319221 [1] https://sourceforge.net/p/xdiskusage/git/ci/b2db4e569cf3f906a9a71ad5072f9301a49bfdf1/ (gdb) bt #0 0x000056009a0f801e in OutputWindow::draw_tree (this=0x56009a7dab70, n=0x56009a7d7b40, column=0, row=0, scale=59.875, offset=0) at xdiskusage.C:713 #1 0x00007fd1a2109247 in Fl_X::flush (this=0x56009a7d0e60) at ../FL/x.H:146 #2 Fl::flush () at Fl.cxx:481 #3 0x00007fd1a210a696 in Fl::wait (time_to_wait=time_to_wait@entry=1e+20) at Fl.cxx:373 #4 0x00007fd1a210a7cd in Fl::run () at Fl.cxx:384 #5 0x000056009a0f6846 in main (argc=1, argv=0x7ffc348364c8) at xdiskusage.C:279
Description: Generate debug information Last-Update: 2019-04-21 --- xdiskusage-1.48.orig/configure +++ xdiskusage-1.48/configure @@ -1804,9 +1804,9 @@ MAKEDEPEND="\$(CXX) -M" if test -n "$GXX"; then # GNU C compiler - CFLAGS="-Wall -O2" + CFLAGS="-Wall -O2 -g" CFLAGS_D="-Wall -g -DDEBUG" - CXXFLAGS="-Wall -O2" + CXXFLAGS="-Wall -O2 -g" CXXFLAGS_D="-Wall -g -DDEBUG" else if test "`(uname) 2>/dev/null`" = IRIX; then
commit b2db4e569cf3f906a9a71ad5072f9301a49bfdf1 Author: Bill Spitzak <spit...@gmail.com> Date: Wed Nov 19 17:14:46 2014 -0800 Fixed crashes when you do "du * | xdiskusage -" ( Modified to be cherry-picked in https://bugs.debian.org/922943 ) diff --git a/xdiskusage.C b/xdiskusage.C index 6891f29..4f9c2e8 100644 --- a/xdiskusage.C +++ b/xdiskusage.C @@ -245,7 +245,7 @@ int main(int argc, char**argv) { Fl::set_color(FL_SELECTION_COLOR,0,0,128); #endif // Parse and -x switches understood by fltk: - int n; Fl::args(argc,argv,n, arg_cb); + int n; Fl::args(argc, argv, n, arg_cb); // Any remaining words are files/directories: if (n < argc) { if (argv[n][0] == '-') { @@ -269,7 +269,7 @@ int main(int argc, char**argv) { } else if (!isatty(0) && !isstdinnull()) { // test for pipe, if so read stdin: OutputWindow* d = OutputWindow::make(0); - if (d) d->show(argc,argv); + if (d) d->show(); } else { // normal gui: make_diskchooser(); @@ -698,7 +698,7 @@ void OutputWindow::draw_tree(Node* n, int column, ull row, double scale, double fl_color(FL_WHITE); fl_rectf(X+1,Y+1,W-1,H-1); fl_color(FL_BLACK); - if (n->size*scale > 10) { + if (n->size*scale > 10 && n->name && n->name[0]) { char buffer[256]; #if FL_MAJOR_VERSION > 1 snprintf(buffer, 256, "%s%c%s", n->name,
# Buster amd64 qemu VM 2019-04-21 apt update apt dist-upgrade apt install systemd-coredump xserver-xorg lightdm openbox gdb gdbserver dpkg-dev devscripts mc xdiskusage xdiskusage-dbgsym libfltk1.1-dbgsym apt build-dep xdiskusage systemctl start lightdm mkdir /home/benutzer/source/xdiskusage/orig -p cd /home/benutzer/source/xdiskusage/orig apt source xdiskusage cd export DISPLAY=:0 mkdir a b du a b > du.txt xdiskusage < du.txt set width 0 set pagination off bt ######### benutzer@debian:~$ export DISPLAY=:0 benutzer@debian:~$ mkdir a b benutzer@debian:~$ du a b > du.txt benutzer@debian:~$ xdiskusage < du.txt Speicherzugriffsfehler (Speicherabzug geschrieben) dmesg: [ 219.066502] xdiskusage[10197]: segfault at 0 ip 0000556ecdc892cc sp 00007fff43498d50 error 4 in xdiskusage[556ecdc85000+9000] [ 219.066514] Code: 72 01 88 44 3c 50 74 08 3c 26 0f 85 a4 05 00 00 48 63 f6 83 c2 02 88 44 34 50 48 83 c1 01 81 fa fd 00 00 00 7f 3d 49 8b 46 10 <0f> b6 04 08 84 c0 74 31 8d 70 81 40 80 fe 20 0f b6 f0 40 0f 96 c7 root@debian:~# coredumpctl list TIME PID UID GID SIG COREFILE EXE Sun 2019-04-21 09:17:15 CEST 10197 1000 1000 11 present /usr/bin/xdiskusage root@debian:~# coredumpctl gdb 10197 PID: 10197 (xdiskusage) UID: 1000 (benutzer) GID: 1000 (benutzer) Signal: 11 (SEGV) Timestamp: Sun 2019-04-21 09:17:15 CEST (1min 20s ago) Command Line: xdiskusage Executable: /usr/bin/xdiskusage Control Group: /user.slice/user-1000.slice/session-3.scope Unit: session-3.scope Slice: user-1000.slice Session: 3 Owner UID: 1000 (benutzer) Boot ID: 439ba3227a404d5fab911161ca1ae66b Machine ID: 32f43b50ac8c4b21941bc0b02f8e7811 Hostname: debian Storage: /var/lib/systemd/coredump/core.xdiskusage.1000.439ba3227a404d5fab911161ca1ae66b.10197.1555831035000000.lz4 Message: Process 10197 (xdiskusage) of user 1000 dumped core. Stack trace of thread 10197: #0 0x0000556ecdc892cc n/a (xdiskusage) #1 0x00007f347428e247 _ZN2Fl5flushEv (libfltk.so.1.1) #2 0x00007f347428f696 _ZN2Fl4waitEd (libfltk.so.1.1) #3 0x00007f347428f7cd _ZN2Fl3runEv (libfltk.so.1.1) #4 0x0000556ecdc87c26 n/a (xdiskusage) #5 0x00007f347394009b __libc_start_main (libc.so.6) #6 0x0000556ecdc87cea n/a (xdiskusage) GNU gdb (Debian 8.2.1-2) 8.2.1 Copyright (C) 2018 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-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/bin/xdiskusage...(no debugging symbols found)...done. [New LWP 10197] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `xdiskusage'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x0000556ecdc892cc in ?? () (gdb) set width 0 (gdb) set pagination off (gdb) bt #0 0x0000556ecdc892cc in ?? () #1 0x00007f347428e247 in Fl::flush() () from /usr/lib/x86_64-linux-gnu/libfltk.so.1.1 #2 0x00007f347428f696 in Fl::wait(double) () from /usr/lib/x86_64-linux-gnu/libfltk.so.1.1 #3 0x00007f347428f7cd in Fl::run() () from /usr/lib/x86_64-linux-gnu/libfltk.so.1.1 #4 0x0000556ecdc87c26 in ?? () #5 0x00007f347394009b in __libc_start_main (main=0x556ecdc87ba0, argc=1, argv=0x7fff43499038, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff43499028) at ../csu/libc-start.c:308 #6 0x0000556ecdc87cea in ?? () (gdb) bt #0 0x0000556ecdc892cc in OutputWindow::draw_tree(Node*, int, unsigned long long, double, double) () #1 0x00007f347428e247 in Fl_X::flush (this=0x556ecf8710b0) at ../FL/x.H:146 #2 Fl::flush () at Fl.cxx:481 #3 0x00007f347428f696 in Fl::wait (time_to_wait=time_to_wait@entry=1e+20) at Fl.cxx:373 #4 0x00007f347428f7cd in Fl::run () at Fl.cxx:384 #5 0x0000556ecdc87c26 in main () ############ # Rebuilt with debug information benutzer@debian:~$ /home/benutzer/source/xdiskusage/try3/xdiskusage-1.48/xdiskusage < du.txt Speicherzugriffsfehler (Speicherabzug geschrieben) root@debian:~# coredumpctl list TIME PID UID GID SIG COREFILE EXE Sun 2019-04-21 10:14:28 CEST 6578 1000 1000 11 present /home/benutzer/source/xdiskusage/try3/xdiskusage-1.48/xdiskusage root@debian:~# coredumpctl gdb 6578 PID: 6578 (xdiskusage) UID: 1000 (benutzer) GID: 1000 (benutzer) Signal: 11 (SEGV) Timestamp: Sun 2019-04-21 10:14:28 CEST (40s ago) Command Line: /home/benutzer/source/xdiskusage/try3/xdiskusage-1.48/xdiskusage Executable: /home/benutzer/source/xdiskusage/try3/xdiskusage-1.48/xdiskusage ... Core was generated by `/home/benutzer/source/xdiskusage/try3/xdiskusage-1.48/xdiskusage'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x000056009a0f801e in OutputWindow::draw_tree (this=0x56009a7dab70, n=0x56009a7d7b40, column=0, row=0, scale=59.875, offset=0) at xdiskusage.C:713 713 unsigned char c = (unsigned char)(n->name[j++]); (gdb) set width 0 (gdb) set pagination off (gdb) bt #0 0x000056009a0f801e in OutputWindow::draw_tree (this=0x56009a7dab70, n=0x56009a7d7b40, column=0, row=0, scale=59.875, offset=0) at xdiskusage.C:713 #1 0x00007fd1a2109247 in Fl_X::flush (this=0x56009a7d0e60) at ../FL/x.H:146 #2 Fl::flush () at Fl.cxx:481 #3 0x00007fd1a210a696 in Fl::wait (time_to_wait=time_to_wait@entry=1e+20) at Fl.cxx:373 #4 0x00007fd1a210a7cd in Fl::run () at Fl.cxx:384 #5 0x000056009a0f6846 in main (argc=1, argv=0x7ffc348364c8) at xdiskusage.C:279 (gdb) list 708 Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_CLIP|fltk::RAW_LABEL)); 709 #else 710 // we need to double all the @ signs in the filename, and do 711 // something with unprintable letters: 712 int i,j; for (i = j = 0; i < 254;) { 713 unsigned char c = (unsigned char)(n->name[j++]); 714 if (!c) break; 715 if (c < 32 || c>=127 && c < 0xA0 || c==255) c = '?'; 716 buffer[i++] = c; if (c=='@' || c=='&') buffer[i++] = c; 717 } (gdb) print n $1 = (Node *) 0x56009a7d7b40 (gdb) print n->name $2 = 0x0 ############## git clone https://git.code.sf.net/p/xdiskusage/git xdiskusage-git cd xdiskusage-git git show b2db4e569cf3f906a9a71ad5072f9301a49bfdf1 > ../b2db4e569cf3f906a9a71ad5072f9301a49bfdf1_Fixed-crashes.patch cd .. cd /home/benutzer/source/xdiskusage/ cp orig try5 -a cd try5/xdiskusage-1.48 cp -a ../../11_generate-debug-information.patch debian/patches/ echo 11_generate-debug-information.patch >> debian/patches/series quilt push cp -a ../../b2db4e569cf3f906a9a71ad5072f9301a49bfdf1_Fixed-crashes_modified.patch debian/patches/ echo b2db4e569cf3f906a9a71ad5072f9301a49bfdf1_Fixed-crashes_modified.patch >> debian/patches/series quilt push dpkg-buildpackage dpkg -i https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=319221 https://sourceforge.net/p/xdiskusage/git/ci/b2db4e569cf3f906a9a71ad5072f9301a49bfdf1/ - xdiskusage-dbgsym misses debug information