-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
'zfs send' aborts on any signal #810
Comments
Indeed, the signal handlers seem overly broad here. |
@behlendorf Should we add some |
@FransUrbo Good question. Someone would probably need to spend some time investigating that. Either we could just ignore the relevant signals or add handlers for them if we want/need to do something more clever. |
I just got hit by this being half way in to what seemed like it was going to be a 60 hour transfer.. seriously this needs to be fixed or at least documented. Sending Ctrl-Z and fg/bg should do what it does for every other sane process... |
this happened to me when I attached with strace to the zfs send process. on ctrl-c to stop strace, zfs exited with message described in first post |
I just ran into this today trying to use kill -STOP / kill -CONT on ZFS send. I don't know if there's an architectural reason why this wouldn't work (i.e. zfs receive must time out if no data for X seconds), but if not, it would be nice to be able to use STOP/CONT signals to control IO load. |
There is a dirty workaround: send the signal only to another process involved in the processing. If you use Typically works unless you run |
This should be easy to fix.. where in the code do we need to fix it? Can someone point me in the general direction? |
I didn't think to try stopping pv (I was piping send | pv | receive) since I assumed send would just keep sending it data until we ran out of memory or something. That's a great work-around for now if it works (I'll try it next time I'm moving data around). |
@ioquatix it would be great if you could dig in to this. My first guess would be that Actually this may be as straight forward as fully implementing
|
For the record, I can confirm that kill -STOP/CONT on a process piped between send and receive (i.e. pv in my case, mbuffer, etc) works fine as a work around for now. |
zfs-0.7.12 Sigh - I just got bit by this tonight with a ctrl-z and then a fg to restart the process. Is there any movement on a solution being this issue is over 6 years old now. FWIW - I would consider this a bug, because it's certainly not a feature and was surprising. |
This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions. |
This should be resolved in OpenZFS by #10843. |
Better late than never! Well done and thank you :) |
This change adds SIGSTOP and SIGTSTP handling to the issig function; this mirrors its behavior on Solaris. This way, long running kernel tasks can be stopped with the appropriate signals. Note that doing so with ctrl-z on the command line doesn't return control of the tty to the shell, because tty handling is done separately from stopping the process. That can be future work, if people feel that it is a necessary addition. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Signed-off-by: Paul Dagnelie <pcd@delphix.com> Issue #810 Issue #10843 Closes #11801
This change adds SIGSTOP and SIGTSTP handling to the issig function; this mirrors its behavior on Solaris. This way, long running kernel tasks can be stopped with the appropriate signals. Note that doing so with ctrl-z on the command line doesn't return control of the tty to the shell, because tty handling is done separately from stopping the process. That can be future work, if people feel that it is a necessary addition. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Signed-off-by: Paul Dagnelie <pcd@delphix.com> Issue openzfs#810 Issue openzfs#10843 Closes openzfs#11801
This change adds SIGSTOP and SIGTSTP handling to the issig function; this mirrors its behavior on Solaris. This way, long running kernel tasks can be stopped with the appropriate signals. Note that doing so with ctrl-z on the command line doesn't return control of the tty to the shell, because tty handling is done separately from stopping the process. That can be future work, if people feel that it is a necessary addition. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Signed-off-by: Paul Dagnelie <pcd@delphix.com> Issue openzfs#810 Issue openzfs#10843 Closes openzfs#11801
This change adds SIGSTOP and SIGTSTP handling to the issig function; this mirrors its behavior on Solaris. This way, long running kernel tasks can be stopped with the appropriate signals. Note that doing so with ctrl-z on the command line doesn't return control of the tty to the shell, because tty handling is done separately from stopping the process. That can be future work, if people feel that it is a necessary addition. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Signed-off-by: Paul Dagnelie <pcd@delphix.com> Issue openzfs#810 Issue openzfs#10843 Closes openzfs#11801
This change adds SIGSTOP and SIGTSTP handling to the issig function; this mirrors its behavior on Solaris. This way, long running kernel tasks can be stopped with the appropriate signals. Note that doing so with ctrl-z on the command line doesn't return control of the tty to the shell, because tty handling is done separately from stopping the process. That can be future work, if people feel that it is a necessary addition. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Signed-off-by: Paul Dagnelie <pcd@delphix.com> Issue #810 Issue #10843 Closes #11801
This change adds SIGSTOP and SIGTSTP handling to the issig function; this mirrors its behavior on Solaris. This way, long running kernel tasks can be stopped with the appropriate signals. Note that doing so with ctrl-z on the command line doesn't return control of the tty to the shell, because tty handling is done separately from stopping the process. That can be future work, if people feel that it is a necessary addition. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Signed-off-by: Paul Dagnelie <pcd@delphix.com> Issue #810 Issue #10843 Closes #11801
This change adds SIGSTOP and SIGTSTP handling to the issig function; this mirrors its behavior on Solaris. This way, long running kernel tasks can be stopped with the appropriate signals. Note that doing so with ctrl-z on the command line doesn't return control of the tty to the shell, because tty handling is done separately from stopping the process. That can be future work, if people feel that it is a necessary addition. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Signed-off-by: Paul Dagnelie <pcd@delphix.com> Issue openzfs#810 Issue openzfs#10843 Closes openzfs#11801
zfs send
should probably not abort when it receives a signal unless the signal is one of the default-fatal signals.For example, start a send and pipe it however you want. Press CTRL+Z to pause. Type "fg" to resume. The send immediately aborts.
In this situation the send should probably not abort, or maybe the signal should be ignored entirely. It makes sense for other signals such as SIGTERM to cause an abort though.
The text was updated successfully, but these errors were encountered: