Skip to content

Instantly share code, notes, and snippets.

@AmosLewis
Created March 1, 2024 07:39
Show Gist options
  • Save AmosLewis/cd4a6f5bc446fdc36de5b7378a9541c5 to your computer and use it in GitHub Desktop.
Save AmosLewis/cd4a6f5bc446fdc36de5b7378a9541c5 to your computer and use it in GitHub Desktop.
(mlir_venv) ➜ torch-mlir git:(reduceprodfix) gdb --arg python -m e2e_testing.main --config=onnx --filter StdCorrectionModule_basic -v
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...
(No debugging symbols found in python)
(gdb) run
Starting program: /home/chi/src/torch-mlir/mlir_venv/bin/python -m e2e_testing.main --config=onnx --filter StdCorrectionModule_basic -v
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffdafff640 (LWP 196469)]
[New Thread 0x7fffda7fe640 (LWP 196470)]
[New Thread 0x7fffd5ffd640 (LWP 196471)]
[New Thread 0x7fffd57fc640 (LWP 196472)]
[New Thread 0x7fffd2ffb640 (LWP 196473)]
[New Thread 0x7fffce7fa640 (LWP 196474)]
[New Thread 0x7fffcbff9640 (LWP 196475)]
[New Thread 0x7fffcb7f8640 (LWP 196476)]
[New Thread 0x7fffc6ff7640 (LWP 196477)]
[New Thread 0x7fffc67f6640 (LWP 196478)]
[New Thread 0x7fffc1ff5640 (LWP 196479)]
[New Thread 0x7fffc17f4640 (LWP 196480)]
[New Thread 0x7fffbcff3640 (LWP 196481)]
[New Thread 0x7fffbc7f2640 (LWP 196482)]
[New Thread 0x7fffb7ff1640 (LWP 196483)]
[New Thread 0x7fffb77f0640 (LWP 196484)]
[New Thread 0x7fffb2fef640 (LWP 196485)]
[New Thread 0x7fffb27ee640 (LWP 196486)]
[New Thread 0x7fffaffed640 (LWP 196487)]
[New Thread 0x7fffad7ec640 (LWP 196488)]
[New Thread 0x7fffaafeb640 (LWP 196489)]
[New Thread 0x7fffa87ea640 (LWP 196490)]
[New Thread 0x7fffa5fe9640 (LWP 196491)]
[New Thread 0x7fffa17e8640 (LWP 196492)]
[New Thread 0x7fff9efe7640 (LWP 196493)]
[New Thread 0x7fff9e7e6640 (LWP 196494)]
[New Thread 0x7fff9bfe5640 (LWP 196495)]
[New Thread 0x7fff997e4640 (LWP 196496)]
[New Thread 0x7fff96fe3640 (LWP 196497)]
[New Thread 0x7fff947e2640 (LWP 196498)]
[New Thread 0x7fff8ffe1640 (LWP 196499)]
TORCH_VERSION_FOR_COMPARISON = 2.3.0.dev20240207
Compiling StdCorrectionModule_basic...
[W ReduceOps.cpp:1776] Warning: std(): degrees of freedom is <= 0. Correction should be strictly less than the reduction factor (input numel divided by output numel). (function warn_invalid_degrees_of_freedom)
python: /home/chi/src/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/UseDefLists.h:198: mlir::IRObjectWithUseList<mlir::OpOperand>::~IRObjectWithUseList() [OperandType = mlir::OpOperand]: Assertion `use_empty() && "Cannot destroy a value that still has uses!"' failed.
Thread 1 "python" received signal SIGABRT, Aborted.
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140737352548352) at ./nptl/pthread_kill.c:44
44 ./nptl/pthread_kill.c: No such file or directory.
(gdb) bt
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737352548352)
at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=6, threadid=140737352548352)
at ./nptl/pthread_kill.c:78
#2 __GI___pthread_kill (threadid=140737352548352, signo=signo@entry=6)
at ./nptl/pthread_kill.c:89
#3 0x00007ffff7c42476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0x00007ffff7c287f3 in __GI_abort () at ./stdlib/abort.c:79
#5 0x00007ffff7c2871b in __assert_fail_base (
fmt=0x7ffff7ddd130 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
assertion=0x7fff854fa7b1 "use_empty() && \"Cannot destroy a value that still has uses!\"",
file=0x7fff8546088c "/home/chi/src/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/UseDefLists.h", line=198, function=<optimized out>) at ./assert/assert.c:92
#6 0x00007ffff7c39e96 in __GI___assert_fail (
assertion=0x7fff854fa7b1 "use_empty() && \"Cannot destroy a value that still has uses!\"",
file=0x7fff8546088c "/home/chi/src/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/UseDefLists.h", line=198,
function=0x7fff854fa7ee "mlir::IRObjectWithUseList<mlir::OpOperand>::~IRObjectWithUseList() [OperandType = mlir::OpOperand]") at ./assert/assert.c:101
#7 0x00007fff7b82b7f8 in mlir::IRObjectWithUseList<mlir::OpOperand>::~IRObjectWithUseList
(this=0x78e3380)
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/UseDefLists.h:198
#8 0x00007fff7b82b785 in mlir::detail::ValueImpl::~ValueImpl (this=0x78e3380)
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/Value.h:40
#9 0x00007fff7b82b765 in mlir::detail::BlockArgumentImpl::~BlockArgumentImpl (
this=0x78e3380)
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/Value.h:289
#10 0x00007fff7b82a55c in mlir::BlockArgument::destroy (this=0x7fffffffb108)
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/Value.h:341
#11 0x00007fff7b828789 in mlir::Block::~Block (this=0x78e3330)
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/lib/IR/Block.cpp:23
#12 0x00007fff842c5bf8 in (anonymous namespace)::CreateBlockRewrite::rollback (
this=0x78e33e0)
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:281
#13 0x00007fff842a7fb8 in mlir::detail::ConversionPatternRewriterImpl::undoRewrites (
this=0x775e0a0, numRewritesToKeep=0)
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:1182
#14 0x00007fff842acdff in mlir::OperationConverter::convertOperations (
this=0x7fffffffb328, ops=...)
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:2513
#15 0x00007fff842b19e9 in mlir::applyPartialConversion (ops=..., target=...,
patterns=..., config=...)
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:3501
#16 0x00007fff842b1b1a in mlir::applyPartialConversion (op=0x754cb30, target=...,
patterns=..., config=...)
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/lib/Transforms/Utils/DialectConversion.cpp:3507
#17 0x00007fff82f124d6 in (anonymous namespace)::ConvertTorchToLinalg::runOnOperation (
this=0x783ad80)
--Type <RET> for more, q to quit, c to continue without paging--
at /home/chi/src/torch-mlir/lib/Conversion/TorchToLinalg/TorchToLinalg.cpp:87
#18 0x00007fff7b5b2b8b in mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_1::operator()() const (
this=0x7fffffffba98)
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:519
#19 0x00007fff7b5b2b25 in llvm::function_ref<void ()>::callback_fn<mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_1>(long) (callable=140737488337560)
at /home/chi/src/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45
#20 0x00007fff7b5bff39 in llvm::function_ref<void ()>::operator()() const (
this=0x7fffffffba20)
at /home/chi/src/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68
#21 0x00007fff7b5b5c45 in mlir::MLIRContext::executeAction<mlir::PassExecutionAction, mlir::Pass&>(llvm::function_ref<void ()>, llvm::ArrayRef<mlir::IRUnit>, mlir::Pass&) (
this=0x7449b30, actionFn=..., irUnits=..., args=...)
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/MLIRContext.h:275
#22 0x00007fff7b5ae2e3 in mlir::detail::OpToOpPassAdaptor::run (pass=0x783ad80,
op=0x754cb30, am=..., verifyPasses=true, parentInitGeneration=1)
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:513
#23 0x00007fff7b5ae864 in mlir::detail::OpToOpPassAdaptor::runPipeline (pm=...,
op=0x754cb30, am=..., verifyPasses=true, parentInitGeneration=1, instrumentor=0x0,
parentInfo=0x7fffffffbfe8)
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:585
#24 0x00007fff7b5af6be in mlir::detail::OpToOpPassAdaptor::runOnOperationImpl (
this=0x763c920, verifyPasses=true)
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:726
#25 0x00007fff7b5aef6d in mlir::detail::OpToOpPassAdaptor::runOnOperation (
this=0x763c920, verifyPasses=true)
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:708
#26 0x00007fff7b5b2b76 in mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_1::operator()() const (
this=0x7fffffffc188)
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:517
#27 0x00007fff7b5b2b25 in llvm::function_ref<void ()>::callback_fn<mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_1>(long) (callable=140737488339336)
at /home/chi/src/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45
#28 0x00007fff7b5bff39 in llvm::function_ref<void ()>::operator()() const (
this=0x7fffffffc110)
at /home/chi/src/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68
#29 0x00007fff7b5b5c45 in mlir::MLIRContext::executeAction<mlir::PassExecutionAction, mlir::Pass&>(llvm::function_ref<void ()>, llvm::ArrayRef<mlir::IRUnit>, mlir::Pass&) (
this=0x7449b30, actionFn=..., irUnits=..., args=...)
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/MLIRContext.h:275
#30 0x00007fff7b5ae2e3 in mlir::detail::OpToOpPassAdaptor::run (pass=0x763c920,
op=0x75be5b0, am=..., verifyPasses=true, parentInitGeneration=1)
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:513
#31 0x00007fff7b5ae864 in mlir::detail::OpToOpPassAdaptor::runPipeline (pm=...,
op=0x75be5b0, am=..., verifyPasses=true, parentInitGeneration=1, instrumentor=0x0,
parentInfo=0x0)
--Type <RET> for more, q to quit, c to continue without paging--
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:585
#32 0x00007fff7b5b02a8 in mlir::PassManager::runPasses (this=0x7772430, op=0x75be5b0,
am=...) at /home/chi/src/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:896
#33 0x00007fff7b5b01d2 in mlir::PassManager::run (this=0x7772430, op=0x75be5b0)
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:876
#34 0x00007fff7b410662 in mlirPassManagerRunOnOp (passManager=..., op=...)
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/lib/CAPI/IR/Pass.cpp:44
#35 0x00007fff8b14b322 in mlir::python::populatePassManagerSubmodule(pybind11::module_&)::$_5::operator()((anonymous namespace)::PyPassManager&, mlir::python::PyOperationBase&, bool) const (this=0x4f5ec78, passManager=..., op=..., invalidateOps=true)
at /home/chi/src/torch-mlir/externals/llvm-project/mlir/lib/Bindings/Python/Pass.cpp:127
#36 0x00007fff8b14b223 in pybind11::detail::argument_loader<(anonymous namespace)::PyPassManager&, mlir::python::PyOperationBase&, bool>::call_impl<void, mlir::python::populatePassManagerSubmodule(pybind11::module_&)::$_5&, 0ul, 1ul, 2ul, pybind11::detail::void_type>(mlir::python::populatePassManagerSubmodule(pybind11::module_&)::$_5&, std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, pybind11::detail::void_type&&) && (this=0x7fffffffcb90, f=...)
at /home/chi/src/torch-mlir/mlir_venv/lib/python3.11/site-packages/pybind11/include/pybind11/detail/../cast.h:1480
#37 0x00007fff8b14af21 in pybind11::detail::argument_loader<(anonymous namespace)::PyPassManager&, mlir::python::PyOperationBase&, bool>::call<void, pybind11::detail::void_type, mlir::python::populatePassManagerSubmodule(pybind11::module_&)::$_5&>(mlir::python::populatePassManagerSubmodule(pybind11::module_&)::$_5&) && (this=0x7fffffffcb90, f=...)
at /home/chi/src/torch-mlir/mlir_venv/lib/python3.11/site-packages/pybind11/include/pybind11/detail/../cast.h:1454
#38 0x00007fff8b14ae3d in pybind11::cpp_function::initialize<mlir::python::populatePassManagerSubmodule(pybind11::module_&)::$_5, void, (anonymous namespace)::PyPassManager&, mlir::python::PyOperationBase&, bool, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::arg, pybind11::arg_v, char [81]>(mlir::python::populatePassManagerSubmodule(pybind11::module_&)::$_5&&, void (*)((anonymous namespace)::PyPassManager&, mlir::python::PyOperationBase&, bool), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&, pybind11::arg const&, pybind11::arg_v const&, char const (&) [81])::{lambda(pybind11::detail::function_call&)#1}::operator()(pybind11::detail::function_call&) const (
this=0x7fffffffcbff, call=...)
at /home/chi/src/torch-mlir/mlir_venv/lib/python3.11/site-packages/pybind11/include/pybind11/pybind11.h:254
#39 0x00007fff8b14ad09 in pybind11::cpp_function::initialize<mlir::python::populatePassManagerSubmodule(pybind11::module_&)::$_5, void, (anonymous namespace)::PyPassManager&, mlir::python::PyOperationBase&, bool, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::arg, pybind11::arg_v, char [81]>(mlir::python::populatePassManagerSubmodule(pybind11::module_&)::$_5&&, void (*)((anonymous namespace)::PyPassManager&, mlir::python::PyOperationBase&, bool), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&, pybind11::arg const&, pybind11::arg_v const&, char const (&) [81])::{lambda(pybind11::detail::function_call&)#1}::__invoke(pybind11::detail::function_call&) (call=...)
at /home/chi/src/torch-mlir/mlir_venv/lib/python3.11/site-packages/pybind11/include/pybind11/pybind11.h:224
#40 0x00007fff8ae46703 in pybind11::cpp_function::dispatcher (self=0x7fff8ad25b90,
args_in=0x7fff73dd4400, kwargs_in=0x0)
at /home/chi/src/torch-mlir/mlir_venv/lib/python3.11/site-packages/pybind11/include/pybind11/pybind11.h:946
#41 0x0000000000554cbb in ?? ()
#42 0x000000000052edac in _PyObject_MakeTpCall ()
#43 0x000000000053cf5d in _PyEval_EvalFrameDefault ()
#44 0x00000000006129b4 in ?? ()
#45 0x0000000000612017 in PyEval_EvalCode ()
#46 0x000000000062bdb3 in ?? ()
--Type <RET> for more, q to quit, c to continue without paging--
#47 0x000000000054aa5b in ?? ()
#48 0x000000000054a945 in PyObject_Vectorcall ()
#49 0x000000000053cf5d in _PyEval_EvalFrameDefault ()
#50 0x0000000000565b53 in _PyFunction_Vectorcall ()
#51 0x000000000063dbe0 in ?? ()
#52 0x000000000063d53c in Py_RunMain ()
#53 0x000000000060339d in Py_BytesMain ()
#54 0x00007ffff7c29d90 in __libc_start_call_main (main=main@entry=0x6032f0,
argc=argc@entry=7, argv=argv@entry=0x7fffffffdc98)
at ../sysdeps/nptl/libc_start_call_main.h:58
#55 0x00007ffff7c29e40 in __libc_start_main_impl (main=0x6032f0, argc=7,
argv=0x7fffffffdc98, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7fffffffdc88) at ../csu/libc-start.c:392
#56 0x0000000000603225 in _start ()
@AmosLewis
Copy link
Author

AmosLewis commented Mar 1, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment