segfault in ld-linux-x86-64.so

Bug #1992468 reported by Pete Lomax
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

My manually built elf x64 file has started crashing on load, within the last month or so.
It worked fine on Ubuntu 20.04.x, but fails on 22.04 - same problem on Mint 19.3 and Fedora 36.

dmesg ... gives this:

[ 107.121214] p[4370]: segfault at 0 ip 00007f3d725b8350 sp 00007ffea111fba0 error 4 in ld-linux-x86-64.so.2[7f3d72598000+2a000]
[ 107.121230] Code: ff ff 00 45 31 db 48 8d 15 c9 ac 00 00 4c 8d 05 46 8f 01 00 4c 8d 2d 1f 8f 01 00 49 89 c2 48 8d 58 ff 48 89 f8 49 f7 da 66 90 <8b> 08 83 f9 07 77 19 85 c9 74 45 83 f9 07 77 40 48 63 0c 8a 48 01

You can download the offending file (a single plain 4MB ELF x64) from http://phix.x10.mx/p64

It almost certainly contains older/rarer forms of relocations and suchlike, but
only about ten or so and meant to be as simple as possible.

If I need to change the binary content of that file, I can, but might need a wee bit of help.

Of course, if/once it gets through ld-linux-x86-64.so and complains about something else, ignore it, or should you be at all intrigued you can visit http://phix.x10.mx/download.php to get the full package.

References, just in case you need them, or to ask a wider set than just me for more details direct:
https://openeuphoria.org/forum/136972.wc?last_id=136973
https://github.com/petelomax/Phix/issues/13
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu82.2
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: pete 1096 F.... pulseaudio
CasperMD5json: {
CurrentDesktop: X-Cinnamon
DistroRelease: Linux Mint 21
InstallationDate: Installed on 2022-12-08 (0 days ago)
InstallationMedia: Linux Mint 21 "Vanessa" - Release amd64 20220726
IwConfig:
 lo no wireless extensions.

 enp0s3 no wireless extensions.
Lsusb:
 Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
 Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Lsusb-t:
 /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/12p, 12M
     |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
MachineType: innotek GmbH VirtualBox
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
Package: linux (not installed)
ProcFB: 0 svgadrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.15.0-56-generic root=UUID=24d28a06-1b9b-4d48-9055-546f7a0e87a3 ro quiet splash
ProcVersionSignature: Ubuntu 5.15.0-56.62-generic 5.15.64
RelatedPackageVersions:
 linux-restricted-modules-5.15.0-56-generic N/A
 linux-backports-modules-5.15.0-56-generic N/A
 linux-firmware 20220329.git681281e4-0ubuntu3.7
RfKill:

Tags: vanessa
Uname: Linux 5.15.0-56-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo vboxsf
_MarkForUpload: True
dmi.bios.date: 12/01/2006
dmi.bios.vendor: innotek GmbH
dmi.bios.version: VirtualBox
dmi.board.name: VirtualBox
dmi.board.vendor: Oracle Corporation
dmi.board.version: 1.2
dmi.chassis.type: 1
dmi.chassis.vendor: Oracle Corporation
dmi.modalias: dmi:bvninnotekGmbH:bvrVirtualBox:bd12/01/2006:svninnotekGmbH:pnVirtualBox:pvr1.2:rvnOracleCorporation:rnVirtualBox:rvr1.2:cvnOracleCorporation:ct1:cvr:sku:
dmi.product.family: Virtual Machine
dmi.product.name: VirtualBox
dmi.product.version: 1.2
dmi.sys.vendor: innotek GmbH

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Libera.chat.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1992468/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Pete Lomax (petelomax) wrote :

It asked me to specify a package and this is the only one that matched

affects: ubuntu → ld.so.preload-manager (Ubuntu)
Pete Lomax (petelomax)
description: updated
Revision history for this message
Pete Lomax (petelomax) wrote (last edit ):

changed to glibc on advice from SO

affects: ld.so.preload-manager (Ubuntu) → glibc (Ubuntu)
Revision history for this message
Pete Lomax (petelomax) wrote :

Irv said:
I upgraded my Linux kernel to 5.4.0-131-generic, and that solved the segfault issue. But latest Ubuntu uses 5.15.x, so the problem is probably back again.

affects: glibc (Ubuntu) → linux (Ubuntu)
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1992468

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Pete Lomax (petelomax) wrote :

Am now convinced, albeit without much in the way of concrete evidence, this is the missing DT_HASH (in libc.so.6 and libdl.so.2) issue, not that I've yet tried to create a DT_GNU_HASH replacment yet.

See (eg) https://src.fedoraproject.org/rpms/glibc/c/1cd731cf293a236f70ed6d54ff711d6a1342a3d3?branch=rawhide

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

The change to omit DT_HASH was only in 2.36 and so was only present in kinetic/22.10, and then only briefly as we patched it before release. I doubt it's that.

Have you reported this upstream at https://sourceware.org/bugzilla/ ? Have you tried building glibc 2.35 from source? (would be interesting to know if this is the fault of Ubuntu patches, although that seems unlikely tbh).

Revision history for this message
Pete Lomax (petelomax) wrote (last edit ):

Now here's an odd thing. I just created a new mint 21 cinnamon 64bit vm:

pete@pete-VirtualBox:~/phix$ ./p64
Segmentation fault (core dumped)
pete@pete-VirtualBox:~/phix$ /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 ./p64
Phix hybrid interpreter/compiler.

Version 1.0.2 (64 bit Linux) Copyright Pete Lomax 2006..2022

Enter ? for options or filename to execute:-test
which completes fine...

Though not entirely surprisingly, "-c -test" segfaults on the first one...

apport-collect 1992468 has been run and the report sent, I did however get this:

ERROR: hook /usr/share/apport/general-hooks/ubuntu.py crashed:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport/report.py", line 228, in _run_hook
    symb['add_info'](report, ui)
  File "/usr/share/apport/general-hooks/ubuntu.py", line 84, in add_info
    apport.hookutils.attach_casper_md5check(report,
  File "/usr/lib/python3/dist-packages/apport/hookutils.py", line 1039, in attach_casper_md5check
    check = json.loads(report['CasperMD5json'])
  File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.10/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

Revision history for this message
Pete Lomax (petelomax) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected vanessa
description: updated
Revision history for this message
Pete Lomax (petelomax) wrote : CRDA.txt

apport information

Revision history for this message
Pete Lomax (petelomax) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Pete Lomax (petelomax) wrote : HookError_ubuntu.txt

apport information

Revision history for this message
Pete Lomax (petelomax) wrote : Lspci.txt

apport information

Revision history for this message
Pete Lomax (petelomax) wrote : Lspci-vt.txt

apport information

Revision history for this message
Pete Lomax (petelomax) wrote : Lsusb-v.txt

apport information

Revision history for this message
Pete Lomax (petelomax) wrote : PaInfo.txt

apport information

Revision history for this message
Pete Lomax (petelomax) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Pete Lomax (petelomax) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Pete Lomax (petelomax) wrote : ProcEnviron.txt

apport information

Revision history for this message
Pete Lomax (petelomax) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Pete Lomax (petelomax) wrote : ProcModules.txt

apport information

Revision history for this message
Pete Lomax (petelomax) wrote : PulseList.txt

apport information

Revision history for this message
Pete Lomax (petelomax) wrote : UdevDb.txt

apport information

Revision history for this message
Pete Lomax (petelomax) wrote : WifiSyslog.txt

apport information

Revision history for this message
Pete Lomax (petelomax) wrote : acpidump.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Pete Lomax (petelomax) wrote :

Is there anything else I can/should do to get this looked at?
The main issue is now as per #9, ./p64 segfaults but /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 ./p64 works fine.

Revision history for this message
Pete Lomax (petelomax) wrote (last edit ):

Finally figured it out - seems it was simply that p_align is now rather more strictly applied, fair enough I guess. You can close this now. Changed status to invalid.

Pete Lomax (petelomax)
Changed in linux (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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