public inbox for frysk-bugzilla@sourceware.org
help / color / mirror / Atom feed
* [Bug general/4889] New: adding new codeObserver in updateHit causes java.lang.IllegalStateException: Already stepping
@ 2007-08-03 12:26 pmachata at redhat dot com
  2007-08-03 12:57 ` [Bug general/4889] " mark at klomp dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: pmachata at redhat dot com @ 2007-08-03 12:26 UTC (permalink / raw)
  To: frysk-bugzilla

FC6.

Adding new codeObserver in updateHit causes java.lang.IllegalStateException:
Already stepping.  The stack trace I'm getting:
Exception in thread "main" java.lang.IllegalStateException: Already stepping
   at frysk.proc.Breakpoint.prepareStep(fltrace)
   at frysk.proc.live.LinuxTaskState$Running.sendContinue(fltrace)
   at frysk.proc.live.LinuxTaskState$Running.handleStoppedEvent(fltrace)
   at frysk.proc.live.LinuxTask.processStoppedEvent(fltrace)
   at frysk.proc.live.LinuxWaitBuilder.stopped(fltrace)
   at frysk.sys.Wait.wait(fltrace)
   at frysk.sys.Wait.waitAll(fltrace)
   at frysk.event.WaitEventLoop.block(fltrace)
   at frysk.event.EventLoop.runEventLoop(fltrace)
   at frysk.event.EventLoop.run(fltrace)
   at frysk.util.Ltrace.trace(fltrace)
   at frysk.bindir.fltrace.run(fltrace)
   at frysk.bindir.fltrace.main(fltrace)

This doesn't seem to happen when requesting observation of already observed
state.  The problem also goes away when I do

      task.requestUnblock(this);
      return Action.BLOCK;

intead of return Action.CONTINUE.  The problem also went away when something
like that was in effect:

      task.getProc().getMainTask().requestAddCodeObserver(this, retAddr);
      System.err.println("[" + task.getTaskId().intValue() + "]");

All this seems to point to the problem of frysk having "enough time" to do the
observer shenanigans, as is suggested by comments on several places.

`retAddr' given above could have been arbitrary, e.g. I tried to enter
0x080483b4, the address of main in my testing binary, so the problems wasn't in
that I'd request breakpoint inside data segment or something.

-- 
           Summary: adding new codeObserver in updateHit causes
                    java.lang.IllegalStateException: Already stepping
           Product: frysk
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: general
        AssignedTo: frysk-bugzilla at sourceware dot org
        ReportedBy: pmachata at redhat dot com
  GCC host triplet: i686-pc-linux-gnu
OtherBugsDependingO 2229
             nThis:


http://sourceware.org/bugzilla/show_bug.cgi?id=4889

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug general/4889] adding new codeObserver in updateHit causes java.lang.IllegalStateException: Already stepping
  2007-08-03 12:26 [Bug general/4889] New: adding new codeObserver in updateHit causes java.lang.IllegalStateException: Already stepping pmachata at redhat dot com
@ 2007-08-03 12:57 ` mark at klomp dot org
  2007-08-10 11:23 ` mark at klomp dot org
  2007-08-15 11:08 ` mark at klomp dot org
  2 siblings, 0 replies; 4+ messages in thread
From: mark at klomp dot org @ 2007-08-03 12:57 UTC (permalink / raw)
  To: frysk-bugzilla


------- Additional Comments From mark at klomp dot org  2007-08-03 12:57 -------
This is related/similar to bug #4747 with the difference that frysk itself is
responsible for generating the stop signal to install the breakpoint instead of
an external trigger.

This will be fixed with the fix for #4747. The "workaround":

      task.requestAddCodeObserver(observer, address);
      task.requestUnblock(this);
      return Action.BLOCK;

Is most likely what you actually want. It makes sure that the observer is
installed and only after that the task is unblocked. If you use the sequence:

      task.requestAddCodeObserver(observer, address);
      return Action.CONTINUE;

The request to add the new observer is only pending and the task might already
be running long before the observer is installed (so you could miss hitting that
breakpoint). This is actually what is happening here.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=4889

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug general/4889] adding new codeObserver in updateHit causes java.lang.IllegalStateException: Already stepping
  2007-08-03 12:26 [Bug general/4889] New: adding new codeObserver in updateHit causes java.lang.IllegalStateException: Already stepping pmachata at redhat dot com
  2007-08-03 12:57 ` [Bug general/4889] " mark at klomp dot org
@ 2007-08-10 11:23 ` mark at klomp dot org
  2007-08-15 11:08 ` mark at klomp dot org
  2 siblings, 0 replies; 4+ messages in thread
From: mark at klomp dot org @ 2007-08-10 11:23 UTC (permalink / raw)
  To: frysk-bugzilla


------- Additional Comments From mark at klomp dot org  2007-08-10 11:23 -------
New testcase added: frysk.proc.TestTaskObserverCode.testInstallCodeDuringCode

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=4889

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug general/4889] adding new codeObserver in updateHit causes java.lang.IllegalStateException: Already stepping
  2007-08-03 12:26 [Bug general/4889] New: adding new codeObserver in updateHit causes java.lang.IllegalStateException: Already stepping pmachata at redhat dot com
  2007-08-03 12:57 ` [Bug general/4889] " mark at klomp dot org
  2007-08-10 11:23 ` mark at klomp dot org
@ 2007-08-15 11:08 ` mark at klomp dot org
  2 siblings, 0 replies; 4+ messages in thread
From: mark at klomp dot org @ 2007-08-15 11:08 UTC (permalink / raw)
  To: frysk-bugzilla


------- Additional Comments From mark at klomp dot org  2007-08-15 11:08 -------
Fixed by:

frysk-core/frysk/proc/ChangeLog
2007-08-15  Mark Wielaard  <mwielaard@redhat.com>
 
    * getSetupAddress (getSetupAddress): New method.
    (stepAbort): Likewise.
    * TestTaskObserverCode.java (testCodeSignalInterrupt): Enable test.
    (testInstallCodeDuringCode): Likewise.
    (Symbol): New static helper class.
    (getGlobalLabelAddress): New helper method.
    (breakTest): New test harness for funit-raise.
    (testBreakDivZero): New test based on breakTest.
    (testBreakIllegalAddress): Likewise.
    (testBreakIllegalInstruction): Likewise.
    (testBreakSignalTerminate): Likewise.
    (testBreakSignalIgnore): Likewise.
    (AttachedObserver.task): New field.
    (updateAttached): Set task field.
    (TerminatingObserver.task): New field.
    (TerminatingObserver.signal): Likewise.
    (TerminatingObserver.value): Likewise.
    (TerminatingObserver.updateTerminating): Set new fields.

frysk-core/frysk/proc/live/ChangeLog
2007-08-15  Mark Wielaard  <mwielaard@redhat.com>

    * LinuxTaskState.java (Stepping.handleTrappedpEvent): Always check
    steppingBreakpoint.
    (checkBreakpointStepping): New helper method.
    (handleSignaledEvent): Use checkBreakpointStepping before
    continuing.
    (handleStoppedEvent): Likewise.

frysk-core/frysk/pkglibdir/ChangeLog
2007-08-15  Mark Wielaard  <mwielaard@redhat.com>

    * funit-raise.S: New test.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=4889

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-08-15 11:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-03 12:26 [Bug general/4889] New: adding new codeObserver in updateHit causes java.lang.IllegalStateException: Already stepping pmachata at redhat dot com
2007-08-03 12:57 ` [Bug general/4889] " mark at klomp dot org
2007-08-10 11:23 ` mark at klomp dot org
2007-08-15 11:08 ` mark at klomp dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).