New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeDyld test failures on powerpc-darwin8 #21014
Comments
assigned to @lhames |
Hi David, I've committed r215938, which is intended to fix endianness handling in RuntimeDyldMachO. This may address some of the issues you've been seeing. I would not expect the endianness fix to impact the issues that you're seeing in the ARM test - I think there may be something else going on there. I recently ran in to a failure with very similar symptoms on one of my systems and the culprit turned out to be a crufty 'foo.o' object file from an earlier compile that had not been deleted. It might be worth manually clearing out /Volumes/Isolde/builds/LLVM/clang34-stage1-build/test/ExecutionEngine/RuntimeDyld/ARM/Output/* to see if that fixes your issue.
|
Hi Lang, I cleaned out that Output dir, but still see failures, but with more diagnostics in one case: % bin/llvm-lit -v test/ExecutionEngine/RuntimeDyld
|
Patch to add extra debug logging to RuntimeDyldChecker. This patch will enable extra debug logging from RuntimeDyldChecker which will hopefully help us track down the source of this bug. Could you please: (1) Apply this patch to your tree. Once you've verified that that's failing (hopefully in the same way that you're seeing in the regression runs, could you then: (5) Re-run the llvm-rtdyld commands and add the '-debug' option, and attach the resulting debug output to this bug report? Cheers, |
Here's the requested output for the ARM test case: % /Users/fang/local/src/LLVM-svn/clang34-stage1-build/./bin/llvm-rtdyld -debug -triple=armv7s-apple-ios7.0.0 -verify -check=/Volumes/Isolde/sources/LLVM-svn/llvm.git/test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s /Volumes/Isolde/builds/LLVM/clang34-stage1-build/test/ExecutionEngine/RuntimeDyld/ARM/Output/foo.o RuntimeDyldChecker: '{4}(stub_addr(foo.o, __text, baz)) = 0xe51ff004' FAILED. RuntimeDyldChecker: '*{4}(stub_addr(foo.o, __text, baz) + 4) = baz' FAILED. and for the X86 test case: % /Users/fang/local/src/LLVM-svn/clang34-stage1-build/./bin/llvm-rtdyld -debug -triple=x86_64-apple-macosx10.9 -verify -check=/Volumes/Isolde/sources/LLVM-svn/llvm.git/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s /Volumes/Isolde/builds/LLVM/clang34-stage1-build/test/ExecutionEngine/RuntimeDyld/X86/Output/foo.o Does this help? |
Patch to add extra debug logging to RuntimeDyldChecker v2. |
Patch to add extra debug logging to RuntimeDyldChecker v3. |
-debug output again for ARM case: /Users/fang/local/src/LLVM-svn/clang34-stage1-build/./bin/llvm-rtdyld -debug -triple=armv7s-apple-ios7.0.0 -verify -check=/Volumes/Isolde/sources/LLVM-svn/llvm.git/test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s /Volumes/Isolde/builds/LLVM/clang34-stage1-build/test/ExecutionEngine/RuntimeDyld/ARM/Output/foo.o RuntimeDyldChecker: '{4}(stub_addr(foo.o, __text, baz)) = 0xe51ff004' FAILED. RuntimeDyldChecker: '*{4}(stub_addr(foo.o, __text, baz) + 4) = baz' FAILED. and for X86 case: |
Oh - something is going very wrong with the addresses that relocations are being applied to: Resolving relocations Section #0 0x1000 It looks like all the relocations are being written out to the null pointer. I don't know how that's not just crashing? |
Here are the same two tests, and their -debug dump (stdout): % /Users/fang/local/src/LLVM-svn/clang34-stage1-build/./bin/llvm-rtdyld -debug -triple=armv7s-apple-ios7.0.0 -verify -check=/Volumes/Isolde/sources/LLVM-svn/llvm.git/test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s /Volumes/Isolde/builds/LLVM/clang34-stage1-build/test/ExecutionEngine/RuntimeDyld/ARM/Output/foo.o RuntimeDyldChecker: '{4}(stub_addr(foo.o, __text, baz)) = 0xe51ff004' FAILED. RuntimeDyldChecker: '*{4}(stub_addr(foo.o, __text, baz) + 4) = baz' FAILED. % /Users/fang/local/src/LLVM-svn/clang34-stage1-build/./bin/llvm-rtdyld -debug -triple=x86_64-apple-macosx10.9 -verify -check=/Volumes/Isolde/sources/LLVM-svn/llvm.git/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s /Volumes/Isolde/builds/LLVM/clang34-stage1-build/test/ExecutionEngine/RuntimeDyld/X86/Output/test_x86-64.o And I see a new test fail (without -debug): % /Users/fang/local/src/LLVM-svn/clang34-stage1-build/./bin/llvm-rtdyld -triple=i386-apple-macosx10.4 -verify -check=/Volumes/Isolde/sources/LLVM-svn/llvm.git/test/ExecutionEngine/RuntimeDyld/X86/MachO_i386_DynNoPIC_relocations.s /Volumes/Isolde/builds/LLVM/clang34-stage1-build/test/ExecutionEngine/RuntimeDyld/X86/Output/test_i386.o |
Hi David, The i386 test case is new - that's why this appears as a new failure. Looking at the section dumps from last time is a huge help: I can see that the relocations have been applied, they just have the wrong value. I suspect the relocation addend extraction logic - it had not been made endian-aware. I believe I've fixed this in r216567. Could you see whether this patch improves things? Thanks for all the support in debugging this one!
|
I cherry picked that, and re-ran with -debug, I don't think it looks any better, addresses are still 0x0. % /Users/fang/local/src/LLVM-svn/clang34-stage1-build/./bin/llvm-rtdyld -debug -triple=armv7s-apple-ios7.0.0 -verify -check=/Volumes/Isolde/sources/LLVM-svn/llvm.git/test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s /Volumes/Isolde/builds/LLVM/clang34-stage1-build/test/ExecutionEngine/RuntimeDyld/ARM/Output/foo.o RuntimeDyldChecker: '{4}(stub_addr(foo.o, __text, baz)) = 0xe51ff004' FAILED. RuntimeDyldChecker: '*{4}(stub_addr(foo.o, __text, baz) + 4) = baz' FAILED. % /Users/fang/local/src/LLVM-svn/clang34-stage1-build/./bin/llvm-rtdyld -debug -triple=x86_64-apple-macosx10.9 -verify -check=/Volumes/Isolde/sources/LLVM-svn/llvm.git/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s /Volumes/Isolde/builds/LLVM/clang34-stage1-build/test/ExecutionEngine/RuntimeDyld/X86/Output/test_x86-64.o Were there any other related patches besides the one you mentioned? I could always reset and re-merge instead of cherry-pick. |
Hi David, Looks like I was too slack with the format specifiers on some of the debugging output. I've fixed that in r216648.
|
-debug output again for the 3 failing test cases: % /Users/fang/local/src/LLVM-svn/clang34-stage1-build/./bin/llvm-rtdyld -debug -triple=i386-apple-macosx10.4 -verify -check=/Volumes/Isolde/sources/LLVM-svn/llvm.git/test/ExecutionEngine/RuntimeDyld/X86/MachO_i386_DynNoPIC_relocations.s /Volumes/Isolde/builds/LLVM/clang34-stage1-build/test/ExecutionEngine/RuntimeDyld/X86/Output/test_i386.o % /Users/fang/local/src/LLVM-svn/clang34-stage1-build/./bin/llvm-rtdyld -debug -triple=armv7s-apple-ios7.0.0 -verify -check=/Volumes/Isolde/sources/LLVM-svn/llvm.git/test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s /Volumes/Isolde/builds/LLVM/clang34-stage1-build/test/ExecutionEngine/RuntimeDyld/ARM/Output/foo.o RuntimeDyldChecker: '{4}(stub_addr(foo.o, __text, baz)) = 0xe51ff004' FAILED. RuntimeDyldChecker: '*{4}(stub_addr(foo.o, __text, baz) + 4) = baz' FAILED. % /Users/fang/local/src/LLVM-svn/clang34-stage1-build/./bin/llvm-rtdyld -debug -triple=x86_64-apple-macosx10.9 -verify -check=/Volumes/Isolde/sources/LLVM-svn/llvm.git/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s /Volumes/Isolde/builds/LLVM/clang34-stage1-build/test/ExecutionEngine/RuntimeDyld/X86/Output/test_x86-64.o |
I've just looked at the x86 case. The latest debugging output is a huge help there: The checking infrastructure all looks good, but the relocation value is being applied incorrectly. I tracked that to a bug in RuntimeDyldImpl::writeBytesUnaligned, which I've fixed in r217325. David - could you let me know if that helps? |
New -debug dumps: % /Users/fang/local/src/LLVM-svn/clang34-stage1-build/./bin/llvm-rtdyld -debug -triple=i386-apple-macosx10.4 -verify -check=/Volumes/Isolde/sources/LLVM-svn/llvm.git/test/ExecutionEngine/RuntimeDyld/X86/MachO_i386_DynNoPIC_relocations.s /Volumes/Isolde/builds/LLVM/clang34-stage1-build/test/ExecutionEngine/RuntimeDyld/X86/Output/test_i386.o % /Users/fang/local/src/LLVM-svn/clang34-stage1-build/./bin/llvm-rtdyld -debug -triple=armv7s-apple-ios7.0.0 -verify -check=/Volumes/Isolde/sources/LLVM-svn/llvm.git/test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s /Volumes/Isolde/builds/LLVM/clang34-stage1-build/test/ExecutionEngine/RuntimeDyld/ARM/Output/foo.o RuntimeDyldChecker: '{4}(stub_addr(foo.o, __text, baz)) = 0xe51ff004' FAILED. RuntimeDyldChecker: '*{4}(stub_addr(foo.o, __text, baz) + 4) = baz' FAILED. % /Users/fang/local/src/LLVM-svn/clang34-stage1-build/./bin/llvm-rtdyld -triple=i386-apple-macosx10.4 -verify -map-section MachO_i386_eh_frame.o,__text=0x2000 -check=/Volumes/Isolde/sources/LLVM-svn/llvm.git/test/ExecutionEngine/RuntimeDyld/X86/MachO_i386_eh_frame.s /Volumes/Isolde/builds/LLVM/clang34-stage1-build/test/ExecutionEngine/RuntimeDyld/X86/Output/MachO_i386_eh_frame.o |
So the good news is that it looks like X86-64 is now passing. Unfortunately i386 and ARM are still failing. I'll look at i386 next. |
Here's what today's failure on the x86_64 test looks like: FAIL: LLVM :: ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s (3 of 5)
|
er, I meant ARM |
Still on powerpc-darwin8, built with clang-3.4.2: FAIL: LLVM :: ExecutionEngine/RuntimeDyld/X86/MachO_i386_eh_frame.s (6486 of 11816)
|
Old build issue |
Extended Description
FAIL: LLVM :: ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s (6222 of 11280)
******************** TEST 'LLVM :: ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s' FAILED ********************
Script:
gtimeout 1m /Users/fang/local/src/LLVM-svn/clang34-stage1-build/./bin/llvm-mc -triple=armv7s-apple-ios7.0.0 -relocation-model=pic -filetype=obj -o /Volumes/Isolde/builds/LLVM/clang34-stage1-build/test/ExecutionEngine/RuntimeDyld/ARM/Output/foo.o /Volumes/Isolde/sources/LLVM-svn/llvm.git/test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s
gtimeout 1m /Users/fang/local/src/LLVM-svn/clang34-stage1-build/./bin/llvm-rtdyld -triple=armv7s-apple-ios7.0.0 -verify -check=/Volumes/Isolde/sources/LLVM-svn/llvm.git/test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s /Volumes/Isolde/builds/LLVM/clang34-stage1-build/test/ExecutionEngine/RuntimeDyld/ARM/Output/foo.o
Exit Code: 1
Command Output (stderr):
Error evaluating expression '*{4}(stub_addr(foo.o, __text, baz)) = 0xe51ff004': File 'foo.o' not found. No stubs registered.
Error evaluating expression '*{4}(stub_addr(foo.o, __text, baz) + 4) = baz': File 'foo.o' not found. No stubs registered.
Error evaluating expression 'decode_operand(insn3, 0) = stub_addr(foo.o, __text, baz) - (insn3 + 8)': Operand '0' of instruction 'insn3' is not an immediate.
Instruction is:
<MCInst #424 STRD >
/Users/fang/local/src/LLVM-svn/clang34-stage1-build/./bin/llvm-rtdyld: error: some checks in '/Volumes/Isolde/sources/LLVM-svn/llvm.git/test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s' failed
--
UNSUPPORTED: LLVM :: ExecutionEngine/fma3-jit.ll (6223 of 11280)
FAIL: LLVM :: ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s (6224 of 11280)
******************** TEST 'LLVM :: ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s' FAILED ********************
Script:
gtimeout 1m /Users/fang/local/src/LLVM-svn/clang34-stage1-build/./bin/llvm-mc -triple=x86_64-apple-macosx10.9 -relocation-model=pic -filetype=obj -o /Volumes/Isolde/builds/LLVM/clang34-stage1-build/test/ExecutionEngine/RuntimeDyld/X86/Output/foo.o /Volumes/Isolde/sources/LLVM-svn/llvm.git/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s
gtimeout 1m /Users/fang/local/src/LLVM-svn/clang34-stage1-build/./bin/llvm-rtdyld -triple=x86_64-apple-macosx10.9 -verify -check=/Volumes/Isolde/sources/LLVM-svn/llvm.git/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s /Volumes/Isolde/builds/LLVM/clang34-stage1-build/test/ExecutionEngine/RuntimeDyld/X86/Output/foo.o
Exit Code: 1
Command Output (stderr):
Expression '*{8}(stub_addr(foo.o, __text, y)) = y' is false: 0x30000000000000 != 0x3000
/Users/fang/local/src/LLVM-svn/clang34-stage1-build/./bin/llvm-rtdyld: error: some checks in '/Volumes/Isolde/sources/LLVM-svn/llvm.git/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s' failed
--
r213572: good
r214445: bad
r215366: bad
You mentioned in IRC that you suspect a matter of endian-ness. I'll be happy to test any patches for you.
The text was updated successfully, but these errors were encountered: