Build-time test fails in some chroots

Bug #2071358 reported by Pushkar Kulkarni
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libmina-sshd-java (Debian)
libmina-sshd-java (Ubuntu)
Fix Released

Bug Description

Imported from Debian bug

Source: libmina-sshd-java
Version: 2.12.1-2
Severity: normal

The test
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: Mount point not found
at java.base/sun.nio.fs.UnixFileStore.<init>(
at java.base/sun.nio.fs.LinuxFileStore.<init>(
at java.base/java.nio.file.Files.getFileStore(

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

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.


Related branches

tags: added: update-excuse
Changed in libmina-sshd-java (Debian):
importance: Undecided → Unknown
summary: - Build-time tests fails in some chroots
+ Build-time test fails in some chroots
Changed in libmina-sshd-java (Debian):
status: New → Confirmed
Revision history for this message
Vladimir Petko (vpa1977) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libmina-sshd-java - 2.12.1-2ubuntu1

libmina-sshd-java (2.12.1-2ubuntu1) oracular; urgency=medium

  * d/patches: Add patch to work-around SFTP test failure
    (LP: #2071358)

 -- Pushkar Kulkarni <email address hidden> Thu, 27 Jun 2024 18:14:54 +0530

Changed in libmina-sshd-java (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.