public inbox for frysk-bugzilla@sourceware.org
help / color / mirror / Atom feed
* [Bug general/4431] New: AckDaemonProcess doesn't appear to fully wait
@ 2007-04-26 15:29 mcvet at redhat dot com
  2007-04-26 17:53 ` [Bug general/4431] " mcvet at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: mcvet at redhat dot com @ 2007-04-26 15:29 UTC (permalink / raw)
  To: frysk-bugzilla

In most of the RT testcases, AckDaemonProcesses are used to start up a test 
process. However, often, (usually second iteration of the test), the test will 
fail becase the grabbed stack trace is not a proper stack trace of the process, 
and as noticed in #4394:

"I grabbed some stack traces of the traced process, and ended up with varying 
results, including the following:

#0 0x00002aaaaaab1a2b in _dl_map_object_from_fd ()
#1 0x00002aaaaaab2d9c in _dl_map_object ()
#2 0x00002aaaaaab610d in openaux ()
#3 0x00002aaaaaab7d26 in _dl_catch_error ()
#4 0x00002aaaaaab67d6 in _dl_map_object_deps ()
#5 0x00002aaaaaaae306 in dl_main ()
#6 0x00002aaaaaabde0b in _dl_sysdep_start ()
#7 0x00002aaaaaaac468 in _dl_start ()
#8 0x00002aaaaaaabb58 in [unknown]

or

#0 0x00002aaaaaabeff6 in strcmp ()
#1 0x00002aaaaaab3c87 in check_match.8134 ()
#2 0x00002aaaaaab4084 in do_lookup_x ()
#3 0x00002aaaaaab4282 in _dl_lookup_symbol_x ()
#4 0x00002aaaaaab57a5 in _dl_relocate_object ()
#5 0x00002aaaaaaae77a in dl_main ()
#6 0x00002aaaaaabde0b in _dl_sysdep_start ()
#7 0x00002aaaaaaac468 in _dl_start ()
#8 0x00002aaaaaaabb58 in [unknown]

or 

#0 0x00002aaaaaab7bc3 in _dl_fixup ()
#1 0x00002aaaaaabd3a2 in _dl_runtime_resolve ()
#2 0x00002aaaaaccb628 in __pthread_initialize_minimal ()
#3 0x00002aaaaaccaf29 in _init ()

or just plain:

#0 0x00002aaaaaabeff4 in [unknown]"

The relevant code is usually something like:

    AckDaemonProcess process = new AckDaemonProcess
	(Sig.POLL, new String[] {
	    getExecPath ("funit-rt-threader"),
	    "" + Pid.get (),
	    "" + Sig.POLL_
	});
        
    myTask = process.findTaskUsingRefresh(true);
    SteppingEngine.setProc(myTask.getProc());

However, the problem is mitigated by placing 

    try { Thread.sleep(500); } catch (Exception e) {}

between the initialization of the AckDaemonProcess, and the call to 
SteppingEngine. It appears as though the process needs time to fully load and 
start running before the test begins.

-- 
           Summary: AckDaemonProcess doesn't appear to fully wait
           Product: frysk
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: general
        AssignedTo: frysk-bugzilla at sourceware dot org
        ReportedBy: mcvet at redhat dot com
                CC: cagney at redhat dot com,mark at klomp dot org
OtherBugsDependingO 2935,3346
             nThis:


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

------- 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/4431] AckDaemonProcess doesn't appear to fully wait
  2007-04-26 15:29 [Bug general/4431] New: AckDaemonProcess doesn't appear to fully wait mcvet at redhat dot com
@ 2007-04-26 17:53 ` mcvet at redhat dot com
  2007-04-30 19:28 ` cagney at redhat dot com
  2007-04-30 22:25 ` mcvet at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: mcvet at redhat dot com @ 2007-04-26 17:53 UTC (permalink / raw)
  To: frysk-bugzilla


------- Additional Comments From mcvet at redhat dot com  2007-04-26 18:53 -------
Without the sleep call, may give errors such as the following:

1) testBacktrace(frysk.rt.TestStackBacktrace)java.lang.RuntimeException: Failed 
to attach to created proc
   at frysk.rt.SteppingEngine$ThreadLifeObservable.addFailed(TestRunner)
   at frysk.proc.LinuxPtraceTaskState$16.handleAddObservation(TestRunner)
   at frysk.proc.Task.handleAddObservation(TestRunner)
   at frysk.proc.TaskObservation.handleAdd(TestRunner)
   at frysk.proc.LinuxPtraceProcState$Attaching.allAttached(TestRunner)
   at 
frysk.proc.LinuxPtraceProcState$Attaching$ToMainTask.handleTaskAttachCompleted(TestRunner)
   at frysk.proc.Proc$4.execute(TestRunner)
   at frysk.event.EventLoop.runEventLoop(TestRunner)
   at frysk.event.EventLoop.runPolling(TestRunner)
   at frysk.proc.TestLib.assertRunUntilStop(TestRunner)
   at frysk.proc.TestLib.assertRunUntilStop(TestRunner)
   at frysk.rt.TestStackBacktrace.testBacktrace(TestRunner)
   at frysk.junit.Runner.runCases(TestRunner)
   at frysk.junit.Runner.runArchCases(TestRunner)
   at frysk.junit.Runner.runTestCases(TestRunner)
   at TestRunner.main(TestRunner)
Caused by: java.lang.RuntimeException: destroyed
   at frysk.proc.LinuxPtraceTaskState$16.handleAddObservation(TestRunner)
   ...27 more
2) 
testThreadedBacktrace(frysk.rt.TestStackBacktrace)java.lang.RuntimeException: 
getting task's executable
   at frysk.proc.IsaFactory.getIsa(TestRunner)
   at frysk.proc.IsaFactory.getIsa(TestRunner)
   at frysk.proc.LinuxPtraceTask.sendrecIsa(TestRunner)
   at frysk.proc.Task.getIsa(TestRunner)
   at frysk.rt.StackCallbacks.<init>(TestRunner)
   at frysk.rt.StackFactory.createStackFrame(TestRunner)
   at frysk.rt.StackFactory.createStackFrame(TestRunner)
   at frysk.rt.TestStackBacktrace.firstTestBacktraceAssertions(TestRunner)
   at frysk.rt.TestStackBacktrace$LockObserver.update(TestRunner)
   at java.util.Observable.notifyObservers(libgcj.so.7rh)
   at frysk.rt.SteppingEngine$SteppingObserver.updateExecuted(TestRunner)
   at frysk.proc.Proc$14.add(TestRunner)
   at frysk.proc.LinuxPtraceTaskState$Attached.handleAddObservation(TestRunner)
   at frysk.proc.Task.handleAddObservation(TestRunner)
   at frysk.proc.TaskObservation.handleAdd(TestRunner)
   at frysk.proc.LinuxPtraceProcState$Attaching.allAttached(TestRunner)
   at 
frysk.proc.LinuxPtraceProcState$Attaching$ToOtherTasks.handleTaskAttachCompleted(TestRunner)
   at frysk.proc.Proc$4.execute(TestRunner)
   at frysk.event.EventLoop.runEventLoop(TestRunner)
   at frysk.event.EventLoop.runPolling(TestRunner)
   at frysk.proc.TestLib.assertRunUntilStop(TestRunner)
   at frysk.proc.TestLib.assertRunUntilStop(TestRunner)
   at frysk.rt.TestStackBacktrace.testThreadedBacktrace(TestRunner)
   at frysk.junit.Runner.runCases(TestRunner)
   at frysk.junit.Runner.runArchCases(TestRunner)
   at frysk.junit.Runner.runTestCases(TestRunner)
   at TestRunner.main(TestRunner)
Caused by: lib.elf.ElfFileException: Could not open /proc/12927/exe
   at lib.elf.Elf.<init>(TestRunner)
   at frysk.proc.IsaFactory.getIsa(TestRunner)
   ...39 more


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mcvet at redhat dot com


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

------- 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/4431] AckDaemonProcess doesn't appear to fully wait
  2007-04-26 15:29 [Bug general/4431] New: AckDaemonProcess doesn't appear to fully wait mcvet at redhat dot com
  2007-04-26 17:53 ` [Bug general/4431] " mcvet at redhat dot com
@ 2007-04-30 19:28 ` cagney at redhat dot com
  2007-04-30 22:25 ` mcvet at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: cagney at redhat dot com @ 2007-04-30 19:28 UTC (permalink / raw)
  To: frysk-bugzilla


------- Additional Comments From cagney at redhat dot com  2007-04-30 20:28 -------
Frysk uses SIGIO (SIGPOLL is an alias) internally.  Try a signal like SIGUSR1.


-- 


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

------- 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/4431] AckDaemonProcess doesn't appear to fully wait
  2007-04-26 15:29 [Bug general/4431] New: AckDaemonProcess doesn't appear to fully wait mcvet at redhat dot com
  2007-04-26 17:53 ` [Bug general/4431] " mcvet at redhat dot com
  2007-04-30 19:28 ` cagney at redhat dot com
@ 2007-04-30 22:25 ` mcvet at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: mcvet at redhat dot com @ 2007-04-30 22:25 UTC (permalink / raw)
  To: frysk-bugzilla


------- Additional Comments From mcvet at redhat dot com  2007-04-30 23:25 -------
Sig.USR1 fixes the problem

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|frysk-bugzilla at sourceware|mcvet at redhat dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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

------- 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-04-30 22:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-26 15:29 [Bug general/4431] New: AckDaemonProcess doesn't appear to fully wait mcvet at redhat dot com
2007-04-26 17:53 ` [Bug general/4431] " mcvet at redhat dot com
2007-04-30 19:28 ` cagney at redhat dot com
2007-04-30 22:25 ` mcvet at redhat dot com

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).