TestApportValgrind.test_valgrind_min_installed fails on armhf: Invalid write of size 4

Bug #2043713 reported by Simon Quigley
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
High
Mate Kukri

Bug Description

autopkgtests are pretty reliably failing[1] on armhf due to the following (single) test failure:

517s =================================== FAILURES ===================================
517s ________________ TestApportValgrind.test_valgrind_min_installed ________________
517s
517s self = <tests.integration.test_apport_valgrind.TestApportValgrind testMethod=test_valgrind_min_installed>
517s
517s def test_valgrind_min_installed(self):
517s """Valgrind is installed and recent enough."""
517s cmd = ["valgrind", "-q", "--extra-debuginfo-path=./", "ls"]
517s (ret, out, err) = self._call(cmd)
517s > self.assertEqual(err, "")
517s E AssertionError: "==2567== Invalid write of size 4\n==2567[1064 chars]= \n" != ''
517s E - ==2567== Invalid write of size 4
517s E - ==2567== at 0x4843040: ??? (in /usr/lib/arm-linux-gnueabihf/libselinux.so.1)
517s E - ==2567== Address 0xfec9a7e4 is on thread 1's stack
517s E - ==2567== 64 bytes below stack pointer
517s E - ==2567==
517s E - ==2567== Invalid write of size 4
517s E - ==2567== at 0x4842F96: ??? (in /usr/lib/arm-linux-gnueabihf/libselinux.so.1)
517s E - ==2567== Address 0xfec9a758 is on thread 1's stack
517s E - ==2567== 160 bytes below stack pointer
517s E - ==2567==
517s E - ==2567== Invalid write of size 4
517s E - ==2567== at 0x484958C: selinuxfs_exists (in /usr/lib/arm-linux-gnueabihf/libselinux.so.1)
517s E - ==2567== Address 0xfec9a7bc is on thread 1's stack
517s E - ==2567== 48 bytes below stack pointer
517s E - ==2567==
517s E - ==2567== Invalid write of size 4
517s E - ==2567== at 0x4842F0E: ??? (in /usr/lib/arm-linux-gnueabihf/libselinux.so.1)
517s E - ==2567== Address 0xfec9a690 is on thread 1's stack
517s E - ==2567== 16 bytes below stack pointer
517s E - ==2567==
517s E - ==2567== Invalid write of size 4
517s E - ==2567== at 0x4842E62: ??? (in /usr/lib/arm-linux-gnueabihf/libselinux.so.1)
517s E - ==2567== Address 0xfec9a6a0 is on thread 1's stack
517s E - ==2567== 8 bytes below stack pointer
517s E - ==2567==
517s
517s tests/integration/test_apport_valgrind.py:45: AssertionError
517s =============================== warnings summary ===============================

This is caused by -fstack-clash-protection.

Bug-RedHat: https://bugzilla.redhat.com/show_bug.cgi?id=1522678
[1] https://autopkgtest.ubuntu.com/packages/a/apport/noble/armhf

Simon Quigley (tsimonq2)
tags: added: rls-nn-incoming
Revision history for this message
Benjamin Drung (bdrung) wrote :

I need to set maxDiff to None to see the full output of valgrind.

Revision history for this message
Benjamin Drung (bdrung) wrote :

test/apport-valgrind: do not limit diff size: https://github.com/canonical/apport/pull/253

Revision history for this message
Benjamin Drung (bdrung) wrote :

517s =================================== FAILURES ===================================
517s ________________ TestApportValgrind.test_valgrind_min_installed ________________
517s
517s self = <tests.integration.test_apport_valgrind.TestApportValgrind testMethod=test_valgrind_min_installed>
517s
517s def test_valgrind_min_installed(self):
517s """Valgrind is installed and recent enough."""
517s cmd = ["valgrind", "-q", "--extra-debuginfo-path=./", "ls"]
517s (ret, out, err) = self._call(cmd)
517s > self.assertEqual(err, "")
517s E AssertionError: "==2567== Invalid write of size 4\n==2567[1064 chars]= \n" != ''
517s E - ==2567== Invalid write of size 4
517s E - ==2567== at 0x4843040: ??? (in /usr/lib/arm-linux-gnueabihf/libselinux.so.1)
517s E - ==2567== Address 0xfec9a7e4 is on thread 1's stack
517s E - ==2567== 64 bytes below stack pointer
517s E - ==2567==
517s E - ==2567== Invalid write of size 4
517s E - ==2567== at 0x4842F96: ??? (in /usr/lib/arm-linux-gnueabihf/libselinux.so.1)
517s E - ==2567== Address 0xfec9a758 is on thread 1's stack
517s E - ==2567== 160 bytes below stack pointer
517s E - ==2567==
517s E - ==2567== Invalid write of size 4
517s E - ==2567== at 0x484958C: selinuxfs_exists (in /usr/lib/arm-linux-gnueabihf/libselinux.so.1)
517s E - ==2567== Address 0xfec9a7bc is on thread 1's stack
517s E - ==2567== 48 bytes below stack pointer
517s E - ==2567==
517s E - ==2567== Invalid write of size 4
517s E - ==2567== at 0x4842F0E: ??? (in /usr/lib/arm-linux-gnueabihf/libselinux.so.1)
517s E - ==2567== Address 0xfec9a690 is on thread 1's stack
517s E - ==2567== 16 bytes below stack pointer
517s E - ==2567==
517s E - ==2567== Invalid write of size 4
517s E - ==2567== at 0x4842E62: ??? (in /usr/lib/arm-linux-gnueabihf/libselinux.so.1)
517s E - ==2567== Address 0xfec9a6a0 is on thread 1's stack
517s E - ==2567== 8 bytes below stack pointer
517s E - ==2567==
517s
517s tests/integration/test_apport_valgrind.py:45: AssertionError
517s =============================== warnings summary ===============================

Full log: https://autopkgtest.ubuntu.com/results/autopkgtest-noble-bdrung-ppa/noble/armhf/a/apport/20231116_191750_27834@/log.gz

Revision history for this message
Mate Kukri (mkukri) wrote (last edit ):

It is sort of a known issue, you need a no change rebuild when dpkg 1.22.1ubuntu3 hits proposed. That is libselinux needs a rebuild.

Revision history for this message
Adrien Nader (adrien) wrote :

That looks a lot like the -fstack-clash-protection issue we've been having recently for other packages on armhf.

dpkg 1.22.1ubuntu3 should fix this ( https://launchpad.net/ubuntu/+source/dpkg/1.22.1ubuntu3 )

The place where I've written the most details about this is https://code.launchpad.net/~adrien-n/ubuntu/+source/dpkg/+git/dpkg/+merge/456181 . If you want I can also upload your package to my test PPA.

Revision history for this message
Mate Kukri (mkukri) wrote :

@adrien-n based on the errors it looks like the current libselinux was built with the bad flag too

Revision history for this message
Adrien Nader (adrien) wrote :

Thanks for looking more deeply than I did. I guess I'll upload both to my PPA, using whichever version is in -proposed right now.

Revision history for this message
Mate Kukri (mkukri) wrote :

Ive asked an upload of a rebuild of libselinux on IRC: code.launchpad.net/~mkukri/ubuntu/+source/libselinux/+git/libselinux/+merge/456199 along with the other packages we had affected.

There should be someone on it. And after that goes up, this should be fixed.

Benjamin Drung (bdrung)
summary: - armhf autopkgtests fail due to
- TestApportValgrind.test_valgrind_min_installed
+ armhf TestApportValgrind.test_valgrind_min_installed fails: Invalid
+ write of size 4
summary: - armhf TestApportValgrind.test_valgrind_min_installed fails: Invalid
+ TestApportValgrind.test_valgrind_min_installed fails on armhf: Invalid
write of size 4
Benjamin Drung (bdrung)
description: updated
tags: removed: rls-nn-incoming
Mate Kukri (mkukri)
Changed in apport (Ubuntu):
status: New → In Progress
assignee: nobody → Mate Kukri (mkukri)
Benjamin Drung (bdrung)
Changed in apport (Ubuntu):
importance: Undecided → High
Revision history for this message
Mate Kukri (mkukri) wrote :

It should be fixed by the last libselinux upload which has migrated, but keeping it "In Progress" until a successful autopkgtest run of apport

Mate Kukri (mkukri)
Changed in apport (Ubuntu):
status: In Progress → 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.