Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.8
-
None
-
The problem occurs on various ARM devices (32 bit and 64 bit) under Linux. The messages here were run on a Raspberry Pi 5 with Yocto version “scarthgap” with meta-raspberrypi and meta-qt6 layer (branch “6.8”). The kernel version is 6.6.22-v8-16k.
The serial interface is a USB-to-serial converter from FTDI. The lsusb output:
Bus 001 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
I also see the same behavior with the serial interfaces of various mobile radio modems such as the Quectel EC20.The problem occurs on various ARM devices (32 bit and 64 bit) under Linux. The messages here were run on a Raspberry Pi 5 with Yocto version “scarthgap” with meta-raspberrypi and meta-qt6 layer (branch “6.8”). The kernel version is 6.6.22-v8-16k. The serial interface is a USB-to-serial converter from FTDI. The lsusb output: Bus 001 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC I also see the same behavior with the serial interfaces of various mobile radio modems such as the Quectel EC20.
Description
If the serial interface disappears (in this case a USB-serial adapter), no error is sent to the application via the errorOccurred() signal.
Instead, the Qt library generates 100% CPU load on the CPU core.
I have the program (in attachment) running with strace. There you can see that a ppoll call returns. (See “< DEVICE REMOVED HERE >”).
The following two lines are then output endlessly at high speed:
ppoll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}], 2, NULL, NULL, 0) = 1 ([{fd=5, revents=POLLIN|POLLERR|POLLHUP}]) read(5, "", 32768)
It seems that the error in the Qt source code is somehow ignored.
I tried to reproduce the problem in a VirtualBox VM with Debian Bookworm and the Qt 6.4.2 from the Debian repository. Here the problem does not occur, and the errorOccurred() signal returns a clean “QSerialPort error: 5, No such file or directory”.