SymbioticLab / Salus

Fine-grained GPU sharing primitives

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Segmentation Fault in AssignOp kernel

lenhattan86 opened this issue · comments

Revision:

Reproduce procedures:

  1. Start Executor
  2. python test_mnist_tf.py TestMnistConv.test_conv

Expected

  • no segmentation fault

Actual

This occurs a lot at my side. We still need to cross-check the environment setting.

commented

Segmentation fault in AssignOp kernel.

#0  0x00007ffff01517a5 in std::_Function_handler<void (long, long), Eigen::internal::TensorExecutor<Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_right<int, int, Eigen::internal::scalar_difference_op<int, int> >, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer> const> const> const, Eigen::ThreadPoolDevice, true>::run(Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_right<int, int, Eigen::internal::scalar_difference_op<int, int> >, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer> const> const> const&, Eigen::ThreadPoolDevice const&)::{lambda(long, long)#1}>::_M_invoke(std::_Any_data const&, long&&, std::_Any_data const&) ()
   from /home/tanle/projects/tensorflow-rpcdev/bazel-bin/tensorflow/libtensorflow_kernels.so
#1  0x00007fffeeb8a548 in Eigen::ThreadPoolDevice::parallelFor(long, Eigen::TensorOpCost const&, std::function<long (long)>, std::function<void (long, long)>) const ()
   from /home/tanle/projects/tensorflow-rpcdev/bazel-bin/tensorflow/libtensorflow_kernels.so
#2  0x00007ffff015b8c9 in Eigen::internal::TensorExecutor<Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_right<int, int, Eigen::internal::scalar_difference_op<int, int> >, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer> const> const> const, Eigen::ThreadPoolDevice, true>::run(Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorCwiseUnaryOp<Eigen::internal::scalar_right<int, int, Eigen::internal::scalar_difference_op<int, int> >, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer> const> const> const&, Eigen::ThreadPoolDevice const&) ()
   from /home/tanle/projects/tensorflow-rpcdev/bazel-bin/tensorflow/libtensorflow_kernels.so
#3  0x00007ffff016eb01 in tensorflow::BinaryOp<Eigen::ThreadPoolDevice, tensorflow::functor::sub<int> >::Compute(tensorflow::OpKernelContext*) () from /home/tanle/projects/tensorflow-rpcdev/bazel-bin/tensorflow/libtensorflow_kernels.so
#4  0x00007ffff077a1be in tensorflow::BaseGPUDevice::ComputeHelper(tensorflow::OpKernel*, tensorflow::OpKernelContext*) () from /home/tanle/projects/tensorflow-rpcdev/bazel-bin/tensorflow/libtensorflow_kernels.so
#5  0x00007ffff077a501 in tensorflow::BaseGPUDevice::Compute(tensorflow::OpKernel*, tensorflow::OpKernelContext*) ()
commented

Adding more detailed stack trace obtained after recompile TF with debug symbol

#0  0x00003fffb03e69bc in Eigen::TensorEvaluator<Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_product_op<int, int>, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer> const> const> const, Eigen::ThreadPoolDevice>::evalScalar (this=0x3fff7d7fd198, i=0)
    at external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h:136
#1  0x00003fffb03d5e0c in Eigen::internal::EvalRange<Eigen::TensorEvaluator<Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_product_op<int, int>, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer> const> const> const, Eigen::ThreadPoolDevice>, long, true>::run (evaluator_in=0x3fff7d7fd470, first=0, last=2) at external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h:127
#2  0x00003fffb03cf34c in Eigen::internal::TensorExecutor<Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_product_op<int, int>, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer> const> const> const, Eigen::ThreadPoolDevice, true>::run(Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_product_op<int, int>, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer> const> const> const&, Eigen::ThreadPoolDevice const&)::{lambda(long, long)#1}::operator()(long, long) const (__closure=0x3fff7d7fd4f8, first=0, last=2)
    at external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h:157
#3  0x00003fffb03e6b04 in std::_Function_handler<void (long, long), Eigen::internal::TensorExecutor<Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_product_op<int, int>, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer> const> const> const, Eigen::ThreadPoolDevice, true>::run(Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_product_op<int, int>, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer> const> const> const&, Eigen::ThreadPoolDevice const&)::{lambda(long, long)#1}>::_M_invoke(std::_Any_data const&, long&&, std::_Any_data const&) (__functor=..., __args#0=@0x3fff7d7fd2e0: 0, __args#1=@0x3fff7d7fd308: 2)
    at /gpfs/gpfs0/software/rhel72/packages/gcc/5.4.0/lib/gcc/powerpc64le-unknown-linux-gnu/5.4.0/../../../../include/c++/5.4.0/functional:1871
#4  0x00003fffae7db338 in Eigen::ThreadPoolDevice::parallelFor(long, Eigen::TensorOpCost const&, std::function<long (long)>, std::function<void (long, long)>) const () from /gpfs/gpfs0/groups/chowdhury/peifeng/buildbed/tensorflow-rpcdev/bazel-bin/tensorflow/libtensorflow_kernels.so
#5  0x00003fffb03cf48c in Eigen::internal::TensorExecutor<Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_product_op<int, int>, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer> const> const> const, Eigen::ThreadPoolDevice, true>::run (expr=..., 
    device=...) at external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h:154
#6  0x00003fffb03cc04c in Eigen::TensorDevice<Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::ThreadPoolDevice>::operator=<Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_product_op<int, int>, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer> const> > (this=0x3fff7d7fd5c0, other=...)
    at external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDevice.h:35
#7  0x00003fffb03c95e8 in tensorflow::functor::Assign<Eigen::ThreadPoolDevice, Eigen::TensorMap<Eigen::Tensor<int, 1, 1, long>, 16, Eigen::MakePointer>, Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_product_op<int, int>, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer> const, Eigen::TensorMap<Eigen::Tensor<int const, 1, 1, long>, 16, Eigen::MakePointer> const> > (d=..., out=..., rhs=...)
    at ./tensorflow/core/kernels/cwise_ops_common.h:255
#8  0x00003fffb03c7118 in tensorflow::functor::BinaryFunctor<Eigen::ThreadPoolDevice, tensorflow::functor::mul<int>, 1, false>::operator() (
    this=0x3fff7d7fd9a8, d=..., out=..., in0=..., in1=..., error=0x0) at ./tensorflow/core/kernels/cwise_ops_common.h:265
#9  0x00003fffb03c3f24 in tensorflow::BinaryOp<Eigen::ThreadPoolDevice, tensorflow::functor::mul<int> >::Compute (this=0x3bffdc000c00, ctx=0x3bffdc001790)
    at ./tensorflow/core/kernels/cwise_ops_common.h:116
commented

Fixed by #17