Bug 129273 - Opening the Profiling Perspective creates org.xml.sax.SAXParseException: Premature end of file.
Summary: Opening the Profiling Perspective creates org.xml.sax.SAXParseException: Pre...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Developer Suite
Classification: Retired
Component: Profiling Plug-in
Version: 2.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Keith Seitz
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-08-05 19:13 UTC by Phil Muldoon
Modified: 2007-04-18 17:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-09-27 17:12:49 UTC
Embargoed:


Attachments (Terms of Use)
patch for 129273 (5.61 KB, text/plain)
2004-08-10 21:33 UTC, Keith Seitz
no flags Details

Description Phil Muldoon 2004-08-05 19:13:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2)
Gecko/20040301

Description of problem:
Opening the profiling perspective creates a  
org.xml.sax.SAXParseException: Premature end of file exception

Stack Trace: 

SAXException: Premature end of file.
org.xml.sax.SAXParseException: Premature end of file.
        at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
        at
org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
        at
org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
        at
com.redhat.eclipse.oprofile.core.linux.OpxmlRunner.run(OpxmlRunner.java:84)
        at
com.redhat.eclipse.oprofile.core.linux.LinuxOpxmlProvider$5.run(LinuxOpxmlProvider.java:98)
        at
com.redhat.eclipse.oprofile.core.Oprofile.getSessionEvents(Oprofile.java:166)
        at
com.redhat.eclipse.oprofile.ui.system.SystemProfileView._refreshEvents(SystemProfileView.java:119)
        at
com.redhat.eclipse.oprofile.ui.system.SystemProfileView.createPartControl(SystemProfileView.java:81)
        at org.eclipse.ui.internal.PartPane$2.run(PartPane.java:137)
        at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:615)
        at org.eclipse.core.runtime.Platform.run(Platform.java:747)
        at
org.eclipse.ui.internal.PartPane.createChildControl(PartPane.java:133)
        at
org.eclipse.ui.internal.ViewPane.createChildControl(ViewPane.java:131)
        at org.eclipse.ui.internal.ViewFactory$1.run(ViewFactory.java:337)
        at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:615)
        at org.eclipse.core.runtime.Platform.run(Platform.java:747)
        at
org.eclipse.ui.internal.ViewFactory.busyRestoreView(ViewFactory.java:259)
        at org.eclipse.ui.internal.ViewFactory$2.run(ViewFactory.java:516)
        at
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
        at
org.eclipse.ui.internal.ViewFactory.restoreView(ViewFactory.java:514)
        at
org.eclipse.ui.internal.ViewFactory$ViewReference.getPart(ViewFactory.java:102)
        at
org.eclipse.ui.internal.WorkbenchPage$1.propertyChange(WorkbenchPage.java:132)
        at
org.eclipse.ui.internal.LayoutPart.setVisible(LayoutPart.java:268)
        at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:317)
        at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:564)
        at
org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:122)
        at
org.eclipse.ui.internal.presentations.DefaultPartPresentation.selectPart(DefaultPartPresentation.java:1111)
        at
org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:946)
        at
org.eclipse.ui.internal.PartStack.createControl(PartStack.java:467)
        at
org.eclipse.ui.internal.PartStack.createControl(PartStack.java:367)
        at
org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:432)
        at
org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:155)
        at
org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:722)
        at
org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:2775)
        at
org.eclipse.ui.internal.WorkbenchPage.busySetPerspective(WorkbenchPage.java:744)
        at
org.eclipse.ui.internal.WorkbenchPage.access$900(WorkbenchPage.java:93)
        at
org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.java:2918)
        at
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
        at
org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:2916)
        at
org.eclipse.ui.internal.ChangeToPerspectiveMenu.run(ChangeToPerspectiveMenu.java:87)
        at
org.eclipse.ui.actions.PerspectiveMenu.run(PerspectiveMenu.java:303)
        at
org.eclipse.ui.actions.PerspectiveMenu.runOther(PerspectiveMenu.java:318)
        at
org.eclipse.ui.actions.PerspectiveMenu$4.widgetSelected(PerspectiveMenu.java:134)
        at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
        at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java(Inlined
Compiled Code))
        at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled
Code))
        at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled
Code))
        at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled
Code))
        at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
        at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254)
        at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
        at
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
        at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335)
        at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
        at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
        at java.lang.reflect.Method.invoke(Method.java:391)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:183)
        at org.eclipse.core.launcher.Main.run(Main.java:644)
        at org.eclipse.core.launcher.Main.main(Main.java:628)


Version-Release number of selected component (if applicable):
eclipse-oprofile-1.1.0-5

How reproducible:
Always

Steps to Reproduce:
1. Follow oprofile test plan to step 14
2. Open profiling perspective
3.
    

Actual Results:  Perspective opens without exceptions

Expected Results:  Perspective opens with an exceptions and stack
trace to console

Additional info:

Comment 1 Keith Seitz 2004-08-09 20:45:14 UTC
When I asked Phil to run
"/usr/share/eclipse/plugins/c.r.e.oprofile_1.1.0/os/linux/x86/opxml
sesssions", he reports:

On Fri, 2004-08-06 at 08:04, Phil Muldoon wrote:
> Here is what I get when I run that command. Do you need access to
> elds2.hsv.redhat.com? Root pwd there is: elds2002 (you can login at
> root, su - pmuldoon, and look at the workspace in my ~)
> 
> Error opening oprofile database: odb_open(): fail to open
> /var/lib/oprofile/samp
>
les/cpu_clk+none/}usr}lib}eclipse}gcjlauncher}}}lib}ssa}libgcj.so.4.0.0#0
cause:  Too many open files
>  
> Error opening oprofile database: odb_open(): fail to open
> /var/lib/oprofile/samp
> les/cpu_clk+none/}usr}lib}eclipse}gcjlauncher}}}lib}tls}libc-2.3.2.so#0
> cause: T oo many open files

Looks like you've got an OS issue. The kernel is complaining about too
many open files, and it refuses to allow opxml to open any files. No
wonder you've hit a brick wall...

The question is: who to ask to on how to fix this?

Comment 2 Phil Muldoon 2004-08-10 14:44:58 UTC
I updated the machine, and rebooted and run it again. Still the same
issues and error. If you want to look at it yourself, I can give you
access to machine in question

Comment 3 Keith Seitz 2004-08-10 21:33:21 UTC
Created attachment 102597 [details]
patch for 129273

Comment 4 Keith Seitz 2004-08-10 21:36:00 UTC
I've attached a patch (with which Phil has done some preliminary testing).

Looks like a relatively simple ommission from my original design. I
always wondered why I structured the oprofile_db and bfd classes so
"goofy". Now I remember: the potential to have TONS of open files!


Comment 5 Ben Konrath 2004-08-13 15:49:31 UTC
I'm getting this problem again with opxml checked out from cvs ~ 1 hr
ago. When I run opxml sessions I get:

Error opening oprofile database: odb_open(): nr_node != hash->descr->size
                                                                     
                                           
oprofile: could not find event 0


Comment 6 Keith Seitz 2004-08-13 15:59:11 UTC
What machine? Can you run op_time?

Comment 7 Ben Konrath 2004-08-13 18:31:09 UTC
It's happening on town.toronto. op_time gives me this:

root(pts/0)@town ~ ## op_time
no samples files found (try running opcontrol --dump ?)
root(pts/0)@town ~ ##

I wasn't sure if I needed arguments or not.

Comment 8 Keith Seitz 2004-08-13 18:47:25 UTC
Ok, on town.toronto, I see:
-bash-2.05b$ ls /var/lib/oprofile/samples/
session-1  session-2  session-3  session-4  session-5  session-6

So you have no "default" (or "current" in the 0.8 lingo) session. So
we need to check each one individually

-bash-2.05b$ cd /var/lib/oprofile/samples/
-bash-2.05b$ for i in *; do echo "*** $i ***"; op_time --session=$i; done
*** session-1 ***
odb_open(): nr_node != hash->descr->size
 
*** session-2 ***
1         100.0000  0.0000 /lib/tls/libc-2.3.2.so
*** session-3 ***
1         100.0000  0.0000 /usr/lib/libgobject-2.0.so.0.200.3
*** session-4 ***
1          9.0909  0.0000 /lib/tls/libc-2.3.2.so
1          9.0909  0.0000
/usr/lib/jvm/java-1.4.2-ibm-1.4.2.0/jre/bin/classic/libjvm.so1       
  9.0909  0.0000 /usr/lib/jvm/java-1.4.2-ibm-1.4.2.0/jre/bin/libjitc.so
2         18.1818  0.0000 /usr/lib/libglib-2.0.so.0.200.3
2         18.1818  0.0000 /usr/lib/libgobject-2.0.so.0.200.3
4         36.3636  0.0000 /boot/vmlinux-2.4.21-15.ELsmp
*** session-5 ***
12        100.0000  0.0000 /boot/vmlinux-2.4.21-15.ELsmp
*** session-6 ***
2          0.0001  0.0000 /usr/lib/zsh/4.0.7/zsh/complete.so
3          0.0002  0.0000 /lib/libacl.so.1.0.3
3          0.0002  0.0000 /lib/libattr.so.1.0.1
5          0.0003  0.0000 /lib/libnss_dns-2.3.2.so
6          0.0004  0.0000 /bin/cat
6          0.0004  0.0000 /sbin/mdmpd
14         0.0010  0.0000 /usr/bin/dirname
15         0.0010  0.0000 /lib/libpcre.so.0.0.1
27         0.0019  0.0000 /lib/libresolv-2.3.2.so
29         0.0020  0.0000 /lib/tls/libpthread-0.60.so
36         0.0025  0.0000 /lib/libnss_nis-2.3.2.so
46         0.0032  0.0000 /bin/rm
47         0.0033  0.0000 /lib/libtermcap.so.2.0.8
52         0.0036  0.0000 /usr/sbin/cupsd
57         0.0040  0.0000 /sbin/init
64         0.0045  0.0000 /sbin/ypbind
70         0.0049  0.0000 /lib/libdl-2.3.2.so
77         0.0054  0.0000 /bin/ps
81         0.0057  0.0000 /sbin/portmap
88         0.0061  0.0000 /bin/ls
90         0.0063  0.0000 /sbin/syslogd
95         0.0066  0.0000 /lib/modules/2.4.21-15.ELsmp/kernel/fs/nfs/nfs.o
96         0.0067  0.0000 /lib/libnss_files-2.3.2.so
122        0.0085  0.0000 /usr/lib/libpopt.so.0.0.0
126        0.0088  0.0000 /lib/libnsl-2.3.2.so
258        0.0180  0.0000 /lib/libproc.so.2.0.13
289        0.0202  0.0000
/lib/modules/2.4.21-15.ELsmp/kernel/drivers/usb/usbcore.o
322        0.0225  0.0000 /usr/lib/zsh/4.0.7/zsh/zle.so
388        0.0271  0.0000 /usr/sbin/ntpd
555        0.0387  0.0000
/lib/modules/2.4.21-15.ELsmp/kernel/net/sunrpc/sunrpc.o
656        0.0458  0.0000 /lib/libata.o
879        0.0613  0.0000
/lib/modules/2.4.21-15.ELsmp/kernel/drivers/usb/host/ehci-hcd.o
920        0.0642  0.0000 /bin/grep
1125       0.0785  0.0000 /lib/ext3.o
2703       0.1886  0.0000 /lib/jbd.o
3572       0.2492  0.0000 /bin/zsh
3633       0.2534  0.0000 /usr/bin/op_help
7959       0.5552  0.0000
/lib/modules/2.4.21-15.ELsmp/kernel/drivers/net/e1000/e1000.o10767   
  0.7511  0.0000
/lib/modules/2.4.21-15.ELsmp/kernel/drivers/usb/host/usb-uhci.o
24152      1.6849  0.0000 /lib/ld-2.3.2.so
24584      1.7150  0.0000 /usr/bin/oprofiled
26820      1.8710  0.0000 /bin/bash
51396      3.5855  0.0000 /usr/sbin/sshd
137750     9.6098  0.0000 /lib/tls/libc-2.3.2.so
185543    12.9440  0.0000 /lib/libcrypto.so.0.9.7a
221343    15.4415  0.0000
/lib/modules/2.4.21-15.ELsmp/kernel/arch/i386/oprofile/oprofile.o
347272    24.2266  0.0000 /home/bkonrath/pi/pi
379291    26.4603  0.0000 /boot/vmlinux-2.4.21-15.ELsmp


So it looks like the data in /var/lib/oprofile/samples/session-1 is
corrupt...

Unfortunately, this exit is hardwired into OProfile 0.5.x, so there's
no way for opxml to catch it and output an error. How does the UI
handle this?


Comment 9 Ben Konrath 2004-08-13 18:58:32 UTC
The UI behaves just like it did with Phil's original bug - nothing
shows up in the System View. 

Perhaps this should be added to the Release Notes as well?? Are there
notes specifically for the oprofile plug-in?

Comment 10 Keith Seitz 2004-08-13 19:35:38 UTC
Ok, that behavior is understandable, given that we have no way of
catching the original error.

However, we should be able to note that opxml exited abnormally and
inform the user of that. Please file new bug against this.


Note You need to log in before you can comment on or make changes to this bug.