Bug 2183041

Summary: could not find symbol `criu_set_lsm_mount_context` in `libcriu.so`
Product: Red Hat Enterprise Linux 8 Reporter: Alex Jia <ajia>
Component: crunAssignee: Jindrich Novy <jnovy>
Status: CLOSED ERRATA QA Contact: Alex Jia <ajia>
Severity: high Docs Contact:
Priority: high    
Version: 8.8CC: gscrivan, jnovy, tsweeney
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: crun-1.8.4-1.module+el8.8.0+18640+3a46c1ae Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2184220 2184221 2215262 (view as bug list) Environment:
Last Closed: 2023-11-14 15:29:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2184220, 2184221, 2215262, 2236049    

Description Alex Jia 2023-03-30 10:04:09 UTC
Description of problem:
The checkpoint doesn't work for crun, and got error like this "could not find symbol `criu_set_lsm_mount_context` in `libcriu.so`".

Version-Release number of selected component (if applicable):
[root@kvm-04-guest23 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.8 Beta (Ootpa)
 
[root@kvm-04-guest23 ~]# rpm -q crun criu criu-libs criu-devel kernel
crun-1.8.1-2.module+el8.8.0+18418+f0e540fe.x86_64
criu-3.15-3.module+el8.8.0+18060+3f21f2cc.x86_64
criu-libs-3.15-3.module+el8.8.0+18060+3f21f2cc.x86_64
criu-devel-3.15-3.module+el8.8.0+18060+3f21f2cc.x86_64
kernel-4.18.0-477.6.1.el8_8.x86_64

How reproducible:
always

Steps to Reproduce:
1. make sure the current system is RHEL 8.8 w/ cgroup v2 enabled
2. running tests/test_checkpoint_restore.py with downstream crun

Actual results:

[root@kvm-04-guest23 crun]# python3 tests/test_checkpoint_restore.py
1..3
2023-03-30T08:41:39.458084Z: could not find symbol `criu_set_lsm_mount_context` in `libcriu.so`
b''
Command '['/root/crun/crun', '--root', '/root/crun/.testsuite-run-28376/root', 'checkpoint', '--image-path=/root/crun/.testsuite-run-28376/checkpoint', 'test-tmpjaxqzz7d']' returned non-zero exit status 1.
not ok 1 - checkpoint-restore
ok 2 - checkpoint-restore-ext-ns #SKIP
ok 3 - checkpoint-restore-pre-dump #SKIP

Expected results:
the checkpoint should work for crun on RHEL 8.8

Additional info:
Giuseppe has committed a patch for this issue - https://github.com/containers/crun/pull/1183

Comment 4 Jindrich Novy 2023-03-31 10:00:19 UTC
It's actually part of crun-1.8.3.

Comment 5 Giuseppe Scrivano 2023-03-31 13:16:47 UTC
(In reply to Jindrich Novy from comment #4)
> It's actually part of crun-1.8.3.

have you backported the patch?  The fix didn't hit the release last week

Comment 6 Tom Sweeney 2023-04-04 00:25:43 UTC
Setting up for 8.8 Zeroday

Comment 12 Alex Jia 2023-04-11 01:43:09 UTC
This bug has not been fixed by crun-1.8.3-2.module+el8.9.0+18566+0239040b yet.

[root@kvm-02-guest05 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.9 Beta (Ootpa)

[root@kvm-02-guest05 ~]# rpm -q crun criu criu-libs criu-devel kernel
crun-1.8.3-2.module+el8.9.0+18566+0239040b.x86_64
criu-3.15-3.module+el8.9.0+18566+0239040b.x86_64
criu-libs-3.15-3.module+el8.9.0+18566+0239040b.x86_64
criu-devel-3.15-3.module+el8.9.0+18566+0239040b.x86_64
kernel-4.18.0-484.el8.x86_64

[root@kvm-02-guest05 ~]# cd crun
[root@kvm-02-guest05 crun]# ll crun
lrwxrwxrwx. 1 root root 13 Apr 10 21:37 crun -> /usr/bin/crun

[root@kvm-02-guest05 crun]# python3 tests/test_checkpoint_restore.py
1..3
2023-04-11T01:38:45.420183Z: could not find symbol `criu_join_ns_add` in `libcriu.so`
b''
Command '['/root/crun/crun', '--root', '/root/crun/.testsuite-run-112404/root', 'checkpoint', '--image-path=/root/crun/.testsuite-run-112404/checkpoint', 'test-tmp497ag61j']' returned non-zero exit status 1.
not ok 1 - checkpoint-restore
ok 2 - checkpoint-restore-ext-ns #SKIP
ok 3 - checkpoint-restore-pre-dump #SKIP

Comment 13 Giuseppe Scrivano 2023-04-13 10:21:23 UTC
We need the crun patch in https://github.com/containers/crun/pull/1183

Comment 14 Tom Sweeney 2023-04-17 20:34:20 UTC
Assigning to Jindrich for any further packaging or BZ needs.  Jindrich, please note Giuseppe's last comment.

Comment 15 Jindrich Novy 2023-04-18 07:49:26 UTC
I added that patch on 4th Apr, just forgot to change the state.

Comment 16 Alex Jia 2023-04-18 07:55:35 UTC
(In reply to Alex Jia from comment #12)
> [root@kvm-02-guest05 crun]# python3 tests/test_checkpoint_restore.py
> 1..3
> 2023-04-11T01:38:45.420183Z: could not find symbol `criu_join_ns_add` in
> `libcriu.so`
> b''
> Command '['/root/crun/crun', '--root',
> '/root/crun/.testsuite-run-112404/root', 'checkpoint',
> '--image-path=/root/crun/.testsuite-run-112404/checkpoint',
> 'test-tmp497ag61j']' returned non-zero exit status 1.
> not ok 1 - checkpoint-restore
> ok 2 - checkpoint-restore-ext-ns #SKIP
> ok 3 - checkpoint-restore-pre-dump #SKIP

The original bug has been fixed, this bug is different but similar one,
Giuseppe committed a patch for it: https://github.com/containers/crun/pull/1193

Comment 17 Jindrich Novy 2023-04-18 11:24:07 UTC
The crun-1.8.4 already contains the patch: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=52003754

Comment 18 Alex Jia 2023-04-18 11:26:55 UTC
This bug has been verified on crun-1.8.4-2.module+el8.8.0+18669+fa5aca5a (container-tools-rhel8-8080020230418075432.0f77c1b7).

[root@kvm-03-guest11 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.8 (Ootpa)

[root@kvm-03-guest11 ~]# rpm -q crun criu kernel
crun-1.8.4-2.module+el8.8.0+18669+fa5aca5a.x86_64
criu-3.15-3.module+el8.8.0+18060+3f21f2cc.x86_64
kernel-4.18.0-477.10.1.el8_8.x86_64

[root@kvm-03-guest11 crun]# ln -s /usr/bin/crun ./crun
[root@kvm-03-guest11 crun]# python3 tests/test_checkpoint_restore.py
1..3
ok 1 - checkpoint-restore
ok 2 - checkpoint-restore-ext-ns #SKIP
ok 3 - checkpoint-restore-pre-dump #SKIP

Comment 22 Alex Jia 2023-05-04 10:04:52 UTC
Moving this bug to verified state per Comment 18.

Comment 24 errata-xmlrpc 2023-11-14 15:29:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: container-tools:rhel8 security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:6939