rstudio / httpuv

HTTP and WebSocket server package for R
Other
229 stars 86 forks source link

Segfault on CentOS 7 #171

Closed jcheng5 closed 5 years ago

jcheng5 commented 6 years ago

@shalutiwari is able to reproduce this crash by throwing a lot of load at a particular CentOS 7 VM. Not reproduced on other VMs.

Program received signal SIGSEGV, Segmentation fault.
exists (name="REQUEST_METHOD", this=0x0) at /usr/lib64/R/library/Rcpp/include/Rcpp/Environment.h:192
192             SEXP res = Rf_findVarInFrame( Storage::get__() , nameSym  ) ;
(gdb) bt
#0  exists (name="REQUEST_METHOD", this=0x0) at /usr/lib64/R/library/Rcpp/include/Rcpp/Environment.h:192
#1  assign (x=0x53ba720, name="REQUEST_METHOD", this=0x0) at /usr/lib64/R/library/Rcpp/include/Rcpp/Environment.h:208
#2  set (x=0x53ba720, this=0x7fff47a40d70) at /usr/lib64/R/library/Rcpp/include/Rcpp/proxy/Binding.h:65
#3  Rcpp::BindingPolicy<Rcpp::Environment_Impl<Rcpp::PreserveStorage> >::Binding::operator=<Rcpp::Vector<16, Rcpp::PreserveStorage> > (this=this@entry=0x7fff47a40d70, rhs=...) at /usr/lib64/R/library/Rcpp/include/Rcpp/api/meat/proxy.h:131
#4  0x00007f573257f978 in requestToEnv (pRequest=..., pEnv=0x0) at webapplication.cpp:110
#5  0x00007f5732584214 in RWebApplication::onHeaders(boost::shared_ptr<HttpRequest>, boost::function<void (boost::shared_ptr<HttpResponse>)>) (this=0x2c5eaa0, pRequest=..., callback=...) at webapplication.cpp:224
#6  0x00007f57325761d1 in call<boost::shared_ptr<WebApplication>, boost::shared_ptr<HttpRequest>, boost::function<void(boost::shared_ptr<HttpResponse>)> > (b2=..., b1=..., u=..., this=0x7f572c009700)
    at /usr/lib64/R/library/BH/include/boost/bind/mem_fn_template.hpp:271
#7  operator()<boost::shared_ptr<WebApplication> > (a2=..., a1=..., u=..., this=0x7f572c009700)
    at /usr/lib64/R/library/BH/include/boost/bind/mem_fn_template.hpp:286
#8  operator()<boost::_mfi::mf2<void, WebApplication, boost::shared_ptr<HttpRequest>, boost::function<void(boost::shared_ptr<HttpResponse>)> >, boost::_bi::list0> (a=<synthetic pointer>, f=..., this=0x7f572c009710)
    at /usr/lib64/R/library/BH/include/boost/bind/bind.hpp:398
#9  operator() (this=0x7f572c009700) at /usr/lib64/R/library/BH/include/boost/bind/bind.hpp:1294
#10 boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void, boost::_mfi::mf2<void, WebApplication, boost::shared_ptr<HttpRequest>, boost::function<void (boost::shared_ptr<HttpResponse>)> >, boost::_bi::list3<boost::_bi::value<boost::shared_ptr<WebApplication> >, boost::_bi::value<boost::shared_ptr<HttpRequest> >, boost::_bi::value<boost::function<void (boost::shared_ptr<HttpResponse>)> > > >, void>::invoke(boost::detail::function::function_buffer&) (function_obj_ptr=...)
    at /usr/lib64/R/library/BH/include/boost/function/function_template.hpp:159
#11 0x00007f573256a61a in operator() (this=<optimized out>)
    at /usr/lib64/R/library/BH/include/boost/function/function_template.hpp:760
#12 BoostFunctionCallback::operator() (this=<optimized out>) at callback.h:29
#13 0x00007f5732569a9a in invoke_callback (data=0x7f572c009550) at callback.cpp:7
#14 0x00007f57329eab43 in operator() (this=<optimized out>)
    at /usr/lib64/R/library/BH/include/boost/function/function_template.hpp:760
#15 operator() (this=<optimized out>) at callback_registry.h:28
#16 execCallbacks (timeoutSecs=<optimized out>) at later.cpp:98
#17 0x00007f57329e0f6a in _later_execCallbacks (timeoutSecsSEXP=0x5cdeb48) at RcppExports.cpp:25
#18 0x00007f574214a7dd in do_dotcall () from /usr/lib64/R/lib/libR.so
#19 0x00007f5742187bcc in bcEval () from /usr/lib64/R/lib/libR.so
#20 0x00007f5742195ca8 in Rf_eval () from /usr/lib64/R/lib/libR.so
#21 0x00007f5742197492 in R_execClosure () from /usr/lib64/R/lib/libR.so
#22 0x00007f574218bde8 in bcEval () from /usr/lib64/R/lib/libR.so
#23 0x00007f5742195ca8 in Rf_eval () from /usr/lib64/R/lib/libR.so
#24 0x00007f5742197492 in R_execClosure () from /usr/lib64/R/lib/libR.so
#25 0x00007f574218bde8 in bcEval () from /usr/lib64/R/lib/libR.so
#26 0x00007f5742195ca8 in Rf_eval () from /usr/lib64/R/lib/libR.so
#27 0x00007f5742197492 in R_execClosure () from /usr/lib64/R/lib/libR.so
#28 0x00007f574218bde8 in bcEval () from /usr/lib64/R/lib/libR.so
#29 0x00007f5742195ca8 in Rf_eval () from /usr/lib64/R/lib/libR.so
---Type <return> to continue, or q <return> to quit---