[llvm-bugs] [Bug 37661] New: [llvm-mca] mca::CycleSegment::Subtract(unsigned int): Assertion `End >= Cycles' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jun 2 08:40:19 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37661

            Bug ID: 37661
           Summary: [llvm-mca] mca::CycleSegment::Subtract(unsigned int):
                    Assertion `End >= Cycles' failed.
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: lebedev.ri at gmail.com
                CC: andrea.dibiagio at gmail.com, craig.topper at gmail.com,
                    llvm-bugs at lists.llvm.org, llvm-dev at redking.me.uk
        Depends on: 37643

+++ This bug was initially created as a clone of Bug #37643 +++

I don't know if this is actually a mca bug, or maybe tablegen should
have somehow handled it.
I also don't quite have a good reproducer, since this happens on
my WIP-and-broken bdver2 sched model.

If you apply the patch, and run, it will crash:
$ /build/llvm/utils/update_mca_test_checks.py --llvm-mca-binary
/build/llvm-build-Clang6-release/bin/llvm-mca X86/BdVer2/load-store-alias.s
Test: X86/BdVer2/load-store-alias.s
llvm-mca: /build/llvm/tools/llvm-mca/Instruction.h:228: void
mca::CycleSegment::Subtract(unsigned int): Assertion `End >= Cycles' failed.
Stack dump:
0.      Program arguments: /build/llvm-build-Clang6-release/bin/llvm-mca
-mtriple=x86_64-unknown-unknown -mcpu=bdver2 -iterations=100 -timeline
-timeline-max-iterations=1 -noalias=false 
#0 0x00007f100cc6d874 PrintStackTraceSignalHandler(void*)
(/build/llvm-build-Clang6-release/bin/../lib/libLLVMSupport.so.7+0x13d874)
#1 0x00007f100cc6b75e llvm::sys::RunSignalHandlers()
(/build/llvm-build-Clang6-release/bin/../lib/libLLVMSupport.so.7+0x13b75e)
#2 0x00007f100cc6da32 SignalHandler(int)
(/build/llvm-build-Clang6-release/bin/../lib/libLLVMSupport.so.7+0x13da32)
#3 0x00007f100c8d9f50 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11f50)
#4 0x00007f100bc04e7b gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x34e7b)
#5 0x00007f100bc06231 abort (/lib/x86_64-linux-gnu/libc.so.6+0x36231)
#6 0x00007f100bbfd9da (/lib/x86_64-linux-gnu/libc.so.6+0x2d9da)
#7 0x00007f100bbfda52 (/lib/x86_64-linux-gnu/libc.so.6+0x2da52)
#8 0x00000000002199dd mca::InstrBuilder::createInstrDescImpl(llvm::MCInst
const&) (/build/llvm-build-Clang6-release/bin/llvm-mca+0x2199dd)
#9 0x0000000000219d1f mca::InstrBuilder::createInstruction(llvm::MCInst const&)
(/build/llvm-build-Clang6-release/bin/llvm-mca+0x219d1f)
#10 0x0000000000216de2 mca::FetchStage::execute(mca::InstRef&)
(/build/llvm-build-Clang6-release/bin/llvm-mca+0x216de2)
#11 0x00000000002142e1 mca::Backend::runCycle(unsigned int)
(/build/llvm-build-Clang6-release/bin/llvm-mca+0x2142e1)
#12 0x00000000002141f7 mca::Backend::run()
(/build/llvm-build-Clang6-release/bin/llvm-mca+0x2141f7)
#13 0x000000000022011d main
(/build/llvm-build-Clang6-release/bin/llvm-mca+0x22011d)
#14 0x00007f100bbf1a87 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21a87)
#15 0x000000000021402a _start
(/build/llvm-build-Clang6-release/bin/llvm-mca+0x21402a)
Aborted
Traceback (most recent call last):
  File "/build/llvm/utils/update_mca_test_checks.py", line 497, in <module>
    sys.exit(main())
  File "/build/llvm/utils/update_mca_test_checks.py", line 482, in main
    block_infos = _get_block_infos(run_infos, test_path, args, common_prefix)
  File "/build/llvm/utils/update_mca_test_checks.py", line 258, in
_get_block_infos
    test_path)
  File "/build/llvm/utils/UpdateTestChecks/common.py", line 40, in invoke_tool
    shell=True, stdin=ir_file)
  File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command
'/build/llvm-build-Clang6-release/bin/llvm-mca -mtriple=x86_64-unknown-unknown
-mcpu=bdver2 -iterations=100 -timeline -timeline-max-iterations=1
-noalias=false' returned non-zero exit status 134

Somehow even if the sched model is broken (it surely is, i don't know what i'm
doing :),
it shouldn't crash, probably, i think.


Referenced Bugs:

https://bugs.llvm.org/show_bug.cgi?id=37643
[Bug 37643] [llvm-mca] crashes in ResourceManager::mustIssueImmediately()
-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180602/ee9c53bb/attachment.html>


More information about the llvm-bugs mailing list