[Bug 381758] New: xosview doesn't start
https://bugzilla.novell.com/show_bug.cgi?id=381758 Summary: xosview doesn't start Product: openSUSE 11.0 Version: Beta 1 Platform: x86-64 OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: X11 Applications AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: koenig@linux.de QAContact: sndirsch@novell.com Found By: --- 10.3 64bit updated to 11.0-beta1 using DVD5: xosview doesn't start anymore: YaST2 # xosview Error: Couldn't find 'usedLabelColor' resource in the resource database! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=381758
Stefan Dirsch
https://bugzilla.novell.com/show_bug.cgi?id=381758
User werner@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=381758#c1
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=381758
User koenig@linux.de added comment
https://bugzilla.novell.com/show_bug.cgi?id=381758#c2
--- Comment #2 from Harald Koenig
I can not reproduce this and I'm using xosview daily. Please provide more informations.
ok. I'll try... 1) running xosview on the notebook with X11 redirection to my PC (still mostly 10.1) works, so it looks like a server issue, BUT: closing the xosview window with the "X" button in the upper right corner from xfce4 causes a SIGSEGV in xosview: harald > gdb /usr/bin/xosview.bin (gdb) r +net +bat Starting program: /usr/bin/xosview.bin +net +bat Program received signal SIGSEGV, Segmentation fault. 0x000000000040739a in ?? () (gdb) where #0 0x000000000040739a in ?? () #1 0x0000000000412af9 in ?? () #2 0x00007fd4bd34e44a in __libc_start_main () from /lib64/libc.so.6 #3 0x0000000000404fd9 in ?? () #4 0x00007fffc656c298 in ?? () #5 0x000000000000001c in ?? () #6 0x0000000000000003 in ?? () #7 0x00007fffc656e190 in ?? () #8 0x0000000000000000 in ?? () (gdb) 2) the string "usedLabelColor" shows up in both the binary and app-defaults/XOsview but changing the key name in app-defaults/XOsview doesn't change the error text, so it's the builtin text in the binary ?! harald > rpm -ql xosview | xargs grep -l usedLabelColor /usr/bin/xosview.bin /usr/share/X11/app-defaults/XOsview harald > sudo emacs /usr/share/X11/app-defaults/XOsview harald > DISPLAY=:0 xosview Error: Couldn't find 'usedLabelColor' resource in the resource database! interestingly, on my 10.1 PC (the X11 server where xosview can display) I can't find that string anywhere but in xosview: atuin > grep -irl 'usedLabelColor' /usr/X11R6/ 2> /dev/null /usr/X11R6/lib/X11/app-defaults/XOsview /usr/X11R6/bin/xosview.bin the error text itself is from xosview, not from libX* : harald > rpm -ql xosview | xargs grep -l "resource in the resource database" /usr/bin/xosview.bin 3) I've used "xmon" to trace the X11 protocol between xosview onthe notebook and (1) local Xserver (not working) and (2) PC Xserver (working). this doesn't show any sigificant difference :-( 4) I've added some debug code which shows every resource lookup --- 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< --- const char *XWin::getResource( const char *name ){ const char* retval = xrmptr_->getResource (name); std::cerr << "Lookup '" << name << "' in resource in the resource database, return = '" << (retval ? retval : "(NULL)") << "'\n"; if (retval) return retval; else { std::cerr << "Error: Couldn't find '" << name << "' resource in the resource database!\n"; exit (-1); /* Some compilers aren't smart enough to know that exit() exits. */ return '\0'; } } --- 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< --- which gives the following output locally --- 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< --- Lookup 'samplesPerSec' in resource in the resource database, return = '10 ! not yet supported' Lookup 'horizontalMargin' in resource in the resource database, return = '5' Lookup 'verticalMargin' in resource in the resource database, return = '5' Lookup 'verticalSpacing' in resource in the resource database, return = '5' Lookup 'font' in resource in the resource database, return = '6x10' Lookup 'captions' in resource in the resource database, return = 'True' Lookup 'labels' in resource in the resource database, return = 'True' Lookup 'usedlabels' in resource in the resource database, return = 'True' Lookup 'load' in resource in the resource database, return = 'True' Lookup 'cpu' in resource in the resource database, return = 'True' Lookup 'mem' in resource in the resource database, return = 'True' Lookup 'disk' in resource in the resource database, return = 'True' Lookup 'diskBandwidth' in resource in the resource database, return = '10000000 ! 10MB/s should be reasonable today for' Lookup 'RAID' in resource in the resource database, return = 'False' Lookup 'swap' in resource in the resource database, return = 'True' Lookup 'page' in resource in the resource database, return = 'True' Lookup 'pageBandwidth' in resource in the resource database, return = '120' Lookup 'net' in resource in the resource database, return = 'False' Lookup 'NFSDStats' in resource in the resource database, return = 'False' Lookup 'NFSStats' in resource in the resource database, return = 'False' Lookup 'serial0' in resource in the resource database, return = 'False' Lookup 'serial1' in resource in the resource database, return = 'False' Lookup 'serial2' in resource in the resource database, return = 'False' Lookup 'serial3' in resource in the resource database, return = 'False' Lookup 'serial4' in resource in the resource database, return = 'False' Lookup 'serial5' in resource in the resource database, return = 'False' Lookup 'serial6' in resource in the resource database, return = 'False' Lookup 'serial7' in resource in the resource database, return = 'False' Lookup 'serial8' in resource in the resource database, return = 'False' Lookup 'serial9' in resource in the resource database, return = 'False' Lookup 'interrupts' in resource in the resource database, return = 'True' Lookup 'battery' in resource in the resource database, return = 'False' Lookup 'lmstemp' in resource in the resource database, return = 'False' Lookup 'meterLabelColor' in resource in the resource database, return = 'black' Lookup 'usedLabelColor' in resource in the resource database, return = '(NULL)' Error: Couldn't find 'usedLabelColor' resource in the resource database! --- 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< --- so most lookups are ok (even for resources which are behind the 'usedLabelColor' entry in the static list in defaultstring.cc - ssh from notebook to notebook (11.0-beta1) doesn't help - LC_ALL=C doesn't help either I'm running out of ideas for more information nwo, sorry.... which Xserver/display are you using for your tests ? I'm running a 64bit system, did you test 64 bit too ? Greetings, Harald -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=381758
Harald Koenig
https://bugzilla.novell.com/show_bug.cgi?id=381758
User werner@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=381758#c3
--- Comment #3 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=381758
User werner@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=381758#c4
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=381758
User koenig@linux.de added comment
https://bugzilla.novell.com/show_bug.cgi?id=381758#c5
Harald Koenig
as expected. Only one question, if you're using an openSuSE 10.0 why the files are found at /usr/X11R6/? The new xosview is not located at /usr/X11R6/.
PC == 10.1 (not 10.0), name "atuin" notebook == 11.0-beta1, name "harald" this was on my PC (10.1, quote from Comment #2) atuin > grep -irl 'usedLabelColor' /usr/X11R6/ 2> /dev/null /usr/X11R6/lib/X11/app-defaults/XOsview /usr/X11R6/bin/xosview.bin this was run on the 11.0 notebook: harald > rpm -ql xosview | xargs grep -l usedLabelColor /usr/bin/xosview.bin /usr/share/X11/app-defaults/XOsview looks consistent, isn't it? SURPRISE 1: I just notice that right now xosview is running on the notebook display!! (I was just working using a remote connection only). no idea what's different since yesterday, EXCEPT: right now ("xosview works") I was running XEN ! so I did a reboot to the regular non-xen kernel, and SURPRISE 2: using non-xen kernel, xosview is missing again :-((( here is the full diff between those two Xserver log files: --- 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< --- log > diff Xorg.0.log.old Xorg.0.log 14c14 < Current Operating System: Linux harald 2.6.25-rc9-17-xen #1 SMP 2008-04-15 22:54:53 +0200 x86_64 ---
Current Operating System: Linux harald 2.6.25-rc9-17-default #1 SMP 2008-04-15 22:54:53 +0200 x86_64 23c23 < (==) Log file: "/var/log/Xorg.0.log", Time: Tue Apr 22 14:54:15 2008
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Apr 22 19:03:12 2008 874d873 < Synaptics DeviceOff called --- 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ---
so absolutely no hint about differences :-( reality-check: next reboot, again into XEN-kernel, and .... .. drum roll: xosview again works fine :-(( any idea what's going on here (except uninitialized variables, bad memory and voodoo) ? are you running your tests with o without XEN ? enough voodoo for today ;-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=381758
User werner@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=381758#c6
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=381758
User koenig@linux.de added comment
https://bugzilla.novell.com/show_bug.cgi?id=381758#c7
Harald Koenig
Try to unset XUSERFILESEARCHPATH, XFILESEARCHPATH,and XAPPLRESDIR on the command line, then execute xosview on the same command line.
none of those variables is set -- no difference. I did an "strace -e open" with local display and non-xen kernel (not working) and with remote display and looked for differences before the working xosview starts collecting data (see below). I'd guess that they all vanish if I use local display with xen-kernel... right now I have two possibilities of "atomic" ;))) changes to make xosview work: - use remote display (10.1 PC) - boot kernel-xen instead of kernel-default (that's _very_ weird IMHO;) Im just running an update to current factory settings (looks like an almost complete update including new kernel but no new xosview yet ;-)) I'll report if beta1 -> factory did any good in this case... ------------------------------------------------------------------------------- @@ -51,6 +51,13 @@ open("/lib64/libdl.so.2", O_RDONLY) = 3 open("/usr/lib64/libXau.so.6", O_RDONLY) = 3 open("/dev/urandom", O_RDONLY) = 3 +open("/etc/nsswitch.conf", O_RDONLY) = 3 +open("/etc/resolv.conf", O_RDONLY) = 3 +open("/etc/ld.so.cache", O_RDONLY) = 3 +open("/lib64/libnss_files.so.2", O_RDONLY) = 3 +open("/etc/hosts", O_RDONLY|0x80000 /* O_??? */) = 3 +open("/etc/hosts", O_RDONLY|0x80000 /* O_??? */) = 3 +open("/etc/gai.conf", O_RDONLY) = 3 open("/home/harald/.Xauthority", O_RDONLY) = 4 open("/usr/share/X11/locale/locale.alias", O_RDONLY) = 4 open("/usr/share/X11/locale/locale.dir", O_RDONLY) = 4 @@ -75,3 +82,484 @@ open("/proc/interrupts", O_RDONLY) = 4 open("/proc/version", O_RDONLY) = 4 open("/proc/interrupts", O_RDONLY) = 4 +open("/etc/ld.so.cache", O_RDONLY) = 5 +open("/usr/lib64/libXcursor.so.1", O_RDONLY) = 5 +open("/usr/lib64/libXrender.so.1", O_RDONLY) = 5 +open("/usr/lib64/libXfixes.so.3", O_RDONLY) = 5 +open("/home/harald/.Xdefaults-harald", O_RDONLY) = -1 ENOENT (No such file or directory) +open("/proc/loadavg", O_RDONLY) = 5 +open("/proc/cpuinfo", O_RDONLY) = 5 +open("/proc/stat", O_RDONLY) = 5 +open("/proc/stat", O_RDONLY) = 5 +open("/proc/meminfo", O_RDONLY) = 5 +open("/sys/block", O_RDONLY|O_NONBLOCK|O_DIRECTORY|0x80000) = 5 +open("/sys/block/sda/removable", O_RDONLY) = 6 +open("/sys/block/sda/stat", O_RDONLY) = 6 +open("/sys/block/sr0/removable", O_RDONLY) = 6 ------------------------------------------------------------------------------- -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=381758
User koenig@linux.de added comment
https://bugzilla.novell.com/show_bug.cgi?id=381758#c8
--- Comment #8 from Harald Koenig
I'll report if beta1 -> factory did any good in this case...
full update to current factory didn't help: with kernel-default xosview doesn't work, with kernel-xen it does. I played with /usr/share/X11/app-defaults/XOsview -- did not help. first successfull "fix" was to patch /usr/bin/xosview.bin to substitute the lookup of "usedLabelColor" to "foreground" which is also defined black: ------------------------------------------------------------------------------- xosview-1.8.3 > cmp -l /usr/bin/xosview.bin{.bad,} 162351 165 146 162352 163 157 162353 145 162 162354 144 145 162355 114 147 162356 141 162 162357 142 157 162358 145 165 162359 154 156 162360 103 144 162361 157 0 ------------------------------------------------------------------------------- next, I played again with the sources and the getResource() stuff. using the following minimal patch bwlow I can build a binary which works for me(tm). I just moved "usedLabelColor" up two lines. one line up is not enough, more would be ok too. ------------------------------------------------------------------------------- --- defaultstring.cc~ 2008-04-21 14:02:16.000000000 +0200 +++ defaultstring.cc 2008-04-24 19:42:48.000000000 +0200 @@ -20,9 +20,9 @@ const char *defaultXResourceString = "*captions: True\n\ *labels: True\n\ *transparent: False\n\ +*usedLabelColor: black\n\ *meterLabelColor: black\n\ *usedlabels: True\n\ -*usedLabelColor: black\n\ *borderwidth: 1\n\ *font: 6x10\n\ *background: grey77\n\ ------------------------------------------------------------------------------- I just recompiled the binary and run it locally ("./xosview.bin"), I did not change/install app-defaults/XOsview. trying to (only) make this change in app-defaults/XOsview did not work. compiling with "-O0" helps too, -O1 to -O4 (default in src.rpm) break for me. ... starting to debug with valgrind ... finally I got here: --- 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< --- ==23139== ==23139== Invalid write of size 4 ==23139== at 0x41C613: IntMeter::initirqcount() (intmeter.cc:187) ==23139== by 0x41C938: IntMeter::IntMeter(XOSView*, int) (intmeter.cc:33) ==23139== by 0x412BB2: MeterMaker::makeMeters() (MeterMaker.cc:91) ==23139== by 0x411626: XOSView::XOSView(char const*, int, char**) (xosview.cc:139) ==23139== by 0x4124E8: main (main.cc:24) ==23139== Address 0x636780 is not stack'd, malloc'd or (recently) free'd ==23139== ==23139== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- y ==23139== starting debugger with cmd: /usr/bin/gdb -nw /proc/23156/fd/1024 23156 GNU gdb 6.8 Copyright (C) 2008 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-suse-linux"... Attaching to program: /proc/23156/fd/1024, process 23156 0x000000000041c613 in IntMeter::initirqcount (this=0x66bdff0) at intmeter.cc:187 187 realintnum[i] = idx++; (gdb) p i $1 = 4344 (gdb) ptype realintnum type = int [1024] --- 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< --- GOTCHA!!! reason for the large index "i" are the weird large interrupt numbers in the new default kernel for my IBM T60 notebook (T7200 CPU)! --- 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< --- linux > cat /proc/interrupts CPU0 CPU1 0: 1649009 0 IO-APIC-edge timer 1: 7561 0 IO-APIC-edge i8042 8: 1 0 IO-APIC-edge rtc0 9: 48697 0 IO-APIC-fasteoi acpi 12: 59746 0 IO-APIC-edge i8042 14: 83701 0 IO-APIC-edge ata_piix 15: 0 0 IO-APIC-edge ata_piix 16: 1 0 IO-APIC-fasteoi uhci_hcd:usb1, yenta 17: 315 0 IO-APIC-fasteoi uhci_hcd:usb2, HDA Intel 18: 0 0 IO-APIC-fasteoi uhci_hcd:usb3 19: 31 0 IO-APIC-fasteoi uhci_hcd:usb4, ehci_hcd:usb5 4344: 75338 0 PCI-MSI-edge iwl3945 4345: 112934 0 PCI-MSI-edge eth1 4346: 316980 0 PCI-MSI-edge ahci NMI: 0 0 Non-maskable interrupts LOC: 553360 1310408 Local timer interrupts RES: 398388 464621 Rescheduling interrupts CAL: 208 442 function call interrupts TLB: 564 1192 TLB shootdowns TRM: 0 0 Thermal event interrupts THR: 0 0 Threshold APIC interrupts SPU: 0 0 Spurious interrupts ERR: 0 --- 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< --- obviously kernel-xen doesn't use such large interrupt numbers, nor does your testing platform :-(( using the following hack gives a working xosview binary for me(tm), but obviously it's only a matter of the next kernel release or other weird hardware to break that code again ;-)) ------------------------------------------------------------------------------- xosview-1.8.3 > diff -u linux/intmeter.cc{~,} --- linux/intmeter.cc~ 2008-04-21 14:01:57.000000000 +0200 +++ linux/intmeter.cc 2008-04-24 20:46:27.000000000 +0200 @@ -20,7 +20,7 @@ static const char *INTFILE = "/proc/interrupts"; static const char *VERSIONFILE = "/proc/version"; -static int realintnum[1024]; +static int realintnum[10240]; IntMeter::IntMeter( XOSView *parent, int cpu) : BitMeter( parent, "INTS", "", 1, ------------------------------------------------------------------------------- so maybe better use something like ------------------------------------------------------------------------------- --- linux/intmeter.cc~ 2008-04-21 14:01:57.000000000 +0200 +++ linux/intmeter.cc 2008-04-24 20:50:58.000000000 +0200 @@ -184,7 +184,8 @@ intno = i; else { intno = idx; - realintnum[i] = idx++; + if (i < 1024) + realintnum[i] = idx++; } if (!intfile) break; intfile.ignore(1024, '\n'); ------------------------------------------------------------------------------- feierabend :-((( -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=381758
User koenig@linux.de added comment
https://bugzilla.novell.com/show_bug.cgi?id=381758#c9
--- Comment #9 from Harald Koenig
so maybe better use something like
------------------------------------------------------------------------------- --- linux/intmeter.cc~ 2008-04-21 14:01:57.000000000 +0200 +++ linux/intmeter.cc 2008-04-24 20:50:58.000000000 +0200 @@ -184,7 +184,8 @@ intno = i; else { intno = idx; - realintnum[i] = idx++; + if (i < 1024) + realintnum[i] = idx++; } if (!intfile) break; intfile.ignore(1024, '\n'); -------------------------------------------------------------------------------
that's not enough, there is always one more bug ;-( ------------------------------------------------------------------------------- --- linux/intmeter.cc~ 2008-04-24 22:25:07.000000000 +0200 +++ linux/intmeter.cc 2008-04-24 22:23:00.000000000 +0200 @@ -94,7 +94,8 @@ while ( !intfile.eof() ){ intfile >> idx; - intno = realintnum[idx]; + if (idx < 1024) + intno = realintnum[idx]; if(intno>=numBits()) updateirqcount(intno,false); if (!intfile) break; ------------------------------------------------------------------------------- -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=381758
User werner@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=381758#c10
Dr. Werner Fink
participants (1)
-
bugzilla_noreply@novell.com