Git Product home page Git Product logo

malt.jl's People

Contributors

fonsp avatar pangoraw avatar rikhuijzer avatar savq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

malt.jl's Issues

Malt on Windows

Malt consistently fails on windows because the behavior for half-open TCP connections differs from that of Linux and macOS.

Consider the following scenario:

  • manager sends request
  • manager awaits response
  • worker sends response
  • worker closes socket

Two things can happen:

  • If the manager reads the response before the socket is closed, nothing happens.

  • If the manager hasn't read the response, and the socket closes, windows will have the worker send an RST (reset signal) to the manager, causing an IOError in the manager.

Solution attempts:

  1. Send another message to acknowledge that the socket can be closed. This won't work reliably in the presence of interrupt signals (in either the worker or the manager).
  2. Don't close the sockets and let the GC handle it. This also doesn't work reliably either.

UPDATE: Solution 2 only fails when there's a signal that kills the process, using a dedicated message instead of an interrupt solves this issue, but it still cannot stop tight loops.


Related issues in Base

Maybe also related: libuv/libuv#3034

FR: `remotecall` without returning a value, but waiting for the call to finish

Something we sometimes use in Pluto is the ability to do a remote call, waiting for it to finish, but without having the result sent over the network. This is useful when the result of the computation uses types that are not defined in the main process, hence it cannot be serialized.

julia> using Distributed

julia> p = Distributed.addprocs(1) |> only
2

julia> Distributed.remotecall_eval(Main, p, :(1 + 1))
2

julia> Distributed.remotecall_eval(Main, [p], :(1 + 1))

julia> ans === nothing
true

Perhaps remote_do can return a Task that resolves to nothing when the call finishes?

Performance comparison with Distributed

Some things are very performance-crucial, like Malt.remotecall_eval(:(1+1)). Can you use BenchmarkTools.jl and compare performance with Distributed? Can you put these scripts in the repository? <3

Tests: remote exceptions

What happens when a worker throws an exception during a remote call? Can we add tests for this behaviour?

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Ability to interrupt `while true end`

In the terminal, Ctrl+C will interrupt some code, like sleep(1000), but not number-crunching code like tight loops. For this, the Julia client has special code that checks for quickly repeating interrupt signals, which creates a "super interrupt":

Schermopname.2022-09-05.om.11.32.35.mov

In Pluto, we have the following code to repeat the Ctrl+C signal:

https://github.com/fonsp/Pluto.jl/blob/70a80786fe9f5c3fe1c6c1368eb937a7e0288305/src/evaluation/WorkspaceManager.jl#L615-L649

This sort-of works (not on Windows), but it will occasionally kill the entire Julia process.

Can you create an example of interrupting while true end using Malt.jl? Can you consistently repeat this multiple times in the same process? Maybe this can be included in the tests?

Maybe this could be included in Malt.jl API, like interrupt(worker; aggressive=true)?

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.