Bug 5734 - core command aborts with backtrace
Summary: core command aborts with backtrace
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Phil Muldoon
URL:
Keywords:
Depends on:
Blocks: 2246
  Show dependency treegraph
 
Reported: 2008-02-06 07:31 UTC by Rick Moseley
Modified: 2008-03-18 14:59 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Moseley 2008-02-06 07:31:51 UTC
The following somple sequence causes the 'core" command to abort with a backtrace.
First create a core file with these commands:

cd frysk-core/frysk/pkglibdir
./funit-threads-looper &
fcore PID
(now kill the looper)

cd ../bindir
./fhpd
(fhpd) core ../pkglibdir/core.13007 ../pkglibdir/funit-threads-looper
Internal Error: java.lang.NullPointerException
   at lib.dwfl.Dwfl.dwfl_addrdie(Dwfl.cxx:248)
   at lib.dwfl.Dwfl.getCompilationUnit(Dwfl.java:113)
   at frysk.debuginfo.DebugInfoFrame.getScopes(DebugInfoFrame.java:91)
   at
frysk.debuginfo.DebugInfoStackFactory.createVirtualStackTrace(DebugInfoStackFactory.java:78)
   at frysk.hpd.CoreCommand.interpret(CoreCommand.java:142)
   at frysk.hpd.ParameterizedCommand.interpret(ParameterizedCommand.java:142)
   at frysk.hpd.MultiLevelCommand.interpret(MultiLevelCommand.java:140)
   at frysk.hpd.CLI.execCommand(CLI.java:277)
   at frysk.bindir.fhpd.main(fhpd.java:170)
Comment 1 Phil Muldoon 2008-02-06 07:59:53 UTC
Are you using tools from top of development? I cannot reproduce. What is your
arch and OS version? I tried this several times. I did notice you used the
installed (by rpm) fcore, but the fhpd from head. Anyway, here is what I get:


[pmuldoon@localhost frysk-core]$ ./frysk/pkglibdir/funit-threads-looper &
[1] 8811
[pmuldoon@localhost frysk-core]$ ./frysk/bindir/fcore 8811
[pmuldoon@localhost frysk-core]$ kill -9 8811
[pmuldoon@localhost frysk-core]$ ./frysk/bindir/fhpd core.8811
./frysk/pkglibdir/funit-threads-looper
Attached to core file: /home/pmuldoon/frysk_bin/frysk-core/core.8811
(fhpd) where
[0.0]
#0 0x00000000004007a3 in do_it()
/home/pmuldoon/frysk_bin/frysk-core/../../frysk/frysk-core/frysk/pkglibdir/funit-threads-looper.c#87
#1 0x00000038cc606407 in start_thread () from /lib64/libpthread.so.0
#2 0x00000038cbad4b0d in __clone () from /lib64/libc.so.6
[0.1]
#0 0x00000000004006e5 in bak()
/home/pmuldoon/frysk_bin/frysk-core/../../frysk/frysk-core/frysk/pkglibdir/funit-threads-looper.c#110
#1 0x0000000000400703 in baz()
/home/pmuldoon/frysk_bin/frysk-core/../../frysk/frysk-core/frysk/pkglibdir/funit-threads-looper.c#127
#2 0x000000000040072a in bar()
/home/pmuldoon/frysk_bin/frysk-core/../../frysk/frysk-core/frysk/pkglibdir/funit-threads-looper.c#135
#3 0x000000000040073d in foo()
/home/pmuldoon/frysk_bin/frysk-core/../../frysk/frysk-core/frysk/pkglibdir/funit-threads-looper.c#142
#4 0x000000000040077e in main(int argc,char ** argv)
/home/pmuldoon/frysk_bin/frysk-core/../../frysk/frysk-core/frysk/pkglibdir/funit-threads-looper.c#155
#5 0x00000038cba1e074 in __libc_start_main () from /lib64/libc.so.6
#6 0x0000000000400619 in _start () from
/home/pmuldoon/frysk_bin/frysk-core/frysk/pkglibdir/funit-threads-looper
Comment 2 Phil Muldoon 2008-02-06 08:07:54 UTC
Also can you attach the compressed corefile and executable. This should be <
100Kb, hopefully.
Comment 3 Rick Moseley 2008-02-06 17:01:57 UTC
OK, seems to be a problem specifying absolute versus relative paths for the
executable.  When I specify a relative path for the executable I get the abort,
when I specify a full path to the executable I do not.

Here is the sequence I did to get this result:

(fhpd) core ../pkglibdir/core.11757 ../pkglibdir/funit-threads-looper
Internal Error: java.lang.NullPointerException
   at lib.dwfl.Dwfl.dwfl_addrdie(fhpd)
   at lib.dwfl.Dwfl.getCompilationUnit(fhpd)
   at frysk.debuginfo.DebugInfoFrame.getScopes(fhpd)
   at frysk.debuginfo.DebugInfoStackFactory.createVirtualStackTrace(fhpd)
   at frysk.hpd.CoreCommand.interpret(fhpd)
   at frysk.hpd.ParameterizedCommand.interpret(fhpd)
   at frysk.hpd.MultiLevelCommand.interpret(fhpd)
   at frysk.hpd.CLI.execCommand(fhpd)
   at frysk.bindir.fhpd.main(fhpd)

(fhpd) quit
Error: requestDeleteInstructionObserver
Quitting...
[rmoseley@localhost bindir]$ ./fhpd
(fhpd) core ../pkglibdir/core.11757
/home/rmoseley/frysk-git/build/frysk-core/frysk/pkglibdir/funit-threads-looper
Attached to core file: ../pkglibdir/core.11757
Comment 4 Phil Muldoon 2008-02-06 17:22:50 UTC
No luck there again rick :( I took the corefiles you sent me and the exe and
created a relative path:

[pmuldoon@localhost rick]$ cd ..
[pmuldoon@localhost ~]$ cd rick/
[pmuldoon@localhost rick]$ mkdir nest2
[pmuldoon@localhost rick]$ cd nest2/
[pmuldoon@localhost nest2]$ ~/frysk_bin/frysk-core/frysk/bindir/fhpd
../core.18673 ../funit-threads-looper
Attached to core file: /home/pmuldoon/rick/core.18673

(fhpd) where
[0.0]
#0 0x00000000004007a0 in gettid()
/home/rmoseley/frysk-git/build/frysk-core/../../frysk/frysk-core/frysk/pkglibdir/funit-threads-looper.c#51
[inline]
#1 0x00000000004007a0 in do_it()
/home/rmoseley/frysk-git/build/frysk-core/../../frysk/frysk-core/frysk/pkglibdir/funit-threads-looper.c#51
#2 0x0000003601406407 in [unknown] from /home/pmuldoon/rick/nest2/Unknown
Comment 5 Rick Moseley 2008-02-06 19:25:14 UTC
OK, the problem seems to be using relative paths when using various command
within fhpd such as 'load'/'start'/'run'/'core' etc.  It seems when there is
more than one parameter passed to a command and the second parameter is a
relative path instead of an absolute path, the relative path is not interpreted
properly.  It seems globbing does not work in that case.
Comment 6 Phil Muldoon 2008-03-18 14:59:42 UTC
Cannot reproduce in current head. Reopen if you see it again.