Skip to content
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

clone09.c: EROFS error when open FILE '/proc/sys/net/ipv4/conf/lo/tag' in container env #1083

Open
coolgw opened this issue Sep 26, 2023 · 4 comments
Labels

Comments

@coolgw
Copy link
Contributor

coolgw commented Sep 26, 2023

Reproduce Step:

  1. Using container file create docker img: https://github.com/richiejp/ltp/blob/alpine-container/Containerfile
  2. docker run -it --rm xxx /bin/sh
  3. run following command
    /opt/ltp # ./testcases/bin/clone09
    tst_test.c:1684: TINFO: LTP version: 20220930-713-g126db850c
    tst_test.c:1568: TINFO: Timeout per run is 0h 00m 30s
    clone09.c:59: TINFO: create clone in a new netns with 'CLONE_NEWNET' flag
    clone09.c:62: TBROK: Failed to open FILE '/proc/sys/net/ipv4/conf/lo/tag' for writing: EROFS (30)

Other info in container:
/opt/ltp # ls -l /proc/sys/net/ipv4/conf/lo/tag
-rw-r--r-- 1 root root 0 Sep 26 07:02 /proc/sys/net/ipv4/conf/lo/tag
/opt/ltp # whoami
root
/opt/ltp # mount
proc on /proc/sys type proc (ro,nosuid,nodev,noexec,relatime)

@Martchus
Copy link
Contributor

Maybe a change similar to what I did for #1082 should be applied here as well?

@coolgw
Copy link
Contributor Author

coolgw commented Sep 26, 2023

Maybe a change similar to what I did for #1082 should be applied here as well?
I suggest wait @pevik @richiejp 's feedback, change code or tune the setup of container etc..

@coolgw
Copy link
Contributor Author

coolgw commented Sep 27, 2023

Just FYI @Martchus
Following patch change the container's setup and use normal user instead of root, then if you run case with normal user the error will not happen.
https://patchwork.ozlabs.org/project/ltp/patch/20230926090101.7565-1-rpalethorpe@suse.com/

@richiejp richiejp added the bug label Sep 28, 2023
@coolgw
Copy link
Contributor Author

coolgw commented May 28, 2024

Just FYI @Martchus Following patch change the container's setup and use normal user instead of root, then if you run case with normal user the error will not happen. https://patchwork.ozlabs.org/project/ltp/patch/20230926090101.7565-1-rpalethorpe@suse.com/

https://patchwork.ozlabs.org/project/ltp/patch/20231009102405.26471-1-rpalethorpe@suse.com/ merge in LTP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants