Code Monkey home page Code Monkey logo

Comments (6)

avraam-inside avatar avraam-inside commented on September 5, 2024 1

It won't work, there's too much code, the service is on a shiny-proxy, with its own package and oun autotests and renv, the error repeats relatively rarely and there is no clear pattern how to cause it.

But after waiting for n time, I probably found the area with which it is connected - most likely with renv...

It's very strange why it climbs into CRAN. When restarting - everything works normally, the error is not repeated.

image

If you suddenly have ideas or have encountered them before, I will be glad to help. But it seems that the problem is not in the processx.

from processx.

gaborcsardi avatar gaborcsardi commented on September 5, 2024

Can you try to create a reproducible example? E.g. you mention run() but p$read_all_error_lines() is about the R6 class and not run(). Hopefully a reproducible example will clarify this.

from processx.

avraam-inside avatar avraam-inside commented on September 5, 2024

Yes, I just tried both through run and through R6.

Crashes on any code.

It takes and hangs sometimes. It is expected to work in 4 seconds usually, sometimes it hangs after a couple of minutes.

An example of how I did:

processx::run('bash', c('-c', 'cd /home && R --no-save --no-restore-data --quiet -e "print(\'123\')"'))

and

p <- processx::process$new('bash', c('-c', 'cd /home && R --no-save --no-restore-data --quiet -e "print(\'123\')"')), stdout = "|", stderr = "|", wd = here())
    p$poll_io(50000000)
    
    stderr <- p$read_all_error_lines()
    stdout <- p$read_all_output_lines()
    
    close(p$get_output_connection())
    close(p$get_error_connection())
    
    p$kill_tree()
    
    p$kill()

from processx.

gaborcsardi avatar gaborcsardi commented on September 5, 2024

An example of how I did:

This runs in ~ 150ms for me, so that is definitely weird, even if it runs. It also never crashes or hangs for me. What is your platform?

system.time({
  p <- processx::process$new('bash', c('-c', 'cd /home && R --no-save --no-restore-data --quiet -e "print(\'123\')")'), stdout = "|", stderr = "|", wd = here::here())
  p$wait()
})

This also does not crash, but finishes in ~5ms.

from processx.

avraam-inside avatar avraam-inside commented on September 5, 2024

It falls only occasionally. But even this is sometimes enough to cause problems.

Ubuntu in container

from processx.

gaborcsardi avatar gaborcsardi commented on September 5, 2024

It falls only occasionally.

I just ran it ~8000 times...

Ubuntu in container

That's great, so then can you create a Dockerfile that reproduces this?

from processx.

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.