Bug 5352 - testLinuxCoreFileStackTrace(frysk.proc.dead.TestLinuxCore)junit.framework.ComparisonFailure: Compare stack traces expected:<...#1 0x080483be in third ()
Summary: testLinuxCoreFileStackTrace(frysk.proc.dead.TestLinuxCore)junit.framework.Com...
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: 1595
  Show dependency treegraph
 
Reported: 2007-11-17 19:18 UTC by Andrew Cagney
Modified: 2007-11-19 13:51 UTC (History)
2 users (show)

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


Attachments
Fix 5352 by providing exe path (350 bytes, text/plain)
2007-11-19 10:46 UTC, Phil Muldoon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cagney 2007-11-17 19:18:39 UTC
testLinuxCoreFileStackTrace(frysk.proc.dead.TestLinuxCore)junit.framework.ComparisonFailure:
Compare stack traces expected:<...#1 0x080483be in third ()
#2 0x080483f5 in second ()
#3 0x08048419 in first ()
#4 0x08048446 in main ()
#5 0x00c2d4e4 in __libc_start_main ()
#6 0x080482f1 in _start ()
> but was:<...>
   at frysk.proc.dead.TestLinuxCore.testLinuxCoreFileStackTrace(TestRunner)
   at frysk.junit.Runner.runCases(TestRunner)
   at frysk.junit.Runner.runArchCases(TestRunner)
   at frysk.junit.Runner.runTestCases(TestRunner)
   at TestRunner.main(TestRunner)
Comment 1 Phil Muldoon 2007-11-19 08:34:03 UTC
Is this a duplicate (a continuation of) 5316?

FWIW I cannot replicate the failure as of this morning. What OS, what
architecture? Was it on a TestRunner -r run, a normal TestRunnner run? Via make
check?
Comment 2 Phil Muldoon 2007-11-19 09:49:11 UTC
I run this test on F8, x86_64 with TestRunner -r 1000 and run make check 20
times and I cannot get it to fail. It looks like one of the backtraces in your
example completely failed.

OTOH I though I changed this test to pass in the executable path, but I see the
code has not, so I will change that. Do you happen to remember the test location
and path from bash history?
Comment 3 Phil Muldoon 2007-11-19 10:42:15 UTC
I have found the issue. Take a very long pathname for the build directory:

[pmuldoon@localhost frysk-core]$ pwd
/home/pmuldoon/frysk_bin/aaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccc/dddddddddddddddddddeeeeeeeeeeeeeeeeeeeeefffffffffffffffffffgggggggggggggggggggg/hhhhhhhhhhhhhhhhhhhiiiiiiiiiiiiiiiiiijjjjjjjjjjjjjjjjjjkkkkkkkkkkkkkk/lllllllllllllllll/mmmmmmmmmmmmmmmmmm/frysk-core


And run the test, the produce similar fail results. This test is failing due to
the corefile trying to source the executable from the core, but the corefile
having a truncated path:

[pmuldoon@localhost frysk-core]$ eu-readelf -n core.12623 | more

Note segment of 1320 bytes at offset 0x388:
  Owner          Data size  Type
  CORE                 136  PRPSINFO
    state: 84, sname: T, zomb: 49, nice: 48, flag: 0x0000000000400000
    uid: 500, gid: 500, pid: 12623, ppid: 1, pgrp: 12616, sid: 3614
    fname: funit-stacks, psargs:
/home/pmuldoon/frysk_bin/aaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbccccccc

Output of test:

[pmuldoon@localhost frysk-core]$ ./TestRunner
frysk.proc.dead.TestLinuxCore.testLinuxCoreFileStackTrace
Running testLinuxCoreFileStackTrace(frysk.proc.dead.TestLinuxCore) ...FAIL
  junit.framework.ComparisonFailure: Compare stack traces expected:<...400468 in
fourth ()
#1 0x00000000004004a0 in third ()
#2 0x00000000004004c2 in second ()
#3 0x00000000004004d5 in first ()
#4 0x00000000004004e8 in main ()
#5 0x00000038cba1e074 in __libc_start_main ()
#6 0x00000000004003b9 in _start ()...> but was:<...000000 in [unknown]...>

Time: 0.058
There was 1 failure:
1)
testLinuxCoreFileStackTrace(frysk.proc.dead.TestLinuxCore)junit.framework.ComparisonFailure:
Compare stack traces expected:<...400468 in fourth ()
#1 0x00000000004004a0 in third ()
#2 0x00000000004004c2 in second ()
#3 0x00000000004004d5 in first ()
#4 0x00000000004004e8 in main ()
#5 0x00000038cba1e074 in __libc_start_main ()
#6 0x00000000004003b9 in _start ()...> but was:<...000000 in [unknown]...>
   at frysk.proc.dead.TestLinuxCore.testLinuxCoreFileStackTrace(TestRunner)
   at frysk.junit.Runner.runCases(TestRunner)
   at frysk.junit.Runner.runArchCases(TestRunner)
   at frysk.junit.Runner.runTestCases(TestRunner)
   at TestRunner.main(TestRunner)





Comment 4 Phil Muldoon 2007-11-19 10:45:33 UTC
Given the attached path, the test passes:

[pmuldoon@localhost frysk-core]$ ./TestRunner
frysk.proc.dead.TestLinuxCore.testLinuxCoreFileStackTrace
Running testLinuxCoreFileStackTrace(frysk.proc.dead.TestLinuxCore) ...PASS
Comment 5 Phil Muldoon 2007-11-19 10:46:58 UTC
Created attachment 2098 [details]
Fix 5352 by providing exe path

Fix 5352 by providing exe path
Comment 6 Phil Muldoon 2007-11-19 10:53:47 UTC
- Log -----------------------------------------------------------------
commit 549835f8c32000e9cae1b45dd50012fb9c7762e0
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Mon Nov 19 10:50:43 2007 +0000

    Fix 5252 by passing executable path.
    
    2007-11-19  Phil Muldoon  <pmuldoon@redhat.com>
    
            * TestLinuxCore.java (testLinuxCoreFileStackTrace): Pass
            executable location to LinuxHost. Fix 5352. Remove unresolved.
            Fix 11-15 indention oops.