Comments (6)
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.
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.
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.
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.
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.
It falls only occasionally. But even this is sometimes enough to cause problems.
Ubuntu in container
from processx.
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)
- Document common options for output encoding of Windows tools HOT 2
- User-defined process name HOT 2
- Different behaviour inside and outside functions HOT 5
- `$call` should be a call or `NULL` in error objects HOT 3
- Release processx 3.8.1
- Release processx 3.9.0 HOT 1
- get_pid() different from Sys.getpid() on Windows HOT 2
- Compiler error during install: -fPIE HOT 7
- Unnable to read more than 78643 chars from stdout pipe HOT 3
- Release processx 3.8.2
- arguments with special character like \'~\' case an error. HOT 2
- Process hangs when using pipes with `stdout`, `stderr` for `latexmk -pdf` compilation HOT 2
- Move httpbin to test-poll-curl.R? HOT 2
- Upkeep for processx (2022)
- Use cli errors or file an issue if you don't have time to do it now
- `usethis::use_standalone("r-lib/rlang", "types-check")` instead of home grown argument checkers;
- Add alt-text to pictures, plots, etc; see https://posit.co/blog/knitr-fig-alt/ for examples
- processx update from CRAN HOT 3
- Installation from CRAN failed on Fedora 30 HOT 6
- Release processx 3.8.3 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from processx.