#1143309 fssync: FTBFS: dh_auto_test: error: make -j2 test returned exit code 2

Package:
src:fssync
Source:
src:fssync
Submitter:
Santiago Vila
Date:
2026-08-03 19:09:02 UTC
Severity:
normal
Tags:
#1143309#5
Date:
2026-08-01 22:35:40 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202608/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:fssync, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean
   dh_auto_clean
	make -j2 clean
make[1]: Entering directory '/<<PKGBUILDDIR>>'
rm -f fssync.1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   dh_clean
 debian/rules binary
dh binary
   dh_update_autotools_config
   dh_autoreconf
   dh_auto_configure
   dh_auto_build
	make -j2 INSTALL="install --strip-program=true"
make[1]: Entering directory '/<<PKGBUILDDIR>>'
rst2man README.rst fssync.1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   dh_auto_test
	make -j2 test
make[1]: Entering directory '/<<PKGBUILDDIR>>'
./test
.missing b'b/c' on destination side
missing b'b' on destination side
... create new inode for b'a'
E...
======================================================================
ERROR: test2 (__main__.Test.test2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/./test", line 356, in test2
    os.link('c', 'd')
    ~~~~~~~^^^^^^^^^^
PermissionError: [Errno 1] Operation not permitted: 'c' -> 'd'
---------------------------------------------------------------------- Ran 5 tests in 0.298s FAILED (errors=1) make[1]: *** [Makefile:21: test] Error 1 make[1]: Leaving directory '/<<PKGBUILDDIR>>' dh_auto_test: error: make -j2 test returned exit code 2 make: *** [debian/rules:17: binary] Error 25 dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2 --------------------------------------------------------------------------------
#1143309#10
Date:
2026-08-02 02:18:44 UTC
From:
To:
Le 02/08/2026 à 00:35, Santiago Vila a écrit :

If you look at the context:

    353      for x in 'a/c', 'c', 'd':
    354        remove(x)
    355      os.symlink('.', 'c')
    356      os.link('c', 'd')

d does not exist, and c has just been created.

It's a mono-thread process with current directory being a temporary one that was created at the test case setup.

So I don't see how it can be a bug in fssync nor even in its deps. For me, there's something wrong at the kernel level. What FS is it ? Is it random ? Does adding a sleep and/or sync between 355 & 356 help ?

Julien

#1143309#15
Date:
2026-08-03 11:07:28 UTC
From:
To:
I think I found. It looks related to a change about os.link in Python 3.14

Python 3.13
   link("c", "d")                          = 0
Python 3.14
   linkat(AT_FDCWD, "c", AT_FDCWD, "d", AT_SYMLINK_FOLLOW) = -1 EPERM (Operation not permitted)

If I call os.link with follow_symlinks=False on Python 3.14, it works:
   linkat(AT_FDCWD, "c", AT_FDCWD, "d", 0) = 0

I'm going to check the Python source code and the related recent commits.

Julien

#1143309#22
Date:
2026-08-03 19:06:45 UTC
From:
To:
See fix at https://github.com/jmuchemb/fssync/commit/0a0c0da5386766139bdc76d3ed6bf6d1a8c657f8

The test suite passes on Python 3.14

But I'm annoyed because I'm far from using Python 3.14 myself and ideally I prefer to release when after real usage on my side. I guess as long as there's no regression on 3.13, it can't be worse as it is currently so I will release in a few days.

Apart from that, I was already thinking about moving from gh to elsewhere, likely codeberg: I could do that at the same time.

Julien