II  did gdb --args python test_autograd.py, followed by run with output

[Thread debugging using libthread_db enabled]
Using host libthread_db library “/lib/x86_64-linux-gnu/libthread_db.so.1”.
[Detaching after fork from child process 153339]
[New Thread 0x7fff817a9700 (LWP 153353)]
*** stack smashing detected ***: terminated
Thread 1 “python” received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at …/sysdeps/unix/sysv/linux/raise.c:50
50      …/sysdeps/unix/sysv/linux/raise.c: No such file or directory.

and backtrace with output
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50                       [110/610]
#1  0x00007ffff7dc1859 in __GI_abort () at abort.c:79
#2  0x00007ffff7e2c3ee in __libc_message (action=action@entry=do_abort,
    fmt=fmt@entry=0x7ffff7f5607c "*** %s ***: terminated\n") at ../sysdeps/posix/libc_fatal.c:155
#3  0x00007ffff7eceb4a in __GI___fortify_fail (msg=msg@entry=0x7ffff7f56064 "stack smashing detected")
    at fortify_fail.c:26
#4  0x00007ffff7eceb16 in __stack_chk_fail () at stack_chk_fail.c:24
#5  0x00007fffb578f0f7 in magma_init () from /home/user/pytorch/torch/lib/libtorch_cuda.so
#6  0x00007fffb5060851 in at::cuda::detail::CUDAHooks::initCUDA() const ()
   from /home/user/pytorch/torch/lib/libtorch_cuda.so
#7  0x00007fffcafc1e10 in std::call_once<at::Context::lazyInitCUDA()::{lambda()#1}>(std::once_flag&, at::
Context::lazyInitCUDA()::{lambda()#1}&&)::{lambda()#2}::_FUN() ()
   from /home/user/pytorch/torch/lib/libtorch_python.so
#8  0x00007ffff7fa047f in __pthread_once_slow (
    once_control=0x7fffc9c8fe40 <at::globalContext()::globalContext_>,
    init_routine=0x7fffd75987ba <std::__once_proxy()>) at pthread_once.c:116
#9  0x00007fffcafc1774 in THCPModule_initExtension(_object*, _object*) ()
   from /home/user/pytorch/torch/lib/libtorch_python.so
#10 0x00005555556b97e1 in _PyMethodDef_RawFastCallKeywords (method=0x555557ca3f40, self=0x7ffff6cf44d0,
    args=0x5555587d9c00, nargs=<optimized out>, kwnames=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:632
#11 0x00005555556b9a31 in _PyCFunction_FastCallKeywords (func=0x7ffff6cf7dc0, args=<optimized out>,
    nargs=<optimized out>, kwnames=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:732
#12 0x0000555555725ebd in call_function (kwnames=0x0, oparg=0, pp_stack=<synthetic pointer>)
    at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:4568
#13 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:3093
#14 0x000055555566985b in function_code_fastcall (globals=<optimized out>, nargs=0,
    args=<optimized out>, co=0x7fff8fd3aa50)
    at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:283
#15 _PyFunction_FastCallDict (func=<optimized out>, args=0x0, nargs=0, kwargs=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:322
#16 0x00005555555c9ad0 in _PyObject_CallFunctionVa (callable=0x7fff8fc287a0, format=<optimized out>,
    va=<optimized out>, is_size_t=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:933
#17 0x00005555556c3287 in callmethod (is_size_t=0, va=0x7fffffffc710, format=0x7fffcb46aa4f "",
    callable=0x7fff8fc287a0) at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:1029
#18 PyObject_CallMethod (obj=<optimized out>, name=<optimized out>, format=0x7fffcb46aa4f "")
    at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:1048
#19 0x00007fffcaf80391 in torch::utils::cuda_lazy_init() ()
   from /home/user/pytorch/torch/lib/libtorch_python.so
#20 0x00007fffcafa8fac in torch::utils::(anonymous namespace)::internal_new_from_data(c10::TensorOptions,
 c10::ScalarType, c10::optional<c10::Device>, _object*, bool, bool, bool, bool) ()
   from /home/user/pytorch/torch/lib/libtorch_python.so
#21 0x00007fffcafadc99 in torch::utils::tensor_ctor(c10::DispatchKey, c10::ScalarType, _object*, _object*
) () from /home/user/pytorch/torch/lib/libtorch_python.so
#22 0x00007fffcabe80ab in torch::autograd::THPVariable_tensor(_object*, _object*, _object*) ()
   from /home/user/pytorch/torch/lib/libtorch_python.so
#23 0x00005555556b99b6 in _PyMethodDef_RawFastCallKeywords (method=<optimized out>, self=0x0,
    args=0x5555586b4040, nargs=<optimized out>, kwnames=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:693
#24 0x00005555556b9a31 in _PyCFunction_FastCallKeywords (func=0x7ffff6d0d780, args=<optimized out>,
    nargs=<optimized out>, kwnames=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:732
#25 0x0000555555726483 in call_function (kwnames=0x7ffff6ec2f90, oparg=<optimized out>,
    pp_stack=<synthetic pointer>) at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:4568
#26 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:3139
#27 0x0000555555668829 in _PyEval_EvalCodeWithName (_co=0x7fff89815c90, globals=<optimized out>,
    locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=0x0, kwargs=0x0,
    kwcount=0, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x0, qualname=0x0)
    at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:3930
#28 0x0000555555669714 in PyEval_EvalCodeEx (_co=<optimized out>, globals=<optimized out>,
    locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kws=<optimized out>,
    kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0)
    at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:3959
#29 0x000055555566973c in PyEval_EvalCode (co=<optimized out>, globals=<optimized out>,          [42/610]
    locals=<optimized out>) at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:524
#30 0x0000555555730e11 in builtin_exec_impl.isra.12 (locals=0x7fff898082d0, globals=0x7fff898082d0,
    source=0x7fff89815c90) at /tmp/build/80754af9/python_1598874792229/work/Python/bltinmodule.c:1079
#31 builtin_exec (module=<optimized out>, args=<optimized out>, nargs=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Python/clinic/bltinmodule.c.h:283
#32 0x000055555568a4b2 in _PyMethodDef_RawFastCallDict (method=0x5555558812e0 <builtin_methods+480>,
    self=0x7ffff7617d10, args=<optimized out>, nargs=2, kwargs=0x7fff89808a00)
    at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:530
#33 0x000055555568a5d1 in _PyCFunction_FastCallDict (func=0x7ffff761ee10, args=<optimized out>,
    nargs=<optimized out>, kwargs=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:585
#34 0x0000555555726c33 in do_call_core (kwdict=0x7fff89808a00, callargs=0x7fff8a000820,
    func=0x7ffff761ee10) at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:4641
#35 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:3191
#36 0x0000555555668829 in _PyEval_EvalCodeWithName (_co=0x7ffff75bf150, globals=<optimized out>,
    locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=0x0,
    kwargs=0x7fff8995db08, kwcount=0, kwstep=1, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0,
    name=0x7ffff75bd300, qualname=0x7ffff75bd300)
    at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:3930
#37 0x00005555556b9107 in _PyFunction_FastCallKeywords (func=<optimized out>, stack=0x7fff8995daf0,
    nargs=3, kwnames=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:433
#38 0x0000555555725b29 in call_function (kwnames=0x0, oparg=<optimized out>,
    pp_stack=<synthetic pointer>) at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:4616
#39 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:3093
#40 0x00005555556b8e7b in function_code_fastcall (globals=<optimized out>, nargs=2,
    args=<optimized out>, co=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:283
#41 _PyFunction_FastCallKeywords (func=<optimized out>, stack=0x5555585a6ed8, nargs=2,
    kwnames=<optimized out>) at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:408
#42 0x0000555555721740 in call_function (kwnames=0x0, oparg=<optimized out>,
    pp_stack=<synthetic pointer>) at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:4616
#43 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:3110
#44 0x00005555556b8e7b in function_code_fastcall (globals=<optimized out>, nargs=1,
    args=<optimized out>, co=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:283
#45 _PyFunction_FastCallKeywords (func=<optimized out>, stack=0x55555852ce40, nargs=1,
    kwnames=<optimized out>) at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:408
#46 0x00005555557214b6 in call_function (kwnames=0x0, oparg=<optimized out>,
    pp_stack=<synthetic pointer>) at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:4616
#47 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:3124
#48 0x00005555556b8e7b in function_code_fastcall (globals=<optimized out>, nargs=2,
    args=<optimized out>, co=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:283
#49 _PyFunction_FastCallKeywords (func=<optimized out>, stack=0x7fff898429e8, nargs=2,
    kwnames=<optimized out>) at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:408
#50 0x00005555557214b6 in call_function (kwnames=0x0, oparg=<optimized out>,
    pp_stack=<synthetic pointer>) at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:4616
#51 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:3124
#52 0x000055555566985b in function_code_fastcall (globals=<optimized out>, nargs=2,
    args=<optimized out>, co=0x7ffff75c5930)
    at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:283
#53 _PyFunction_FastCallDict (func=<optimized out>, args=0x7fffffffd7e0, nargs=2,
    kwargs=<optimized out>) at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:322
#54 0x00005555556887ce in object_vacall (callable=0x7ffff75d1a70, vargs=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:1200
#55 0x00005555556e276d in _PyObject_CallMethodIdObjArgs (obj=<optimized out>, name=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:1250
#56 0x0000555555671fdc in import_find_and_load (abs_name=0x7ffff74b6c90)
    at /tmp/build/80754af9/python_1598874792229/work/Python/import.c:1652
#57 PyImport_ImportModuleLevelObject (name=0x7ffff74b6c90, globals=<optimized out>,
--Type <RET> for more, q to quit, c to continue without paging--
    locals=<optimized out>, fromlist=0x7ffff5df4e90, level=0)
    at /tmp/build/80754af9/python_1598874792229/work/Python/import.c:1764
#58 0x0000555555724479 in import_name (level=0x5555558be2e0 <small_ints+160>, fromlist=0x7ffff5df4e90,
    name=0x7ffff74b6c90, f=0x555555967280)
    at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:4770
#59 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:2600
#60 0x0000555555668829 in _PyEval_EvalCodeWithName (_co=0x7ffff73eb420, globals=<optimized out>,
    locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=0x0, kwargs=0x0,
    kwcount=0, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x0, qualname=0x0)
    at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:3930
#61 0x0000555555669714 in PyEval_EvalCodeEx (_co=<optimized out>, globals=<optimized out>,
    locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kws=<optimized out>,
    kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0)
    at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:3959
#62 0x000055555566973c in PyEval_EvalCode (co=<optimized out>, globals=<optimized out>,
    locals=<optimized out>) at /tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:524
#63 0x0000555555780f14 in run_mod (mod=<optimized out>, filename=<optimized out>,
    globals=0x7ffff7597be0, locals=0x7ffff7597be0, flags=<optimized out>, arena=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Python/pythonrun.c:1035
#64 0x000055555578b331 in PyRun_FileExFlags (fp=0x5555558c4180, filename_str=<optimized out>,
    start=<optimized out>, globals=0x7ffff7597be0, locals=0x7ffff7597be0, closeit=1,
    flags=0x7fffffffdd10) at /tmp/build/80754af9/python_1598874792229/work/Python/pythonrun.c:988
#65 0x000055555578b523 in PyRun_SimpleFileExFlags (fp=0x5555558c4180, filename=<optimized out>,
    closeit=1, flags=0x7fffffffdd10)
    at /tmp/build/80754af9/python_1598874792229/work/Python/pythonrun.c:429
#66 0x000055555578c655 in pymain_run_file (p_cf=0x7fffffffdd10,
    filename=0x5555558c3900 L"test_autograd.py", fp=0x5555558c4180)
    at /tmp/build/80754af9/python_1598874792229/work/Modules/main.c:462
#67 pymain_run_filename (cf=0x7fffffffdd10, pymain=0x7fffffffde20)
    at /tmp/build/80754af9/python_1598874792229/work/Modules/main.c:1652
#68 pymain_run_python (pymain=0x7fffffffde20)
    at /tmp/build/80754af9/python_1598874792229/work/Modules/main.c:2913
#69 pymain_main (pymain=0x7fffffffde20)
    at /tmp/build/80754af9/python_1598874792229/work/Modules/main.c:3460
#70 0x000055555578c77c in _Py_UnixMain (argc=<optimized out>, argv=<optimized out>)
    at /tmp/build/80754af9/python_1598874792229/work/Modules/main.c:3495
#71 0x00007ffff7dc30b3 in __libc_start_main (main=0x555555649c90 <main>, argc=2, argv=0x7fffffffdf88,
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdf78)
    at ../csu/libc-start.c:308
#72 0x0000555555730ff0 in _start () at ../sysdeps/x86_64/elf/start.S:103

I don’t know how to interpret this output though.
I also uploaded the outputs of ldd build/lib/* here 1 and of torch/lib/* here 2. What am I supposed to look for?