Package: libreadline8t64
Version: 8.2-6
Severity: normal

Dear Maintainer,

after upgrading to trixie, I found that readline on remote hosts sometimes 
acted up when pasting
kanji. the symptom is that the cursor is in the wrong position, and/or the 
character is not visible.
ctrl-l or forcing redarw by other means fixes it.

it seems (i have not dug deeper) that this is caused by slight timing
differences with any multibyte input.

here is an example of strace'ing bash (it happens with rlwrap, too)
reading U+0555 and displaying it correctly:

   read(0, "\325", 1)                      = 1
   pselect6(1, [0], NULL, [0], {tv_sec=0, tv_nsec=0}, {sigmask=NULL, 
sigsetsize=8}) = 1 (in [0], left {tv_sec=0, tv_nsec=0})
   pselect6(1, [0], NULL, NULL, NULL, {sigmask=[], sigsetsize=8}) = 1 (in [0])
   read(0, "\225", 1)                      = 1
   pselect6(1, [0], NULL, [0], {tv_sec=0, tv_nsec=0}, {sigmask=NULL, 
sigsetsize=8}) = 0 (Timeout)
   write(2, "\325\225", 2)                 = 2

and here is the same thing, in a case where it didn't work:

   read(0, "\325", 1)                      = 1
   pselect6(1, [0], NULL, [0], {tv_sec=0, tv_nsec=0}, {sigmask=NULL, 
sigsetsize=8}) = 0 (Timeout)
   write(2, "\325", 1)                     = 1
   pselect6(1, [0], NULL, NULL, NULL, {sigmask=[], sigsetsize=8}) = 1 (in [0])
   read(0, "\225", 1)                      = 1
   pselect6(1, [0], NULL, [0], {tv_sec=0, tv_nsec=0}, {sigmask=NULL, 
sigsetsize=8}) = 0 (Timeout)
   write(2, "\225\10", 2)                  = 2

the problem is obvious, readline decided to backspace over the previous
character.

the only difference I see, and this seems to be triggering the issue, in the 
latter case, there was
a slightly higher delay between the bytes, so pselect6 timeouted. note that the 
timeout is 0, so
even tiny delays would cause this.

this happens mostly when logging in remotely, and more often with rlogin
than ssh, but it does happen with both.

-- System Information:
Debian Release: 13.0
  APT prefers stable-updates
  APT policy: (990, 'stable-updates'), (990, 'stable-security'), (990, 
'stable'), (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, x32

Kernel: Linux 6.12.41+deb13-amd64 (SMP w/28 CPU threads; PREEMPT)
Kernel taint flags: TAINT_USER, TAINT_WARN, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libreadline8t64 depends on:
ii  libc6            2.41-12
ii  libtinfo6        6.5+20250216-2
ii  readline-common  8.2-6

libreadline8t64 recommends no packages.

libreadline8t64 suggests no packages.

-- no debconf information

Reply via email to