Bug 212434 - Frysk going down in flames after a miserable NullPointerException
Frysk going down in flames after a miserable NullPointerException
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: frysk (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mike Cvet
Len DiMaggio
:
Depends On:
Blocks: 213487
  Show dependency treegraph
 
Reported: 2006-10-26 15:04 EDT by Daniel Qarras
Modified: 2007-11-30 17:11 EST (History)
7 users (show)

See Also:
Fixed In Version: 2006.10.30
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-11-01 12:54:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
A simple C test program to hang frysk (145 bytes, text/plain)
2006-10-26 15:04 EDT, Daniel Qarras
no flags Details

  None (edit)
Description Daniel Qarras 2006-10-26 15:04:53 EDT
Description of problem:
On a freshly installed FC6 + updates of 2006-10-26 I tried frysk with a simple C
test program but frysk hangs miserably immediately after attaching it to a process.

Version-Release number of selected component (if applicable):
frysk-0.0.1.2006.10.23.rh1-1.fc6

How reproducible:
Always.

Steps to Reproduce:
1. Compile the attached test program
2. Start frysk
3. Start the test program
4. Select Debug an Existing Process and select the test program
  
Actual results:
Frysk produces java.lang.NullPointerException till the end of time.

Expected results:
Frysk does something meaningful.

Additional info:
The exception frysk produces is:

java.lang.NullPointerException
   at frysk.gui.srcwin.SourceWindowFactory.generateProcStackTrace(frysk)
   at frysk.gui.srcwin.SourceWindowFactory.finishSourceWin(frysk)
   at frysk.gui.srcwin.SourceWindowFactory$2.run(frysk)
   at org.gnu.glib.CustomEvents.runEvents(libgtkjava-2.8.so)
   at org.gnu.gtk.Gtk.gtk_main(libgtkjava-2.8.so)
   at org.gnu.gtk.Gtk.main(libgtkjava-2.8.so)
   at frysk.gui.Gui.gui(frysk)
   at frysk.main(frysk)
Comment 1 Daniel Qarras 2006-10-26 15:04:54 EDT
Created attachment 139514 [details]
A simple C test program to hang frysk
Comment 2 Daniel Qarras 2006-10-26 15:32:03 EDT
Uh, oh.. This happens only when you compile with:

gcc -g test.c

but NOT when compiling with:

gcc test.c

What gives?
Comment 3 Rick Moseley 2006-10-26 15:39:55 EDT
We are looking at this problem as I type this.  When compiled with the -g option
we look for debuginfo in the executable.  It seems we are running into something
we have not seen before in the debuginfo that is causing the source window to bail.

If you compile without -g we should pop the source window up and show a message
that says we cannot find the debuginfo for this process.

Thanks for finding this.  If you find any more interesting info, please post it.
 As I said above, we are looking at this now.
Comment 4 Mike Cvet 2006-10-26 16:23:19 EDT
Hi Daniel, thanks for the catch.

I've isolated the problem - Frysk made an assumption that all of the test
program was compiled with debuginfo, and sleep() obviously is not. Trying to
grab debug information there crashes it.

I'll most likely have a fix in CVS by tomorrow!
Comment 5 Mike Cvet 2006-10-29 19:30:05 EST
Fixed in CVS as of Friday, October 27.
Comment 6 Daniel Qarras 2006-10-31 14:13:15 EST
I've updated to frysk-0.0.1.2006.10.30.rh1-1.fc6 from FC6 updated and the
exception does not occur anymore. However, when attaching to the same example
process compiled with "gcc -g test.c" I now get:


i = 0
i = 1
i = 2
getting sourcefile
checking hashmap
Creating new image
creating source
<?xml version="1.0" encoding="UTF-8"?>
<TaskTask>Frysk JDOM<PC /><image filename="Task 7577" filepath="/tmp"
CCPATH="/tmp" /></TaskTask>
Complete Parse: Error found on line 70
                Char offset of error = 1922
Looking for test.c: 9


What gives?

PS. Where could I find a "Debugging Hello World with Frysk" style tutorial? For
systemtap one is at (1) but for Frysk I can't find any proper documentation.

1) http://sourceware.org/systemtap/tutorial/node2.html
Comment 7 Rick Moseley 2006-10-31 14:33:13 EST
Please be aware that the source window is the newest part of the Frysk debugger
and is in a state of flux right now.  So, you will be seeing some debug
statements printing out on the console where frysk is activated.  New features
are being added as the underlying code to support those features comes online.

Basically what works now in the source window is the source code highlighting,
simple variable values by right-clicking over them, register window, memory
window.  

Items currently be worked on for the source window are stepping and jumping to
the correct source line when a stack frame is clicked on. These useful features
will be added in the next few weeks.

Thanks for your patience here and keep filing those bugs to help us make frysk a
great debugger!!!
Comment 8 Rick Moseley 2006-10-31 14:37:24 EST
Oh, by the way, the Frysk documentation is currently in our CVS repo, in the
frysk/htdocs directory.  Please see the http://sourceware.org/frysk/build for
instructions on how to check out frysk repository.  We are trying to get it online.
Comment 9 Daniel Qarras 2006-10-31 17:44:24 EST
Yeah, I realize that this a young project so I'm not expecting miracles (yet ;).

Thanks for the documentation tip, frysk_doc_1.0.pdf was just the kind of
document I was looking for. It would be nice to have it online (perhaps after
updating to match current version, now some screenshots etc do not match current
frysk).

Thanks.
Comment 10 Andrew Cagney 2006-11-01 12:45:50 EST
(In reply to comment #6)

> PS. Where could I find a "Debugging Hello World with Frysk" style tutorial? For
> systemtap one is at (1) but for Frysk I can't find any proper documentation.
> 
> 1) http://sourceware.org/systemtap/tutorial/node2.html

I've pushed this upstream; definitly need to do.
http://sourceware.org/bugzilla/show_bug.cgi?id=3442
Comment 11 Andrew Cagney 2006-11-01 13:04:12 EST
(In reply to comment #6)
> I've updated to frysk-0.0.1.2006.10.30.rh1-1.fc6 from FC6 updated and the
> exception does not occur anymore. However, when attaching to the same example
> process compiled with "gcc -g test.c" I now get:
> 
> 
> i = 0
> i = 1
> i = 2
> getting sourcefile
> checking hashmap
> Creating new image
> creating source
> <?xml version="1.0" encoding="UTF-8"?>
> <TaskTask>Frysk JDOM<PC /><image filename="Task 7577" filepath="/tmp"
> CCPATH="/tmp" /></TaskTask>
> Complete Parse: Error found on line 70
>                 Char offset of error = 1922
> Looking for test.c: 9
> 
> 
> What gives?

Pushed upstream:
http://sourceware.org/bugzilla/show_bug.cgi?id=3443
Comment 12 Andrew Cagney 2006-11-02 13:32:22 EST
This bug is missing unit testing:

Pushed upstream:
http://sourceware.org/bugzilla/show_bug.cgi?id=3450

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