Bug 4947

Summary: testASMFramelessFunctionReturn(frysk.stepping.TestStepping)ptrace: Input/output error (pt 0x2, pid 15327, addr 0x1524c, data 0x0)
Product: frysk Reporter: Andrew Cagney <cagney>
Component: generalAssignee: Unassigned <frysk-bugzilla>
Status: NEW ---    
Severity: normal CC: mcvet, swagiaal
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Project(s) to access: ssh public key:

Description Andrew Cagney 2007-08-22 02:00:37 UTC
On fc5, i386:

testASMFramelessFunctionReturn(frysk.stepping.TestStepping)ptrace: Input/output
error (pt 0x2, pid 15327, addr 0x1524c, data 0x0)
   at frysk.sys.Ptrace$AddressSpace.peek(TestRunner)
   at frysk.proc.live.AddressSpaceByteBuffer$PeeksRequest.peek(TestRunner)
   at frysk.proc.live.AddressSpaceByteBuffer$PeeksRequest.request(TestRunner)
   at frysk.proc.live.AddressSpaceByteBuffer.peek(TestRunner)
   at frysk.proc.live.LogicalMemoryBuffer.peek(TestRunner)
   at inua.eio.ByteBuffer.peekFully(TestRunner)
   at inua.eio.ByteBuffer.get(TestRunner)
   at frysk.stack.UnwindAddressSpace.accessMem(TestRunner)
   at lib.unwind.UnwindX86.isSignalFrame(TestRunner)
   at lib.unwind.Cursor.isSignalFrame(TestRunner)
   at frysk.stack.RemoteFrame.getAdjustedAddress(TestRunner)
   at frysk.stack.FrameDecorator.getAdjustedAddress(TestRunner)
   at frysk.debuginfo.DebugInfoFrame.getInlinedSubprograms(TestRunner)
   at
frysk.debuginfo.DebugInfoStackFactory.createVirtualDebugInfoStackTrace(TestRunner)
   at frysk.debuginfo.DebugInfoStackFactory.createDebugInfoStackTrace(TestRunner)
   at frysk.stepping.TestStepping.testASMFramelessFunctionReturn(TestRunner)
   at frysk.junit.Runner.runCases(TestRunner)
   at frysk.junit.Runner.runArchCases(TestRunner)
   at frysk.junit.Runner.runTestCases(TestRunner)
   at TestRunner.main(TestRunner)

(in fact, all the assembler stepping tests).  I traced it back to this change:

2007-08-21  Sami Wagiaalla  <swagiaal@redhat.com>

        * TestFrameDebugInfo.java (testFrameDebugInfoStackTrace): New passes number
        of frames to printStackTrace.
        * DebugInfoStackFactory.java (printStackTrace): Now takes a number frames
        arguement.
Comment 1 Andrew Cagney 2007-08-22 02:48:22 UTC
Work-around for now:

Index: frysk-core/frysk/bindir/ChangeLog
2007-08-21  Andrew Cagney  <cagney@redhat.com>

	* TestFhd.java (testFhpdVirtualStackTrace): Move to
	frysk.hpd.TestStackCommands.

Index: frysk-core/frysk/debuginfo/ChangeLog
2007-08-21  Andrew Cagney  <cagney@redhat.com>

	* DebugInfoStackFactory.java: Revert enabling of virtual stack
	backtraces by default for now.  Bug 4947.

Index: frysk-core/frysk/hpd/ChangeLog
2007-08-21  Andrew Cagney  <cagney@redhat.com>

	* TestStackCommands.java (testFhpdVirtualStackTrace): Moved to
	here from frysk.bindir.TestFhd.  Disable for now.  Bug 4947.

Index: frysk-core/frysk/testbed/ChangeLog
2007-08-21  Andrew Cagney  <cagney@redhat.com>

	* CoreFileAtSignal.java (constructCore(File)): New.
Comment 2 Andrew Cagney 2007-08-22 13:40:41 UTC
This more selectively enables the virtual stack backtrace
(createNonVirtualDebugInfoStackTrace gets confusing as a name), and lets the new
work continue.  It should probably be enabled in a few more places (but not the
stepping engine tests).

The underlying problem (or the real bug), looking at the stack backtrace is
likely either in libunwind or its binding.  The question <<is this a signal
frame>> shouldn't result in an exception.

Index: frysk-core/frysk/debuginfo/ChangeLog
2007-08-22  Andrew Cagney  <cagney@redhat.com>

	* DebugInfoStackFactory.java (createDebugInfoStackTrace)
	(createVirtualStackTrace): Rename
	createVirtualDebugInfoStackTrace.
	* TestFrameDebugInfo.java: Update.

Index: frysk-core/frysk/hpd/ChangeLog
2007-08-22  Andrew Cagney  <cagney@redhat.com>

	* CLI.java: Use DebugInfoStackFactory.createVirtualStackTrace.
	* CoreCommand.java: Ditto.
	* TestStackCommands.java (testFhpdVirtualStackTrace): Remove
	unresolved 4947.