Comments (5)
could you share with me the content of the /run/crun
directory?
from crun.
could you share with me the content of the
/run/crun
directory?
edited some sensitive data
from crun.
thanks, I am still unable to reproduce it locally though.
Is it possible for you to try a patch?
diff --git a/src/list.c b/src/list.c
index b310ac9..792e878 100644
--- a/src/list.c
+++ b/src/list.c
@@ -97,7 +97,7 @@ crun_command_list (struct crun_global_arguments *global_args, int argc, char **a
libcrun_context_t crun_context = {
0,
};
- libcrun_container_list_t *list, *it;
+ libcrun_container_list_t *list = NULL, *it;
list_options.format = LIST_TABLE;
I think could fix the issue, but I am not able to confirm it
from crun.
thanks, I am still unable to reproduce it locally though.
Is it possible for you to try a patch?
diff --git a/src/list.c b/src/list.c index b310ac9..792e878 100644 --- a/src/list.c +++ b/src/list.c @@ -97,7 +97,7 @@ crun_command_list (struct crun_global_arguments *global_args, int argc, char **a libcrun_context_t crun_context = { 0, }; - libcrun_container_list_t *list, *it; + libcrun_container_list_t *list = NULL, *it; list_options.format = LIST_TABLE;I think could fix the issue, but I am not able to confirm it
Hello, thank you for the patch.
In the attached archive I noticed that there is no file which contains the PID of the container (abcdef-123456.pid), itβs my fault ((
I have the following launch parameter in systemd unit, like this:
PIDFile=/run/crun/%i.pid
Environment=CRUNROOT=/run/crun
ExecStart=/usr/bin/crun --root=${CRUNROOT} run --pid-file=${CRUNROOT}/%i.pid -f /home/users/%i/config.json -d %i
PID of the container located in /run/crun/abcdef-123456.pid
[root@web ~]# strace crun.12.patched list
execve("/bin/crun.12.patched", ["crun.12.patched", "list"], 0x7ffe1e4714c8 /* 36 vars */) = 0
...
...
mkdirat(AT_FDCWD, "/run/crun", 0700) = -1 EEXIST (File exists)
statx(AT_FDCWD, "/run/crun", AT_STATX_DONT_SYNC, STATX_TYPE, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|0700, stx_size=100, ...}) = 0
openat(AT_FDCWD, "/run/crun", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
fstat(3, {st_mode=S_IFDIR|0700, st_size=100, ...}) = 0
getdents64(3, 0x913cd0 /* 5 entries */, 32768) = 152
access("/run/crun/abcdef-123456/status", F_OK) = 0
access("/run/crun/abcdef-123456.pid/status", F_OK) = -1 ENOTDIR (Not a directory)
close(3) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=NULL} ---
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault (core dumped)
if move the PID file to another location or rename to dot.PID (hidden) , then everything is fine )
[root@web crun]# crun.12.orig list
NAME PID STATUS BUNDLE PATH CREATED OWNER
abcdef-123456 21950 running / 2023-12-14T15:15:38.666662Z root
[root@web crun]# crun.12.patched list
NAME PID STATUS BUNDLE PATH CREATED OWNER
abcdef-123456 21950 running / 2023-12-14T15:15:38.666662Z root
[root@web crun]# ls -al
total 4
drwx------. 4 root root 100 Dec 14 18:15 .
drwxr-xr-x. 41 root root 1220 Dec 14 17:41 ..
drwx------. 3 root root 60 Dec 14 17:32 .cache
drwx------. 2 root root 100 Dec 14 18:15 abcdef-123456
-rwx------. 1 root root 5 Dec 14 18:15 .abcdef-123456.pid
Thanks
from crun.
you should not really mess with the crun directory, that is private and it is supposed to be used only by crun.
On the other hand, crun should report an error not crash, for this problem I've opened a PR: #1374
from crun.
Related Issues (20)
- apt repository for current versions HOT 1
- crun verify the cgroup file system type even when invoked with `--cgroups=disabled`
- crun: bpf create ``: Invalid argument HOT 2
- #21520 crun not working with pterodactyl wings HOT 6
- Read-only file volumes fail on fedora 39 with docker HOT 5
- How to verify downloaded binaries? HOT 2
- Release v1.14.4 HOT 2
- unrecognized option '--keep' when using crun for building docker images HOT 2
- Example Config HOT 1
- Crun not starting in amd64/x86_64 docker container on Apple Silicon HOT 3
- crun 1.14.4: `Error: OCI runtime error: crun: Error relocating /usr/bin/crun: statx: symbol not found` HOT 3
- BPF create error when use debian bullseye kernel >= 5.10.0-26-amd64 HOT 1
- Discrepancy between crun and runc when disallowing access by default to devices with cgroups v1 HOT 5
- Does not ignore SIGWINCH if no terminal is allocated
- container create failed: sd-bus call: Cannot set property CPUQuotaPeriodUSec, or unknown propert HOT 8
- Compilation error with clang++ 17 HOT 3
- Missing libsystemd headers on Alpine Linux v3.19 HOT 2
- Version 1.14.5 HOT 1
- [packit] Propose downstream failed for release 1.15 HOT 2
- Container creation fails with read-only bind mount HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crun.