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

'ignoring SIGPIPE signal' under load #121

Closed
dselivanov opened this issue Nov 5, 2018 · 6 comments
Closed

'ignoring SIGPIPE signal' under load #121

dselivanov opened this issue Nov 5, 2018 · 6 comments

Comments

@dselivanov
Copy link

Hi Simon. Under high-load during benchmarking I'm getting:

Error in (function (..., config.file = "/etc/Rserve.conf") :
ignoring SIGPIPE signal

If Rserve compiled in normal model (with forking) it throws error to stderr, but continues to work. However if it is running in "cooperative" mode R process dies after throwing this error. Not sure what is happening there.

I use Rserve http interface.

R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin17.6.0 (64-bit)
Running under: macOS High Sierra 10.13.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib

locale:
[1] en_US.UTF-8/UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] Rserve_1.8-6

loaded via a namespace (and not attached):
[1] compiler_3.5.1
@s-u
Copy link
Owner

s-u commented Nov 5, 2018

Cooperative mode is not the intended mode of operation, because any fatal error terminates the server (since there is only one process which is both the listener and the worker). In the case above, some pipe has been closed while the R process was writing to it so it terminated.

@dselivanov
Copy link
Author

dselivanov commented Nov 5, 2018

Thank you very much for answer. Just wanted to clarify one more thing. I'm using Rserve in cooperative mode in order to be able to update the state of the server process time to time (caching some variables to be used during request processing).
As I understand this is the only option in 1.8.* series because OOB control commands are disabled. Am I right? Is there any other way to update parent process state in normal fork mode?

@long-do
Copy link

long-do commented Sep 19, 2020

Hi @dselivanov,
I have the same error when I run your framework RestRserve for building API.

Sep 19 10:18:34 server_abc Rscript[20367]: Error in (function (..., config.file = "/etc/Rserve.conf") :
Sep 19 10:18:34 server_abc Rscript[20367]: ignoring SIGPIPE signal
Sep 19 10:18:34 server_abc Rscript[20367]: Calls: -> -> do.call ->
Sep 19 10:18:34 server_abc Rscript[20367]: Execution halted
Sep 19 10:18:34 server_abc Rscript[20367]: There were 50 or more warnings (use warnings() to see the first 50)
Sep 19 10:18:44 server_abc Rscript[20367]: Timing stopped at: 0.001 0.012 10.25

But the file "/etc/Rserve.conf does not exist on my "server_abc".
And when I start my service, I see the application Rserve backend is launched with TWO servers, which is contrary to what @s-u said below ("... because any fatal error terminates the server (since there is only one process which is both the listener and the worker)").
Could you please help me to clarify this issue, @s-u @dselivanov .
Thank you very much.

@dselivanov
Copy link
Author

@long-do ignoring SIGPIPE signal is likely nothing to do with Rserve and might be already fixed in dev version of RestRserve (dev branch).

And when I start my service, I see the application Rserve backend is launched with TWO servers

As per my understanding one is Rserve which serves via binary protocol and another is Rserve which serves via http.

Error in (function (..., config.file = "/etc/Rserve.conf") :
But the file "/etc/Rserve.conf does not exist on my "server_abc".

this is not relevant to RestRserve as all parameters are passed explicitly to run.Rserve and as per Rserve documentation

config.file

path of the configuration file to load in the Rserve. It will be
loaded before the above settings and is optional, i.e. if the
file is not present or readable it will be ignored.

@richarddmorey
Copy link

I've been trying to debug a problem with disappearing tempdir()s while using RestRserve (see here: rexyai/RestRserve#174 (comment)) and although I can't reliably reproduce it, it seems that when the tempdir() goes missing, I see this error crop up before it.

Error in (function (..., config.file = "/etc/Rserve.conf")  : 
  ignoring SIGPIPE signal
Calls: <Anonymous> -> <Anonymous> -> do.call -> <Anonymous>
Execution halted

along with

Warning message:
In x$unload() : Could not cancel cli thread

Is it possible that when this error happens, the R process that is halted takes the tempdir() with it when it cleans up?

@s-u
Copy link
Owner

s-u commented Jun 8, 2023

There are two distinct issues discussed here- I have created #194 to talk about tempdir cleanup and #100 about SIGPIPE, thus this is now closed as duplicate of the two.

@s-u s-u closed this as completed Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants