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

Interrupted system call while cleaning up multicore workers #93

Closed
wlandau opened this issue Aug 13, 2018 · 7 comments
Closed

Interrupted system call while cleaning up multicore workers #93

wlandau opened this issue Aug 13, 2018 · 7 comments
Labels

Comments

@wlandau
Copy link
Contributor

wlandau commented Aug 13, 2018

Happens for both current CRAN (0.8.4.1) and 36d7861.

options(clustermq.scheduler = "multicore")
w <- clustermq::workers(4)
out <- clustermq::Q(1:4, fun = function(x) x * 2, workers = w)
w$cleanup()
## Submitting 4 worker jobs (ID: 7422) ...
## Running 4 calculations (1 calls/chunk) ...
## Error in rzmq::poll.socket(list(private$socket), list("read"), timeout = timeout) :
##   Interrupted system call
traceback()
## 4: rzmq::poll.socket(list(private$socket), list("read"), timeout = timeout)
## 3: self$receive_data(timeout = 5)
## 2: super$cleanup(quiet = quiet)
## 1: w$cleanup()
sessionInfo()
## R version 3.5.0 (2018-04-23)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Red Hat Enterprise Linux
## 
## Matrix products: default
## BLAS: CENSORED/R-3.5.0/lib64/R/lib/libRblas.so
## LAPACK: CENSORED/R-3.5.0/lib64/R/lib/libRlapack.so
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base
## 
## other attached packages:
## [1] usethis_1.3.0       testthat_2.0.0.9000 devtools_1.13.5
## 
## loaded via a namespace (and not attached):
##  [1] prettyunits_1.0.2  assertthat_0.2.0   digest_0.6.15      crayon_1.3.4
##  [5] withr_2.1.2        R6_2.2.2           backports_1.1.2    magrittr_1.5
##  [9] rlang_0.2.1        progress_1.2.0     hms_0.4.2          parallel_3.5.0
## [13] compiler_3.5.0     pkgconfig_2.0.1    rzmq_0.9.3         memoise_1.1.0
## [17] clustermq_0.8.4.99
@wlandau
Copy link
Contributor Author

wlandau commented Aug 13, 2018

Related: #86

@mschubert
Copy link
Owner

Related: ropensci/rzmq#37

@mschubert
Copy link
Owner

@wlandau I think I fixed this, can you check?

@wlandau
Copy link
Contributor Author

wlandau commented Aug 13, 2018

Thanks, Michael! I think I will have time to try again either later tonight or early tomorrow morning.

@wlandau
Copy link
Contributor Author

wlandau commented Aug 14, 2018

Yup, the example runs normally as of bb4477e.

@wlandau wlandau closed this as completed Aug 14, 2018
@mschubert mschubert reopened this Aug 14, 2018
mschubert added a commit that referenced this issue Aug 14, 2018
mschubert added a commit that referenced this issue Aug 14, 2018
this means that
1) R can handle the signals with its handlers, we leave C code + re-enter
2) mccollect(wait=TRUE) will return if process error, so that's ok
3) we rely on multicore workers never getting stuck in an endless loop (should be ok)
4) R will also handle terminating child processes if they produce errors (no Sl zombies found)
@mschubert
Copy link
Owner

I'm fairly certain all interrupt-related issues are now fixed with rzmq@signal.

I can no longer reproduce #93 and #97

@wlandau
Copy link
Contributor Author

wlandau commented Aug 21, 2018

Confirmed, I can no longer reproduce #93 or #97 either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants