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

1.48.5: test_file_architecture_26 and test_xfs_growfs_0 failing #100

Closed
dvzrv opened this issue Nov 22, 2022 · 14 comments
Closed

1.48.5: test_file_architecture_26 and test_xfs_growfs_0 failing #100

dvzrv opened this issue Nov 22, 2022 · 14 comments

Comments

@dvzrv
Copy link

dvzrv commented Nov 22, 2022

Hi! While packaging 1.48.5 for Arch Linux I ran into these two tests failing:
test_file_architecture_26 and test_xfs_growfs_0.

libguestfs-1.48.5-1-x86_64-build.log
libguestfs-1.48.5-1-x86_64-check.log
test-suite.log

@rwmjones
Copy link
Collaborator

libguestfs: trace: file_architecture "/lib-i586.so.zst"
libguestfs: trace: file_architecture = NULL (error)
libguestfs: error: file_architecture: external command ‘file’ killed by signal -
24
FAIL: test_file_architecture_26

signal 24 may be SIGXCPU, indicating some sort of crash. Not sure what to say about this, but it might be significant that the test involves a zstd file which we only added support for recently. Is it reproducible if you run file ./test-data/files/lib-i586.so.zst on the host?

537/550 test_xfs_growfs_0
libguestfs: error: mkfs: xfs: /dev/VG/LV: Filesystem must be larger than 300MB.

This is a bug (of sorts) caused by changing requirements again in xfs. Our test disk was only 40MB. I will see if I can fix this.

rwmjones added a commit that referenced this issue Nov 22, 2022
I cannot reproduce the originally reported error:

libguestfs: error: mkfs: xfs: /dev/VG/LV: Filesystem must be larger than 300MB.

Thanks: David Runge
Related: #100
@dvzrv
Copy link
Author

dvzrv commented Nov 22, 2022

Is it reproducible if you run file ./test-data/files/lib-i586.so.zst on the host?

That seems fine (outside of the build environment):

file ./test-data/files/lib-i586.so.zst
./test-data/files/lib-i586.so.zst: Zstandard compressed data (v0.8+), Dictionary ID: None

@rwmjones
Copy link
Collaborator

Thanks. Another thing to try would be something like:

$ ./run virt-rescue --ro -a test-data/test.iso -m /dev/sda

><rescue> find / -name '*.zst'
/sysroot/lib-i586.so.zst
><rescue> file -bsL /sysroot/lib-i586.so.zst
Zstandard compressed data (v0.8+), Dictionary ID: None

I expect that the last command may segfault for you inside the appliance, although I don't know why.

@dvzrv
Copy link
Author

dvzrv commented Nov 22, 2022

Hmm, that actually also went fine (in the build environment):

><rescue> file -bsL /sysroot/lib-i586.so.zst
Zstandard compressed data (v0.8+), Dictionary ID: None

@dvzrv
Copy link
Author

dvzrv commented Nov 22, 2022

During the build the test still fails though.
Is there a way for me to disable it for now?

btw: Your patch for test_xfs_growfs_0 works as intended! Thanks!

@dvzrv
Copy link
Author

dvzrv commented Nov 22, 2022

Ah, I guess it would be export SKIP_TEST_FILE_ARCHITECTURE_26=1

archlinux-github pushed a commit to archlinux/svntogit-community that referenced this issue Nov 22, 2022
Add upstream patch for failing test and disable other failing test:
libguestfs/libguestfs#100

git-svn-id: file:///srv/repos/svn-community/svn@1351897 9fca08f4-af9d-4005-b8df-a31f2cc04f65
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this issue Nov 22, 2022
Add upstream patch for failing test and disable other failing test:
libguestfs/libguestfs#100

git-svn-id: file:///srv/repos/svn-community/svn@1351897 9fca08f4-af9d-4005-b8df-a31f2cc04f65
@rwmjones
Copy link
Collaborator

Right, although I'm confused/worried why that test is failing ...

@dvzrv
Copy link
Author

dvzrv commented Nov 22, 2022

Let me know if I can test further things. Build/test always takes quite a while (even on my machine) but I can try again tomorrow.

@Toolybird
Copy link

It's probably the 'z' switch:

><rescue> file -zbsL /sysroot/lib-i586.so.zst
Bad system call

Arch compiles its "file" utility with seccomp support whereas it appears Fedora does not. At least that's what it looks like after checking the koji build log:

checking for seccomp_init in -lseccomp... no

Is that intentional by Fedora?

@rwmjones
Copy link
Collaborator

Oh, well spotted! This could well be the case. Let me compile the Fedora package with seccomp support to see if I can reproduce the problem ...

@rwmjones
Copy link
Collaborator

Yes, I can reproduce this. In fact this is both a bug upstream (in the seccomp support) and in Fedora. I will file bugs for both.

@rwmjones
Copy link
Collaborator

@rwmjones
Copy link
Collaborator

Upstream bug: https://bugs.astron.com/view.php?id=406

@Toolybird
Copy link

re: the upstream report...not sure that'll fly as it's kinda expected when the sandbox is in effect. See the man page [1].

The libguestfs test can be made to pass if the "file" call on line 46 of daemon/file.ml is changed from "-zb" to "-zbS", but I'm not sure if that's what you really want.

[1] https://man.archlinux.org/man/file.1.en#SECURITY

rwmjones added a commit that referenced this issue Nov 28, 2022
I cannot reproduce the originally reported error:

libguestfs: error: mkfs: xfs: /dev/VG/LV: Filesystem must be larger than 300MB.

Thanks: David Runge
Related: #100
(cherry picked from commit e657e45)
rwmjones added a commit that referenced this issue Nov 28, 2022
The file(1) manual suggests using -S (disable seccomp) with -z since
the set of system calls provided by the seccomp policy does not allow
the subprocess to run.  This is obvious when you use file -z on a
compressed file on a Linux distro that enables file's seccomp policy
(Arch does this, Fedora does not):

  $ file -zbsL lib-i586.so.zst
  Bad system call

I also fixed some incorrect text in the manual.

Thanks: Toolybird for pointing to this fix
Reported-by: David Runge
Fixes: #100
(cherry picked from commit 23986d3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants