[CRIU] dump stopped tasks suspended from terminal (treat TSTP like STOP)?

Pavel Emelyanov xemul at virtuozzo.com
Wed Jan 27 05:48:26 PST 2016


On 01/24/2016 05:51 PM, Scott Mcdermott wrote:
> I tried criu (v1.8-224-g5dc64eb, kernel 4.3.1), command line:
> 
>     $ sudo criu dump -t `pgrep -P1 tmux`
>     Error (ptrace.c:274): SEIZE 17067: unsupported stop signal 20
>     Error (ptrace.c:274): SEIZE 19394: unsupported stop signal 20
>     Error (ptrace.c:274): SEIZE 17067: unsupported stop signal 20
>     ...
>     Error (cr-dump.c:1578): Dumping FAILED.
> 
> These are just shells, pagers, curses apps stopped by CTRL-Z.  I
> typically have tons of these stopped jobs in my terminals.  These simple
> paused terminal apps cannot be dumped by CRIU?

At the moment no, we don't handle TSTP signal.

> I noticed that in patch 79d47a9 the capability to handle processes
> suspended by SIGSTOP was added, and indeed if I do the following:
> 
>     tmux -L test
>     <inside-tmux> more /etc/hosts
>     <outside-tmux> kill -STOP <pidof-more-in-tmux>
> 
> (i.e., send STOP signal from different terminal, leaving pager in
> foreground) then the pager still stops, the shell notices, and a
> subsequent 'dump' succeeds.
> 
> Can we not just naively add code to treat TSTP as identical to STOP?  It
> seems to only differ in where it came from (tty driver raises TSTP in
> attached process but STOP must be raised explicitly by user code) and
> whether it can be blocked.

Well, I _hope_ that treating TSTP just like STOP would work :) But someone needs
to try, would you?

> (incidentally, we also have SIGTTOU case to handle but that's more
> complicated because there's a buffer with I/O waiting when return from
> signal)
> 



More information about the CRIU mailing list