Giter VIP home page Giter VIP logo

Comments (1)

HenrikBengtsson avatar HenrikBengtsson commented on July 17, 2024

To add some ideas, I run a post-mortem analysis when this happens and include the findings in the error message, e.g.

> library(future)
> plan(multicore)
> f <- future({ tools::pskill(Sys.getpid()) })
> value(f)
Error: Failed to retrieve the result of MulticoreFuture (<none>) from the forked
worker (on localhost; PID 118742). Post-mortem diagnostic: No process exists
with this PID, i.e. the forked localhost worker is no longer alive
In addition: Warning message:
In mccollect(jobs = jobs, wait = TRUE) :
  1 parallel job did not deliver a result

and

> library(future)
> plan(multisession)
> f <- future(tools::pskill(Sys.getpid()))
TRACKER:  loadedNamespaces() changed:  1 package loaded ('crayon')
> value(f)
Error in unserialize(node$con) : 
  MultisessionFuture (<none>) failed to receive results from cluster
RichSOCKnode #1 (PID 119302 on localhost 'localhost'). The reason
reported was 'error reading from connection'. Post-mortem diagnostic: No
process exists with this PID, i.e. the localhost worker is no longer alive

In some cases, we can give more clues. For example, when a non-exportable object may be in play, e.g.

> library(future)
> plan(multisession)
> library(XML)
> doc <- xmlParse(system.file("exampleData", "tagnames.xml", package = "XML"))
> a <- getNodeSet(doc, "/doc//a[@status]")[[1]]
> f <- future(xmlGetAttr(a, "status"))
> value(f)
Error in unserialize(node$con) :
  MultisessionFuture (<none>) failed to receive results from cluster
RichSOCKnode #1 (PID 31541 on localhost 'localhost'). The reason
reported was 'error reading from connection'. Post-mortem diagnostic:
No process exists with this PID, i.e. the localhost worker is no
longer alive. Detected a non-exportable reference ('externalptr' of
class 'XMLInternalElementNode') in one of the globals ('a' of class
'XMLInternalElementNode') used in the future expression. The total
size of the 1 globals exported is 520 bytes. There is one global: 'a'
(520 bytes of class 'externalptr')

That exported non-exportable XML object causes XML to segfault the parallel worker, cf. https://future.futureverse.org/articles/future-4-non-exportable-objects.html#package-xml.

I found that these type of error messages helps the user to help themselves, but it also saves me a lot of time when someone reaches out for help.

from biocparallel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.