Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

空指针 (Null pointer) #49922

Closed
Ligoml opened this issue Jan 18, 2023 · 24 comments
Closed

空指针 (Null pointer) #49922

Ligoml opened this issue Jan 18, 2023 · 24 comments
Assignees

Comments

@Ligoml
Copy link
Contributor

Ligoml commented Jan 18, 2023

Case1: paddle.metric.accuracy

Reproduced Case:

import paddle
import numpy as np
array = np.array([], dtype=np.float32)
x = paddle.to_tensor(np.reshape(array, [0]), dtype='float32')
y = paddle.to_tensor([0, 0, 0, 0], dtype='int64')
paddle.metric.accuracy(input=x, label=y)

Stack Trace Message:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==1843==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fd12145b332 bp 0x7ffff8650290 sp 0x7ffff8650040 T0)
==1843==The signal is caused by a READ memory access.
==1843==Hint: address points to the zero page.
    #0 0x7fd12145b332 in void phi::FullTopK<float, long>(long, long, int, phi::DenseTensor const*, float*, long*, int const&, bool const&, bool const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/cpu/top_k_kernel.cc:117:37
    #1 0x7fd121453b49 in void phi::TopkKernel<float, phi::CPUContext>(phi::CPUContext const&, phi::DenseTensor const&, paddle::experimental::ScalarBase<phi::DenseTensor> const&, int, bool, bool, phi::DenseTensor*, phi::DenseTensor*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/cpu/top_k_kernel.cc:157:5
    #2 0x7fd1206174c4 in paddle::experimental::topk(paddle::experimental::Tensor const&, paddle::experimental::ScalarBase<paddle::experimental::Tensor> const&, int, bool, bool) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/api/lib/api.cc:24861:5
    #3 0x7fd114595cda in topk_ad_func(paddle::experimental::Tensor const&, paddle::experimental::ScalarBase<paddle::experimental::Tensor>, int, bool, bool) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/eager/api/generated/eager_generated/forwards/dygraph_functions.cc:40664:21
    #4 0x7fd110905dde in paddle::pybind::eager_api_topk(_object*, _object*, _object*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/pybind/eager_op_function.cc:17940:61
    #5 0x5025f3 in PyCFunction_Call (/usr/bin/python3.8+0x5025f3)
    #6 0x500db4 in _PyObject_MakeTpCall (/usr/bin/python3.8+0x500db4)
    #7 0x566223 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x566223)
    #8 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #9 0x5016c5 in _PyFunction_Vectorcall (/usr/bin/python3.8+0x5016c5)
    #10 0x5610ed in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x5610ed)
    #11 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #12 0x5016c5 in _PyFunction_Vectorcall (/usr/bin/python3.8+0x5016c5)
    #13 0x5610ed in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x5610ed)
    #14 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #15 0x55f102 in PyEval_EvalCode (/usr/bin/python3.8+0x55f102)
    #16 0x62a1ef  (/usr/bin/python3.8+0x62a1ef)
    #17 0x62a179  (/usr/bin/python3.8+0x62a179)
    #18 0x47a7f2  (/usr/bin/python3.8+0x47a7f2)
    #19 0x47a5cb in PyRun_SimpleFileExFlags (/usr/bin/python3.8+0x47a5cb)
    #20 0x4247dc in _init (/usr/bin/python3.8+0x4247dc)
    #21 0x5fb9b8 in Py_BytesMain (/usr/bin/python3.8+0x5fb9b8)
    #22 0x7fd1d7bd083f in __libc_start_main /build/glibc-S7Ft5T/glibc-2.23/csu/../csu/libc-start.c:291
    #23 0x5fb8b8 in _start (/usr/bin/python3.8+0x5fb8b8)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/cpu/top_k_kernel.cc:117:37 in void phi::FullTopK<float, long>(long, long, int, phi::DenseTensor const*, float*, long*, int const&, bool const&, bool const&)
==1843==ABORTING
@Ligoml Ligoml self-assigned this Jan 18, 2023
@PaddlePaddle PaddlePaddle deleted a comment from paddle-bot bot Jan 18, 2023
@Ligoml
Copy link
Contributor Author

Ligoml commented Jan 18, 2023

Case2: paddle.linalg.lu_unpack

Reproduced Case:

import paddle
import numpy as np
array = np.array([], dtype=np.float32)
x = paddle.to_tensor(np.reshape(array, [0, 1, 1]), dtype='float32')
paddle.linalg.lu_unpack(x, x)

Stack Trace Message:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==157632==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f10be7f5027 bp 0x7ffc205afdb0 sp 0x7ffc205af920 T0)
==157632==The signal is caused by a WRITE memory access.
==157632==Hint: address points to the zero page.
    #0 0x7f10be7f5027 in phi::OneFunctor<float>::operator()(unsigned long) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/impl/lu_kernel_impl.h:411:45
    #1 0x7f10be7f5027 in void phi::funcs::ForRange<phi::CPUContext>::operator()<phi::OneFunctor<float> >(phi::OneFunctor<float>) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/funcs/for_range.h:37:7
    #2 0x7f10be7f5027 in void phi::LU_Unpack<phi::CPUContext, float>(phi::CPUContext const&, phi::DenseTensor const*, phi::DenseTensor*, phi::DenseTensor*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/impl/lu_kernel_impl.h:456:3
    #3 0x7f10be7f3df2 in void phi::LUUnpackKernel<float, phi::CPUContext>(phi::CPUContext const&, phi::DenseTensor const&, phi::DenseTensor const&, bool, bool, phi::DenseTensor*, phi::DenseTensor*, phi::DenseTensor*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/impl/lu_unpack_kernel_impl.h:41:5
    #4 0x7f10baa6cd0f in paddle::experimental::lu_unpack(paddle::experimental::Tensor const&, paddle::experimental::Tensor const&, bool, bool) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/api/lib/api.cc:16815:5
    #5 0x7f10ae89f5b5 in lu_unpack_ad_func(paddle::experimental::Tensor const&, paddle::experimental::Tensor const&, bool, bool) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/eager/api/generated/eager_generated/forwards/dygraph_functions.cc:27888:21
    #6 0x7f10aad71402 in paddle::pybind::eager_api_lu_unpack(_object*, _object*, _object*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/pybind/eager_op_function.cc:12176:74
    #7 0x5025f3 in PyCFunction_Call (/usr/bin/python3.8+0x5025f3)
    #8 0x500db4 in _PyObject_MakeTpCall (/usr/bin/python3.8+0x500db4)
    #9 0x566223 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x566223)
    #10 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #11 0x5016c5 in _PyFunction_Vectorcall (/usr/bin/python3.8+0x5016c5)
    #12 0x564f2d in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x564f2d)
    #13 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #14 0x55f102 in PyEval_EvalCode (/usr/bin/python3.8+0x55f102)
    #15 0x62a1ef  (/usr/bin/python3.8+0x62a1ef)
    #16 0x62a179  (/usr/bin/python3.8+0x62a179)
    #17 0x47a7f2  (/usr/bin/python3.8+0x47a7f2)
    #18 0x47a5cb in PyRun_SimpleFileExFlags (/usr/bin/python3.8+0x47a5cb)
    #19 0x4247dc in _init (/usr/bin/python3.8+0x4247dc)
    #20 0x5fb9b8 in Py_BytesMain (/usr/bin/python3.8+0x5fb9b8)
    #21 0x7f117215f83f in __libc_start_main /build/glibc-S7Ft5T/glibc-2.23/csu/../csu/libc-start.c:291
    #22 0x5fb8b8 in _start (/usr/bin/python3.8+0x5fb8b8)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/impl/lu_kernel_impl.h:411:45 in phi::OneFunctor<float>::operator()(unsigned long) const
==157632==ABORTING

@Ligoml
Copy link
Contributor Author

Ligoml commented Jan 18, 2023

Case3: paddle.linalg.matrix_power

Reproduced Case:

import paddle
import numpy as np
array = np.array([], dtype=np.float32)
x = paddle.to_tensor(np.reshape(array, [0, 0]), dtype='float32')
paddle.linalg.matrix_power(x, n=-956301312)

Stack Trace Message:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==168439==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f09f01206fc bp 0x7ffe7dc16b70 sp 0x7ffe7dc16620 T0)
==168439==The signal is caused by a READ memory access.
==168439==Hint: address points to the zero page.
    #0 0x7f09f01206fc in float Eigen::internal::redux_impl<Eigen::internal::scalar_min_op<float, float, 0>, Eigen::internal::redux_evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_abs_op<float>, Eigen::Diagonal<Eigen::Matrix<float, -1, -1, 1, -1, -1> const, 0> const> >, 0, 0>::run<Eigen::CwiseUnaryOp<Eigen::internal::scalar_abs_op<float>, Eigen::Diagonal<Eigen::Matrix<float, -1, -1, 1, -1, -1> const, 0> const> >(Eigen::internal::redux_evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_abs_op<float>, Eigen::Diagonal<Eigen::Matrix<float, -1, -1, 1, -1, -1> const, 0> const> > const&, Eigen::internal::scalar_min_op<float, float, 0> const&, Eigen::CwiseUnaryOp<Eigen::internal::scalar_abs_op<float>, Eigen::Diagonal<Eigen::Matrix<float, -1, -1, 1, -1, -1> const, 0> const> const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/Eigen/src/Core/CoreEvaluators.h
    #1 0x7f09f01206fc in float Eigen::DenseBase<Eigen::CwiseUnaryOp<Eigen::internal::scalar_abs_op<float>, Eigen::Diagonal<Eigen::Matrix<float, -1, -1, 1, -1, -1> const, 0> const> >::redux<Eigen::internal::scalar_min_op<float, float, 0> >(Eigen::internal::scalar_min_op<float, float, 0> const&) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/Eigen/src/Core/Redux.h:418:10
    #2 0x7f09f01206fc in float Eigen::DenseBase<Eigen::CwiseUnaryOp<Eigen::internal::scalar_abs_op<float>, Eigen::Diagonal<Eigen::Matrix<float, -1, -1, 1, -1, -1> const, 0> const> >::minCoeff<0>() const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/Eigen/src/Core/Redux.h:433:20
    #3 0x7f09f01206fc in Eigen::DenseBase<Eigen::CwiseUnaryOp<Eigen::internal::scalar_abs_op<float>, Eigen::Diagonal<Eigen::Matrix<float, -1, -1, 1, -1, -1> const, 0> const> >::minCoeff() const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/Eigen/src/Core/DenseBase.h:463:14
    #4 0x7f09f01206fc in void phi::funcs::ComputeInverseEigen<phi::CPUContext, float>(phi::CPUContext const&, phi::DenseTensor const&, phi::DenseTensor*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/funcs/matrix_inverse.h:50:65
    #5 0x7f09ecab97e5 in void phi::MatrixPowerFunction<phi::CPUContext, float>(phi::DenseTensor const*, int, phi::DenseTensor*, phi::CPUContext const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/impl/matrix_power_kernel_impl.h:68:5
    #6 0x7f09ecab8598 in void phi::MatrixPowerKernel<float, phi::CPUContext>(phi::CPUContext const&, phi::DenseTensor const&, int, phi::DenseTensor*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/impl/matrix_power_kernel_impl.h:200:3
    #7 0x7f09e8e6bff1 in paddle::experimental::matrix_power(paddle::experimental::Tensor const&, int) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/api/lib/api.cc:17177:5
    #8 0x7f09dccb6f3d in matrix_power_ad_func(paddle::experimental::Tensor const&, int) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/eager/api/generated/eager_generated/forwards/dygraph_functions.cc:28564:21
    #9 0x7f09d91722d9 in paddle::pybind::eager_api_matrix_power(_object*, _object*, _object*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/pybind/eager_op_function.cc:12463:49
    #10 0x5025f3 in PyCFunction_Call (/usr/bin/python3.8+0x5025f3)
    #11 0x500db4 in _PyObject_MakeTpCall (/usr/bin/python3.8+0x500db4)
    #12 0x566223 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x566223)
    #13 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #14 0x5016c5 in _PyFunction_Vectorcall (/usr/bin/python3.8+0x5016c5)
    #15 0x5610ed in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x5610ed)
    #16 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #17 0x55f102 in PyEval_EvalCode (/usr/bin/python3.8+0x55f102)
    #18 0x62a1ef  (/usr/bin/python3.8+0x62a1ef)
    #19 0x62a179  (/usr/bin/python3.8+0x62a179)
    #20 0x47a7f2  (/usr/bin/python3.8+0x47a7f2)
    #21 0x47a5cb in PyRun_SimpleFileExFlags (/usr/bin/python3.8+0x47a5cb)
    #22 0x4247dc in _init (/usr/bin/python3.8+0x4247dc)
    #23 0x5fb9b8 in Py_BytesMain (/usr/bin/python3.8+0x5fb9b8)
    #24 0x7f0aa055083f in __libc_start_main /build/glibc-S7Ft5T/glibc-2.23/csu/../csu/libc-start.c:291
    #25 0x5fb8b8 in _start (/usr/bin/python3.8+0x5fb8b8)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/Eigen/src/Core/CoreEvaluators.h in float Eigen::internal::redux_impl<Eigen::internal::scalar_min_op<float, float, 0>, Eigen::internal::redux_evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_abs_op<float>, Eigen::Diagonal<Eigen::Matrix<float, -1, -1, 1, -1, -1> const, 0> const> >, 0, 0>::run<Eigen::CwiseUnaryOp<Eigen::internal::scalar_abs_op<float>, Eigen::Diagonal<Eigen::Matrix<float, -1, -1, 1, -1, -1> const, 0> const> >(Eigen::internal::redux_evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_abs_op<float>, Eigen::Diagonal<Eigen::Matrix<float, -1, -1, 1, -1, -1> const, 0> const> > const&, Eigen::internal::scalar_min_op<float, float, 0> const&, Eigen::CwiseUnaryOp<Eigen::internal::scalar_abs_op<float>, Eigen::Diagonal<Eigen::Matrix<float, -1, -1, 1, -1, -1> const, 0> const> const&)
==168439==ABORTING

@Ligoml
Copy link
Contributor Author

Ligoml commented Jan 18, 2023

Case4: paddle.incubate.graph_khop_sampler

Reproduced Case:

import paddle
import numpy as np
array = np.array([], dtype=np.float32)
x = paddle.to_tensor(np.reshape(array, [0]), dtype='int32')
y = paddle.to_tensor([10], dtype='int32')
layer = paddle.incubate.graph_khop_sampler(row=x, colptr=x, input_nodes=y, sample_sizes=[0])

Stack Trace Message:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==45956==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000028 (pc 0x7f88bd8c2ccf bp 0x7ffd8e124240 sp 0x7ffd8e123d60 T0)
==45956==The signal is caused by a READ memory access.
==45956==Hint: address points to the zero page.
    #0 0x7f88bd8c2ccf in void paddle::operators::SampleNeighbors<int>(int const*, int const*, int const*, std::vector<int, std::allocator<int> >*, std::vector<int, std::allocator<int> >*, std::vector<int, std::allocator<int> >*, std::vector<int, std::allocator<int> >*, int, bool, bool, bool) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/operators/graph_khop_sampler_op.h:99:15
    #1 0x7f88bd8ba995 in paddle::operators::GraphKhopSamplerOpKernel<phi::CPUContext, int>::Compute(paddle::framework::ExecutionContext const&) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/operators/graph_khop_sampler_op.h:272:9
    #2 0x7f88bd8b9096 in paddle::framework::OpKernelRegistrarFunctor<phi::CPUPlace, false, 0ul, paddle::operators::GraphKhopSamplerOpKernel<phi::CPUContext, int>, paddle::operators::GraphKhopSamplerOpKernel<phi::CPUContext, long> >::operator()(char const*, char const*, int) const::'lambda'(paddle::framework::ExecutionContext const&)::operator()(paddle::framework::ExecutionContext const&) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/framework/op_registry.h:208:25
    #3 0x7f88bd8b9096 in std::_Function_handler<void (paddle::framework::ExecutionContext const&), paddle::framework::OpKernelRegistrarFunctor<phi::CPUPlace, false, 0ul, paddle::operators::GraphKhopSamplerOpKernel<phi::CPUContext, int>, paddle::operators::GraphKhopSamplerOpKernel<phi::CPUContext, long> >::operator()(char const*, char const*, int) const::'lambda'(paddle::framework::ExecutionContext const&)>::_M_invoke(std::_Any_data const&, paddle::framework::ExecutionContext const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h:297:2
    #4 0x7f88c3c8fe37 in std::function<void (paddle::framework::ExecutionContext const&)>::operator()(paddle::framework::ExecutionContext const&) const /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h:687:14
    #5 0x7f88c3c8fe37 in void paddle::imperative::PreparedOpRunImpl<egr::EagerVariable>(paddle::framework::OperatorBase const&, paddle::framework::RuntimeContext const&, paddle::framework::OpKernelType const&, std::function<void (paddle::framework::ExecutionContext const&)> const&, std::function<phi::KernelSignature (phi::ArgumentMappingContext const&)> const*, phi::KernelSignature const*, phi::DeviceContext*, paddle::imperative::details::NameVarMapTrait<egr::EagerVariable>::Type const&, paddle::imperative::details::NameVarMapTrait<egr::EagerVariable>::Type const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > > const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/imperative/prepared_operator.cc:612:5
    #6 0x7f88c3c8fe37 in paddle::imperative::PreparedOp::Run(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > > > > > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > > > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > > const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/imperative/prepared_operator.cc:796:5
    #7 0x7f88b76c47f8 in void paddle::imperative::OpBaseRunImpl<egr::EagerVariable>(paddle::framework::OperatorBase const&, paddle::imperative::details::NameVarMapTrait<egr::EagerVariable>::Type const&, paddle::imperative::details::NameVarMapTrait<egr::EagerVariable>::Type const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > > const&, phi::Place const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/imperative/layer.cc:525:17
    #8 0x7f88b76c47f8 in paddle::imperative::OpBase::Run(paddle::framework::OperatorBase const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > > > > > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > > > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > > const&, phi::Place const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/imperative/layer.cc:560:3
    #9 0x7f88b7719d56 in void paddle::imperative::Tracer::TraceOpImpl<egr::EagerVariable>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, paddle::imperative::details::NameVarMapTrait<egr::EagerVariable>::Type const&, paddle::imperative::details::NameVarMapTrait<egr::EagerVariable>::Type const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > >&, phi::Place const&, bool, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > >*, bool) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/imperative/tracer.cc:340:7
    #10 0x7f88b7722627 in paddle::imperative::Tracer::TraceOp(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > > > > > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > > > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > >&, phi::Place const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > >*, bool, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/imperative/tracer.cc:432:3
    #11 0x7f88b98151dd in graph_khop_sampler_dygraph_function(paddle::experimental::Tensor const&, paddle::experimental::Tensor const&, paddle::experimental::Tensor const&, paddle::experimental::Tensor const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > > const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/eager/api/generated/fluid_generated/forwards/dygraph_forward_functions4.cc:42:51
    #12 0x7f88b4baf1df in paddle::pybind::eager_legacy_api_graph_khop_sampler(_object*, _object*, _object*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/pybind/eager_legacy_op_function.cc:5318:16
    #13 0x5025f3 in PyCFunction_Call (/usr/bin/python3.8+0x5025f3)
    #14 0x500db4 in _PyObject_MakeTpCall (/usr/bin/python3.8+0x500db4)
    #15 0x566223 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x566223)
    #16 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #17 0x5016c5 in _PyFunction_Vectorcall (/usr/bin/python3.8+0x5016c5)
    #18 0x5610ed in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x5610ed)
    #19 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #20 0x55f102 in PyEval_EvalCode (/usr/bin/python3.8+0x55f102)
    #21 0x62a1ef  (/usr/bin/python3.8+0x62a1ef)
    #22 0x62a179  (/usr/bin/python3.8+0x62a179)
    #23 0x47a7f2  (/usr/bin/python3.8+0x47a7f2)
    #24 0x47a5cb in PyRun_SimpleFileExFlags (/usr/bin/python3.8+0x47a5cb)
    #25 0x4247dc in _init (/usr/bin/python3.8+0x4247dc)
    #26 0x5fb9b8 in Py_BytesMain (/usr/bin/python3.8+0x5fb9b8)
    #27 0x7f897bbf783f in __libc_start_main /build/glibc-S7Ft5T/glibc-2.23/csu/../csu/libc-start.c:291
    #28 0x5fb8b8 in _start (/usr/bin/python3.8+0x5fb8b8)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/operators/graph_khop_sampler_op.h:99:15 in void paddle::operators::SampleNeighbors<int>(int const*, int const*, int const*, std::vector<int, std::allocator<int> >*, std::vector<int, std::allocator<int> >*, std::vector<int, std::allocator<int> >*, std::vector<int, std::allocator<int> >*, int, bool, bool, bool)
==45956==ABORTING

@Ligoml
Copy link
Contributor Author

Ligoml commented Jan 18, 2023

Case5: paddle.incubate.graph_khop_sampler

Reproduced Case:

import paddle
import numpy as np
array = np.array([], dtype=np.float32)
x = paddle.to_tensor(np.reshape(array, [0]), dtype='int32')
layer = paddle.incubate.graph_khop_sampler(row=x, colptr=x, input_nodes=x, sample_sizes=[0])

Stack Trace Message:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==157506==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7f058b8c5d17 bp 0x7ffef7b70290 sp 0x7ffef7b6f6e0 T0)
==157506==The signal is caused by a READ memory access.
==157506==Hint: address points to the zero page.
    #0 0x7f058b8c5d17 in std::vector<int, std::allocator<int> >::size() const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/operators/graph_khop_sampler_op.h
    #1 0x7f058b8c5d17 in paddle::operators::GraphKhopSamplerOpKernel<phi::CPUContext, int>::Compute(paddle::framework::ExecutionContext const&) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/operators/graph_khop_sampler_op.h:293:34
    #2 0x7f058b8c3096 in paddle::framework::OpKernelRegistrarFunctor<phi::CPUPlace, false, 0ul, paddle::operators::GraphKhopSamplerOpKernel<phi::CPUContext, int>, paddle::operators::GraphKhopSamplerOpKernel<phi::CPUContext, long> >::operator()(char const*, char const*, int) const::'lambda'(paddle::framework::ExecutionContext const&)::operator()(paddle::framework::ExecutionContext const&) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/framework/op_registry.h:208:25
    #3 0x7f058b8c3096 in std::_Function_handler<void (paddle::framework::ExecutionContext const&), paddle::framework::OpKernelRegistrarFunctor<phi::CPUPlace, false, 0ul, paddle::operators::GraphKhopSamplerOpKernel<phi::CPUContext, int>, paddle::operators::GraphKhopSamplerOpKernel<phi::CPUContext, long> >::operator()(char const*, char const*, int) const::'lambda'(paddle::framework::ExecutionContext const&)>::_M_invoke(std::_Any_data const&, paddle::framework::ExecutionContext const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h:297:2
    #4 0x7f0591c99e37 in std::function<void (paddle::framework::ExecutionContext const&)>::operator()(paddle::framework::ExecutionContext const&) const /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h:687:14
    #5 0x7f0591c99e37 in void paddle::imperative::PreparedOpRunImpl<egr::EagerVariable>(paddle::framework::OperatorBase const&, paddle::framework::RuntimeContext const&, paddle::framework::OpKernelType const&, std::function<void (paddle::framework::ExecutionContext const&)> const&, std::function<phi::KernelSignature (phi::ArgumentMappingContext const&)> const*, phi::KernelSignature const*, phi::DeviceContext*, paddle::imperative::details::NameVarMapTrait<egr::EagerVariable>::Type const&, paddle::imperative::details::NameVarMapTrait<egr::EagerVariable>::Type const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > > const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/imperative/prepared_operator.cc:612:5
    #6 0x7f0591c99e37 in paddle::imperative::PreparedOp::Run(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > > > > > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > > > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > > const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/imperative/prepared_operator.cc:796:5
    #7 0x7f05856ce7f8 in void paddle::imperative::OpBaseRunImpl<egr::EagerVariable>(paddle::framework::OperatorBase const&, paddle::imperative::details::NameVarMapTrait<egr::EagerVariable>::Type const&, paddle::imperative::details::NameVarMapTrait<egr::EagerVariable>::Type const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > > const&, phi::Place const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/imperative/layer.cc:525:17
    #8 0x7f05856ce7f8 in paddle::imperative::OpBase::Run(paddle::framework::OperatorBase const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > > > > > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > > > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > > const&, phi::Place const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/imperative/layer.cc:560:3
    #9 0x7f0585723d56 in void paddle::imperative::Tracer::TraceOpImpl<egr::EagerVariable>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, paddle::imperative::details::NameVarMapTrait<egr::EagerVariable>::Type const&, paddle::imperative::details::NameVarMapTrait<egr::EagerVariable>::Type const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > >&, phi::Place const&, bool, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > >*, bool) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/imperative/tracer.cc:340:7
    #10 0x7f058572c627 in paddle::imperative::Tracer::TraceOp(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > > > > > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::shared_ptr<egr::EagerVariable>, std::allocator<std::shared_ptr<egr::EagerVariable> > > > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > >&, phi::Place const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > >*, bool, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/imperative/tracer.cc:432:3
    #11 0x7f058781f1dd in graph_khop_sampler_dygraph_function(paddle::experimental::Tensor const&, paddle::experimental::Tensor const&, paddle::experimental::Tensor const&, paddle::experimental::Tensor const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, paddle::variant<paddle::blank, int, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >, std::vector<float, std::allocator<float> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, bool, std::vector<bool, std::allocator<bool> >, paddle::framework::BlockDesc*, long, std::vector<paddle::framework::BlockDesc*, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator<long> >, std::vector<double, std::allocator<double> >, paddle::framework::VarDesc*, std::vector<paddle::framework::VarDesc*, std::allocator<paddle::framework::VarDesc*> >, double> > > > const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/eager/api/generated/fluid_generated/forwards/dygraph_forward_functions4.cc:42:51
    #12 0x7f0582bb91df in paddle::pybind::eager_legacy_api_graph_khop_sampler(_object*, _object*, _object*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/pybind/eager_legacy_op_function.cc:5318:16
    #13 0x5025f3 in PyCFunction_Call (/usr/bin/python3.8+0x5025f3)
    #14 0x500db4 in _PyObject_MakeTpCall (/usr/bin/python3.8+0x500db4)
    #15 0x566223 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x566223)
    #16 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #17 0x5016c5 in _PyFunction_Vectorcall (/usr/bin/python3.8+0x5016c5)
    #18 0x5610ed in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x5610ed)
    #19 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #20 0x55f102 in PyEval_EvalCode (/usr/bin/python3.8+0x55f102)
    #21 0x62a1ef  (/usr/bin/python3.8+0x62a1ef)
    #22 0x62a179  (/usr/bin/python3.8+0x62a179)
    #23 0x47a7f2  (/usr/bin/python3.8+0x47a7f2)
    #24 0x47a5cb in PyRun_SimpleFileExFlags (/usr/bin/python3.8+0x47a5cb)
    #25 0x4247dc in _init (/usr/bin/python3.8+0x4247dc)
    #26 0x5fb9b8 in Py_BytesMain (/usr/bin/python3.8+0x5fb9b8)
    #27 0x7f0649c0183f in __libc_start_main /build/glibc-S7Ft5T/glibc-2.23/csu/../csu/libc-start.c:291
    #28 0x5fb8b8 in _start (/usr/bin/python3.8+0x5fb8b8)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/operators/graph_khop_sampler_op.h in std::vector<int, std::allocator<int> >::size() const
==157506==ABORTING

@Ligoml
Copy link
Contributor Author

Ligoml commented Jan 18, 2023

Case6: paddle.distribution.Multinomial

Reproduced Case:

import paddle
import numpy as np
array = np.array([0.0], dtype=np.float32)
probs = paddle.to_tensor(np.reshape(array, [1]), dtype='float32')
array = np.array([], dtype=np.float32)
value = paddle.to_tensor(np.reshape(array, [0]), dtype='float32')
multinomial = paddle.distribution.Multinomial(total_count=1, probs=probs)
multinomial.prob(value)

Stack Trace Message:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==191571==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f2e387b3f96 bp 0x7ffd9c8844c0 sp 0x7ffd9c8842e0 T0)
==191571==The signal is caused by a READ memory access.
==191571==Hint: address points to the zero page.
    #0 0x7f2e387b3f96 in Eigen::TensorEvaluator<Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long> const, 0, Eigen::MakePointer> const, Eigen::DefaultDevice>::coeff(long) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h:292:12
    #1 0x7f2e387b3f96 in Eigen::internal::TensorBlockAssignment<float, 1, Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long> const, 0, Eigen::MakePointer>, long>::InnerDimAssign<true, Eigen::TensorEvaluator<Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long> const, 0, Eigen::MakePointer> const, Eigen::DefaultDevice> >::Run(float*, long, Eigen::TensorEvaluator<Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long> const, 0, Eigen::MakePointer> const, Eigen::DefaultDevice> const&, long) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBlock.h:1429:26
    #2 0x7f2e387b3f96 in Eigen::internal::TensorBlockAssignment<float, 1, Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long> const, 0, Eigen::MakePointer>, long>::Run(Eigen::internal::TensorBlockAssignment<float, 1, Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long> const, 0, Eigen::MakePointer>, long>::Target const&, Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long> const, 0, Eigen::MakePointer> const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBlock.h:1522:7
    #3 0x7f2e387b3f96 in Eigen::TensorEvaluator<Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 0, Eigen::MakePointer> const> const, Eigen::DefaultDevice>::BroadcastBlock(Eigen::DSizes<long, 1> const&, Eigen::DSizes<long, 1> const&, Eigen::DSizes<long, 2> const&, Eigen::DSizes<long, 2> const&, Eigen::DSizes<long, 2> const&, long, long, Eigen::internal::TensorBlockScratchAllocator<Eigen::DefaultDevice>&, float*, float**, unsigned long*) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h:1061:7
    #4 0x7f2e387b1c19 in Eigen::TensorEvaluator<Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 0, Eigen::MakePointer> const> const, Eigen::DefaultDevice>::BroadcastBlockAlongBcastDim(Eigen::TensorEvaluator<Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 0, Eigen::MakePointer> const> const, Eigen::DefaultDevice>::BlockBroadcastingParams, long, Eigen::internal::TensorBlockScratchAllocator<Eigen::DefaultDevice>&, float*, float**, unsigned long*) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h
    #5 0x7f2e387b100c in Eigen::TensorEvaluator<Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 0, Eigen::MakePointer> const> const, Eigen::DefaultDevice>::block(Eigen::internal::TensorBlockDescriptor<1, long>&, Eigen::internal::TensorBlockScratchAllocator<Eigen::DefaultDevice>&, bool) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h:674:28
    #6 0x7f2e387acd5c in Eigen::TensorEvaluator<Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 0, Eigen::MakePointer> const> const> const, Eigen::DefaultDevice>::evalBlock(Eigen::internal::TensorBlockDescriptor<1, long>&, Eigen::internal::TensorBlockScratchAllocator<Eigen::DefaultDevice>&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h:221:42
    #7 0x7f2e387ac4f2 in Eigen::internal::TensorExecutor<Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 0, Eigen::MakePointer> const> const> const, Eigen::DefaultDevice, true, (Eigen::internal::TiledEvaluation)1>::run(Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 0, Eigen::MakePointer> const> const> const&, Eigen::DefaultDevice const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h:206:19
    #8 0x7f2e386778bf in Eigen::TensorDevice<Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::DefaultDevice>& Eigen::TensorDevice<Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::DefaultDevice>::operator=<Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 0, Eigen::MakePointer> const> >(Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 0, Eigen::MakePointer> const> const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDevice.h:37:7
    #9 0x7f2e386778bf in phi::funcs::EigenBroadcast<Eigen::DefaultDevice, float, 1>::Eval(Eigen::DefaultDevice const&, Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::DSizes<long, 1> const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/funcs/eigen/broadcast.cc:40:21
    #10 0x7f2e41a57092 in void phi::ApplyBroadcast<float, phi::CPUContext, 1>(phi::CPUContext const&, phi::DenseTensor const*, phi::DenseTensor*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/impl/broadcast_tensors_kernel_impl.h:72:3
    #11 0x7f2e41a54fd9 in void phi::BroadcastTensorsKernel<float, phi::CPUContext>(phi::CPUContext const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, std::vector<phi::DenseTensor*, std::allocator<phi::DenseTensor*> >) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/impl/broadcast_tensors_kernel_impl.h:104:7
    #12 0x7f2e41a66642 in phi::KernelImpl<void (*)(phi::CPUContext const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, std::vector<phi::DenseTensor*, std::allocator<phi::DenseTensor*> >), &(void phi::BroadcastTensorsKernel<float, phi::CPUContext>(phi::CPUContext const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, std::vector<phi::DenseTensor*, std::allocator<phi::DenseTensor*> >))>::VariadicCompute(phi::DeviceContext const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, std::vector<phi::DenseTensor*, std::allocator<phi::DenseTensor*> >) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/core/kernel_utils.h:239:12
    #13 0x7f2e3bdf1802 in paddle::experimental::broadcast_tensors(std::vector<paddle::experimental::Tensor, std::allocator<paddle::experimental::Tensor> > const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/api/lib/api.cc:26561:5
    #14 0x7f2e2fdc117a in broadcast_tensors_ad_func(std::vector<paddle::experimental::Tensor, std::allocator<paddle::experimental::Tensor> > const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/eager/api/generated/eager_generated/forwards/dygraph_functions.cc:43385:21
    #15 0x7f2e2c0e53ce in paddle::pybind::eager_api_broadcast_tensors(_object*, _object*, _object*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/pybind/eager_op_function.cc:19349:56
    #16 0x5025f3 in PyCFunction_Call (/usr/bin/python3.8+0x5025f3)
    #17 0x500db4 in _PyObject_MakeTpCall (/usr/bin/python3.8+0x500db4)
    #18 0x566223 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x566223)
    #19 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #20 0x5016c5 in _PyFunction_Vectorcall (/usr/bin/python3.8+0x5016c5)
    #21 0x564f2d in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x564f2d)
    #22 0x50163a in _PyFunction_Vectorcall (/usr/bin/python3.8+0x50163a)
    #23 0x560631 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x560631)
    #24 0x50163a in _PyFunction_Vectorcall (/usr/bin/python3.8+0x50163a)
    #25 0x560631 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x560631)
    #26 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #27 0x55f102 in PyEval_EvalCode (/usr/bin/python3.8+0x55f102)
    #28 0x62a1ef  (/usr/bin/python3.8+0x62a1ef)
    #29 0x62a179  (/usr/bin/python3.8+0x62a179)
    #30 0x47a7f2  (/usr/bin/python3.8+0x47a7f2)
    #31 0x47a5cb in PyRun_SimpleFileExFlags (/usr/bin/python3.8+0x47a5cb)
    #32 0x4247dc in _init (/usr/bin/python3.8+0x4247dc)
    #33 0x5fb9b8 in Py_BytesMain (/usr/bin/python3.8+0x5fb9b8)
    #34 0x7f2ef336b83f in __libc_start_main /build/glibc-S7Ft5T/glibc-2.23/csu/../csu/libc-start.c:291
    #35 0x5fb8b8 in _start (/usr/bin/python3.8+0x5fb8b8)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h:292:12 in Eigen::TensorEvaluator<Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long> const, 0, Eigen::MakePointer> const, Eigen::DefaultDevice>::coeff(long) const
==191571==ABORTING

@Ligoml
Copy link
Contributor Author

Ligoml commented Jan 18, 2023

Case7: paddle.distribution.Beta

Reproduced Case:

import paddle
import numpy as np
array = np.array([], dtype=np.float32)
x = paddle.to_tensor(np.reshape(array, [0]), dtype='int32')
paddle.distribution.Beta(alpha=x, beta=x)

Stack Trace Message:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==194842==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f620fdbc9e6 bp 0x7ffdb2584b80 sp 0x7ffdb25849a0 T0)
==194842==The signal is caused by a READ memory access.
==194842==Hint: address points to the zero page.
    #0 0x7f620fdbc9e6 in Eigen::TensorEvaluator<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long> const, 0, Eigen::MakePointer> const, Eigen::DefaultDevice>::coeff(long) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h:292:12
    #1 0x7f620fdbc9e6 in Eigen::internal::TensorBlockAssignment<int, 1, Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long> const, 0, Eigen::MakePointer>, long>::InnerDimAssign<true, Eigen::TensorEvaluator<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long> const, 0, Eigen::MakePointer> const, Eigen::DefaultDevice> >::Run(int*, long, Eigen::TensorEvaluator<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long> const, 0, Eigen::MakePointer> const, Eigen::DefaultDevice> const&, long) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBlock.h:1429:26
    #2 0x7f620fdbc9e6 in Eigen::internal::TensorBlockAssignment<int, 1, Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long> const, 0, Eigen::MakePointer>, long>::Run(Eigen::internal::TensorBlockAssignment<int, 1, Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long> const, 0, Eigen::MakePointer>, long>::Target const&, Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long> const, 0, Eigen::MakePointer> const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBlock.h:1522:7
    #3 0x7f620fdbc9e6 in Eigen::TensorEvaluator<Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 0, Eigen::MakePointer> const> const, Eigen::DefaultDevice>::BroadcastBlock(Eigen::DSizes<long, 1> const&, Eigen::DSizes<long, 1> const&, Eigen::DSizes<long, 2> const&, Eigen::DSizes<long, 2> const&, Eigen::DSizes<long, 2> const&, long, long, Eigen::internal::TensorBlockScratchAllocator<Eigen::DefaultDevice>&, int*, int**, unsigned long*) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h:1061:7
    #4 0x7f620fdba659 in Eigen::TensorEvaluator<Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 0, Eigen::MakePointer> const> const, Eigen::DefaultDevice>::BroadcastBlockAlongBcastDim(Eigen::TensorEvaluator<Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 0, Eigen::MakePointer> const> const, Eigen::DefaultDevice>::BlockBroadcastingParams, long, Eigen::internal::TensorBlockScratchAllocator<Eigen::DefaultDevice>&, int*, int**, unsigned long*) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h
    #5 0x7f620fdb9a4c in Eigen::TensorEvaluator<Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 0, Eigen::MakePointer> const> const, Eigen::DefaultDevice>::block(Eigen::internal::TensorBlockDescriptor<1, long>&, Eigen::internal::TensorBlockScratchAllocator<Eigen::DefaultDevice>&, bool) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h:674:28
    #6 0x7f620fdb57fc in Eigen::TensorEvaluator<Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 0, Eigen::MakePointer> const> const> const, Eigen::DefaultDevice>::evalBlock(Eigen::internal::TensorBlockDescriptor<1, long>&, Eigen::internal::TensorBlockScratchAllocator<Eigen::DefaultDevice>&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h:221:42
    #7 0x7f620fdb4f92 in Eigen::internal::TensorExecutor<Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 0, Eigen::MakePointer> const> const> const, Eigen::DefaultDevice, true, (Eigen::internal::TiledEvaluation)1>::run(Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 0, Eigen::MakePointer> const> const> const&, Eigen::DefaultDevice const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h:206:19
    #8 0x7f620faac1bf in Eigen::TensorDevice<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::DefaultDevice>& Eigen::TensorDevice<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::DefaultDevice>::operator=<Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 0, Eigen::MakePointer> const> >(Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 0, Eigen::MakePointer> const> const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDevice.h:37:7
    #9 0x7f620faac1bf in phi::funcs::EigenBroadcast<Eigen::DefaultDevice, int, 1>::Eval(Eigen::DefaultDevice const&, Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::DSizes<long, 1> const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/funcs/eigen/broadcast.cc:40:21
    #10 0x7f6218e7ca72 in void phi::ApplyBroadcast<int, phi::CPUContext, 1>(phi::CPUContext const&, phi::DenseTensor const*, phi::DenseTensor*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/impl/broadcast_tensors_kernel_impl.h:72:3
    #11 0x7f6218e7a9b9 in void phi::BroadcastTensorsKernel<int, phi::CPUContext>(phi::CPUContext const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, std::vector<phi::DenseTensor*, std::allocator<phi::DenseTensor*> >) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/impl/broadcast_tensors_kernel_impl.h:104:7
    #12 0x7f6218e97062 in phi::KernelImpl<void (*)(phi::CPUContext const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, std::vector<phi::DenseTensor*, std::allocator<phi::DenseTensor*> >), &(void phi::BroadcastTensorsKernel<int, phi::CPUContext>(phi::CPUContext const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, std::vector<phi::DenseTensor*, std::allocator<phi::DenseTensor*> >))>::VariadicCompute(phi::DeviceContext const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, std::vector<phi::DenseTensor*, std::allocator<phi::DenseTensor*> >) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/core/kernel_utils.h:239:12
    #13 0x7f6213222802 in paddle::experimental::broadcast_tensors(std::vector<paddle::experimental::Tensor, std::allocator<paddle::experimental::Tensor> > const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/api/lib/api.cc:26561:5
    #14 0x7f62071f217a in broadcast_tensors_ad_func(std::vector<paddle::experimental::Tensor, std::allocator<paddle::experimental::Tensor> > const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/eager/api/generated/eager_generated/forwards/dygraph_functions.cc:43385:21
    #15 0x7f62035163ce in paddle::pybind::eager_api_broadcast_tensors(_object*, _object*, _object*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/pybind/eager_op_function.cc:19349:56
    #16 0x5025f3 in PyCFunction_Call (/usr/bin/python3.8+0x5025f3)
    #17 0x500db4 in _PyObject_MakeTpCall (/usr/bin/python3.8+0x500db4)
    #18 0x566223 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x566223)
    #19 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #20 0x5016c5 in _PyFunction_Vectorcall (/usr/bin/python3.8+0x5016c5)
    #21 0x564f2d in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x564f2d)
    #22 0x55fa97 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55fa97)
    #23 0x5016c5 in _PyFunction_Vectorcall (/usr/bin/python3.8+0x5016c5)
    #24 0x502212 in _PyObject_Call_Prepend (/usr/bin/python3.8+0x502212)
    #25 0x53d6f6  (/usr/bin/python3.8+0x53d6f6)
    #26 0x53a8b9  (/usr/bin/python3.8+0x53a8b9)
    #27 0x500f77 in _PyObject_MakeTpCall (/usr/bin/python3.8+0x500f77)
    #28 0x565e09 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x565e09)
    #29 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #30 0x55f102 in PyEval_EvalCode (/usr/bin/python3.8+0x55f102)
    #31 0x62a1ef  (/usr/bin/python3.8+0x62a1ef)
    #32 0x62a179  (/usr/bin/python3.8+0x62a179)
    #33 0x47a7f2  (/usr/bin/python3.8+0x47a7f2)
    #34 0x47a5cb in PyRun_SimpleFileExFlags (/usr/bin/python3.8+0x47a5cb)
    #35 0x4247dc in _init (/usr/bin/python3.8+0x4247dc)
    #36 0x5fb9b8 in Py_BytesMain (/usr/bin/python3.8+0x5fb9b8)
    #37 0x7f62ca79c83f in __libc_start_main /build/glibc-S7Ft5T/glibc-2.23/csu/../csu/libc-start.c:291
    #38 0x5fb8b8 in _start (/usr/bin/python3.8+0x5fb8b8)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h:292:12 in Eigen::TensorEvaluator<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long> const, 0, Eigen::MakePointer> const, Eigen::DefaultDevice>::coeff(long) const
==194842==ABORTING

@Ligoml
Copy link
Contributor Author

Ligoml commented Jan 18, 2023

Case8: paddle.slice

Reproduced Case:

import paddle
import numpy as np
array = np.array([], dtype=np.float32)
x = paddle.to_tensor(np.reshape(array, [0]), dtype='float32')
paddle.slice(x, axes=[0], starts=[], ends=[])

Stack Trace Message:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==114137==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7efd438de811 bp 0x7ffef038cff0 sp 0x7ffef038c620 T0)
==114137==The signal is caused by a WRITE memory access.
==114137==Hint: address points to the zero page.
    #0 0x7efd438de811 in void phi::funcs::CheckAndUpdateSliceAttrs<long>(phi::DDim, std::vector<long, std::allocator<long> > const&, std::vector<long, std::allocator<long> >*, std::vector<long, std::allocator<long> >*, std::vector<long, std::allocator<long> >*, std::vector<long, std::allocator<long> >*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/funcs/slice_utils.h:98:20
    #1 0x7efd4905650c in phi::SliceRawInferMeta(phi::MetaTensor const&, std::vector<long, std::allocator<long> > const&, paddle::experimental::IntArrayBase<phi::DenseTensor> const&, paddle::experimental::IntArrayBase<phi::DenseTensor> const&, std::vector<long, std::allocator<long> > const&, std::vector<long, std::allocator<long> > const&, phi::MetaTensor*, phi::MetaConfig) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/infermeta/unary.cc:3292:3
    #2 0x7efd4224d6d5 in paddle::experimental::slice(paddle::experimental::Tensor const&, std::vector<long, std::allocator<long> > const&, paddle::experimental::IntArrayBase<paddle::experimental::Tensor> const&, paddle::experimental::IntArrayBase<paddle::experimental::Tensor> const&, std::vector<long, std::allocator<long> > const&, std::vector<long, std::allocator<long> > const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/api/lib/api.cc:23353:3
    #3 0x7efd36187092 in slice_ad_func(paddle::experimental::Tensor const&, std::vector<long, std::allocator<long> >, paddle::experimental::IntArrayBase<paddle::experimental::Tensor>, paddle::experimental::IntArrayBase<paddle::experimental::Tensor>, std::vector<long, std::allocator<long> >, std::vector<long, std::allocator<long> >) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/eager/api/generated/eager_generated/forwards/dygraph_functions.cc:37882:21
    #4 0x7efd325400e5 in paddle::pybind::eager_api_slice(_object*, _object*, _object*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/pybind/eager_op_function.cc:16823:87
    #5 0x5025f3 in PyCFunction_Call (/usr/bin/python3.8+0x5025f3)
    #6 0x500db4 in _PyObject_MakeTpCall (/usr/bin/python3.8+0x500db4)
    #7 0x566223 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x566223)
    #8 0x55fa97 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55fa97)
    #9 0x5016c5 in _PyFunction_Vectorcall (/usr/bin/python3.8+0x5016c5)
    #10 0x5610ed in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x5610ed)
    #11 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #12 0x55f102 in PyEval_EvalCode (/usr/bin/python3.8+0x55f102)
    #13 0x62a1ef  (/usr/bin/python3.8+0x62a1ef)
    #14 0x62a179  (/usr/bin/python3.8+0x62a179)
    #15 0x47a7f2  (/usr/bin/python3.8+0x47a7f2)
    #16 0x47a5cb in PyRun_SimpleFileExFlags (/usr/bin/python3.8+0x47a5cb)
    #17 0x4247dc in _init (/usr/bin/python3.8+0x4247dc)
    #18 0x5fb9b8 in Py_BytesMain (/usr/bin/python3.8+0x5fb9b8)
    #19 0x7efdf984083f in __libc_start_main /build/glibc-S7Ft5T/glibc-2.23/csu/../csu/libc-start.c:291
    #20 0x5fb8b8 in _start (/usr/bin/python3.8+0x5fb8b8)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/funcs/slice_utils.h:98:20 in void phi::funcs::CheckAndUpdateSliceAttrs<long>(phi::DDim, std::vector<long, std::allocator<long> > const&, std::vector<long, std::allocator<long> >*, std::vector<long, std::allocator<long> >*, std::vector<long, std::allocator<long> >*, std::vector<long, std::allocator<long> >*)
==114137==ABORTING

@Ligoml
Copy link
Contributor Author

Ligoml commented Jan 18, 2023

Case9: paddle.topk

Reproduced Case:

import paddle
import numpy as np
array = np.array([], dtype=np.float32)
x = paddle.to_tensor(np.reshape(array, [0]), dtype='float32')
paddle.topk(x, k=1)

Stack Trace Message:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==138254==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fc8139c3332 bp 0x7fff65c34ad0 sp 0x7fff65c34880 T0)
==138254==The signal is caused by a READ memory access.
==138254==Hint: address points to the zero page.
    #0 0x7fc8139c3332 in void phi::FullTopK<float, long>(long, long, int, phi::DenseTensor const*, float*, long*, int const&, bool const&, bool const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/cpu/top_k_kernel.cc:117:37
    #1 0x7fc8139bbb49 in void phi::TopkKernel<float, phi::CPUContext>(phi::CPUContext const&, phi::DenseTensor const&, paddle::experimental::ScalarBase<phi::DenseTensor> const&, int, bool, bool, phi::DenseTensor*, phi::DenseTensor*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/cpu/top_k_kernel.cc:157:5
    #2 0x7fc812b7f4c4 in paddle::experimental::topk(paddle::experimental::Tensor const&, paddle::experimental::ScalarBase<paddle::experimental::Tensor> const&, int, bool, bool) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/api/lib/api.cc:24861:5
    #3 0x7fc806afdcda in topk_ad_func(paddle::experimental::Tensor const&, paddle::experimental::ScalarBase<paddle::experimental::Tensor>, int, bool, bool) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/eager/api/generated/eager_generated/forwards/dygraph_functions.cc:40664:21
    #4 0x7fc802e6ddde in paddle::pybind::eager_api_topk(_object*, _object*, _object*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/pybind/eager_op_function.cc:17940:61
    #5 0x5025f3 in PyCFunction_Call (/usr/bin/python3.8+0x5025f3)
    #6 0x500db4 in _PyObject_MakeTpCall (/usr/bin/python3.8+0x500db4)
    #7 0x566223 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x566223)
    #8 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #9 0x5016c5 in _PyFunction_Vectorcall (/usr/bin/python3.8+0x5016c5)
    #10 0x5610ed in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x5610ed)
    #11 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #12 0x55f102 in PyEval_EvalCode (/usr/bin/python3.8+0x55f102)
    #13 0x62a1ef  (/usr/bin/python3.8+0x62a1ef)
    #14 0x62a179  (/usr/bin/python3.8+0x62a179)
    #15 0x47a7f2  (/usr/bin/python3.8+0x47a7f2)
    #16 0x47a5cb in PyRun_SimpleFileExFlags (/usr/bin/python3.8+0x47a5cb)
    #17 0x4247dc in _init (/usr/bin/python3.8+0x4247dc)
    #18 0x5fb9b8 in Py_BytesMain (/usr/bin/python3.8+0x5fb9b8)
    #19 0x7fc8ca13883f in __libc_start_main /build/glibc-S7Ft5T/glibc-2.23/csu/../csu/libc-start.c:291
    #20 0x5fb8b8 in _start (/usr/bin/python3.8+0x5fb8b8)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/cpu/top_k_kernel.cc:117:37 in void phi::FullTopK<float, long>(long, long, int, phi::DenseTensor const*, float*, long*, int const&, bool const&, bool const&)
==138254==ABORTING

@Ligoml
Copy link
Contributor Author

Ligoml commented Jan 18, 2023

Case10: paddle.topk

Reproduced Case:

import paddle
import numpy as np
array = np.array([], dtype=np.float32)
x = paddle.to_tensor(np.reshape(array, [0]), dtype='float32')
paddle.topk(x, k=16896)

Stack Trace Message:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==85897==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000010 (pc 0x7f345ca58779 bp 0x7ffd0a584730 sp 0x7ffd0a5846e0 T0)
==85897==The signal is caused by a READ memory access.
==85897==Hint: address points to the zero page.
    #0 0x7f345ca58779 in bool __gnu_cxx::__ops::_Iter_comp_iter<void phi::FullTopK<float, long>(long, long, int, phi::DenseTensor const*, float*, long*, int const&, bool const&, bool const&)::'lambda1'(std::pair<float, long> const&, std::pair<float, long> const&)>::operator()<__gnu_cxx::__normal_iterator<std::pair<float, long>*, std::vector<std::pair<float, long>, std::allocator<std::pair<float, long> > > >, __gnu_cxx::__normal_iterator<std::pair<float, long>*, std::vector<std::pair<float, long>, std::allocator<std::pair<float, long> > > > >(float, long) /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/predefined_ops.h:143:23
    #1 0x7f345ca58779 in void std::__move_median_to_first<__gnu_cxx::__normal_iterator<std::pair<float, long>*, std::vector<std::pair<float, long>, std::allocator<std::pair<float, long> > > >, __gnu_cxx::__ops::_Iter_comp_iter<void phi::FullTopK<float, long>(long, long, int, phi::DenseTensor const*, float*, long*, int const&, bool const&, bool const&)::'lambda1'(std::pair<float, long> const&, std::pair<float, long> const&)> >(float, float, float, float, long) /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h:81:11
    #2 0x7f345ca58779 in float std::__unguarded_partition_pivot<__gnu_cxx::__normal_iterator<std::pair<float, long>*, std::vector<std::pair<float, long>, std::allocator<std::pair<float, long> > > >, __gnu_cxx::__ops::_Iter_comp_iter<void phi::FullTopK<float, long>(long, long, int, phi::DenseTensor const*, float*, long*, int const&, bool const&, bool const&)::'lambda1'(std::pair<float, long> const&, std::pair<float, long> const&)> >(float, float, long) /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h:1921:7
    #3 0x7f345ca58779 in void std::__introsort_loop<__gnu_cxx::__normal_iterator<std::pair<float, long>*, std::vector<std::pair<float, long>, std::allocator<std::pair<float, long> > > >, long, __gnu_cxx::__ops::_Iter_comp_iter<void phi::FullTopK<float, long>(long, long, int, phi::DenseTensor const*, float*, long*, int const&, bool const&, bool const&)::'lambda1'(std::pair<float, long> const&, std::pair<float, long> const&)> >(float, float, long, __gnu_cxx::__ops::_Iter_comp_iter<void phi::FullTopK<float, long>(long, long, int, phi::DenseTensor const*, float*, long*, int const&, bool const&, bool const&)::'lambda1'(std::pair<float, long> const&, std::pair<float, long> const&)>) /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h:1953:6
    #4 0x7f345ca2c84f in void std::__sort<__gnu_cxx::__normal_iterator<std::pair<float, long>*, std::vector<std::pair<float, long>, std::allocator<std::pair<float, long> > > >, __gnu_cxx::__ops::_Iter_comp_iter<void phi::FullTopK<float, long>(long, long, int, phi::DenseTensor const*, float*, long*, int const&, bool const&, bool const&)::'lambda1'(std::pair<float, long> const&, std::pair<float, long> const&)> >(float, float, long) /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h:1968:4
    #5 0x7f345ca2c84f in void std::sort<__gnu_cxx::__normal_iterator<std::pair<float, long>*, std::vector<std::pair<float, long>, std::allocator<std::pair<float, long> > > >, void phi::FullTopK<float, long>(long, long, int, phi::DenseTensor const*, float*, long*, int const&, bool const&, bool const&)::'lambda1'(std::pair<float, long> const&, std::pair<float, long> const&)>(float, float, long) /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h:4866:7
    #6 0x7f345ca2c84f in void phi::FullTopK<float, long>(long, long, int, phi::DenseTensor const*, float*, long*, int const&, bool const&, bool const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/cpu/top_k_kernel.cc:84:11
    #7 0x7f345ca27b49 in void phi::TopkKernel<float, phi::CPUContext>(phi::CPUContext const&, phi::DenseTensor const&, paddle::experimental::ScalarBase<phi::DenseTensor> const&, int, bool, bool, phi::DenseTensor*, phi::DenseTensor*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/cpu/top_k_kernel.cc:157:5
    #8 0x7f345bbeb4c4 in paddle::experimental::topk(paddle::experimental::Tensor const&, paddle::experimental::ScalarBase<paddle::experimental::Tensor> const&, int, bool, bool) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/api/lib/api.cc:24861:5
    #9 0x7f344fb69cda in topk_ad_func(paddle::experimental::Tensor const&, paddle::experimental::ScalarBase<paddle::experimental::Tensor>, int, bool, bool) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/eager/api/generated/eager_generated/forwards/dygraph_functions.cc:40664:21
    #10 0x7f344bed9dde in paddle::pybind::eager_api_topk(_object*, _object*, _object*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/pybind/eager_op_function.cc:17940:61
    #11 0x5025f3 in PyCFunction_Call (/usr/bin/python3.8+0x5025f3)
    #12 0x500db4 in _PyObject_MakeTpCall (/usr/bin/python3.8+0x500db4)
    #13 0x566223 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x566223)
    #14 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #15 0x5016c5 in _PyFunction_Vectorcall (/usr/bin/python3.8+0x5016c5)
    #16 0x5610ed in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x5610ed)
    #17 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #18 0x55f102 in PyEval_EvalCode (/usr/bin/python3.8+0x55f102)
    #19 0x62a1ef  (/usr/bin/python3.8+0x62a1ef)
    #20 0x62a179  (/usr/bin/python3.8+0x62a179)
    #21 0x47a7f2  (/usr/bin/python3.8+0x47a7f2)
    #22 0x47a5cb in PyRun_SimpleFileExFlags (/usr/bin/python3.8+0x47a5cb)
    #23 0x4247dc in _init (/usr/bin/python3.8+0x4247dc)
    #24 0x5fb9b8 in Py_BytesMain (/usr/bin/python3.8+0x5fb9b8)
    #25 0x7f35131a483f in __libc_start_main /build/glibc-S7Ft5T/glibc-2.23/csu/../csu/libc-start.c:291
    #26 0x5fb8b8 in _start (/usr/bin/python3.8+0x5fb8b8)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/predefined_ops.h:143:23 in bool __gnu_cxx::__ops::_Iter_comp_iter<void phi::FullTopK<float, long>(long, long, int, phi::DenseTensor const*, float*, long*, int const&, bool const&, bool const&)::'lambda1'(std::pair<float, long> const&, std::pair<float, long> const&)>::operator()<__gnu_cxx::__normal_iterator<std::pair<float, long>*, std::vector<std::pair<float, long>, std::allocator<std::pair<float, long> > > >, __gnu_cxx::__normal_iterator<std::pair<float, long>*, std::vector<std::pair<float, long>, std::allocator<std::pair<float, long> > > > >(float, long)
==85897==ABORTING

@Ligoml
Copy link
Contributor Author

Ligoml commented Jan 18, 2023

Case11: paddle.unbind

Reproduced Case:

import paddle
import numpy as np
array = np.array([1.1], dtype=np.float32)
x = paddle.to_tensor(np.reshape(array, [1]), dtype='float32')
paddle.unbind(x, axis=1)

Stack Trace Message:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==42710==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fb1bd732291 bp 0x7fffbb243230 sp 0x7fffbb2430a0 T0)
==42710==The signal is caused by a READ memory access.
==42710==Hint: address points to the zero page.
    #0 0x7fb1bd732291 in phi::funcs::SplitFunctor<phi::CPUContext, float>::operator()(phi::CPUContext const&, phi::DenseTensor const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, int, std::vector<phi::DenseTensor*, std::allocator<phi::DenseTensor*> >*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/funcs/concat_and_split_functor.cc:88:18
    #1 0x7fb1b6f73785 in void phi::UnbindKernel<float, phi::CPUContext>(phi::CPUContext const&, phi::DenseTensor const&, int, std::vector<phi::DenseTensor*, std::allocator<phi::DenseTensor*> >) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/impl/unbind_kernel_impl.h:37:3
    #2 0x7fb1b6f7e0a7 in phi::KernelImpl<void (*)(phi::CPUContext const&, phi::DenseTensor const&, int, std::vector<phi::DenseTensor*, std::allocator<phi::DenseTensor*> >), &(void phi::UnbindKernel<float, phi::CPUContext>(phi::CPUContext const&, phi::DenseTensor const&, int, std::vector<phi::DenseTensor*, std::allocator<phi::DenseTensor*> >))>::VariadicCompute(phi::DeviceContext const&, phi::DenseTensor const&, int, std::vector<phi::DenseTensor*, std::allocator<phi::DenseTensor*> >) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/core/kernel_utils.h:239:12
    #3 0x7fb1b620e20f in paddle::experimental::unbind(paddle::experimental::Tensor const&, int) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/api/lib/api.cc:25401:5
    #4 0x7fb1aa1a4f88 in unbind_ad_func(paddle::experimental::Tensor const&, int) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/eager/api/generated/eager_generated/forwards/dygraph_functions.cc:41478:21
    #5 0x7fb1a64fefc7 in paddle::pybind::eager_api_unbind(_object*, _object*, _object*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/pybind/eager_op_function.cc:18392:50
    #6 0x5025f3 in PyCFunction_Call (/usr/bin/python3.8+0x5025f3)
    #7 0x500db4 in _PyObject_MakeTpCall (/usr/bin/python3.8+0x500db4)
    #8 0x566223 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x566223)
    #9 0x55fa97 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55fa97)
    #10 0x5016c5 in _PyFunction_Vectorcall (/usr/bin/python3.8+0x5016c5)
    #11 0x5610ed in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x5610ed)
    #12 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #13 0x55f102 in PyEval_EvalCode (/usr/bin/python3.8+0x55f102)
    #14 0x62a1ef  (/usr/bin/python3.8+0x62a1ef)
    #15 0x62a179  (/usr/bin/python3.8+0x62a179)
    #16 0x47a7f2  (/usr/bin/python3.8+0x47a7f2)
    #17 0x47a5cb in PyRun_SimpleFileExFlags (/usr/bin/python3.8+0x47a5cb)
    #18 0x4247dc in _init (/usr/bin/python3.8+0x4247dc)
    #19 0x5fb9b8 in Py_BytesMain (/usr/bin/python3.8+0x5fb9b8)
    #20 0x7fb26d7b583f in __libc_start_main /build/glibc-S7Ft5T/glibc-2.23/csu/../csu/libc-start.c:291
    #21 0x5fb8b8 in _start (/usr/bin/python3.8+0x5fb8b8)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/funcs/concat_and_split_functor.cc:88:18 in phi::funcs::SplitFunctor<phi::CPUContext, float>::operator()(phi::CPUContext const&, phi::DenseTensor const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, int, std::vector<phi::DenseTensor*, std::allocator<phi::DenseTensor*> >*)
==42710==ABORTING

@Ligoml
Copy link
Contributor Author

Ligoml commented Jan 18, 2023

Case12: paddle.unique_consecutive

Reproduced Case:

import paddle
import numpy as np
array = np.array([], dtype=np.float32)
x = paddle.to_tensor(np.reshape(array, [0]), dtype='float32')
paddle.unique_consecutive(x, return_inverse=True, return_counts=True)

Stack Trace Message:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==144173==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fa62f87a633 bp 0x7ffe7ea6c370 sp 0x7ffe7ea6c080 T0)
==144173==The signal is caused by a WRITE memory access.
==144173==Hint: address points to the zero page.
    #0 0x7fa62f87a633 in void phi::UniqueConsecutiveFlattenedTensor<float, long, phi::CPUContext>(phi::CPUContext const&, phi::DenseTensor const&, phi::DenseTensor*, bool, bool, phi::DenseTensor*, phi::DenseTensor*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/cpu/unique_consecutive_functor.h:57:8
    #1 0x7fa62f87a633 in void phi::UniqueConsecutiveFlattenedTensorFunctor<phi::CPUContext, float>::apply<long>() const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/cpu/unique_consecutive_functor.h:106:5
    #2 0x7fa62f869a3b in void paddle::framework::VisitDataTypeTiny<phi::UniqueConsecutiveFlattenedTensorFunctor<phi::CPUContext, float> >(paddle::framework::proto::VarType_Type, phi::UniqueConsecutiveFlattenedTensorFunctor<phi::CPUContext, float>) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/framework/data_type.h:200:3
    #3 0x7fa62f869a3b in void phi::UniqueConsecutiveKernel<float, phi::CPUContext>(phi::CPUContext const&, phi::DenseTensor const&, bool, bool, std::vector<int, std::allocator<int> > const&, int, phi::DenseTensor*, phi::DenseTensor*, phi::DenseTensor*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/cpu/unique_consecutive_kernel.cc:49:5
    #4 0x7fa62eb796c8 in paddle::experimental::unique_consecutive(paddle::experimental::Tensor const&, bool, bool, std::vector<int, std::allocator<int> > const&, int) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/api/lib/api.cc:25672:5
    #5 0x7fa622b1a8ec in unique_consecutive_ad_func(paddle::experimental::Tensor const&, bool, bool, std::vector<int, std::allocator<int> >, int) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/eager/api/generated/eager_generated/forwards/dygraph_functions.cc:41873:21
    #6 0x7fa61ee6b613 in paddle::pybind::eager_api_unique_consecutive(_object*, _object*, _object*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/pybind/eager_op_function.cc:18624:93
    #7 0x5025f3 in PyCFunction_Call (/usr/bin/python3.8+0x5025f3)
    #8 0x500db4 in _PyObject_MakeTpCall (/usr/bin/python3.8+0x500db4)
    #9 0x566223 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x566223)
    #10 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #11 0x5016c5 in _PyFunction_Vectorcall (/usr/bin/python3.8+0x5016c5)
    #12 0x5610ed in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x5610ed)
    #13 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #14 0x55f102 in PyEval_EvalCode (/usr/bin/python3.8+0x55f102)
    #15 0x62a1ef  (/usr/bin/python3.8+0x62a1ef)
    #16 0x62a179  (/usr/bin/python3.8+0x62a179)
    #17 0x47a7f2  (/usr/bin/python3.8+0x47a7f2)
    #18 0x47a5cb in PyRun_SimpleFileExFlags (/usr/bin/python3.8+0x47a5cb)
    #19 0x4247dc in _init (/usr/bin/python3.8+0x4247dc)
    #20 0x5fb9b8 in Py_BytesMain (/usr/bin/python3.8+0x5fb9b8)
    #21 0x7fa6e611883f in __libc_start_main /build/glibc-S7Ft5T/glibc-2.23/csu/../csu/libc-start.c:291
    #22 0x5fb8b8 in _start (/usr/bin/python3.8+0x5fb8b8)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/cpu/unique_consecutive_functor.h:57:8 in void phi::UniqueConsecutiveFlattenedTensor<float, long, phi::CPUContext>(phi::CPUContext const&, phi::DenseTensor const&, phi::DenseTensor*, bool, bool, phi::DenseTensor*, phi::DenseTensor*)
==144173==ABORTING

@Ligoml
Copy link
Contributor Author

Ligoml commented Jan 18, 2023

Case13: paddle.median

Reproduced Case:

import paddle
import numpy as np
array = np.array([], dtype=np.float32)
x = paddle.to_tensor(np.reshape(array, [0]), dtype='float32')
paddle.median(x)

Stack Trace Message:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==87371==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7ff4d2c89332 bp 0x7fffeeadcef0 sp 0x7fffeeadcca0 T0)
==87371==The signal is caused by a READ memory access.
==87371==Hint: address points to the zero page.
    #0 0x7ff4d2c89332 in void phi::FullTopK<float, long>(long, long, int, phi::DenseTensor const*, float*, long*, int const&, bool const&, bool const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/cpu/top_k_kernel.cc:117:37
    #1 0x7ff4d2c81b49 in void phi::TopkKernel<float, phi::CPUContext>(phi::CPUContext const&, phi::DenseTensor const&, paddle::experimental::ScalarBase<phi::DenseTensor> const&, int, bool, bool, phi::DenseTensor*, phi::DenseTensor*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/cpu/top_k_kernel.cc:157:5
    #2 0x7ff4d1e454c4 in paddle::experimental::topk(paddle::experimental::Tensor const&, paddle::experimental::ScalarBase<paddle::experimental::Tensor> const&, int, bool, bool) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/api/lib/api.cc:24861:5
    #3 0x7ff4c5dc3cda in topk_ad_func(paddle::experimental::Tensor const&, paddle::experimental::ScalarBase<paddle::experimental::Tensor>, int, bool, bool) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/eager/api/generated/eager_generated/forwards/dygraph_functions.cc:40664:21
    #4 0x7ff4c2133dde in paddle::pybind::eager_api_topk(_object*, _object*, _object*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/pybind/eager_op_function.cc:17940:61
    #5 0x5025f3 in PyCFunction_Call (/usr/bin/python3.8+0x5025f3)
    #6 0x500db4 in _PyObject_MakeTpCall (/usr/bin/python3.8+0x500db4)
    #7 0x566223 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x566223)
    #8 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #9 0x5016c5 in _PyFunction_Vectorcall (/usr/bin/python3.8+0x5016c5)
    #10 0x5610ed in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x5610ed)
    #11 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #12 0x5016c5 in _PyFunction_Vectorcall (/usr/bin/python3.8+0x5016c5)
    #13 0x564f2d in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x564f2d)
    #14 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #15 0x55f102 in PyEval_EvalCode (/usr/bin/python3.8+0x55f102)
    #16 0x62a1ef  (/usr/bin/python3.8+0x62a1ef)
    #17 0x62a179  (/usr/bin/python3.8+0x62a179)
    #18 0x47a7f2  (/usr/bin/python3.8+0x47a7f2)
    #19 0x47a5cb in PyRun_SimpleFileExFlags (/usr/bin/python3.8+0x47a5cb)
    #20 0x4247dc in _init (/usr/bin/python3.8+0x4247dc)
    #21 0x5fb9b8 in Py_BytesMain (/usr/bin/python3.8+0x5fb9b8)
    #22 0x7ff5873f683f in __libc_start_main /build/glibc-S7Ft5T/glibc-2.23/csu/../csu/libc-start.c:291
    #23 0x5fb8b8 in _start (/usr/bin/python3.8+0x5fb8b8)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/cpu/top_k_kernel.cc:117:37 in void phi::FullTopK<float, long>(long, long, int, phi::DenseTensor const*, float*, long*, int const&, bool const&, bool const&)
==87371==ABORTING

@Ligoml
Copy link
Contributor Author

Ligoml commented Jan 18, 2023

Case14: paddle.atan2

Reproduced Case:

import paddle
import numpy as np
array = np.array([1.3823577699190182e-15], dtype=np.float32)
x = paddle.to_tensor(np.reshape(array, [1]), dtype='float32')
array = np.array([], dtype=np.float32)
y = paddle.to_tensor(np.reshape(array, [0]), dtype='float32')
paddle.atan2(x, y)

Stack Trace Message:

==139163==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f5b2f196792 bp 0x7ffd5024fbf0 sp 0x7ffd5024fbb0 T0)
==139163==The signal is caused by a READ memory access.
==139163==Hint: address points to the zero page.
    #0 0x7f5b2f196792 in phi::Atan2Functor<float>::operator()(long) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/impl/atan2_kernel_impl.h:47:67
    #1 0x7f5b2f196792 in void phi::funcs::ForRange<phi::CPUContext>::operator()<phi::Atan2Functor<float> >(phi::Atan2Functor<float>) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/funcs/for_range.h:37:7
    #2 0x7f5b2f196792 in void phi::Atan2Kernel<float, phi::CPUContext>(phi::CPUContext const&, phi::DenseTensor const&, phi::DenseTensor const&, phi::DenseTensor*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/impl/atan2_kernel_impl.h:85:3
    #3 0x7f5b2f196792 in phi::KernelImpl<void (*)(phi::CPUContext const&, phi::DenseTensor const&, phi::DenseTensor const&, phi::DenseTensor*), &(void phi::Atan2Kernel<float, phi::CPUContext>(phi::CPUContext const&, phi::DenseTensor const&, phi::DenseTensor const&, phi::DenseTensor*))>::VariadicCompute(phi::DeviceContext const&, phi::DenseTensor const&, phi::DenseTensor const&, phi::DenseTensor*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/core/kernel_utils.h:239:12
    #4 0x7f5b28e37ea2 in paddle::experimental::atan2(paddle::experimental::Tensor const&, paddle::experimental::Tensor const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/api/lib/api.cc:692:5
    #5 0x7f5b1c995403 in atan2_ad_func(paddle::experimental::Tensor const&, paddle::experimental::Tensor const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/eager/api/generated/eager_generated/forwards/dygraph_functions.cc:2333:21
    #6 0x7f5b1913ad96 in paddle::pybind::eager_api_atan2(_object*, _object*, _object*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/pybind/eager_op_function.cc:500:42
    #7 0x5025f3 in PyCFunction_Call (/usr/bin/python3.8+0x5025f3)
    #8 0x500db4 in _PyObject_MakeTpCall (/usr/bin/python3.8+0x500db4)
    #9 0x566223 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x566223)
    #10 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #11 0x5016c5 in _PyFunction_Vectorcall (/usr/bin/python3.8+0x5016c5)
    #12 0x564f2d in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x564f2d)
    #13 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #14 0x55f102 in PyEval_EvalCode (/usr/bin/python3.8+0x55f102)
    #15 0x62a1ef  (/usr/bin/python3.8+0x62a1ef)
    #16 0x62a179  (/usr/bin/python3.8+0x62a179)
    #17 0x47a7f2  (/usr/bin/python3.8+0x47a7f2)
    #18 0x47a5cb in PyRun_SimpleFileExFlags (/usr/bin/python3.8+0x47a5cb)
    #19 0x4247dc in _init (/usr/bin/python3.8+0x4247dc)
    #20 0x5fb9b8 in Py_BytesMain (/usr/bin/python3.8+0x5fb9b8)
    #21 0x7f5be077e83f in __libc_start_main /build/glibc-S7Ft5T/glibc-2.23/csu/../csu/libc-start.c:291
    #22 0x5fb8b8 in _start (/usr/bin/python3.8+0x5fb8b8)

@Ligoml
Copy link
Contributor Author

Ligoml commented Jan 18, 2023

Case15: paddle.broadcast_tensors

Reproduced Case:

import paddle
import numpy as np
array = np.array([], dtype=np.float32)
x1 = paddle.to_tensor(np.reshape(array, [0]), dtype='float32')
x2 = paddle.to_tensor(np.reshape(array, [0]), dtype='float32')
x3 = paddle.to_tensor(np.reshape(array, [0]), dtype='float32')
paddle.broadcast_tensors([x1, x2, x3])

Stack Trace Message:

==181808==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f85b43c5f96 bp 0x7ffc0f3851e0 sp 0x7ffc0f385000 T0)
==181808==The signal is caused by a READ memory access.
==181808==Hint: address points to the zero page.
    #0 0x7f85b43c5f96 in Eigen::TensorEvaluator<Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long> const, 0, Eigen::MakePointer> const, Eigen::DefaultDevice>::coeff(long) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h:292:12
    #1 0x7f85b43c5f96 in Eigen::internal::TensorBlockAssignment<float, 1, Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long> const, 0, Eigen::MakePointer>, long>::InnerDimAssign<true, Eigen::TensorEvaluator<Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long> const, 0, Eigen::MakePointer> const, Eigen::DefaultDevice> >::Run(float*, long, Eigen::TensorEvaluator<Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long> const, 0, Eigen::MakePointer> const, Eigen::DefaultDevice> const&, long) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBlock.h:1429:26
    #2 0x7f85b43c5f96 in Eigen::internal::TensorBlockAssignment<float, 1, Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long> const, 0, Eigen::MakePointer>, long>::Run(Eigen::internal::TensorBlockAssignment<float, 1, Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long> const, 0, Eigen::MakePointer>, long>::Target const&, Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long> const, 0, Eigen::MakePointer> const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBlock.h:1522:7
    #3 0x7f85b43c5f96 in Eigen::TensorEvaluator<Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 0, Eigen::MakePointer> const> const, Eigen::DefaultDevice>::BroadcastBlock(Eigen::DSizes<long, 1> const&, Eigen::DSizes<long, 1> const&, Eigen::DSizes<long, 2> const&, Eigen::DSizes<long, 2> const&, Eigen::DSizes<long, 2> const&, long, long, Eigen::internal::TensorBlockScratchAllocator<Eigen::DefaultDevice>&, float*, float**, unsigned long*) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h:1061:7
    #4 0x7f85b43c3c19 in Eigen::TensorEvaluator<Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 0, Eigen::MakePointer> const> const, Eigen::DefaultDevice>::BroadcastBlockAlongBcastDim(Eigen::TensorEvaluator<Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 0, Eigen::MakePointer> const> const, Eigen::DefaultDevice>::BlockBroadcastingParams, long, Eigen::internal::TensorBlockScratchAllocator<Eigen::DefaultDevice>&, float*, float**, unsigned long*) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h
    #5 0x7f85b43c300c in Eigen::TensorEvaluator<Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 0, Eigen::MakePointer> const> const, Eigen::DefaultDevice>::block(Eigen::internal::TensorBlockDescriptor<1, long>&, Eigen::internal::TensorBlockScratchAllocator<Eigen::DefaultDevice>&, bool) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h:674:28
    #6 0x7f85b43bed5c in Eigen::TensorEvaluator<Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 0, Eigen::MakePointer> const> const> const, Eigen::DefaultDevice>::evalBlock(Eigen::internal::TensorBlockDescriptor<1, long>&, Eigen::internal::TensorBlockScratchAllocator<Eigen::DefaultDevice>&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h:221:42
    #7 0x7f85b43be4f2 in Eigen::internal::TensorExecutor<Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 0, Eigen::MakePointer> const> const> const, Eigen::DefaultDevice, true, (Eigen::internal::TiledEvaluation)1>::run(Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 0, Eigen::MakePointer> const> const> const&, Eigen::DefaultDevice const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h:206:19
    #8 0x7f85b42898bf in Eigen::TensorDevice<Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::DefaultDevice>& Eigen::TensorDevice<Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::DefaultDevice>::operator=<Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 0, Eigen::MakePointer> const> >(Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 0, Eigen::MakePointer> const> const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDevice.h:37:7
    #9 0x7f85b42898bf in phi::funcs::EigenBroadcast<Eigen::DefaultDevice, float, 1>::Eval(Eigen::DefaultDevice const&, Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::TensorMap<Eigen::Tensor<float const, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::DSizes<long, 1> const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/funcs/eigen/broadcast.cc:40:21
    #10 0x7f85bd669092 in void phi::ApplyBroadcast<float, phi::CPUContext, 1>(phi::CPUContext const&, phi::DenseTensor const*, phi::DenseTensor*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/impl/broadcast_tensors_kernel_impl.h:72:3
    #11 0x7f85bd666fd9 in void phi::BroadcastTensorsKernel<float, phi::CPUContext>(phi::CPUContext const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, std::vector<phi::DenseTensor*, std::allocator<phi::DenseTensor*> >) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/impl/broadcast_tensors_kernel_impl.h:104:7
    #12 0x7f85bd678642 in phi::KernelImpl<void (*)(phi::CPUContext const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, std::vector<phi::DenseTensor*, std::allocator<phi::DenseTensor*> >), &(void phi::BroadcastTensorsKernel<float, phi::CPUContext>(phi::CPUContext const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, std::vector<phi::DenseTensor*, std::allocator<phi::DenseTensor*> >))>::VariadicCompute(phi::DeviceContext const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, std::vector<phi::DenseTensor*, std::allocator<phi::DenseTensor*> >) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/core/kernel_utils.h:239:12
    #13 0x7f85b7a03802 in paddle::experimental::broadcast_tensors(std::vector<paddle::experimental::Tensor, std::allocator<paddle::experimental::Tensor> > const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/api/lib/api.cc:26561:5
    #14 0x7f85ab9d317a in broadcast_tensors_ad_func(std::vector<paddle::experimental::Tensor, std::allocator<paddle::experimental::Tensor> > const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/eager/api/generated/eager_generated/forwards/dygraph_functions.cc:43385:21
    #15 0x7f85a7cf73ce in paddle::pybind::eager_api_broadcast_tensors(_object*, _object*, _object*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/pybind/eager_op_function.cc:19349:56
    #16 0x5025f3 in PyCFunction_Call (/usr/bin/python3.8+0x5025f3)
    #17 0x500db4 in _PyObject_MakeTpCall (/usr/bin/python3.8+0x500db4)
    #18 0x566223 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x566223)
    #19 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #20 0x5016c5 in _PyFunction_Vectorcall (/usr/bin/python3.8+0x5016c5)
    #21 0x564f2d in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x564f2d)
    #22 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #23 0x55f102 in PyEval_EvalCode (/usr/bin/python3.8+0x55f102)
    #24 0x62a1ef  (/usr/bin/python3.8+0x62a1ef)
    #25 0x62a179  (/usr/bin/python3.8+0x62a179)
    #26 0x47a7f2  (/usr/bin/python3.8+0x47a7f2)
    #27 0x47a5cb in PyRun_SimpleFileExFlags (/usr/bin/python3.8+0x47a5cb)
    #28 0x4247dc in _init (/usr/bin/python3.8+0x4247dc)
    #29 0x5fb9b8 in Py_BytesMain (/usr/bin/python3.8+0x5fb9b8)
    #30 0x7f866ef7d83f in __libc_start_main /build/glibc-S7Ft5T/glibc-2.23/csu/../csu/libc-start.c:291
    #31 0x5fb8b8 in _start (/usr/bin/python3.8+0x5fb8b8)

@Ligoml
Copy link
Contributor Author

Ligoml commented Jan 18, 2023

Case16: paddle.logsumexp

Reproduced Case:

import paddle
import numpy as np
from paddle import logsumexp 
x = paddle.to_tensor(np.random.uniform(-10, 10, [1]).astype(np.float32))
axis = paddle.to_tensor(np.random.uniform(-10, 10, [2, 0]).astype(np.int64))
logsumexp(x,axis)

Stack Trace Message:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==14974==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7f7235708ab3 bp 0x7ffe472e4e70 sp 0x7ffe472e4dc0 T0)
==14974==The signal is caused by a READ memory access.
==14974==Hint: address points to the zero page.
    #0 0x7f7235708ab3 in paddle::pybind::PyObject_CheckLongOrToLong(_object**) /home/work/yakun/paddle-2.4.0/Paddle/paddle/fluid/pybind/op_function_common.cc:69:8
    #1 0x7f7235710845 in paddle::pybind::CastPyArg2Longs(_object*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long) /home/work/yakun/paddle-2.4.0/Paddle/paddle/fluid/pybind/op_function_common.cc:432:11
    #2 0x7f72348da059 in paddle::pybind::eager_api_logsumexp(_object*, _object*, _object*) /home/work/yakun/paddle-2.4.0/Paddle/paddle/fluid/pybind/eager_op_function.cc:10876:33
    #3 0x5025f3 in PyCFunction_Call (/usr/bin/python3.8+0x5025f3) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #4 0x500db4 in _PyObject_MakeTpCall (/usr/bin/python3.8+0x500db4) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #5 0x566223 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x566223) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #6 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #7 0x5016c5 in _PyFunction_Vectorcall (/usr/bin/python3.8+0x5016c5) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #8 0x560136 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x560136) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #9 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #10 0x55f102 in PyEval_EvalCode (/usr/bin/python3.8+0x55f102) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #11 0x62a1ef  (/usr/bin/python3.8+0x62a1ef) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #12 0x62a179  (/usr/bin/python3.8+0x62a179) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #13 0x47a7f2  (/usr/bin/python3.8+0x47a7f2) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #14 0x47a5cb in PyRun_SimpleFileExFlags (/usr/bin/python3.8+0x47a5cb) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #15 0x4247dc in _init (/usr/bin/python3.8+0x4247dc) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #16 0x5fb9b8 in Py_BytesMain (/usr/bin/python3.8+0x5fb9b8) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #17 0x7f731de8883f in __libc_start_main /build/glibc-S7Ft5T/glibc-2.23/csu/../csu/libc-start.c:291
    #18 0x5fb8b8 in _start (/usr/bin/python3.8+0x5fb8b8) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/work/yakun/paddle-2.4.0/Paddle/paddle/fluid/pybind/op_function_common.cc:69:8 in paddle::pybind::PyObject_CheckLongOrToLong(_object**)
==14974==ABORTING

@Ligoml
Copy link
Contributor Author

Ligoml commented Jan 18, 2023

Case17: paddle.flip

Reproduced Case:

import paddle
import numpy as np
from paddle import flip
x = paddle.to_tensor(np.random.uniform(-10, 10, [1, 2, 3]).astype(np.int64)),
axis = paddle.to_tensor(np.random.uniform(-2147483648, 2147483647, [3, 3]).astype(np.int32))
print(x)
print(axis)
flip(x, axis)

Stack Trace Message:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==92083==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7faceb79eab3 bp 0x7ffe95a59990 sp 0x7ffe95a598e0 T0)
==92083==The signal is caused by a READ memory access.
==92083==Hint: address points to the zero page.
    #0 0x7faceb79eab3 in paddle::pybind::PyObject_CheckLongOrToLong(_object**) /home/work/yakun/paddle-2.4.0/Paddle/paddle/fluid/pybind/op_function_common.cc:69:8
    #1 0x7faceb7a4dd5 in paddle::pybind::CastPyArg2Ints(_object*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long) /home/work/yakun/paddle-2.4.0/Paddle/paddle/fluid/pybind/op_function_common.cc:357:11
    #2 0x7facea7c4caf in paddle::pybind::eager_api_flip(_object*, _object*, _object*) /home/work/yakun/paddle-2.4.0/Paddle/paddle/fluid/pybind/eager_op_function.cc:1216:29
    #3 0x5025f3 in PyCFunction_Call (/usr/bin/python3.8+0x5025f3) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #4 0x500db4 in _PyObject_MakeTpCall (/usr/bin/python3.8+0x500db4) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #5 0x566223 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x566223) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #6 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #7 0x5016c5 in _PyFunction_Vectorcall (/usr/bin/python3.8+0x5016c5) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #8 0x560136 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x560136) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #9 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #10 0x55f102 in PyEval_EvalCode (/usr/bin/python3.8+0x55f102) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #11 0x62a1ef  (/usr/bin/python3.8+0x62a1ef) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #12 0x62a179  (/usr/bin/python3.8+0x62a179) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #13 0x47a7f2  (/usr/bin/python3.8+0x47a7f2) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #14 0x47a5cb in PyRun_SimpleFileExFlags (/usr/bin/python3.8+0x47a5cb) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #15 0x4247dc in _init (/usr/bin/python3.8+0x4247dc) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #16 0x5fb9b8 in Py_BytesMain (/usr/bin/python3.8+0x5fb9b8) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
    #17 0x7fad0bf9783f in __libc_start_main /build/glibc-S7Ft5T/glibc-2.23/csu/../csu/libc-start.c:291
    #18 0x5fb8b8 in _start (/usr/bin/python3.8+0x5fb8b8) (BuildId: 69b06f9a4b2e8428d7e32aa682c34a91dc0b961e)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/work/yakun/paddle-2.4.0/Paddle/paddle/fluid/pybind/op_function_common.cc:69:8 in paddle::pybind::PyObject_CheckLongOrToLong(_object**)
==92083==ABORTING

@luotao1
Copy link
Contributor

luotao1 commented Jan 21, 2023

@RedContritio PR请关联到认领任务的issue页,避免大家重复

@RedContritio
Copy link
Contributor

@RedContritio PR请关联到认领任务的issue页,避免大家重复

收到,已关联

@co63oc
Copy link
Contributor

co63oc commented Mar 15, 2023

Case7: paddle.distribution.Beta

Reproduced Case:

import paddle
import numpy as np
array = np.array([], dtype=np.float32)
x = paddle.to_tensor(np.reshape(array, [0]), dtype='int32')
paddle.distribution.Beta(alpha=x, beta=x)

Stack Trace Message:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==194842==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f620fdbc9e6 bp 0x7ffdb2584b80 sp 0x7ffdb25849a0 T0)
==194842==The signal is caused by a READ memory access.
==194842==Hint: address points to the zero page.
    #0 0x7f620fdbc9e6 in Eigen::TensorEvaluator<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long> const, 0, Eigen::MakePointer> const, Eigen::DefaultDevice>::coeff(long) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h:292:12
    #1 0x7f620fdbc9e6 in Eigen::internal::TensorBlockAssignment<int, 1, Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long> const, 0, Eigen::MakePointer>, long>::InnerDimAssign<true, Eigen::TensorEvaluator<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long> const, 0, Eigen::MakePointer> const, Eigen::DefaultDevice> >::Run(int*, long, Eigen::TensorEvaluator<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long> const, 0, Eigen::MakePointer> const, Eigen::DefaultDevice> const&, long) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBlock.h:1429:26
    #2 0x7f620fdbc9e6 in Eigen::internal::TensorBlockAssignment<int, 1, Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long> const, 0, Eigen::MakePointer>, long>::Run(Eigen::internal::TensorBlockAssignment<int, 1, Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long> const, 0, Eigen::MakePointer>, long>::Target const&, Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long> const, 0, Eigen::MakePointer> const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBlock.h:1522:7
    #3 0x7f620fdbc9e6 in Eigen::TensorEvaluator<Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 0, Eigen::MakePointer> const> const, Eigen::DefaultDevice>::BroadcastBlock(Eigen::DSizes<long, 1> const&, Eigen::DSizes<long, 1> const&, Eigen::DSizes<long, 2> const&, Eigen::DSizes<long, 2> const&, Eigen::DSizes<long, 2> const&, long, long, Eigen::internal::TensorBlockScratchAllocator<Eigen::DefaultDevice>&, int*, int**, unsigned long*) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h:1061:7
    #4 0x7f620fdba659 in Eigen::TensorEvaluator<Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 0, Eigen::MakePointer> const> const, Eigen::DefaultDevice>::BroadcastBlockAlongBcastDim(Eigen::TensorEvaluator<Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 0, Eigen::MakePointer> const> const, Eigen::DefaultDevice>::BlockBroadcastingParams, long, Eigen::internal::TensorBlockScratchAllocator<Eigen::DefaultDevice>&, int*, int**, unsigned long*) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h
    #5 0x7f620fdb9a4c in Eigen::TensorEvaluator<Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 0, Eigen::MakePointer> const> const, Eigen::DefaultDevice>::block(Eigen::internal::TensorBlockDescriptor<1, long>&, Eigen::internal::TensorBlockScratchAllocator<Eigen::DefaultDevice>&, bool) const /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h:674:28
    #6 0x7f620fdb57fc in Eigen::TensorEvaluator<Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 0, Eigen::MakePointer> const> const> const, Eigen::DefaultDevice>::evalBlock(Eigen::internal::TensorBlockDescriptor<1, long>&, Eigen::internal::TensorBlockScratchAllocator<Eigen::DefaultDevice>&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h:221:42
    #7 0x7f620fdb4f92 in Eigen::internal::TensorExecutor<Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 0, Eigen::MakePointer> const> const> const, Eigen::DefaultDevice, true, (Eigen::internal::TiledEvaluation)1>::run(Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 0, Eigen::MakePointer> const> const> const&, Eigen::DefaultDevice const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h:206:19
    #8 0x7f620faac1bf in Eigen::TensorDevice<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::DefaultDevice>& Eigen::TensorDevice<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::DefaultDevice>::operator=<Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 0, Eigen::MakePointer> const> >(Eigen::TensorBroadcastingOp<Eigen::DSizes<long, 1> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 0, Eigen::MakePointer> const> const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDevice.h:37:7
    #9 0x7f620faac1bf in phi::funcs::EigenBroadcast<Eigen::DefaultDevice, int, 1>::Eval(Eigen::DefaultDevice const&, Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 0, Eigen::MakePointer>, Eigen::DSizes<long, 1> const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/funcs/eigen/broadcast.cc:40:21
    #10 0x7f6218e7ca72 in void phi::ApplyBroadcast<int, phi::CPUContext, 1>(phi::CPUContext const&, phi::DenseTensor const*, phi::DenseTensor*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/impl/broadcast_tensors_kernel_impl.h:72:3
    #11 0x7f6218e7a9b9 in void phi::BroadcastTensorsKernel<int, phi::CPUContext>(phi::CPUContext const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, std::vector<phi::DenseTensor*, std::allocator<phi::DenseTensor*> >) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/kernels/impl/broadcast_tensors_kernel_impl.h:104:7
    #12 0x7f6218e97062 in phi::KernelImpl<void (*)(phi::CPUContext const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, std::vector<phi::DenseTensor*, std::allocator<phi::DenseTensor*> >), &(void phi::BroadcastTensorsKernel<int, phi::CPUContext>(phi::CPUContext const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, std::vector<phi::DenseTensor*, std::allocator<phi::DenseTensor*> >))>::VariadicCompute(phi::DeviceContext const&, std::vector<phi::DenseTensor const*, std::allocator<phi::DenseTensor const*> > const&, std::vector<phi::DenseTensor*, std::allocator<phi::DenseTensor*> >) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/core/kernel_utils.h:239:12
    #13 0x7f6213222802 in paddle::experimental::broadcast_tensors(std::vector<paddle::experimental::Tensor, std::allocator<paddle::experimental::Tensor> > const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/phi/api/lib/api.cc:26561:5
    #14 0x7f62071f217a in broadcast_tensors_ad_func(std::vector<paddle::experimental::Tensor, std::allocator<paddle::experimental::Tensor> > const&) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/eager/api/generated/eager_generated/forwards/dygraph_functions.cc:43385:21
    #15 0x7f62035163ce in paddle::pybind::eager_api_broadcast_tensors(_object*, _object*, _object*) /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/paddle/fluid/pybind/eager_op_function.cc:19349:56
    #16 0x5025f3 in PyCFunction_Call (/usr/bin/python3.8+0x5025f3)
    #17 0x500db4 in _PyObject_MakeTpCall (/usr/bin/python3.8+0x500db4)
    #18 0x566223 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x566223)
    #19 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #20 0x5016c5 in _PyFunction_Vectorcall (/usr/bin/python3.8+0x5016c5)
    #21 0x564f2d in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x564f2d)
    #22 0x55fa97 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55fa97)
    #23 0x5016c5 in _PyFunction_Vectorcall (/usr/bin/python3.8+0x5016c5)
    #24 0x502212 in _PyObject_Call_Prepend (/usr/bin/python3.8+0x502212)
    #25 0x53d6f6  (/usr/bin/python3.8+0x53d6f6)
    #26 0x53a8b9  (/usr/bin/python3.8+0x53a8b9)
    #27 0x500f77 in _PyObject_MakeTpCall (/usr/bin/python3.8+0x500f77)
    #28 0x565e09 in _PyEval_EvalFrameDefault (/usr/bin/python3.8+0x565e09)
    #29 0x55f470 in _PyEval_EvalCodeWithName (/usr/bin/python3.8+0x55f470)
    #30 0x55f102 in PyEval_EvalCode (/usr/bin/python3.8+0x55f102)
    #31 0x62a1ef  (/usr/bin/python3.8+0x62a1ef)
    #32 0x62a179  (/usr/bin/python3.8+0x62a179)
    #33 0x47a7f2  (/usr/bin/python3.8+0x47a7f2)
    #34 0x47a5cb in PyRun_SimpleFileExFlags (/usr/bin/python3.8+0x47a5cb)
    #35 0x4247dc in _init (/usr/bin/python3.8+0x4247dc)
    #36 0x5fb9b8 in Py_BytesMain (/usr/bin/python3.8+0x5fb9b8)
    #37 0x7f62ca79c83f in __libc_start_main /build/glibc-S7Ft5T/glibc-2.23/csu/../csu/libc-start.c:291
    #38 0x5fb8b8 in _start (/usr/bin/python3.8+0x5fb8b8)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/work/wangying/paddlepaddle/pdpd_source_code_new/pdpd_1109/Paddle/build/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h:292:12 in Eigen::TensorEvaluator<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long> const, 0, Eigen::MakePointer> const, Eigen::DefaultDevice>::coeff(long) const
==194842==ABORTING

最新develop分支没有复现
图片

@wanghuancoder
Copy link
Contributor

你好。我刚刚验证这个case还是会崩溃的。
我是安装官方的develop包复现的:
python -m pip install paddlepaddle-gpu==0.0.0.post112 -f https://www.paddlepaddle.org.cn/whl/linux/gpu/develop.html
同时,我用自己编译的develop也是同样崩溃的。
你可以尝试用官方的包看看是否崩溃。如果不崩溃,那么可能这个bug与环境有关。
如果崩溃,那可能是你自己编的包与官网的不一样。可以把你编译的命令发给我,咱们一起看看

@co63oc
Copy link
Contributor

co63oc commented Mar 16, 2023

图片

图片

aistudio.baidu.com 上配置develop环境运行可以
aistudio使用python -m pip install paddlepaddle-gpu==0.0.0.post112 -f https://www.paddlepaddle.org.cn/whl/linux/gpu/develop.html 安装包测试有问题

@Difers
Copy link
Contributor

Difers commented Mar 20, 2023

在调试Beta算子时发现了sum算子的一个bug,提在这里可以吗?
gpu环境下出错,cpu正常:测试代码如下

import paddle
import numpy as np
paddle.set_device("gpu")
array = np.array([], dtype=np.float32)
x = paddle.to_tensor(np.reshape(array, [0, 2]), dtype='float32')
x.sum(-1)

image
应该是reduce_ function.h下Run函数某一步出错,但下面的维度变化我没看懂QAQ

@luotao1
Copy link
Contributor

luotao1 commented Mar 20, 2023

#49922 (comment)

建议单独提一个 issue,非常感谢 @Difers

@Difers Difers mentioned this issue Mar 20, 2023
@luotao1 luotao1 closed this as completed Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants