Your message dated Sat, 26 Oct 2024 20:35:10 +0000
with message-id <[email protected]>
and subject line Bug#1081220: fixed in fscrypt 0.3.5-1
has caused the Debian Bug report #1081220,
regarding fscrypt FTBFS in tests on systems with low available locked memory
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1081220: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1081220
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: fscrypt
Version: 0.3.4-2
Severity: minor
Tags: patch ftbfs
User: [email protected]
Usertags: origin-ubuntu oracular ubuntu-patch

Hi Paride,

The latest version of fscrypt has been stuck for some time in Ubuntu's
devel-proposed pocket because its build-time tests depend on being able to
lock memory for keys, and on the ppc64el builders in Launchpad, less memory

[...]
=== RUN   TestMakeKeys
    crypto_test.go:122: could not lock key in memory
--- FAIL: TestMakeKeys (0.00s)
is available for locking than expected:
[...]

  (https://launchpad.net/ubuntu/+source/fscrypt/0.3.4-2/+build/28152160)

The upstream testsuite does already have support for detecting when
insufficient locked memory is available and avoiding treating that as a
failure, but currently it only applies this when creating "big" keys.

The attached patch causes a number of other tests to be skipped when locked
memory is unavailable.  Unfortunately this is insufficient to get the
package to build because there is one remaining test that fails with a
segfault, that I have not gotten to the bottom of:

[...]
=== RUN   TestKeysAndOutputsDistinct
--- FAIL: TestKeysAndOutputsDistinct (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference 
[recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x101eeda8]

goroutine 16 [running]:
testing.tRunner.func1.2({0x1021eec0, 0x10410a80})
        /usr/lib/go-1.23/src/testing/testing.go:1632 +0x1e8
testing.tRunner.func1()
[...]

But I believe the patch is still an improvement in overall portability of
the package.

Thanks for considering,

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
[email protected]                                     [email protected]
diff -Nru fscrypt-0.3.4/debian/patches/dont-fail-tests-on-mlock.patch 
fscrypt-0.3.4/debian/patches/dont-fail-tests-on-mlock.patch
--- fscrypt-0.3.4/debian/patches/dont-fail-tests-on-mlock.patch 1969-12-31 
16:00:00.000000000 -0800
+++ fscrypt-0.3.4/debian/patches/dont-fail-tests-on-mlock.patch 2024-09-09 
07:54:54.000000000 -0700
@@ -0,0 +1,91 @@
+Description: don't fail tests when locked memory is unavailable
+ The test suite already has support for skipping tests when locked memory
+ is unavailable, but currently only does this for the "big key" test.  On
+ the Launchpad ppc64el builders, less memory is available for locking than
+ expected.
+ .
+ Patch our test suite to skip tests when locked memory is unavailable
+ instead of failing.  With this, all tests pass under `ulimit -S -l 2`
+ on x86 except for TestKeysAndOutputsDistinct, whose usage of the locked
+ memory is deeper and results in a segfault currently.
+Author: Steve Langasek <[email protected]>
+Forwarded: no
+Last-Update: 2024-09-09
+
+Index: fscrypt-0.3.4/crypto/crypto_test.go
+===================================================================
+--- fscrypt-0.3.4.orig/crypto/crypto_test.go
++++ fscrypt-0.3.4/crypto/crypto_test.go
+@@ -118,10 +118,15 @@
+       data := []byte("1234\n6789")
+ 
+       key1, err := NewKeyFromReader(bytes.NewReader(data))
+-      if err != nil {
++      switch err {
++      case nil:
++              defer key1.Wipe()
++      case ErrMlockUlimit:
++              // Don't fail just because "ulimit -l" is too low.
++              t.Skip(err)
++      default:
+               t.Fatal(err)
+       }
+-      defer key1.Wipe()
+       if !bytes.Equal(data, key1.data) {
+               t.Error("Key from reader contained incorrect data")
+       }
+@@ -139,6 +144,10 @@
+ // Tests that wipe succeeds
+ func TestWipe(t *testing.T) {
+       key, err := makeKey(1, 1000)
++      if err == ErrMlockUlimit {
++              // Don't fail just because "ulimit -l" is too low.
++              t.Skip(err)
++      }
+       if err != nil {
+               t.Fatal(err)
+       }
+@@ -169,6 +178,10 @@
+ 
+       key2, err := NewKeyFromReader(bytes.NewReader(nil))
+       if err != nil {
++                if err == ErrMlockUlimit {
++                      // Don't fail just because "ulimit -l" is too low.
++                      t.Skip(err)
++              }
+               t.Fatal(err)
+       }
+       defer key2.Wipe()
+@@ -188,6 +201,10 @@
+       }()
+ 
+       if err != nil {
++                if err == ErrMlockUlimit {
++                      // Don't fail just because "ulimit -l" is too low.
++                      t.Skip(err)
++              }
+               t.Fatal(err)
+       }
+       if err := key.Wipe(); err != nil {
+@@ -217,6 +234,10 @@
+       r := io.LimitReader(ConstReader(1), int64(os.Getpagesize())+1)
+       key, err := NewKeyFromReader(r)
+       if err != nil {
++                if err == ErrMlockUlimit {
++                      // Don't fail just because "ulimit -l" is too low.
++                      t.Skip(err)
++              }
+               t.Fatal(err)
+       }
+       defer key.Wipe()
+@@ -257,6 +278,10 @@
+ func TestRandomKeyGen(t *testing.T) {
+       key, err := NewRandomKey(os.Getpagesize())
+       if err != nil {
++                if err == ErrMlockUlimit {
++                      // Don't fail just because "ulimit -l" is too low.
++                      t.Skip(err)
++              }
+               t.Fatal(err)
+       }
+       defer key.Wipe()
diff -Nru fscrypt-0.3.4/debian/patches/series 
fscrypt-0.3.4/debian/patches/series
--- fscrypt-0.3.4/debian/patches/series 1969-12-31 16:00:00.000000000 -0800
+++ fscrypt-0.3.4/debian/patches/series 2024-09-06 16:40:02.000000000 -0700
@@ -0,0 +1 @@
+dont-fail-tests-on-mlock.patch

--- End Message ---
--- Begin Message ---
Source: fscrypt
Source-Version: 0.3.5-1
Done: Paride Legovini <[email protected]>

We believe that the bug you reported is fixed in the latest version of
fscrypt, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Paride Legovini <[email protected]> (supplier of updated fscrypt package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sat, 26 Oct 2024 19:51:27 +0200
Source: fscrypt
Architecture: source
Version: 0.3.5-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Go Packaging Team <[email protected]>
Changed-By: Paride Legovini <[email protected]>
Closes: 1081220
Changes:
 fscrypt (0.3.5-1) unstable; urgency=medium
 .
   * New upstream version 0.3.5
   * d/patches: new patch: dont-fail-tests-on-mlock.patch.
     Don't fail tests when locked memory is unavailable.
     Thanks to Steve Langasek (Closes: #1081220)
   * d/control: bump Standards-Version to 4.7.0
Checksums-Sha1:
 f52e56a1a9b94c4b0a310b49d92208602d013313 1923 fscrypt_0.3.5-1.dsc
 2ef10e3a036f0fba3cacb63a8932e3e221f5ddeb 140936 fscrypt_0.3.5.orig.tar.xz
 f1bdc6ea7878f787f7df050562fd417aa506dabe 6212 fscrypt_0.3.5-1.debian.tar.xz
 fb4499f157ee6f142d521fa156aa606890e49e95 6272 fscrypt_0.3.5-1_amd64.buildinfo
Checksums-Sha256:
 96a73de5c52bb77e0c237a703938b96c9dcccf252239bc480ee76edeb5258b77 1923 
fscrypt_0.3.5-1.dsc
 c23b7a124daf57e3f1bbc5daefbfd72e837907a7b99ab5a0678264cae0ac436c 140936 
fscrypt_0.3.5.orig.tar.xz
 2e76dbc7571e730c0fa31da87420201055eb38e2c3ad5e6bbb7e1643fbdb47c2 6212 
fscrypt_0.3.5-1.debian.tar.xz
 ef6911ba696f5fa1484b711ac756b6621e42167904d32a84d226b472d00cc37c 6272 
fscrypt_0.3.5-1_amd64.buildinfo
Files:
 746ae31e3659acf471e7ca4f99673de6 1923 admin optional fscrypt_0.3.5-1.dsc
 a6f09aa7dc00df8d622b87a4b79a9586 140936 admin optional 
fscrypt_0.3.5.orig.tar.xz
 07b22c5e9023a2a0e2fab5777cae7e33 6212 admin optional 
fscrypt_0.3.5-1.debian.tar.xz
 631410e16767a8a205d46396b766416c 6272 admin optional 
fscrypt_0.3.5-1_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQFGBAEBCgAwFiEEVhrVhe7XZpIbqN2W1lhhiD4BTbkFAmcdSPUSHHBhcmlkZUBk
ZWJpYW4ub3JnAAoJENZYYYg+AU25F18H+gIxJKGESjxTtyLv6r5gQ0T9xioUbI2t
L8Uo2OkTOABI7fKs+JXQRPq6wRAXk/14cLZ9hzWzLNRP2sAvtpSDbVWorR6SpJL+
3alu45C2JiXj38PVQbQzgcyCrzpjtBXMjV5qaLNjnBTjCIfMpU7VolqHL6ZLOw2a
fzV9QaDC1P1I5T7iaacfCi8nO1tVH+pRfRXyDuJD/RhgOoEWEsJpiOM123etYaOO
fkJ3qg38Jj/exSfAUyGVWWeUNnp1bMgTCAj1npLAoyRoPPnlCtNf1+XsPrxJR9xI
jKJpMF526uqmLmr0PTDuKcTnsNJrN8sUXzpEdxr1yIGhUOoHKw4geic=
=wxwB
-----END PGP SIGNATURE-----

Attachment: pgpo_DQmIAAw2.pgp
Description: PGP signature


--- End Message ---

Reply via email to