llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[mlir]Test-Foo-Analysis Pass triggered Assertion failure "(!NodePtr->isKnownSentinel())"

Open CelestineSmith opened this issue 3 years ago • 2 comments

MLIR built at commit https://github.com/llvm/llvm-project/commit/034bab4c Reproduced with:

mlir-opt --test-foo-analysis  temp.mlir

temp.mlir:

  func.func private @printMemrefF32(%ptr : tensor<*xf32>)

trace:

Assertion failed: (!NodePtr->isKnownSentinel()), function operatfunction: @or*, file ilist_iterator.h, line 138.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
main
0.  mlir-opt --test-foo-analysis  temp.mlir
0  mlir-opt                 0x0000000102376828 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1  mlir-opt                 0x0000000102375890 llvm::sys::RunSignalHandlers() + 112
2  mlir-opt                 0x0000000102376ec0 SignalHandler(int) + 344
3  libsystem_platform.dylib 0x00000001a56894c4 _sigtramp + 56
4  libsystem_pthread.dylib  0x00000001a5671ee0 pthread_kill + 288
5  libsystem_c.dylib        0x00000001a55ac340 abort + 168
6  libsystem_c.dylib        0x00000001a55ab754 err + 0
7  mlir-opt                 0x00000001040616e4 (anonymous namespace)::FooState* mlir::DataFlowAnalysis::getOrCreate<(anonymous namespace)::FooState, mlir::Block*>(mlir::Block*) (.cold.1) + 0
8  mlir-opt                 0x00000001036fa508 (anonymous namespace)::FooAnalysis::initialize(mlir::Operation*) + 504
9  mlir-opt                 0x0000000103965d3c mlir::DataFlowSolver::initializeAndRun(mlir::Operation*) + 352
10 mlir-opt                 0x00000001036f9ef0 (anonymous namespace)::TestFooAnalysisPass::runOnOperation() + 372
11 mlir-opt                 0x000000010398667c mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) + 428
12 mlir-opt                 0x0000000103986bac mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) + 320
13 mlir-opt                 0x000000010398ae0c std::__1::__function::__func<mlir::LogicalResult mlir::failableParallelForEach<std::__1::__wrap_iter<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*>, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_14&>(mlir::MLIRContext*, std::__1::__wrap_iter<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*>, std::__1::__wrap_iter<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*>, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_14&)::'lambda'(), std::__1::allocator<mlir::LogicalResult mlir::failableParallelForEach<std::__1::__wrap_iter<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*>, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_14&>(mlir::MLIRContext*, std::__1::__wrap_iter<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*>, std::__1::__wrap_iter<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*>, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_14&)::'lambda'()>, void ()>::operator()() + 292
14 mlir-opt                 0x00000001039abbd8 std::__1::__function::__func<llvm::ThreadPool::createTaskAndFuture(std::__1::function<void ()>)::'lambda'(), std::__1::allocator<llvm::ThreadPool::createTaskAndFuture(std::__1::function<void ()>)::'lambda'()>, void ()>::operator()() + 36
15 mlir-opt                 0x000000010235a8ac llvm::ThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) + 1160
16 mlir-opt                 0x000000010235b06c void* llvm::thread::ThreadProxy<std::__1::tuple<llvm::ThreadPool::grow(int)::$_0>>(void*) + 44
17 libsystem_pthread.dylib  0x00000001a567226c _pthread_start + 148
18 libsystem_pthread.dylib  0x00000001a566d08c thread_start + 8

CelestineSmith avatar Feb 07 '23 13:02 CelestineSmith

@llvm/issue-subscribers-mlir

llvmbot avatar Feb 07 '23 15:02 llvmbot

This issue was fixed in de58a4f (https://reviews.llvm.org/D144359).

Also, the committed test is still part of the test suite on main and everything still works as expected on current main (6fdc77e4884ba22453c0042ab6b11cf43499958d):

$ mlir-opt --test-foo-analysis temp.mlir
temp.mlir:1:2: error: expected at least one block in the region
 func.func private @printMemrefF32(%ptr : tensor<*xf32>)
 ^
temp.mlir:1:2: note: see current operation:
"func.func"() <{function_type = (tensor<*xf32>) -> (), sym_name = "printMemrefF32", sym_visibility = "private"}> ({
}) : () -> ()

Can someone with permissions close this issue?

rikhuijzer avatar May 25 '23 10:05 rikhuijzer