<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/128344>128344</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[MLIR]`--mlir-pass-pipeline-local-reproducer --mlir-pass-pipeline-crash-reproducer=%t` triggers LLVM ERROR: Local crash reproduction can't be setup on a pass-manager without disabling multi-threading first
</td>
</tr>
<tr>
<th>Labels</th>
<td>
mlir
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
xisang0
</td>
</tr>
</table>
<pre>
Test on commit: https://github.com/llvm/llvm-project/commit/1d070988d9172965dee227e5629fa886845b815f
steps to reproduce:
```
mlir-opt test.mlir --mlir-pass-pipeline-local-reproducer --mlir-pass-pipeline-crash-reproducer=%t
```
test case:
```
module {
}
```
crash trace:
```
LLVM ERROR: Local crash reproduction can't be setup on a pass-manager without disabling multi-threading first.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: ./mlir-opt /home/workdir/test.mlir --mlir-pass-pipeline-local-reproducer --mlir-pass-pipeline-crash-reproducer=%t
#0 0x0000652425b022b8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (./mlir-opt+0x10b62b8)
#1 0x0000652425affdde llvm::sys::RunSignalHandlers() (./mlir-opt+0x10b3dde)
#2 0x0000652425b02cc8 SignalHandler(int) Signals.cpp:0:0
#3 0x000072d05a342520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x000072d05a3969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#5 0x000072d05a342476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#6 0x000072d05a3287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#7 0x0000652425b222bc llvm::report_fatal_error(llvm::Twine const&, bool) (./mlir-opt+0x10d62bc)
#8 0x0000652425b22106 (./mlir-opt+0x10d6106)
#9 0x0000652428f029d6 (./mlir-opt+0x44b69d6)
#10 0x0000652428f028a6 mlir::PassManager::enableCrashReproducerGeneration(llvm::StringRef, bool) (./mlir-opt+0x44b68a6)
#11 0x0000652428f047b3 mlir::applyPassManagerCLOptions(mlir::PassManager&) (./mlir-opt+0x44b87b3)
#12 0x0000652428ef4033 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#13 0x0000652428ef3d03 llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#14 0x0000652428f9d465 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (./mlir-opt+0x4551465)
#15 0x0000652428eed962 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (./mlir-opt+0x44a1962)
#16 0x0000652428eedc13 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (./mlir-opt+0x44a1c13)
#17 0x0000652428eede22 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (./mlir-opt+0x44a1e22)
#18 0x0000652425ae14d7 main (./mlir-opt+0x10954d7)
#19 0x000072d05a329d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#20 0x000072d05a329e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#21 0x0000652425ae1045 _start (./mlir-opt+0x1095045)
Aborted (core dumped)
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzcWF1v47gV_TX0C2GDuqK-HvzgceK2QIIZeAZ9NSjxSmaHElWS2kn-fUHZiWWvnakXmC26gYPEJO-559wPipRwTjUd4pIkn0jyMBOD3xu7fFFOdA2blUa-Lr-h89R0tDJtqzyJV3Tvfe9IvCKwIbBplN8P5aIyLYGN1r-9_Zn31vwLK09gczSFTSRZxoo8l0WUQZEmEhEgwySFohZ5nuY8KfMoqQlbOY-9o95Qi701cqgweGQrkrLjh61arezc9J56dH4RvtH5fBzshXPzXvWoVYdzbSqh5-9AN1ZVVrj9ZBWJHwgk_sJncEUr4a7RMXLQSEn2KUywFckeLlaMLqi34pqap6d_PtPH7fbzNgT5KXCmB4M3Tl6FPIiOQOZpidShH_qQG0FHKa3oRIOW_lB-bwZPpXKi1KpraDtor-Z-b1HI8L1W1vkFYasvT4-rr4_UDWWrPBW0HJrgzlgfYn93ppVzAzoCGyo6SVVX6UEi9Xs8KilF9X2UH3x_9aL6TuXQ9odgsAUdf75Y01jRUmGbocXOBwZ0QWDznm8Cm71pkcDmh7HfpbIENr-4BiiBmFH2whhjaQIckpIBlDkdAxGvSLxyr-7wzxerOj-q-zamGvLTIit-7IzzFkVLICWwpqrzBApKIJ9qJPCJvUSsTKHMCRRHBtEZA1HXUuI1Btuh-6qaTui_i05qtI5A_oGTWEo8OYFLmVWV0zM4AvmR9WHYLao-JJGNvweU-IiSgWSJiDkkwOhIY6NVSWDzkqe7lM-16oaXedMNh4lq4cwiHYmNJida_BywSIu6ov2hpnffldb3oY_2J_Tkki7PUtq4Ud69tHmWnoDTc2DIszqmogwddhfsaHiCzc6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