hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

Instruction operand type check failure

Open HRMsimon opened this issue 12 years ago • 2 comments

Code:

<?hh

while ($line = fgets(STDIN)) {
    $line = trim($line);
    $parts = explode(' ', $line);
    $total = count($parts);
    $file = $parts[$total - 4];
    $line = $parts[$total - 1];
    $type = $parts[2];

    echo "$type $file - $line\n";
}

Command: hhvm notice.hh < /var/log/hhvm/error.log (the error log is almost entirely E_NOTICE from undefined index/variable, no headers)

Output:

Error: failed type check on operand 0
   instruction: (369) t148:Str = ConcatStrStr t146:Cell, " " -> B120<Catch>
   was expecting: Str
   received: Cell

/tmp/tmp.i5Wfw9qjJv/hphp/runtime/vm/jit/type.cpp:977: HPHP::JIT::assertOperandTypes(const HPHP::JIT::IRInstruction*)::__lambda79: assertion `false && "instruction operand type check failure"' failed.

The echo also gets called once.

Stack trace:

Host: ee-hhvm
ProcessID: 24111
ThreadID: 7ff660032440
ThreadPID: 24111
Name: /usr/bin/hhvm
Type: Aborted
Runtime: hhvm
Version: heads/master-0-g2b3a39b124a1a364a983f935e5bc1803f619a66d
DebuggerCount: 0

Failed Assertion: /tmp/tmp.i5Wfw9qjJv/hphp/runtime/vm/jit/type.cpp:977: HPHP::JIT::assertOperandTypes(const HPHP::JIT::IRInstruction*)::__lambda79: assertion `false && "instruction operand type check failure"' failed.
Arguments: notice.hh
ThreadType: CLI

#0  ?? at hhvm:0
#1  raise at /lib/x86_64-linux-gnu/libc.so.6:0
#2  abort at /lib/x86_64-linux-gnu/libc.so.6:0
#3  HPHP::assert_fail(char const*, char const*, unsigned int, char const*) at hhvm:0
#4  ?? at hhvm:0
#5  ?? at hhvm:0
#6  HPHP::JIT::assertOperandTypes(HPHP::JIT::IRInstruction const*) at hhvm:0
#7  HPHP::JIT::retypeDests(HPHP::JIT::IRInstruction*) at hhvm:0
#8  HPHP::JIT::relaxGuards(HPHP::JIT::IRUnit&, HPHP::JIT::GuardConstraints const&, HPHP::JIT::RelaxGuardsFlags) at hhvm:0
#9  HPHP::JIT::optimize(HPHP::JIT::IRUnit&, HPHP::JIT::IRBuilder&, HPHP::JIT::TransKind) at hhvm:0
#10 HPHP::JIT::MCGenerator::traceCodeGen() at hhvm:0
#11 HPHP::JIT::translatorTraceCodeGen() at hhvm:0
#12 HPHP::JIT::Translator::translateRegion(HPHP::JIT::RegionDesc const&, bool, HPHP::hphp_hash_set<HPHP::JIT::ProfSrcKey, HPHP::JIT::ProfSrcKey::Hasher, std::equal_to<HPHP::JIT::ProfSrcKey> >&, HPHP::JIT::TransFlags) at hhvm:0
#13 HPHP::JIT::MCGenerator::translateWork(HPHP::JIT::TranslArgs const&) at hhvm:0
#14 HPHP::JIT::MCGenerator::translate(HPHP::JIT::TranslArgs const&) at hhvm:0
#15 HPHP::JIT::MCGenerator::retranslateOpt(unsigned int, bool) at hhvm:0
#16 HPHP::JIT::MCGenerator::handleServiceRequest(HPHP::JIT::TReqInfo&, unsigned char*&, HPHP::SrcKey&) at hhvm:0
#17 HPHP::JIT::MCGenerator::enterTC(unsigned char*, void*) at hhvm:0
#18 HPHP::JIT::MCGenerator::enterTCAfterPrologue(unsigned char*) at hhvm:0
#19 HPHP::ExecutionContext::enterVMAtFunc(HPHP::ActRec*, HPHP::ExecutionContext::StackArgsState) at hhvm:0
#20 HPHP::ExecutionContext::enterVM(HPHP::ActRec*, HPHP::ExecutionContext::StackArgsState, HPHP::Resumable*, HPHP::ObjectData*) at hhvm:0
#21 HPHP::ExecutionContext::invokeFunc(HPHP::TypedValue*, HPHP::Func const*, HPHP::Variant const&, HPHP::ObjectData*, HPHP::Class*, HPHP::VarEnv*, HPHP::StringData*, HPHP::ExecutionContext::InvokeFlags) at hhvm:0
#22 HPHP::ExecutionContext::invokeUnit(HPHP::TypedValue*, HPHP::Unit const*) at hhvm:0
#23 ?? at hhvm:0
#24 ?? at hhvm:0
#25 HPHP::include_impl_invoke(HPHP::String const&, bool, char const*) at hhvm:0
#26 HPHP::hphp_invoke(HPHP::ExecutionContext*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, HPHP::Array const&, HPHP::VRefParamValue const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool, bool, bool) at hhvm:0
#27 HPHP::hphp_invoke_simple(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) at hhvm:0
#28 ?? at hhvm:0
#29 HPHP::execute_program(int, char**) at hhvm:0
#30 main at hhvm:0
#31 __libc_start_main at /lib/x86_64-linux-gnu/libc.so.6:0
#32 ?? at hhvm:0

PHP Stacktrace:

HRMsimon avatar Jul 07 '14 23:07 HRMsimon

This is a recent failure. The exact same code was working fine late last week on heads/master-0-g19fdaea2c72674ac5bebddce70bb46a48cfdab37

HRMsimon avatar Jul 07 '14 23:07 HRMsimon

Should be fixed in f383cad7b75ce7e3f8c42f519873a5a556e09e42

paulbiss avatar Sep 09 '14 03:09 paulbiss