You are not logged in.
I am new to the forums, so I am sorry if this is the wrong place to post this.
I began seeing this crash in a program I help develop yesterday.I believe it is somehow OS or hardware related. I do not have this issue on my Mint machine and (more impotently) have seen it in older builds which I was not having any issue with before. We also have not changed any code in the related area recently, and I reverted my settings as well.
Assertion 'close_nointr(fd) != -EBADF' failed at src/basic/fd-util.c:75, function safe_close(). Aborting.Full update (It had been 1-2 weeks since I had updated)
Numerous reboots
Boot an LTS Kernel
Disable and unmount, unplug USB devices
Search for others with similar issues (not too thorough though)
Disabled OpenRGB
Boot Windows and look for any misbehaving devices (only my motherboards onboard WIFI says it needs a driver).
Check journalctl for anything obviously wrong (I only really saw the stack trace and crash dump logs)
I have not seen any issues in other programs (maybe it is our or Qt's code?).
This is specifically happening in some of serial port code: enumerating devices for NEMA GPS support. We have not made any changes recently to this code.
The start of the problem did not line up with a system update. It did at first appear to line up with updating from Qt 6.8.0 to Qt 6.8.1 within the project (we ship a bundled version of Qt), but I kept a Qt 6.8.0 build around, and am having issues with that as well. I also tried going back to Qt 6.8.0 and it still happens.
It is also not consistent. sometimes I will get several runs which will work fine, then several which will fail.
I was having a few issues with picom locking up, but I think that was unrelated
Anything labeled scwx is our code. I am not too sure this is all that useful, but I figured I would add it.
#0 0x00007ffff31b63f4 in ?? () from /usr/lib/libc.so.6
#1 0x00007ffff315d120 in raise () from /usr/lib/libc.so.6
#2 0x00007ffff31444c3 in abort () from /usr/lib/libc.so.6
#3 0x00007ffff556b85e in ?? () from /usr/lib/libudev.so.1
#4 0x00007ffff557bbdb in ?? () from /usr/lib/libudev.so.1
#5 0x00007ffff557669b in ?? () from /usr/lib/libudev.so.1
#6 0x00007ffff558f802 in ?? () from /usr/lib/libudev.so.1
#7 0x00007ffff556f7e4 in ?? () from /usr/lib/libudev.so.1
#8 0x00007ffff556fbb7 in ?? () from /usr/lib/libudev.so.1
#9 0x00007ffff55754d5 in udev_enumerate_scan_devices () from /usr/lib/libudev.so.1
#10 0x00007ffff7663e43 in availablePortsByUdev (ok=@0x7fffffffd5df: false) at /opt/Qt/6.8.1/Src/qtserialport/src/serialport/qserialportinfo_unix.cpp:368
#11 0x00007ffff766557e in QSerialPortInfo::availablePorts () at /opt/Qt/6.8.1/Src/qtserialport/src/serialport/qserialportinfo_unix.cpp:419
#12 0x0000555555b00fab in scwx::qt::ui::SerialPortDialog::Impl::RefreshSerialDevices (this=0x555558275920)
at scwx-qt/source/scwx/qt/ui/serial_port_dialog.cpp:210
#13 0x0000555555b005bb in scwx::qt::ui::SerialPortDialog::SerialPortDialog (this=0x555558270e40, parent=0x55555824e8d0)
at scwx-qt/source/scwx/qt/ui/serial_port_dialog.cpp:107
#14 0x0000555555af1145 in scwx::qt::ui::SettingsDialogImpl::SettingsDialogImpl (this=0x55555824ed80, self=0x55555824e8d0)
at scwx-qt/source/scwx/qt/ui/settings_dialog.cpp:113
#15 0x0000555555af28e8 in std::make_unique<scwx::qt::ui::SettingsDialogImpl, scwx::qt::ui::SettingsDialog*> () at /usr/lib/gcc/x86_64-pc-linux-gnu/13.3.1/include/c++/bits/unique_ptr.h:1070
#16 0x0000555555ac6fa7 in scwx::qt::ui::SettingsDialog::SettingsDialog (this=0x55555824e8d0, parent=0x7fffffffdcb0)
at scwx-qt/source/scwx/qt/ui/settings_dialog.cpp:297
#17 0x00005555556ae67a in scwx::qt::main::MainWindow::MainWindow (this=0x7fffffffdcb0, parent=0x0) at scwx-qt/source/scwx/qt/main/main_window.cpp:319
#18 0x0000555555d6c5de in main (argc=1, argv=0x7fffffffe078) at scwx-qt/source/scwx/qt/main/main.cpp:145CPU: AMD Ryzen 7 7700X
GPU: Radeon RX 7700 XT (running second monitor on integrated)
RAM: 32 GB DDR5
Thanks for any help you can provide. I would be happy to provide more information if needed.
Offline
Why is the backtrace missing debug symbols? Do you have any external packages installed? (please post the output of "pacman -Qm")
Offline
Had not thought of that.
armadillo 14.0.3-1
gnss-sdr-git v0.0.19.1.1-1
gr-lora-git 0.6.2+60.r190.20211210.90343d4-2
gr-rds-git 1:3.10+r336.20241031.670e205-1
gr-satellites-git r1640.a2a41279-1
libosmocore 1.10.0-2
xygrib 1.2.6.1-5$ sudo pacman -Qo /usr/lib/libudev.so.1
/usr/lib/libudev.so.1 is owned by systemd-libs 257.2-2
$ sudo pacman -Qo /usr/lib/libudev.so.1.7.10
/usr/lib/libudev.so.1.7.10 is owned by systemd-libs 257.2-2Last edited by AnkomCoper (2025-01-19 16:12:34)
Offline
So did you answer "yes" when producing the backtrace when being asked about debuginfod?
Last edited by gromit (2025-01-19 16:17:19)
Offline
Sorry, I must have turned that off at some point. Here is the full trace now that I turned it back on.
Downloading 4.06 K source file /usr/src/debug/glibc/glibc/nptl/pthread_kill.c
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
44 return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
(gdb) info stack
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1 0x00007ffff31b6463 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:78
#2 0x00007ffff315d120 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 0x00007ffff31444c3 in __GI_abort () at abort.c:79
#4 0x00007ffff556b85e in log_assert_failed (text=text@entry=0x7ffff559664e "close_nointr(fd) != -EBADF", file=file@entry=0x7ffff5594363 "src/basic/fd-util.c", line=line@entry=75,
func=<optimized out>) at ../systemd/src/basic/log.c:996
#5 0x00007ffff557bbdb in safe_close (fd=fd@entry=66) at ../systemd/src/basic/fd-util.c:75
#6 0x00007ffff5587adb in closep (fd=<synthetic pointer>) at ../systemd/src/basic/fd-util.h:45
#7 chaseat (dir_fd=<optimized out>, path=<optimized out>, flags=<optimized out>, ret_path=0x7fffffffd088, ret_fd=<optimized out>) at ../systemd/src/basic/chase.c:84
#8 0x00007ffff558be45 in chase.constprop.0 (path=0x55555829adf1 "sys/devices", ret_path=0x7fffffffd110, ret_fd=0x7fffffffd10c, flags=0, root=0x7ffff55968e6 "/")
at ../systemd/src/basic/chase.c:633
#9 0x00007ffff5576582 in device_set_syspath (device=0x55555829b030, _syspath=0x55555829b1e0 "/sys/devices", verify=<optimized out>) at ../systemd/src/libsystemd/sd-device/sd-device.c:153
#10 0x00007ffff558f802 in device_new_from_syspath.constprop.0 (ret=ret@entry=0x55555829abb8, syspath=syspath@entry=0x55555829b1e0 "/sys/devices", strict=true)
at ../systemd/src/libsystemd/sd-device/sd-device.c:271
#11 0x00007ffff5583aa3 in sd_device_new_from_syspath (ret=0x55555829abb8, syspath=<optimized out>) at ../systemd/src/libsystemd/sd-device/sd-device.c:280
#12 device_new_from_child (ret=0x55555829abb8, child=0x55555829abb0) at ../systemd/src/libsystemd/sd-device/sd-device.c:1117
#13 sd_device_get_parent (child=0x55555829abb0, ret=0x7fffffffd318) at ../systemd/src/libsystemd/sd-device/sd-device.c:1131
#14 0x00007ffff556f8fb in enumerator_add_parent_devices (flags=<optimized out>, enumerator=<optimized out>, device=0x55555829abb0)
at ../systemd/src/libsystemd/sd-device/device-enumerator.c:648
#15 enumerator_scan_dir_and_add_devices (enumerator=enumerator@entry=0x555558282c90, basedir=basedir@entry=0x7ffff55963f4 "class", subdir1=subdir1@entry=0x5555582892fb "tty",
subdir2=subdir2@entry=0x0) at ../systemd/src/libsystemd/sd-device/device-enumerator.c:746
#16 0x00007ffff556fbb7 in enumerator_scan_dir (enumerator=enumerator@entry=0x555558282c90, basedir=basedir@entry=0x7ffff55963f4 "class", subdir=subdir@entry=0x0,
subsystem=subsystem@entry=0x0) at ../systemd/src/libsystemd/sd-device/device-enumerator.c:783
#17 0x00007ffff55754d5 in enumerator_scan_devices_all (enumerator=0x555558282c90) at ../systemd/src/libsystemd/sd-device/device-enumerator.c:962
#18 device_enumerator_scan_devices (enumerator=0x555558282c90) at ../systemd/src/libsystemd/sd-device/device-enumerator.c:989
#19 device_enumerator_scan_devices (enumerator=0x555558282c90) at ../systemd/src/libsystemd/sd-device/device-enumerator.c:969
#20 udev_enumerate_scan_devices (udev_enumerate=<optimized out>) at ../systemd/src/libudev/libudev-enumerate.c:443
#21 0x00007ffff7663e43 in availablePortsByUdev (ok=@0x7fffffffd5df: false) at /opt/Qt/6.8.1/Src/qtserialport/src/serialport/qserialportinfo_unix.cpp:368
#22 0x00007ffff766557e in QSerialPortInfo::availablePorts () at /opt/Qt/6.8.1/Src/qtserialport/src/serialport/qserialportinfo_unix.cpp:419
#23 0x0000555555b00fab in scwx::qt::ui::SerialPortDialog::Impl::RefreshSerialDevices (this=0x555558276430)
at scwx-qt/source/scwx/qt/ui/serial_port_dialog.cpp:210
#24 0x0000555555b005bb in scwx::qt::ui::SerialPortDialog::SerialPortDialog (this=0x555558271900, parent=0x55555824dcf0)
at scwx-qt/source/scwx/qt/ui/serial_port_dialog.cpp:107
#25 0x0000555555af1145 in scwx::qt::ui::SettingsDialogImpl::SettingsDialogImpl (this=0x55555824e1a0, self=0x55555824dcf0)
at scwx-qt/source/scwx/qt/ui/settings_dialog.cpp:113
#26 0x0000555555af28e8 in std::make_unique<scwx::qt::ui::SettingsDialogImpl, scwx::qt::ui::SettingsDialog*> () at /usr/lib/gcc/x86_64-pc-linux-gnu/13.3.1/include/c++/bits/unique_ptr.h:1070
#27 0x0000555555ac6fa7 in scwx::qt::ui::SettingsDialog::SettingsDialog (this=0x55555824dcf0, parent=0x7fffffffdcb0)
at scwx-qt/source/scwx/qt/ui/settings_dialog.cpp:297
#28 0x00005555556ae67a in scwx::qt::main::MainWindow::MainWindow (this=0x7fffffffdcb0, parent=0x0) at scwx-qt/source/scwx/qt/main/main_window.cpp:319
#29 0x0000555555d6c5de in main (argc=1, argv=0x7fffffffe078) at scwx-qt/source/scwx/qt/main/main.cpp:145Offline