You are not logged in.

#1 2025-08-16 09:31:01

JanErik
Member
Registered: 2018-01-08
Posts: 56

Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

With my 3D printer I need 250000bps and glibc after this seems to break that:

RepetierHost/SetBaudrate /dev/ttyACM0 250000
actual baud: 38400
error: couldn't set desired baud rate 250000 got 38400
Forcing set baudrate failed

Downgrading is not an option either as it breaks Firefox and probably many other packages.

Offline

#2 2025-08-16 12:16:01

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,875

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

Can you still set the rate w/ stty or (fresh or rebuilt) setserial?
https://aur.archlinux.org/packages/setserial

Offline

#3 2025-08-17 17:39:14

JanErik
Member
Registered: 2018-01-08
Posts: 56

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

It seems, with RepetierHost SetBaudrate binary alone I can set it without issue. I guess RepetierHost opens the port before changing the baud rate.
But it doesn't help the issue to set the baudrate manually before connecting.

Also, with RepetierHost I only seem to get this error with 250000 and 128000 baud. I know 250000 is somewhat problematic and special in Linux. 115200 and 230400 work, but obviously do not communicate with my printer.

Tried with stty, got this:

# stty -F /dev/ttyACM0 250000
stty: invalid argument ‘250000’
Try 'stty --help' for more information.
# stty -F /dev/ttyACM0 115200
# stty -F /dev/ttyACM0 9600

Last edited by JanErik (2025-08-17 17:48:18)

Offline

#4 2025-08-17 19:57:15

loqs
Member
Registered: 2014-03-06
Posts: 18,645

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

Possibly bisect glibc in a clean chroot and test it with LD_PRELOAD to avoid altering the system's glibc?

Offline

#5 2025-08-17 20:11:07

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,875

Offline

#6 2025-08-17 20:43:18

loqs
Member
Registered: 2014-03-06
Posts: 18,645

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

de730d3d2d9131398e56f69228d46d895f126a60 is blocked from being reverted by 10 other commits due to header, Makefile and documentation changes. So reverting this commit reverts a lot of other termios changes.
Edit:
This folder contains 2.42+r17+gd7274d718e6f with de730d3d2d9131398e56f69228d46d895f126a60 reverted.

Last edited by loqs (2025-08-17 20:55:20)

Offline

#7 2025-08-19 11:01:06

JanErik
Member
Registered: 2018-01-08
Posts: 56

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

Installed this reverted (not sure if I was supposed to) but still the same issues.

Offline

#8 2025-08-19 13:17:18

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,875

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

Means you'll have to bisect this sad
termios has been refactored, this could have fallen through the cracks anywhere (the patch that switches out discrete rates for arbitrary ones would just have been some obvious contender)

Offline

#9 2025-08-19 20:00:45

loqs
Member
Registered: 2014-03-06
Posts: 18,645

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

$ git bisect start
status: waiting for both good and bad commits
$ git bisect bad
status: waiting for good commit(s), bad commit known
$ git bisect good 5cb575ca9a3d
Bisecting: a merge base must be tested
[74f59e9271cbb4071671e5a474e7d4f1622b186f] Create ChangeLog.old/ChangeLog.30
$ git describe
glibc-2.41

The merge base which I expect to be good has been uploaded to the same google drive folder.

Offline

#10 2025-08-20 19:10:56

JanErik
Member
Registered: 2018-01-08
Posts: 56

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

Yep, works with that one.

Offline

#11 2025-08-20 21:09:45

loqs
Member
Registered: 2014-03-06
Posts: 18,645

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

$ git bisect good
Bisecting: 289 revisions left to test after this (roughly 8 steps)
[5d101745814b9c1d59fb830bb044f702437f3002] malloc: Inline tcache_try_malloc
$ git describe 
glibc-2.41.9000-288-g5d10174581

Uploaded to the same folder.

Offline

#12 2025-08-22 06:22:56

JanErik
Member
Registered: 2018-01-08
Posts: 56

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

This one works too, also doesn't break Firefox and other packages.

Offline

#13 2025-08-22 13:38:33

loqs
Member
Registered: 2014-03-06
Posts: 18,645

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

$ git bisect good
Bisecting: 144 revisions left to test after this (roughly 7 steps)
[5f54d8bc48983bed844c02e1fe614ad223e78838] linux/termios/powerpc: deal with powerpc-unique ioctl emulation
$ git describe 
glibc-2.41.9000-433-g5f54d8bc48

Uploaded to the same folder.

Offline

#14 2025-08-24 16:05:06

JanErik
Member
Registered: 2018-01-08
Posts: 56

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

Still works with this one.

Offline

#15 2025-08-24 16:28:27

loqs
Member
Registered: 2014-03-06
Posts: 18,645

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

$ git bisect good
Bisecting: 72 revisions left to test after this (roughly 6 steps)
[c559a6190e397b315fdd98d9369f15d2914d8248] elf: Remove now pointless empty ld.so.conf files in single tests
$ git describe 
glibc-2.41.9000-505-gc559a6190e

Uploaded to the same folder.

Offline

#16 2025-08-24 18:24:21

JanErik
Member
Registered: 2018-01-08
Posts: 56

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

Broken.

Offline

#17 2025-08-24 18:54:48

loqs
Member
Registered: 2014-03-06
Posts: 18,645

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

$ git bisect bad
Bisecting: 35 revisions left to test after this (roughly 5 steps)
[14ca258cc566fd15fa4251baa45abd873fa8b230] benchtests: Add IPv6 inet_ntop benchmark
$ git describe 
glibc-2.41.9000-469-g14ca258cc5

Uploaded to the same folder.

Offline

#18 2025-08-25 15:38:43

JanErik
Member
Registered: 2018-01-08
Posts: 56

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

Broken.

Offline

#19 2025-08-25 16:17:03

loqs
Member
Registered: 2014-03-06
Posts: 18,645

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

$ git bisect bad
Bisecting: 17 revisions left to test after this (roughly 4 steps)
[8788bd77d68c6429c7f2dcbd22765525555c3cd8] sparc: Fix sparc32 Fix argument passing to __libc_start_main (BZ 32981)
$ git describe 
glibc-2.41.9000-451-g8788bd77d6

Uploaded to the same folder.
Edit:
Assuming the next one is bad:

$ git bisect bad
Bisecting: 8 revisions left to test after this (roughly 3 steps)
[c66801f36135a7b031ca37e25a35e98255b20def] include/array_length.h: add array_foreach[_const] macros
$ git describe 
glibc-2.41.9000-442-gc66801f361

Uploaded to the same folder.

@seth I wonder if you were right initially I messed up the revert.

Last edited by loqs (2025-08-25 21:34:34)

Offline

#20 2025-08-26 15:56:27

JanErik
Member
Registered: 2018-01-08
Posts: 56

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

Both broken.

Offline

#21 2025-08-26 16:31:15

loqs
Member
Registered: 2014-03-06
Posts: 18,645

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

$ git bisect bad
Bisecting: 4 revisions left to test after this (roughly 2 steps)
[bbbaf50b2a340d6913b8ad8a840dd2d66874c62b] hurd+generic/termios: make speed_t an unsigned int
$ git describe 
glibc-2.41.9000-437-gbbbaf50b2a

Uploaded to the same folder.

Offline

#22 2025-08-27 18:40:58

JanErik
Member
Registered: 2018-01-08
Posts: 56

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

Broken.

Offline

#23 2025-08-27 18:54:37

loqs
Member
Registered: 2014-03-06
Posts: 18,645

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

$ git bisect bad 
Bisecting: 1 revision left to test after this (roughly 1 step)
[bff11c2fa945814101c08c66f8c55212ae788075] hurd/termios: remove USE_OLD_TTY
$ git describe 
glibc-2.41.9000-435-gbff11c2fa9

Uploaded to the same folder.

Offline

#24 2025-08-28 15:54:44

JanErik
Member
Registered: 2018-01-08
Posts: 56

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

Broken.
I know I am slow to test these, thanks for having patience!

Offline

#25 2025-08-28 17:13:21

loqs
Member
Registered: 2014-03-06
Posts: 18,645

Re: Glibc after 2.41+r48+g5cb575ca9a3d-1 breaks UART baudrate setting

JanErik wrote:

I know I am slow to test these, thanks for having patience!

No problem.

This should be the last one to test

$ git bisect bad
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[5cf101a85aae0d703cdd8ed7b25fe288e41fdacb] linux: implement arbitrary and split speeds in termios
$ git describe 
glibc-2.41.9000-434-g5cf101a85a

Uploaded to the same folder.

I expect it to be bad meaning the cause is 5cf101a linux: implement arbitrary and split speeds in termios.

Offline

Board footer

Powered by FluxBB