Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upInterruption of callbacks can result in `c++ exception (unknown reason)` message #55
Comments
|
Hmmm. exceptiontest doesn't repro on Ubuntu using gcc. But the first example in this issue does repro. But not the second example. |
|
Is it possible that the difference you're seeing between Linux and Mac is because on Linux, all packages are compiled from source on the test machine, but on Mac, some packages (like Rcpp) were built on a different machine with possibly a different compiler and compiler settings? |
|
Possibly. Could also be clang vs g++ in general? |
|
We am also having issues running our plumber service in docker. We keep having containers implode on us with this stack trace
Is this the same issue? Sorry I am kind of at a loss on this one |
|
@JackStat Are you able to provide us with a reproducible example -- say, a Dockerfile that builds an image that will raise that same error? Also, the segfault you're seeing is probably a separate problem. Can you file a new issue for this? |
|
It's so buried in our proprietary code I don't know if I can but I will try. We installed httpuv 1.3.5 and the issue went away. I will continue to dig and hopefully put this in the appropriate place |
|
Thanks, that would be very helpful. I think that it would make sense to file an issue in the httpuv repo. |
Downstream issues:
rstudio/shiny#1967 (comment)
rstudio/httpuv#130
This happens only under certain circumstances, when a native/Rcpp callback function is registered with the native
later::laterAPI, and an interrupt occurs within the callback.Run
test()to reproduce; you should seelater: c++ exception (unknown reason) occurred while executing callback.In the example above, we are calling
throw Rcpp::internal::InterruptedException()explicitly, but it can happen through user gesture as well:Run
test2(); later::run_now(5), and quickly hit Esc or Ctrl+C to interrupt. You should seeError in execCallbacks(timeoutSecs) : c++ exception (unknown reason).The root cause seems to have to do with the compilation unit of the
throw Rcpp::internal::InterruptedExceptionversus that of thecatch (Rcpp::internal::InterruptedException)(usually the latter is via theEND_RCPPmacro). A minimal repro for this problem is at https://github.com/jcheng5/exceptiontest.