Your message dated Tue, 24 Oct 2023 21:47:55 +0000
with message-id <[email protected]>
and subject line Bug#1021853: fixed in sysprof 45.1-2
has caused the Debian Bug report #1021853,
regarding sysprof: FTBFS on hppa - mmap aliasing issue
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.)


-- 
1021853: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021853
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: sysprof
Version: 3.46.0-2
Severity: normal
Tags: ftbfs patch

Dear Maintainer,

The test test-mapped-ring-buffer fails on hppa:

==================================== 2/4 =====================================
test:         test-mapped-ring-buffer
start time:   14:55:16
duration:     0.40s
result:       killed by signal 6 SIGABRT
command:      GSETTINGS_BACKEND=memory G_DEBUG=gc-friendly MALLOC_PERTURB_=142 
NO_AT_BRIDGE=1 MALLOC_CHECK_=2 G_TEST_SRCDIR=/<<PKGBUILDDIR>>/src/tests 
G_TEST_BUILDDIR=/<<PKGBUILDDIR>>/obj-hppa-linux-gnu/src/tests 
/<<PKGBUILDDIR>>/obj-hppa-linux-gnu/src/tests/test-mapped-ring-buffer
----------------------------------- stdout -----------------------------------
# random seed: R02Sb35445e48e2cfa93f89f3c5793901662
1..3
# Start of MappedRingBuffer tests
Bail out! ERROR:../src/tests/test-mapped-ring-buffer.c:43:test_basic_movements: 
'reader' should not be NULL
----------------------------------- stderr -----------------------------------
**
ERROR:../src/tests/test-mapped-ring-buffer.c:43:test_basic_movements: 'reader' 
should not be NULL
==============================================================================

Full build log is here:
https://buildd.debian.org/status/fetch.php?pkg=sysprof&arch=hppa&ver=3.46.0-3&stamp=1665759904&raw=0

In map_head_and_body_twice(), the second mmap call fails:

mmap2(NULL, 135168, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0) = 0xf64a2000
mmap2(0xf64b3000, 65536, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, 3, 0x1000) 
= -1 EINVAL (Invalid argument)

Due to cache issues, all shared mapping of a page must be equivalently
mapped.  This requires page mappings to be at the same virtual address
modulo 4 MB.  Due to a kernel limitation, all mappings to a file must
be equivalent.

The test can be fixed by rounding the buffer_size used in the mapped
ring buffer to 4 MB on hppa.  This makes the two mmap mappings equivalent.

Please send the fix upstream and install if okay.

Regards,
Dave Anglin

-- System Information:
Debian Release: bookworm/sid
  APT prefers buildd-unstable
  APT policy: (500, 'buildd-unstable'), (500, 'unstable')
Architecture: hppa (parisc64)

Kernel: Linux 5.19.15+ (SMP w/4 CPU threads)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
Index: sysprof-3.46.0/src/libsysprof-capture/mapped-ring-buffer.c
===================================================================
--- sysprof-3.46.0.orig/src/libsysprof-capture/mapped-ring-buffer.c
+++ sysprof-3.46.0/src/libsysprof-capture/mapped-ring-buffer.c
@@ -35,6 +35,7 @@
 
 #define DEFAULT_N_PAGES 32
 #define BUFFER_MAX_SIZE ((UINT32_MAX/2)-_sysprof_getpagesize())
+#define SHM_COLOUR 0x00400000
 
 enum {
   MODE_READER    = 1,
@@ -172,9 +173,16 @@ mapped_ring_buffer_new_reader (size_t bu
 
   page_size = _sysprof_getpagesize ();
 
-  /* Add 1 page for coordination header */
   if (buffer_size == 0)
     buffer_size = page_size * DEFAULT_N_PAGES;
+
+#ifdef __hppa__
+  /* Round buffer_size up to the shared memory colour boundary */
+  buffer_size += SHM_COLOUR - 1;
+  buffer_size &= ~(SHM_COLOUR - 1);
+#endif
+
+  /* Add 1 page for coordination header */
   buffer_size += page_size;
 
   /* Create our memfd (or tmpfs) for writing */

--- End Message ---
--- Begin Message ---
Source: sysprof
Source-Version: 45.1-2
Done: Jeremy Bícha <[email protected]>

We believe that the bug you reported is fixed in the latest version of
sysprof, 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.
Jeremy Bícha <[email protected]> (supplier of updated sysprof 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: Tue, 24 Oct 2023 17:21:44 -0400
Source: sysprof
Built-For-Profiles: noudeb
Architecture: source
Version: 45.1-2
Distribution: unstable
Urgency: medium
Maintainer: Debian GNOME Maintainers 
<[email protected]>
Changed-By: Jeremy Bícha <[email protected]>
Closes: 1021853
Changes:
 sysprof (45.1-2) unstable; urgency=medium
 .
   [ John David Anglin ]
   * Add patch to fix hppa issue noticed in build tests (Closes: #1021853)
Checksums-Sha1:
 0f80f6def875a3c513ab867f65417e4077466309 2795 sysprof_45.1-2.dsc
 f47e2c11bbce7a35431d790c1800e14957e5a53c 14732 sysprof_45.1-2.debian.tar.xz
 91f199834145f0803aea25f4851e055c467f95eb 18209 sysprof_45.1-2_source.buildinfo
Checksums-Sha256:
 6a4dfd0c7493fb744667e555f6ae6a6b6c74cbaba627e908f60a60a16ee7e705 2795 
sysprof_45.1-2.dsc
 af80224dea9ed05660512d7ccb729d6c248ce2c66d2484d27b628f8d6ca09e30 14732 
sysprof_45.1-2.debian.tar.xz
 01a477f6a33ebfefbdbc59313fbf615aeeb577a343a80a683fb839fb22c838e8 18209 
sysprof_45.1-2_source.buildinfo
Files:
 a2f60427ff04f4ec919261124f6bd23e 2795 devel optional sysprof_45.1-2.dsc
 3336114a8f74f864dd0d3988744ff9b5 14732 devel optional 
sysprof_45.1-2.debian.tar.xz
 de052318b106d84578212d5179ee1116 18209 devel optional 
sysprof_45.1-2_source.buildinfo

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

iQIzBAEBCgAdFiEETQvhLw5HdtiqzpaW5mx3Wuv+bH0FAmU4NYAACgkQ5mx3Wuv+
bH17eA/+LK+zah1WEhiGtXd6G3sMNFcvQyBMns1xQf+NBT6aNx3iMUaXpXOD1L3K
UESYdC7jF1WmWZQvbUn3NLRuk3d+CdJQqX24FWU1tg7vxPpbsThmbfckMXfttG2N
KSHVKLpq2g/hsoNeSZ4iCqdxcjtaFLBx0BCcaNaGLaCmElrsP0lLOXh7BtAF4vrC
JI9murhGMVr5uem/oTtVUTRgA8o2MOKzzW8/LAu9dpYW0Qh8S5ZpM4+PUajS+Ibq
3TrzmHAUIFJthMg0w0GDkEiNl1Ib9m+1Ba7VWJrPg0LU5R3r+nYmdgPuiOTa+uof
OVdPTxDBxwIZb4qGdN7nKJ8H7WOahFnZUS9tAHbIfoiWhaTwtO0RXC8M7Zefhl0k
zrfYlPuWnAGc7hLqGRiY8ibx6FIG32qhFBakKwv1mcdopPy8POF6X8pJnrMqgNVb
YMwfz6ZUEgPu8tsgnbhY8h/HixFrhV9dnDYE0mDCBUEzu5nnQRN6QhSSCavmkRTf
htlsIxvIIElViZCgx9xY5JuqbX8T2Zvf3UVMPkcsPDd6b5/7Khu/GzJr3/mFzanQ
RnGjarlNPbeDhfCIdKonCz4MgbxPU0YICFjbNoTvPRu7zEGGsKoqukI/NMLT4AK+
/HprISd4zataA+WreU8xropBHsEYLjVAfrihXgpeRvLlKXDis8k=
=svHJ
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to