You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2017/12/13 04:40:43 UTC

[GitHub] iblis17 opened a new issue #9050: got segfault from lenet with stn example

iblis17 opened a new issue #9050: got segfault from lenet with stn example
URL: https://github.com/apache/incubator-mxnet/issues/9050
 
 
   Hi,
   We encounter segfault with stn.
   Here is the original issue
   https://github.com/dmlc/MXNet.jl/issues/369.
   
   TL;DR:
   Segfault happened in CPU-version `mshadow::BilinearSamplingBackward`
   
   gdb trace here:
   ```julia
   Thread 37 "julia" received signal SIGSEGV, Segmentation fault.
   [Switching to Thread 0x7fff35a15700 (LWP 13819)]
   0x00007fff83e77ba0 in mshadow::BilinearSamplingBackward<float> (input_grad=..., grid_src_data=..., output_grad=..., 
       input_data=...) at src/operator/spatial_transformer.cc:120
   120                   *(g_input + data_index + 1) += *(grad + grad_index) * top_left_y_w
   (gdb) bt
   #0  0x00007fff83e77ba0 in mshadow::BilinearSamplingBackward<float> (input_grad=..., grid_src_data=..., output_grad=..., 
       input_data=...) at src/operator/spatial_transformer.cc:120
   #1  0x00007fff83e5f18c in mxnet::op::SpatialTransformerOp<mshadow::cpu, float>::Backward (this=0x38bcd30, ctx=..., 
       out_grad=std::vector of length 1, capacity 1 = {...}, in_data=std::vector of length 2, capacity 2 = {...}, 
       out_data=std::vector of length 3, capacity 3 = {...}, req=std::vector of length 2, capacity 2 = {...}, 
       in_grad=std::vector of length 2, capacity 2 = {...}, aux_args=std::vector of length 0, capacity 0)
       at src/operator/./spatial_transformer-inl.h:136
   (gdb) p grad
   $1 = (const float *) 0x7fff251e6f90
   (gdb) p top_left_y_w
   $2 = 0.376614928
   (gdb) p grad_index
   $3 = 0
   (gdb) p *(grad + grad_index)                                                                                              
   $4 = 0.00177509966
   (gdb) p g_input + data_index + 1
   $5 = (float *) 0x80032442cf50
   (gdb) p g_input
   $6 = (float *) 0x7fff2442cf50
   (gdb) p data_index
   $7 = 4294967295
   ```
   actually `data_index` become a negative number.
   
   Also, segfault can reproduce in Python's example (with 1.0 prebuilt binary) (https://github.com/dmlc/MXNet.jl/issues/369#issuecomment-350617043)
   ```
   ./train_mnist.py --network lenet --add_stn --optimizer adam
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services