[DragonFlyBSD - Bug #3318] Segmenation fault when a process resumed with checkpt exits

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Sat Jun 18 08:24:37 PDT 2022


Issue #3318 has been updated by zabolekar.


tuxillo wrote in #note-1:

> We'll try t at least handle that case but we're also considering how useful process checkpointing really is. If anybody has any feedback about it now it would be the time to share it :-)

To clarify, I don't actually have a use for process checkpointing yet, this was my first time experimenting with it. It's just that sys_checkpoint/checkpt looks so nice and boilerplate-free compared to e.g. CRIU :)


----------------------------------------
Bug #3318: Segmenation fault when a process resumed with checkpt exits
http://bugs.dragonflybsd.org/issues/3318#change-14387

* Author: zabolekar
* Status: In Progress
* Priority: Normal
* Assignee: tuxillo
* Target version: 6.4
* Start date: 2022-06-12
----------------------------------------
DragonFly version: 6.2.1

Code example (error handling omitted for brevity):
<pre><code class="c">
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/checkpoint.h>
     
void save(const char* filename)
{
    int file = open(filename, O_RDWR|O_CREAT|O_TRUNC, 0666);
    sys_checkpoint(CKPT_FREEZE, file, -1, -1);
    close(file);
}
  
int main()
{
    puts("a");
    save("a.ckpt");
    puts("b");
}
</code></pre>

Expected output:

<pre>
% gcc test.c -o test -Wall -Wextra
% ./test
a
b
% checkpt -r a.ckpt
b
</pre>

Actual output:

<pre>
% gcc test.c -o test -Wall -Wextra
% ./test
a
b
% checkpt -r a.ckpt
b
pid 1143 (test), uid 1001: exited on signal 11 (core dumped)
Segmentation fault (core dumped)
</pre>

Backtrace with @gdb test test.core@:

<pre>
#0  0x000000080040400f in __tls_get_addr () from /libexec/ld-elf.so.2
#1  0x000000080075648a in _thread_finalize () from /lib/libc.so.8
#2  0x0000000800756449 in exit () from /lib/libc.so.8
#3  0x00000000004007b3 in _start ()
</pre>

See also: https://lists.dragonflybsd.org/pipermail/users/2022-June/405002.html



-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



More information about the Bugs mailing list