Red Hat Bugzilla – Bug 212434
Frysk going down in flames after a miserable NullPointerException
Last modified: 2007-11-30 17:11:46 EST
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):
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
Frysk produces java.lang.NullPointerException till the end of time.
Frysk does something meaningful.
The exception frysk produces is:
Created attachment 139514 [details]
A simple C test program to hang frysk
Uh, oh.. This happens only when you compile with:
gcc -g test.c
but NOT when compiling with:
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.
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!
Fixed in CVS as of Friday, October 27.
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
Creating new image
<?xml version="1.0" encoding="UTF-8"?>
<TaskTask>Frysk JDOM<PC /><image filename="Task 7577" filepath="/tmp"
Complete Parse: Error found on line 70
Char offset of error = 1922
Looking for test.c: 9
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.
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
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
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.
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
(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.
(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?
This bug is missing unit testing: