[Bug 2071358] Re: Build-time tests fails in some chroots
Bug Watch Updater
2071358 at bugs.launchpad.net
Sat Jun 29 10:00:38 UTC 2024
** Changed in: libmina-sshd-java (Debian)
Importance: Undecided => Unknown
--
You received this bug notification because you are a member of Ubuntu
Sponsors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/2071358
Title:
Build-time tests fails in some chroots
Status in libmina-sshd-java package in Ubuntu:
New
Status in libmina-sshd-java package in Debian:
New
Bug description:
Imported from Debian bug http://bugs.debian.org/1074355:
Source: libmina-sshd-java
Version: 2.12.1-2
Severity: normal
The test
org.apache.sshd.sftp.client.extensions.helpers.SpaceAvailableExtensionImplTest.testFileStoreReport()
is observed to be failing in some chroots. Failures have been reported on
launchpad [1] and in the Debian CI [2]. The test fails with the following
exception:
java.io.IOException: Mount point not found
at
java.base/sun.nio.fs.LinuxFileStore.findMountEntry(LinuxFileStore.java:105)
at java.base/sun.nio.fs.UnixFileStore.<init>(UnixFileStore.java:69)
at java.base/sun.nio.fs.LinuxFileStore.<init>(LinuxFileStore.java:49)
at
java.base/sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:51)
at
java.base/sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:39)
at
java.base/sun.nio.fs.UnixFileSystemProvider.getFileStore(UnixFileSystemProvider.java:381)
at java.base/java.nio.file.Files.getFileStore(Files.java:1498)
I could not reproduce this error in my local chroot. I also do not have
access to a chroot where this issue is reproducible at will. However, I do
have a theory based on an internet search.
In particular, because we depend on /proc/mount to derive the FileStore for
a file, this kind of a failure could have one of these reasons:
a. The chroot has no /proc/mount
b. The /proc/mount has a lack of information
c. The chroot needs root permissions to read /proc/mount
The use of FileStores has been reported to fail in chroot environments in
the past [3][4]. I couldn't conclude about the extent to which this issue
has been resolved in the openjdk. But [3][5] do suggest a way to avoid this
problem.
We run into this issue while getting the FileStore for a given Path using
java.nio.file.Files.getFileStore(Path), which is what
SpaceAvailableExtensionImplTest.testFileStoreReport() does. Alternatively,
only for the sake of this test, we could use
path.getFileSystem().getFileStores() and loop this test through them. This
will, of course, run many more unnecessary tests including the current one.
But it might be better than skipping this altogether.
I hope to submit a patch.
[1]
https://launchpadlibrarian.net/736702067/buildlog_ubuntu-oracular-amd64.libmina-sshd-java_2.12.1-2ppa5_BUILDING.txt.gz
[2]
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/libmina-sshd-java.html
[3] https://mail.openjdk.org/pipermail/nio-dev/2016-October/003915.html
[4] https://bugs.openjdk.org/browse/JDK-8165323
[5] https://hg.openjdk.org/jdk9/jdk9/jdk/rev/2e1e4c9c8af2
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libmina-sshd-java/+bug/2071358/+subscriptions
More information about the Ubuntu-sponsors
mailing list