Article View: linux.debian.bugs.dist
Article #3710Bug#1153378: libbrlapi0.8: IPv6 localhost timeout misses ::1; X11 login stalls for 134 seconds
From: Komorebi Aware
Date: Sat, 07 Nov 2026 20:40
Date: Sat, 07 Nov 2026 20:40
268 lines
15083 bytes
15083 bytes
This is a multi-part message in MIME format.
--------------kutTmlnpEbAIWRcP4Z74ObOk
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Package: libbrlapi0.8
Version: 6.9.1+repack-2
Severity: normal
Tags: patch ipv6
Control: affects -1 xbrlapi
Dear Maintainer,
The localhost timeout fix used to close Debian bug #1087173 appears
incomplete
for IPv6. With libbrlapi0.8 and xbrlapi 6.9.1+repack-2 installed,
xbrlapi still
blocks an X11 login for approximately 134 seconds while connecting to
[::1]:4101.
Related report: https://bugs.debian.org/1087173
Expected behaviour
------------------
If no BrlAPI server is available, a localhost connection should fail
promptly,
with the existing short timeout covering IPv6 loopback as well as IPv4. An
unavailable optional braille helper should not delay the desktop for
minutes.
Observed behaviour and configuration
------------------------------------
The system runs Debian forky/sid on amd64, using SDDM and Plasma X11.
The brltty
package is not installed and there is no local braille daemon listening.
/etc/X11/Xsession.d/90xbrlapi runs xbrlapi synchronously, before Plasma
starts,
and suppresses its stderr. xbrlapi attempts its BrlAPI connection before
backgrounding. During the delay, the helper was observed blocked in
connect()
to [::1]:4101, with the TCP socket in SYN_SENT.
The persistent IPv6-disable configuration includes:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.enp2s0.disable_ipv6 = 1
net.ipv6.conf.wlp3s0.disable_ipv6 = 1
The actual runtime state, also checked after the successful workaround
test, is:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.enp2s0.disable_ipv6 = 0
Thus IPv6 loopback is disabled but Ethernet has IPv6 enabled. I have not
established which component re-enabled IPv6 on Ethernet. In this state,
"ip -6 route get ::1" selects the Ethernet default gateway rather than a
local
loopback route. The unanswered connection waits for TCP retries to expire.
Regardless of this unusual network state, this is the kind of slow localhost
connection that the existing 100 ms timeout was intended to bound.
Measurements made before installing the workaround:
Default xbrlapi connection: 134.465 seconds, then failure
xbrlapi -b 127.0.0.1: 0.008 seconds, connection
refused
Workaround followed by real 90xbrlapi: 0.010 seconds, shell exit
status 0
The original suspicion was external-monitor probing, because the problem was
noticed with an external monitor attached. Xorg successfully read the EDIDs,
however, and live xrandr queries completed in 0.010-0.017 seconds. The
blocking
BrlAPI connection provides a direct explanation of the measured login delay;
I have not established that an external monitor is required to trigger it.
The journal supplies an end-to-end comparison using the same two events:
Before workaround, seconds since boot:
88.040221 SDDM starts /etc/sddm/Xsession /usr/bin/startplasma-x11
224.262690 Started plasma-plasmashell.service
Difference: 136.222469 seconds
After workaround, a fresh login in the same boot:
366939.047430 SDDM starts /etc/sddm/Xsession
/usr/bin/startplasma-x11
366941.425568 Started plasma-plasmashell.service
Difference: 2.378138 seconds
The fresh login was successful and the long delay disappeared. These
intervals
measure session launch to the plasmashell service being started, rather than
the time until every desktop application has finished loading.
Suspected cause and proposed correction
---------------------------------------
The installed changelog says 6.9.1+repack-2 includes git-localhost-timeout,
closing #1087173. I also checked that exact Debian version's packaging
archive:
https://deb.debian.org/debian/pool/main/b/brltty/brltty_6.9.1+repack-2.debian.tar.xz
SHA256: 4d4bfdbcd3fd749371f87e2f4be1f7eb9992aa990cc130ef1a49271762c98d1d
In Programs/brlapi_client.c, the IPv6 branch of the added localhost
guard uses:
!memcmp(cur->ai_addr, &ip6_localhost, sizeof(ip6_localhost))
cur->ai_addr points to a struct sockaddr_in6, starting with the address
family,
port, and flow information. The comparison should instead start at
sin6_addr.
As written, ::1 is not recognized and the short SO_SNDTIMEO is not installed
for that connection. This appears to explain why the supposedly fixed
version
still waits for the full IPv6 TCP connection timeout.
The attached candidate patch (suggestion) changes the first argument to:
&((struct sockaddr_in6 *)cur->ai_addr)->sin6_addr
It preserves the existing IPv4 check and timeout duration.
The attached standalone C reproducer checks the existing and corrected
guards
using numeric addresses and port 4101, without opening network connections.
It was compiled with -std=c11 -D_POSIX_C_SOURCE=200112L -Wall -Wextra
-Werror
and produced:
::1 original=0 corrected=1
2001:db8::1 original=0 corrected=0
127.0.0.1 original=1 corrected=1
127.0.0.2 original=1 corrected=1
192.0.2.1 original=0 corrected=0
This validates the address-comparison correction. I have not rebuilt or
tested
a complete BrlAPI library with the candidate patch; the confirmed desktop
login test used the environment workaround below.
Reproduction on an affected system
----------------------------------
With the network state above, no listening BrlAPI server, and the reported
package versions, run from an X11 session:
time timeout 5s env -u BRLAPI_HOST xbrlapi
time timeout 5s env BRLAPI_HOST=127.0.0.1 xbrlapi
The first command reaches the five-second limit (exit status 124). The IPv4
command returns promptly with a connection error, which is expected with no
server. The earlier 134.465-second measurement allowed the default
connection
to run to completion instead of imposing this five-second limit.
I rechecked these bounded commands after the successful login: the default
connection was stopped after 5.003 seconds with status 124; the IPv4
connection
returned after 0.011 seconds with status 4 and the following stderr:
openConnection: Connection refused
cannot connect to braille devices daemon brltty at 127.0.0.1
Working local workaround
------------------------
I installed /etc/X11/Xsession.d/89blp-brlapi-local, sourced before
90xbrlapi:
if [ -z "${BRLAPI_HOST:-}" ]; then
export BRLAPI_HOST=127.0.0.1
fi
This preserves an explicitly configured nonempty BrlAPI host. The default
IPv4 connection is refused immediately and Xsession continues. IPv6 settings
were left unchanged. An alternative sysctl drop-in to enable IPv6 loopback
remains commented out and was not activated.
Versions
--------
xbrlapi 6.9.1+repack-2
libbrlapi0.8:amd64 6.9.1+repack-2
brltty not installed
libc6:amd64 2.43-6
sddm 0.21.0+git20250502.4fe234b-2
plasma-workspace 4:6.5.2-1
xserver-xorg-core 2:21.1.20-1
Kernel Linux 6.16.12+deb14+1-amd64
Since #1087173 is archived, I am filing this against libbrlapi0.8 with
xbrlapi
marked as affected. Please link or reopen the earlier report if that is more
appropriate. Thank you for looking into it.
--------------kutTmlnpEbAIWRcP4Z74ObOk
Content-Type: text/x-patch; charset=UTF-8;
name="ipv6-loopback-comparison.patch"
Content-Disposition: attachment; filename="ipv6-loopback-comparison.patch"
Content-Transfer-Encoding: base64
RGVzY3JpcHRpb246IENvbXBhcmUgdGhlIElQdjYgYWRkcmVzcyBmaWVsZCB3aGVuIGFwcGx5
aW5nIHRoZSBsb2NhbGhvc3QgdGltZW91dAogVGhlIGV4aXN0aW5nIGd1YXJkIGNvbXBhcmVz
IHRoZSBzb2NrYWRkcl9pbjYgaGVhZGVyIHRvIGFuIGluNl9hZGRyLCBzbyBpdAogZG9lcyBu
b3QgcmVjb2duaXplIDo6MSBhbmQgbmV2ZXIgc2V0cyB0aGUgc2hvcnQgdGltZW91dCBmb3Ig
SVB2NiBsb29wYmFjay4KIENvbXBhcmUgc2luNl9hZGRyIGluc3RlYWQsIHByZXNlcnZpbmcg
dGhlIElQdjQgdGVzdCBhbmQgdGhlIGV4aXN0aW5nIHRpbWVvdXQuCk9yaWdpbjogb3RoZXIs
IGxvY2FsbHkgcHJlcGFyZWQgY2FuZGlkYXRlIGNvcnJlY3Rpb24KQnVnLURlYmlhbjogaHR0
cHM6Ly9idWdzLmRlYmlhbi5vcmcvMTA4NzE3MwpMYXN0LVVwZGF0ZTogMjAyNi0xMS0wNwoK
LS0tIGEvUHJvZ3JhbXMvYnJsYXBpX2NsaWVudC5jCisrKyBiL1Byb2dyYW1zL2JybGFwaV9j
bGllbnQuYwpAQCAtOTM1LDcgKzkzNSw3IEBACiAJICAgICYmIChudG9obCgoKHN0cnVjdCBz
b2NrYWRkcl9pbiAqKWN1ci0+YWlfYWRkciktPnNpbl9hZGRyLnNfYWRkcikgJiBJTl9DTEFT
U0FfTkVUKQogCSAgICAgID09IChJTkFERFJfTE9PUEJBQ0sgJiBJTl9DTEFTU0FfTkVUKSkK
IAkgIHx8IChjdXItPmFpX2ZhbWlseSA9PSBBRl9JTkVUNgotCSAgICAmJiAhbWVtY21wKGN1
ci0+YWlfYWRkciwgJmlwNl9sb2NhbGhvc3QsIHNpemVvZihpcDZfbG9jYWxob3N0KSkpKSB7
CisJICAgICYmICFtZW1jbXAoJigoc3RydWN0IHNvY2thZGRyX2luNiAqKWN1ci0+YWlfYWRk
ciktPnNpbjZfYWRkciwgJmlwNl9sb2NhbGhvc3QsIHNpemVvZihpcDZfbG9jYWxob3N0KSkp
KSB7CiAJLyogTG9jYWwgY29ubmVjdGlvbiwgaXQgc2hvdWxkIGJlIGZhc3QsIG90aGVyd2lz
ZSBpdCBtZWFucyB3ZSBoYXZlIGEKIAkgKiBmaXJld2FsbCBibG9ja2luZyB1cywgYW5kIHRo
ZW4gYmV0dGVyIG5vdCB3YWl0IHVubmVjZXNzYXJpbHkuICovCiAJc3RydWN0IHRpbWV2YWwg
dHYgPSB7IC50dl91c2VjID0gMTAwMDAwIH07Cg==
--------------kutTmlnpEbAIWRcP4Z74ObOk
Content-Type: text/x-csrc; charset=UTF-8; name="loopback-check.c"
Content-Disposition: attachment; filename="loopback-check.c"
Content-Transfer-Encoding: base64
LyogU3RhbmRhbG9uZSBjaGVjayBvZiB0aGUgbG9jYWxob3N0IHByZWRpY2F0ZSBpbiBnaXQt
bG9jYWxob3N0LXRpbWVvdXQuCiAqIE5vIHNvY2tldHMgYXJlIG9wZW5lZCBhbmQgbm8gbmV0
d29yayBjb25maWd1cmF0aW9uIGlzIGNoYW5nZWQuCiAqLwojaW5jbHVkZSA8YXJwYS9pbmV0
Lmg+CiNpbmNsdWRlIDxuZXRkYi5oPgojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPHN0
ZGxpYi5oPgojaW5jbHVkZSA8c3RyaW5nLmg+CgpzdGF0aWMgaW50IGlzX2xvY2FsaG9zdChj
b25zdCBzdHJ1Y3QgYWRkcmluZm8gKmN1ciwgaW50IGNvcnJlY3RlZCkgewogIGNvbnN0IHN0
cnVjdCBpbjZfYWRkciBpcDZfbG9jYWx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f.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!news.servidellagleba.it!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!news.servidellagleba.it!bofh.it!news.nic.it!robomod
From: Komorebi Aware <komorebi.aware@gmail.com>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1153378: libbrlapi0.8: IPv6 localhost timeout misses ::1; X11 login stalls for 134 seconds
Date: Sat, 07 Nov 2026 21:40:01 +0100
Message-ID: <NWVmF-asI8-3@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Sat Nov 7 20:37:09 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -0.547
Reply-To: Komorebi Aware <komorebi.aware@gmail.com>, 1153378@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: pkg-a11y-devel@alioth-lists.debian.net
X-Debian-Pr-Message: report 1153378
X-Debian-Pr-Package: libbrlapi0.8
X-Debian-Pr-Keywords: ipv6 patch
X-Debian-Pr-Source: brltty
X-Gm-Message-State: APuU4Z/MHOdyaHFRE5Y4FSKSRj+qMRBJtGKYrIhVeA4myj6drcT/sPWS
XTpvmoqcdwGax+uDlO7BVezq5Rv/PEeSWpGUpsC0g0VsIwIll6+tFQGeMvG8CA==
X-Gm-Gg: AYBFou3/4rCU6l7ogvq4i6MV17sZN8DLykEWfUOI0xMZlu3qU+i4Uo0ukAddZkcKZdx
So/F1hv/sdkVIZ94Ruk+tlclcJACouGK5KP6t+m19KeF/GE5iJj4QfgC3pMUa77b2EhmKi/HL78
WjiLgOrnSkgiPkG2VE8ie05aD4zpDU/Iz0lzz7RfrxDGbpMtvWSN21rnQw7sq3CkD/LW2cqXiQR
52syEWZGktY0Wj2TQiu6kAgUtofFoVxnXwOCtD0Lt4RhjYyRDvboR063H7pIHXZR36yXy/5PXD1
NQUoMimASAK4xEN0ybpPttLiwmhf1M6sZS1zOE6bJ0hpWAFH3RaNP/9tZaMOKlcrAAfjDpWwqma
0b+HgtimMb7KsSWoJtMRdPhqob8lnKd6GHtfC2SZJ23lqJ34boJY3AW30iFuBerkMhcF8a47kDZ
XewKeZwC3HI8J+5D42GMLho48zN53PxMdpg830mFHPtd5fzqtdrwnDRLW+BCvTrzmr1o7x/cx6F
fEGkNjytyY8/pBwSvQVGJY3an21NgARA6UKYtbqYzPfzb313kWh3B7eRoccWSUSqLStobfR/gie
cgOewVziI4fD3+KMo9+YvcUattU0vPKUfoRTAZLBj7jpMVH+0WkniRsZFeI8GjiwtvxE1i4=
X-Received: by 2002:a05:600c:3f10:b0:4a1:777b:8a12 with SMTP id 5b1f17b1804b1-4b6dea69280mr111987235e9.14.1794083670583;
Sat, 07 Nov 2026 12:34:30 -0800 (PST)
Content-Type: multipart/mixed; boundary="------------kutTmlnpEbAIWRcP4Z74ObOk"
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2001342
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 268
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Sat, 7 Nov 2026 21:34:18 +0100
X-Original-Message-ID: <e4eb8288-6989-4c4d-a2e0-cbe0c4f1df32@gmail.com>