From unknown Sun Jun 22 00:53:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42140: 26.3; sigsegv when using nss-docker Resent-From: Hans van den Bogert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Jun 2020 15:11:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42140 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 42140@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159352984823836 (code B ref -1); Tue, 30 Jun 2020 15:11:07 +0000 Received: (at submit) by debbugs.gnu.org; 30 Jun 2020 15:10:48 +0000 Received: from localhost ([127.0.0.1]:51450 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqHuI-0006CN-U1 for submit@debbugs.gnu.org; Tue, 30 Jun 2020 11:10:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:44798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqDGd-0002lF-AT for submit@debbugs.gnu.org; Tue, 30 Jun 2020 06:13:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqDGd-0003cX-43 for bug-gnu-emacs@gnu.org; Tue, 30 Jun 2020 06:13:31 -0400 Received: from mail-ej1-x642.google.com ([2a00:1450:4864:20::642]:40279) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jqDGa-0006Mg-HL for bug-gnu-emacs@gnu.org; Tue, 30 Jun 2020 06:13:30 -0400 Received: by mail-ej1-x642.google.com with SMTP id o18so15489503eje.7 for ; Tue, 30 Jun 2020 03:13:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:subject:from:message-id:date:user-agent:mime-version :content-language; bh=nTQFKB298p8YPSr4cS0U4lEc7cY+pn3eiWAMxKZVsfI=; b=bagsqMYcOXrVO4I5hWerud2ChYt+mJmEx9HVaMo54FgLmBoVRtMOk9tShV/NdkCNOc C6YmyTxFmQQKsh4NollgoDMyscysIKFTyfVxdyc35sO3inNDE8A/KZ2qT5iZDpCgGu81 7wnDPsKkPm13pgdT4k8p9oq0dJk7C00/9JI+o9RlecAsOjdKVqk8CDs3LcKMq+qNnc9A mOqhfnqDPsAXRc7ffB2oKDAQnQBnn2haNItq/qDMWqnDbUaLzxAYCFweEyARxbJ4Fnrb A6cZ3rxI9A11fVh5CqPU5OsZUoSFMpu5l25+i0YsS5KN3veWq7jSn+IdKV8b5KkVkpxw gjUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:subject:from:message-id:date:user-agent :mime-version:content-language; bh=nTQFKB298p8YPSr4cS0U4lEc7cY+pn3eiWAMxKZVsfI=; b=r/PzrrSQXt4COgHSHoTRunNyZvFZcqcNw4gtIOxrwZFHbfNkJxWDw7WrRp8BfT74aX 1oKLqa22HCq17IhEbWmRAqfqpGi8SyHm8d6wWJXaaRFUJ6tPWKY78RhfzL6ad5Yj9ZbV erBHT8EOG+JSOdMcWqq70f3ze+lH4FfhqBZj9qtT9Ltutoz4ESYjxrbJkO+S1OugY0KD FbmAbPpiZOlAo7My1YZTPKJeZePBnmmMRt30p8tBn2rCyVPSdKhF3qx7N+FIyJwH7Cqj nX3MI3eFCtq5WEQ6wFWJjST1m8R5L9y+7iDM3f5rKmjJWZ7sRFVOL7TvPMrHnGrEq4lN TRKQ== X-Gm-Message-State: AOAM533lLnYynDLKiPkLADISibjxp8rS5g8vXKwe16Rh6m39VB2LuENW d9h1IWA0jc9aSqwtDxtmqZkTKqAf/44= X-Google-Smtp-Source: ABdhPJxa8m43PMHA61u5Ww5Ml6q/R/vAQGU/GdVnORUghQEqiEyRtkbso0A4RznHxGUZkbbD9YjU1g== X-Received: by 2002:a17:906:8607:: with SMTP id o7mr17321644ejx.142.1593512006007; Tue, 30 Jun 2020 03:13:26 -0700 (PDT) Received: from [192.168.1.148] (235-131-158-163.dynamic.caiway.nl. [163.158.131.235]) by smtp.gmail.com with ESMTPSA id a13sm2334641edk.58.2020.06.30.03.13.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Jun 2020 03:13:25 -0700 (PDT) From: Hans van den Bogert Message-ID: <356361b1-9b17-eab5-108c-1d02b7ea73ce@gmail.com> Date: Tue, 30 Jun 2020 12:13:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------------DDE017D52929FAC03290B9C4" Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::642; envelope-from=hansbogert@gmail.com; helo=mail-ej1-x642.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 0.7 (/) X-Mailman-Approved-At: Tue, 30 Jun 2020 11:10:46 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) This is a multi-part message in MIME format. --------------DDE017D52929FAC03290B9C4 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Dear Bug squashers, To reproduce, have 'nss-docker'[1] installed. This library can be added to nsswitch.conf to intercept .docker host requests. I have not had other problematic programs icw nss-docker. Since emacs 26, and most likely due to it's premiered use of multi-threadedness, a simple `m-x list-packages`, with multiple repos configured (e.g. gnu, melpa), will crash with sigsegv with high probability. I am not well-versed enough in debugging multithreaded emacs to conclude if this is a problem in emacs or nss-docker. But to iterate, since I have not encountered this at all with other programs, I'll start at emacs. Thanks in advance for any effort, Hans [1] https://github.com/dex4er/nss-docker Starting program: /usr/bin/emacs -u /tmp [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7fffdb75b700 (LWP 26156)] [New Thread 0x7fffdaa77700 (LWP 26157)] [New Thread 0x7fffd9fdc700 (LWP 26158)] [New Thread 0x7fffd8f51b40 (LWP 26232)] [New Thread 0x7fffd8cffb40 (LWP 26233)] NSS DEBUG: Called _nss_debug_gethostbyname4_r with args (name: elpa.gnu.org) NSS DEBUG: Called _nss_debug_gethostbyname4_r with args (name: stable.melpa.org) [New Thread 0x7fffd8f39b40 (LWP 26234)] _nss_docker_gethostbyname2_r(name="elpa.gnu.org", af=10) _nss_docker_gethostbyname2_r(name="stable.melpa.org", af=10) _nss_docker_gethostbyname3_r(name="elpa.gnu.org", af=10) _nss_docker_gethostbyname2_r(name="elpa.gnu.org", af=2) NSS DEBUG: Called _nss_debug_gethostbyname4_r with args (name: orgmode.org) _nss_docker_gethostbyname3_r(name="elpa.gnu.org", af=2) Thread 6 "emacs" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffd8cffb40 (LWP 26233)] 0x00007fffd8aafcd5 in _nss_docker_gethostbyname3_r (name=0x2e6f732e312e302d , af=2002936162, result=0x6e672d78756e696c, buffer=0x2d34365f3638782f , buflen=7091318039310988591, errnop=0x312e6f732e312e, herrnop=0x302d77626162696c, ttlp=0x302e6f732e6563, canonp=0x697672657373746e) at libnss_docker.c:72 72 ) { (gdb) bt full #0 0x00007fffd8aafcd5 in _nss_docker_gethostbyname3_r (name=0x2e6f732e312e302d , af=2002936162, result=0x6e672d78756e696c, buffer=0x2d34365f3638782f , buflen=7091318039310988591, errnop=0x312e6f732e312e, herrnop=0x302d77626162696c, ttlp=0x302e6f732e6563, canonp=0x697672657373746e) at libnss_docker.c:72 name_len = 3414407380873671541 hostname = "86_64-linux-gnu/libX11-xcb.so\000libXxf86vm.so.1\000/usr/lib/x86_64-linux-gnu/libXxf86vm.so.1\000libXxf86vm.so.1\000/usr/lib/i386-linux-gnu/libXxf86vm.so.1\000libXxf86vm.so\000/usr/lib/x86_64-linux-gnu/libXxf86vm.so\000li"... hostname_suffix_ptr = 0x312e6f732e616162 docker_api_addr = {sun_family = 12593, sun_path = ".so.6\000libX11.so.6\000/usr/lib/i386-linux-gnu/libX11.so.6\000libX11.so\000/usr/lib/x86_64-linux-gnu/libX11.so\000libX11-x"} docker_api_addr_len = 1869819507 buffer_size = 3346019690390575202 buffer_offset = 7795575320214437942 sockfd = 788541486 req_message_buffer = "86_64-linux-gnu/libX11-xcb.so.1\000libX11-xcb.so.1\000/usr/lib/i386-linux-gnu/libX11-xcb.so.1\000libX11-xcb.so\000/usr/lib" req_message_len = 7596498840077020928 res_message_buffer = Python Exception value requires 102400 bytes, which is more than max-value-size: #1 0x00007fffd8ab0518 in _nss_docker_gethostbyname2_r (name=0x3ba8368 "stable.melpa.org", af=10, result=0x7fffd8cfe7d0, buffer=0x7fffd8cfea40 "\377\002", buflen=1024, errnop=0x7fffd8cff948, herrnop=0x7fffd8cff9ac) at libnss_docker.c:340 #2 0x00007fffebf70f9f in gaih_inet (name=name@entry=0x3ba8368 "stable.melpa.org", service=, req=req@entry=0x3ba8338, pai=pai@entry=0x7fffd8cfe9c8, naddrs=naddrs@entry=0x7fffd8cfe9c4, tmpbuf=tmpbuf@entry=0x7fffd8cfea30) at ../sysdeps/posix/getaddrinfo.c:873 th = {h_name = 0x0, h_aliases = 0x0, h_addrtype = 0, h_length = 0, h_addr_list = 0x0} localcanon = 0x0 fct = 0x7fffd8ab04a4 <_nss_docker_gethostbyname2_r> fct4 = pat = 0x7fffd8cfe7b8 no_inet6_data = 0 nip = 0x2c5eb30 status = no_more = 0 no_data = 0 inet6_status = NSS_STATUS_UNAVAIL res_ctx = 0x7fffc8000b20 res_enable_inet6 = tp = st = 0x7fffd8cfe6f0 at = 0x7fffd8cfe6b0 got_ipv6 = false canon = 0x0 orig_name = 0x3ba8368 "stable.melpa.org" alloca_used = port = malloc_name = false addrmem = 0x0 canonbuf = 0x0 result = 0 #3 0x00007fffebf72ce4 in __GI_getaddrinfo (name=, service=, hints=0x3ba8338, pai=pai@entry=0x3ba8318) at ../sysdeps/posix/getaddrinfo.c:2300 tmpbuf = {data = 0x7fffd8cfea40, length = 1024, __space = {__align = {__max_align_ll = 767, __max_align_ld = 5.1301383008835767187e-4937}, __c = "\377\002", '\000' , "\002@\352\317\330\377\177\000\000\000\000\000\000\000\000\000\000ff02::2\000ip6-allrouters", '\000' , "v\352\317\330\377\177\000\000\000\000\000\000\000\000\000\000ts\n", '\000' ...}} i = 0 last_i = 0 nresults = 0 p = 0x0 gaih_service = {name = 0x3ba8379 "443", num = 443} pservice = local_hints = {ai_flags = 0, ai_family = 0, ai_socktype = 0, ai_protocol = 0, ai_addrlen = 0, ai_addr = 0x0, ai_canonname = 0x0, ai_next = 0x0} in6ai = 0x0 in6ailen = 0 seen_ipv4 = false seen_ipv6 = false check_pf_called = false end = 0x7fffd8cfe9c8 naddrs = 0 __PRETTY_FUNCTION__ = "getaddrinfo" #4 0x00007fffecb5a058 in handle_requests (arg=) at gai_misc.c:317 req = 0x3ba8300 srchp = lastp = runp = 0x3d84690 ---Type to continue, or q to quit---xbackq __PRETTY_FUNCTION__ = "handle_requests" #5 0x00007fffecd646db in start_thread (arg=0x7fffd8cffb40) at pthread_create.c:463 pd = 0x7fffd8cffb40 now = unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140736830896960, -2868501273485909582, 140736830894080, 0, 64505488, 140737488329792, 2868433241719562674, 2868459701649662386}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}} not_first_call = #6 0x00007fffebf8c88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 (gdb) xbacktrace Undefined command: "xbacktrace". Try "help". In GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2019-09-16 built on lcy01-amd64-030 Windowing system distributor 'The X.Org Foundation --------------DDE017D52929FAC03290B9C4 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit Dear Bug squashers,

To reproduce, have 'nss-docker'[1] installed. This library can be added to
nsswitch.conf to intercept .docker host requests.
I have not had other problematic programs icw nss-docker.

Since emacs 26, and most likely due to it's premiered use of
multi-threadedness, a simple `m-x list-packages`, with multiple repos
configured (e.g. gnu, melpa), will crash with sigsegv with high
probability.

I am not well-versed enough in debugging multithreaded emacs to conclude
if this is a problem in emacs or nss-docker. But to iterate, since I
have not encountered this at all with other programs, I'll start at
emacs.

Thanks in advance for any effort,

Hans

[1] https://github.com/dex4er/nss-docker

Starting program: /usr/bin/emacs -u /tmp
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffdb75b700 (LWP 26156)]
[New Thread 0x7fffdaa77700 (LWP 26157)]
[New Thread 0x7fffd9fdc700 (LWP 26158)]
[New Thread 0x7fffd8f51b40 (LWP 26232)]
[New Thread 0x7fffd8cffb40 (LWP 26233)]
NSS DEBUG: Called _nss_debug_gethostbyname4_r with args (name: elpa.gnu.org)
NSS DEBUG: Called _nss_debug_gethostbyname4_r with args (name: stable.melpa.org)
[New Thread 0x7fffd8f39b40 (LWP 26234)]
_nss_docker_gethostbyname2_r(name="elpa.gnu.org", af=10)
_nss_docker_gethostbyname2_r(name="stable.melpa.org", af=10)
_nss_docker_gethostbyname3_r(name="elpa.gnu.org", af=10)
_nss_docker_gethostbyname2_r(name="elpa.gnu.org", af=2)
NSS DEBUG: Called _nss_debug_gethostbyname4_r with args (name: orgmode.org)
_nss_docker_gethostbyname3_r(name="elpa.gnu.org", af=2)

Thread 6 "emacs" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd8cffb40 (LWP 26233)]
0x00007fffd8aafcd5 in _nss_docker_gethostbyname3_r (name=0x2e6f732e312e302d ,
af=2002936162, result=0x6e672d78756e696c, buffer=0x2d34365f3638782f ,
buflen=7091318039310988591, errnop=0x312e6f732e312e, herrnop=0x302d77626162696c, ttlp=0x302e6f732e6563, canonp=0x697672657373746e)
at libnss_docker.c:72
72 ) {
(gdb) bt full
#0 0x00007fffd8aafcd5 in _nss_docker_gethostbyname3_r (name=0x2e6f732e312e302d , af=2002936162, result=0x6e672d78756e696c, buffer=0x2d34365f3638782f , buflen=7091318039310988591, errnop=0x312e6f732e312e, herrnop=0x302d77626162696c, ttlp=0x302e6f732e6563, canonp=0x697672657373746e)
at libnss_docker.c:72
name_len = 3414407380873671541
hostname = "86_64-linux-gnu/libX11-xcb.so\000libXxf86vm.so.1\000/usr/lib/x86_64-linux-gnu/libXxf86vm.so.1\000libXxf86vm.so.1\000/usr/lib/i386-linux-gnu/libXxf86vm.so.1\000libXxf86vm.so\000/usr/lib/x86_64-linux-gnu/libXxf86vm.so\000li"...
hostname_suffix_ptr = 0x312e6f732e616162
docker_api_addr =
{sun_family = 12593, sun_path = ".so.6\000libX11.so.6\000/usr/lib/i386-linux-gnu/libX11.so.6\000libX11.so\000/usr/lib/x86_64-linux-gnu/libX11.so\000libX11-x"}
docker_api_addr_len = 1869819507
buffer_size = 3346019690390575202
buffer_offset = 7795575320214437942
sockfd = 788541486
req_message_buffer = "86_64-linux-gnu/libX11-xcb.so.1\000libX11-xcb.so.1\000/usr/lib/i386-linux-gnu/libX11-xcb.so.1\000libX11-xcb.so\000/usr/lib"
req_message_len = 7596498840077020928
res_message_buffer = Python Exception value requires 102400 bytes, which is more than max-value-size:
#1 0x00007fffd8ab0518 in _nss_docker_gethostbyname2_r (name=0x3ba8368 "stable.melpa.org", af=10, result=0x7fffd8cfe7d0, buffer=0x7fffd8cfea40 "\377\002", buflen=1024, errnop=0x7fffd8cff948, herrnop=0x7fffd8cff9ac) at libnss_docker.c:340
#2 0x00007fffebf70f9f in gaih_inet (name=name@entry=0x3ba8368 "stable.melpa.org", service=, req=req@entry=0x3ba8338, pai=pai@entry=0x7fffd8cfe9c8, naddrs=naddrs@entry=0x7fffd8cfe9c4, tmpbuf=tmpbuf@entry=0x7fffd8cfea30) at ../sysdeps/posix/getaddrinfo.c:873
th = {h_name = 0x0, h_aliases = 0x0, h_addrtype = 0, h_length = 0, h_addr_list = 0x0}
localcanon = 0x0
fct = 0x7fffd8ab04a4 <_nss_docker_gethostbyname2_r>
fct4 =
pat = 0x7fffd8cfe7b8
no_inet6_data = 0
nip = 0x2c5eb30
status =
no_more = 0
no_data = 0
inet6_status = NSS_STATUS_UNAVAIL
res_ctx = 0x7fffc8000b20
res_enable_inet6 =
tp =
st = 0x7fffd8cfe6f0
at = 0x7fffd8cfe6b0
got_ipv6 = false
canon = 0x0
orig_name = 0x3ba8368 "stable.melpa.org"
alloca_used =
port =
malloc_name = false
addrmem = 0x0
canonbuf = 0x0
result = 0
#3 0x00007fffebf72ce4 in __GI_getaddrinfo (name=, service=, hints=0x3ba8338, pai=pai@entry=0x3ba8318)
at ../sysdeps/posix/getaddrinfo.c:2300
tmpbuf =
{data = 0x7fffd8cfea40, length = 1024, __space = {__align = {__max_align_ll = 767, __max_align_ld = 5.1301383008835767187e-4937}, __c = "\377\002", '\000' , "\002@\352\317\330\377\177\000\000\000\000\000\000\000\000\000\000ff02::2\000ip6-allrouters", '\000' , "v\352\317\330\377\177\000\000\000\000\000\000\000\000\000\000ts\n", '\000' ...}}
i = 0
last_i = 0
nresults = 0
p = 0x0
gaih_service = {name = 0x3ba8379 "443", num = 443}
pservice =
local_hints =
{ai_flags = 0, ai_family = 0, ai_socktype = 0, ai_protocol = 0, ai_addrlen = 0, ai_addr = 0x0, ai_canonname = 0x0, ai_next = 0x0}
in6ai = 0x0
in6ailen = 0
seen_ipv4 = false
seen_ipv6 = false
check_pf_called = false
end = 0x7fffd8cfe9c8
naddrs = 0
__PRETTY_FUNCTION__ = "getaddrinfo"
#4 0x00007fffecb5a058 in handle_requests (arg=) at gai_misc.c:317
req = 0x3ba8300
srchp =
lastp =
runp = 0x3d84690
---Type to continue, or q to quit---xbackq
__PRETTY_FUNCTION__ = "handle_requests"
#5 0x00007fffecd646db in start_thread (arg=0x7fffd8cffb40) at pthread_create.c:463
pd = 0x7fffd8cffb40
now =
unwind_buf =
{cancel_jmp_buf = {{jmp_buf = {140736830896960, -2868501273485909582, 140736830894080, 0, 64505488, 140737488329792, 2868433241719562674, 2868459701649662386}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call =
#6 0x00007fffebf8c88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) xbacktrace
Undefined command: "xbacktrace". Try "help".

In GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
of 2019-09-16 built on lcy01-amd64-030
Windowing system distributor 'The X.Org Foundation
--------------DDE017D52929FAC03290B9C4-- From unknown Sun Jun 22 00:53:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42140: 26.3; sigsegv when using nss-docker Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Jun 2020 15:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42140 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Hans van den Bogert Cc: 42140@debbugs.gnu.org Received: via spool by 42140-submit@debbugs.gnu.org id=B42140.159353163126647 (code B ref 42140); Tue, 30 Jun 2020 15:41:01 +0000 Received: (at 42140) by debbugs.gnu.org; 30 Jun 2020 15:40:31 +0000 Received: from localhost ([127.0.0.1]:51491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqIN4-0006vj-Je for submit@debbugs.gnu.org; Tue, 30 Jun 2020 11:40:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57012) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqIN3-0006vW-2a for 42140@debbugs.gnu.org; Tue, 30 Jun 2020 11:40:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51681) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqIMx-0003iK-QX; Tue, 30 Jun 2020 11:40:23 -0400 Received: from [176.228.60.248] (port=1038 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jqIMw-0004xZ-Ug; Tue, 30 Jun 2020 11:40:23 -0400 Date: Tue, 30 Jun 2020 18:40:14 +0300 Message-Id: <83k0zozhnl.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <356361b1-9b17-eab5-108c-1d02b7ea73ce@gmail.com> (message from Hans van den Bogert on Tue, 30 Jun 2020 12:13:24 +0200) References: <356361b1-9b17-eab5-108c-1d02b7ea73ce@gmail.com> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Hans van den Bogert > Date: Tue, 30 Jun 2020 12:13:24 +0200 > > Since emacs 26, and most likely due to it's premiered use of > multi-threadedness, a simple `m-x list-packages`, with multiple repos > configured (e.g. gnu, melpa), will crash with sigsegv with high > probability. > > I am not well-versed enough in debugging multithreaded emacs to conclude > if this is a problem in emacs or nss-docker. But to iterate, since I > have not encountered this at all with other programs, I'll start at > emacs. Emacs is not multithreaded. If you never start any additional Lisp threads, only one thread ever runs (not counting GTK threads, but those aren't new in Emacs 26). The backtrace seems to suggest its a problem in nss-docker, since the crash is in its code. Are you sure this is an Emacs problem? From unknown Sun Jun 22 00:53:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42140: 26.3; sigsegv when using nss-docker Resent-From: Hans van den Bogert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Jun 2020 21:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42140 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 42140@debbugs.gnu.org Received: via spool by 42140-submit@debbugs.gnu.org id=B42140.159355191226008 (code B ref 42140); Tue, 30 Jun 2020 21:19:02 +0000 Received: (at 42140) by debbugs.gnu.org; 30 Jun 2020 21:18:32 +0000 Received: from localhost ([127.0.0.1]:51785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqNeB-0006lP-AD for submit@debbugs.gnu.org; Tue, 30 Jun 2020 17:18:32 -0400 Received: from mail-ed1-f45.google.com ([209.85.208.45]:44082) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqMfX-0005EC-6T for 42140@debbugs.gnu.org; Tue, 30 Jun 2020 16:15:54 -0400 Received: by mail-ed1-f45.google.com with SMTP id by13so7538906edb.11 for <42140@debbugs.gnu.org>; Tue, 30 Jun 2020 13:15:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=5jGjWwTHiEyK6y//sbAp4i2JU2JlosInx+VwbgAkTyU=; b=X8Ts9QtAFVLK2B7f3ji5jnBAYP5dyBKrNuONRa5q9ddKIhWlpUFpUQRa5xbpBl5Bln kjFnzFE8iI7RBQTxARn3zKqOTqbFlQVIv6FsvFjjmRIMZ6mP7Om6G08QVoIHRwKtGsQK 1jrYlHd2k4Szt+nVGg3hps2h2d0BD6ZyjaAPhx1ZHv1vBvwY2kkt96GIZ5C3UYi075j3 KmnFni3lDCZ3Me57OMSJkOTzYTv0kpa5j0VzMod6b6TYzonmb0knj3VWBl48nbF3IpLu 914h8Y80wuCvvpyaSqjp2ctOxAhDg3bEevRTXLg1MyHuqdSgL25tw1PUJWq5jFX2dcGh hBYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=5jGjWwTHiEyK6y//sbAp4i2JU2JlosInx+VwbgAkTyU=; b=M06K0jhG2sWGKr+dUL70mz77SyWtStZ6pbiJqp0vdZDtDb0YYj98aEe+FfMplTtU5M /9r/nFvkrsGnjBQZln2rkUaX3/6zTTYbOez9ogR0TyBFH0wmsyUYNZZy10rIAuMFN3Kk Ei0EAX3ZFCFPzpE/zCv5cb67NFTyx4wO5LLP9Y3m9LCRb2YrlXInwDApHmtkaoQSI7Op 9LYS5glXeLTseKOqfSnFQuJ4fVkOqAfFWYt0lx+H74z3qW497v1S+p6A8r6XKYHfs1IZ a6XsFP12nqzhATtkK1zIMNzh1VGEFhCXBp1j9agLGHT+oagaWvmjm2aePxyw3S2om2Xa BriQ== X-Gm-Message-State: AOAM530FmL9YOhRROM2TyWNObabDe2i4DeMqUGOoHK5IxmMt7Ximr7HR 1cYCyiPnfV3/dBs/hZO19CH1++fMM6s= X-Google-Smtp-Source: ABdhPJxjyC9iUvR3Q7jBihDhz85ylC1QvFLyMnc1fbWu24zGvzhna3Zi+JwTRCI+Gd5nxeDM9DqdrQ== X-Received: by 2002:aa7:d744:: with SMTP id a4mr24862612eds.94.1593548143680; Tue, 30 Jun 2020 13:15:43 -0700 (PDT) Received: from [192.168.1.148] (235-131-158-163.dynamic.caiway.nl. [163.158.131.235]) by smtp.gmail.com with ESMTPSA id j19sm4083253edt.44.2020.06.30.13.15.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Jun 2020 13:15:43 -0700 (PDT) References: <356361b1-9b17-eab5-108c-1d02b7ea73ce@gmail.com> <83k0zozhnl.fsf@gnu.org> From: Hans van den Bogert Message-ID: Date: Tue, 30 Jun 2020 22:15:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <83k0zozhnl.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Tue, 30 Jun 2020 17:18:29 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 6/30/20 5:40 PM, Eli Zaretskii wrote: > Emacs is not multithreaded. If you never start any additional Lisp > threads, only one thread ever runs (not counting GTK threads, but > those aren't new in Emacs 26). > > The backtrace seems to suggest its a problem in nss-docker, since the > crash is in its code. Are you sure this is an Emacs problem? > Emacs is not multithreaded. You are right, poor choice of words; concurrent seems to be the proper word. The release notes of v26 do note the change to an async network layer: Release note v26 snippet --->8--- ** The networking code has been reworked so that it's more asynchronous than it was (when specifying :nowait t in 'make-network-process'). How asynchronous it is varies based on the capabilities of the system, but on a typical GNU/Linux system the DNS resolution, the connection, and (for TLS streams) the TLS negotiation are all done without blocking the main Emacs thread. To get asynchronous TLS, the TLS boot parameters have to be passed in (see the manual for details). --->8--- > If you never start any additional Lisp > threads, only one thread ever runs (not counting GTK threads, but > those aren't new in Emacs 26). I am an extreme novice wrt to emacs development, but I have to disagree, in contrast to v25, I can see this async change in the debug prints which I added to `_nss_docker_*_r` functions; the order of internal method calls can interleave between `_nss_docker_gethostbyname2_r` invocations. Further, Ithink I see 2 threads for 2 name resolves (is this what you meant with 'additional lisp threads'?): ``` Thread 7 (Thread 0x7fffd8ce7b40 (LWP 18899)): #0 0x00007fffd8acecd5 in _nss_docker_gethostbyname3_r (name=Python Exception Cannot access memory at address 0x7fffd8ccd388: #1 0x00007fffd8acf518 in _nss_docker_gethostbyname2_r (name=0x2d72768 "orgmode.org", af=10, result=0x7fffd8ce67d0, buffer=0x7fffd8ce6a40 "\377\002", buflen=1024, errnop=0x7fffd8ce7948, herrnop=0x7fffd8ce79ac) at libnss_docker.c:340 #2 0x00007fffebf70f9f in gaih_inet (name=name@entry=0x2d72768 "orgmode.org", service=, req=req@entry=0x2d72738, pai=pai@entry=0x7fffd8ce69c8, naddrs=naddrs@entry=0x7fffd8ce69c4, tmpbuf=tmpbuf@entry=0x7fffd8ce6a30) at ../sysdeps/posix/getaddrinfo.c:873 #3 0x00007fffebf72ce4 in __GI_getaddrinfo (name=, service=, hints=0x2d72738, pai=pai@entry=0x2d72718) at ../sysdeps/posix/getaddrinfo.c:2300 #4 0x00007fffecb5a058 in handle_requests (arg=) at gai_misc.c:317 #5 0x00007fffecd646db in start_thread (arg=0x7fffd8ce7b40) at pthread_create.c:463 #6 0x00007fffebf8c88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 ... Thread 5 (Thread 0x7fffd8f51b40 (LWP 18897)): #0 0x00007fffd8acecd5 in _nss_docker_gethostbyname3_r (name=0x2e6f732e312e302d , af=2002936162, result=0x6e672d78756e696c, buffer=0x2d34365f3638782f , buflen=7091318039310988591, errnop=0x312e6f732e312e, herrnop=0x302d77626162696c, ttlp=0x302e6f732e6563, canonp=0x697672657373746e) at libnss_docker.c:72 #1 0x00007fffd8acf518 in _nss_docker_gethostbyname2_r (name=0x338a068 "elpa.gnu.org", af=10, result=0x7fffd8f507d0, buffer=0x7fffd8f50a40 "\377\002", buflen=1024, errnop=0x7fffd8f51948, herrnop=0x7fffd8f519ac) at libnss_docker.c:340 #2 0x00007fffebf70f9f in gaih_inet (name=name@entry=0x338a068 "elpa.gnu.org", service=, req=req@entry=0x338a038, pai=pai@entry=0x7fffd8f509c8, naddrs=naddrs@entry=0x7fffd8f509c4, tmpbuf=tmpbuf@entry=0x7fffd8f50a30) at ../sysdeps/posix/getaddrinfo.c:873 #3 0x00007fffebf72ce4 in __GI_getaddrinfo (name=, service=, hints=0x338a038, pai=pai@entry=0x338a018) at ../sysdeps/posix/getaddrinfo.c:2300 #4 0x00007fffecb5a058 in handle_requests (arg=) at gai_misc.c:317 #5 0x00007fffecd646db in start_thread (arg=0x7fffd8f51b40) at pthread_create.c:463 #6 0x00007fffebf8c88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 ``` If someone could help me point out where the libc/nss code is called on the emacs side, I can debug this further. Because tbh, I'm having difficulty pin-pointing that. From unknown Sun Jun 22 00:53:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42140: 26.3; sigsegv when using nss-docker Resent-From: Hans van den Bogert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jul 2020 12:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42140 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 42140@debbugs.gnu.org Received: via spool by 42140-submit@debbugs.gnu.org id=B42140.15936071831158 (code B ref 42140); Wed, 01 Jul 2020 12:40:01 +0000 Received: (at 42140) by debbugs.gnu.org; 1 Jul 2020 12:39:43 +0000 Received: from localhost ([127.0.0.1]:52502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqc1f-0000Ic-8K for submit@debbugs.gnu.org; Wed, 01 Jul 2020 08:39:43 -0400 Received: from mail-wr1-f54.google.com ([209.85.221.54]:40339) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqc1d-0000IN-NH for 42140@debbugs.gnu.org; Wed, 01 Jul 2020 08:39:42 -0400 Received: by mail-wr1-f54.google.com with SMTP id h5so23632843wrc.7 for <42140@debbugs.gnu.org>; Wed, 01 Jul 2020 05:39:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=cauBv0fZKx+ylwHINuVzkns1r8yK+zjy78S4AiwO2ds=; b=n9p55xYLgcXUp/O5I7kVRLUsdKthO/XpEgpCduFVoIn968TuP06vpCJ3j1pdz3584g CGsHN6UTBS/n7mFpew2kqigKbCgy8RmxDTlzsV2W4n31vcgBemrgBdVtvXsexlnV/1GV OZrUA6RiPVx0TIlHrcFSPGxjkOymUeHzCkVpEDShoSDS2B94Yp6/WQgaZiAwtQaX0Bdd MISqRW1Kkanj1H2dFI5gxWyNXCqKEWudzDQovr2J44aI2aTpmyYXCTVsSwSCFm1vbxI6 3uC3i7FWtqM7eQS3yJPJcC+HJwQMEqz0mjV0Gsp9OGkzORwawTOxFaT6x61QdNJnfgS+ 4Qfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=cauBv0fZKx+ylwHINuVzkns1r8yK+zjy78S4AiwO2ds=; b=dx1PCd9s/iWguY530y5Kf0ixDNOJ9P+szx8/R8DbctL7n9J67seogKDDMqDjLeMyBC 4Un1+s5t//DUZt+JjKIkXQxZC7CkC9+8zl0dXtplCUvlgTb9Qb47ZxPNfamgNTETLjA/ HkuCTt5PfzIefriEalDmAc87i1nUCQjcqLnqTJ6+L/Jfi1BS0iMJwjuIaQW5xDNTtE7h bqVC2wp20nIWe/i9w3Utk+qbmbXGnVHDqwyy4BeMQ0UcoKmfKxeJ4P7heZDXE/00FKvf a+KPw5QPebKRK85/Y+z6mGzuXOrA3M8ICta93Ci8g0kSa0+AuEpBsun2pbDAKNuXe+V4 Ibvg== X-Gm-Message-State: AOAM530Zu+zECtBhkk5pNEoBuOaGnNhbRdG0tR6UrF4Pp+yeV1+eBdTC nZiuio6pFJtw0Mf3AAahM00V+V8bzUg= X-Google-Smtp-Source: ABdhPJw8tp4FLeol9cxFviZF5xz5/QOvuaqAnSFDMIwG59p5IU/hLhX0Vk0z9ZEF7jUkjGLcmHXztA== X-Received: by 2002:a5d:4d8b:: with SMTP id b11mr26780712wru.341.1593607175503; Wed, 01 Jul 2020 05:39:35 -0700 (PDT) Received: from [192.168.1.196] (office.worldstream.nl. [93.190.136.1]) by smtp.gmail.com with ESMTPSA id k126sm7490097wme.17.2020.07.01.05.39.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Jul 2020 05:39:34 -0700 (PDT) References: <356361b1-9b17-eab5-108c-1d02b7ea73ce@gmail.com> <83k0zozhnl.fsf@gnu.org> From: Hans van den Bogert Message-ID: <0e10422c-253f-0ec5-bccf-d8c9b0e6c7bf@gmail.com> Date: Wed, 1 Jul 2020 14:39:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <83k0zozhnl.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Just for information, I've bisected this to commit fdfb68690f Implement asynchronous name resolution Hans From unknown Sun Jun 22 00:53:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42140: 26.3; sigsegv when using nss-docker Resent-From: Hans van den Bogert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Jul 2020 06:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42140 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 42140@debbugs.gnu.org Received: via spool by 42140-submit@debbugs.gnu.org id=B42140.159401823411351 (code B ref 42140); Mon, 06 Jul 2020 06:51:02 +0000 Received: (at 42140) by debbugs.gnu.org; 6 Jul 2020 06:50:34 +0000 Received: from localhost ([127.0.0.1]:33413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsKxW-0002x1-Gq for submit@debbugs.gnu.org; Mon, 06 Jul 2020 02:50:34 -0400 Received: from mail-ej1-f54.google.com ([209.85.218.54]:42099) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsKxR-0002wc-O7 for 42140@debbugs.gnu.org; Mon, 06 Jul 2020 02:50:33 -0400 Received: by mail-ej1-f54.google.com with SMTP id f12so15055678eja.9 for <42140@debbugs.gnu.org>; Sun, 05 Jul 2020 23:50:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=y5GtSlqnRO6hPaGM2lxeGXer5uJhWG0B1OVtJSBLCm0=; b=ILMsvN1x1gHwXvAgW4lSf/fa846eCl8IXFviH6YUWWuf1wjDrIrdaUDNOIZHS2Waqg XZObDx+dFC+Sm+EVFq1ZvG9CVQswhqFRvVkK1DjLs1EAwzLZ0KU8pUd5ISTz66CYF3zk hT8W2kansXeRr4vtNURrZQcOBvmQkwlkhMVlqM3619vMCj3dxjuRX5ug8aKD7NjFNr7Q 6dp57zjOVZtBMG9YiK19ynUIwWUL9sgX8Ohz/5xSbfNgUioPrsRL0vvBd0gzYmvir1rN PGK0yQVk8kp2XbT6eszV3wU5/Nlf8MnlMiBI7Mgs3FZ0oE2ZCP7bx49pd53ajHyTwrWh mbTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=y5GtSlqnRO6hPaGM2lxeGXer5uJhWG0B1OVtJSBLCm0=; b=IQQtekdTUZTY0qBtso+tJWQPG8G3ixw6X23Ry1CTkEDE/HA3xdxdWWsQVAmv6Me/QL hPcRXjiTz8n/GS0MCZEyX7994VOJzqLwm1WsxB3v0KJW4yL0Up5X8CD55o7ciXIOhero ETz/e9DfW330bEoRa1DeUWIpLb4ZUVC056p883QDQfEzs/+bZrM5RxeFVsVGxjuUG4k0 LXfhEM1dl0aEdphIyk/oFPoAdoj9eczcPP7HxR5UoanBREjwx8EjEkB8oKsP62+4FHJl bxHCbHDhqjXZiPX2cUIqFjuC37Njpqiv21DRBYyOsRy2YeYStuzbJKDUCAS65QHxuQlM GkAg== X-Gm-Message-State: AOAM533HGP/VubC6712hipc0h7qeFKDk8AHEOvLu+yi25LTXRBAfkNCd gTUU6+sxFlJwnmRWbrR+pPLh+ai2qHM= X-Google-Smtp-Source: ABdhPJxIrpLP6sOkxpCmkuGzfonzXVtsrztDqLT5s/cLQ9kEZ7fsnao+lOsZBiJ8JcJvsoTlsfus0w== X-Received: by 2002:a17:906:f98e:: with SMTP id li14mr41875328ejb.174.1594018223368; Sun, 05 Jul 2020 23:50:23 -0700 (PDT) Received: from [192.168.1.148] (235-131-158-163.dynamic.caiway.nl. [163.158.131.235]) by smtp.gmail.com with ESMTPSA id ay27sm22518480edb.81.2020.07.05.23.50.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Jul 2020 23:50:22 -0700 (PDT) References: <356361b1-9b17-eab5-108c-1d02b7ea73ce@gmail.com> <83k0zozhnl.fsf@gnu.org> From: Hans van den Bogert Message-ID: Date: Mon, 6 Jul 2020 08:50:21 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <83k0zozhnl.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dear Eli, Please set this bug to 'invalid'. (could I've done this myself?) The example in the manpages of `getaddrinfo_a` is enough to trigger this locally. I am at my wit's end though where the real problem lies. Sorry for the lack of confidence in emacs and for the overhead of this unneeded bug report ;) Regards, Hans From unknown Sun Jun 22 00:53:17 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Hans van den Bogert Subject: bug#42140: closed (Re: bug#42140: 26.3; sigsegv when using nss-docker) Message-ID: References: <83pn98sizu.fsf@gnu.org> <356361b1-9b17-eab5-108c-1d02b7ea73ce@gmail.com> X-Gnu-PR-Message: they-closed 42140 X-Gnu-PR-Package: emacs Reply-To: 42140@debbugs.gnu.org Date: Mon, 06 Jul 2020 16:32:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1594053122-10814-1" This is a multi-part message in MIME format... ------------=_1594053122-10814-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #42140: 26.3; sigsegv when using nss-docker which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 42140@debbugs.gnu.org. --=20 42140: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D42140 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1594053122-10814-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 42140-done) by debbugs.gnu.org; 6 Jul 2020 16:31:22 +0000 Received: from localhost ([127.0.0.1]:34759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsU1Z-0002nI-Nm for submit@debbugs.gnu.org; Mon, 06 Jul 2020 12:31:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsU1V-0002mn-A3 for 42140-done@debbugs.gnu.org; Mon, 06 Jul 2020 12:31:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57962) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jsU1Q-0000sQ-1I; Mon, 06 Jul 2020 12:31:12 -0400 Received: from [176.228.60.248] (port=2092 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jsU1N-00029u-14; Mon, 06 Jul 2020 12:31:10 -0400 Date: Mon, 06 Jul 2020 19:31:17 +0300 Message-Id: <83pn98sizu.fsf@gnu.org> From: Eli Zaretskii To: Hans van den Bogert In-Reply-To: (message from Hans van den Bogert on Mon, 6 Jul 2020 08:50:21 +0200) Subject: Re: bug#42140: 26.3; sigsegv when using nss-docker References: <356361b1-9b17-eab5-108c-1d02b7ea73ce@gmail.com> <83k0zozhnl.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42140-done Cc: 42140-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 42140@debbugs.gnu.org > From: Hans van den Bogert > Date: Mon, 6 Jul 2020 08:50:21 +0200 > > Please set this bug to 'invalid'. (could I've done this myself?) You can always close a bug by sending email to NNNN-done@debbugs.gnu.org, where NNNN is the bug number. Like I did now. > The example in the manpages of `getaddrinfo_a` is enough to trigger this > locally. > I am at my wit's end though where the real problem lies. Thanks for telling us. Could this be a bug with your kernel or the standard C library? > Sorry for the lack of confidence in emacs and for the overhead of this > unneeded bug report ;) No need to apologize, it can happen with anyone. ------------=_1594053122-10814-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 30 Jun 2020 15:10:48 +0000 Received: from localhost ([127.0.0.1]:51450 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqHuI-0006CN-U1 for submit@debbugs.gnu.org; Tue, 30 Jun 2020 11:10:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:44798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqDGd-0002lF-AT for submit@debbugs.gnu.org; Tue, 30 Jun 2020 06:13:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqDGd-0003cX-43 for bug-gnu-emacs@gnu.org; Tue, 30 Jun 2020 06:13:31 -0400 Received: from mail-ej1-x642.google.com ([2a00:1450:4864:20::642]:40279) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jqDGa-0006Mg-HL for bug-gnu-emacs@gnu.org; Tue, 30 Jun 2020 06:13:30 -0400 Received: by mail-ej1-x642.google.com with SMTP id o18so15489503eje.7 for ; Tue, 30 Jun 2020 03:13:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:subject:from:message-id:date:user-agent:mime-version :content-language; bh=nTQFKB298p8YPSr4cS0U4lEc7cY+pn3eiWAMxKZVsfI=; b=bagsqMYcOXrVO4I5hWerud2ChYt+mJmEx9HVaMo54FgLmBoVRtMOk9tShV/NdkCNOc C6YmyTxFmQQKsh4NollgoDMyscysIKFTyfVxdyc35sO3inNDE8A/KZ2qT5iZDpCgGu81 7wnDPsKkPm13pgdT4k8p9oq0dJk7C00/9JI+o9RlecAsOjdKVqk8CDs3LcKMq+qNnc9A mOqhfnqDPsAXRc7ffB2oKDAQnQBnn2haNItq/qDMWqnDbUaLzxAYCFweEyARxbJ4Fnrb A6cZ3rxI9A11fVh5CqPU5OsZUoSFMpu5l25+i0YsS5KN3veWq7jSn+IdKV8b5KkVkpxw gjUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:subject:from:message-id:date:user-agent :mime-version:content-language; bh=nTQFKB298p8YPSr4cS0U4lEc7cY+pn3eiWAMxKZVsfI=; b=r/PzrrSQXt4COgHSHoTRunNyZvFZcqcNw4gtIOxrwZFHbfNkJxWDw7WrRp8BfT74aX 1oKLqa22HCq17IhEbWmRAqfqpGi8SyHm8d6wWJXaaRFUJ6tPWKY78RhfzL6ad5Yj9ZbV erBHT8EOG+JSOdMcWqq70f3ze+lH4FfhqBZj9qtT9Ltutoz4ESYjxrbJkO+S1OugY0KD FbmAbPpiZOlAo7My1YZTPKJeZePBnmmMRt30p8tBn2rCyVPSdKhF3qx7N+FIyJwH7Cqj nX3MI3eFCtq5WEQ6wFWJjST1m8R5L9y+7iDM3f5rKmjJWZ7sRFVOL7TvPMrHnGrEq4lN TRKQ== X-Gm-Message-State: AOAM533lLnYynDLKiPkLADISibjxp8rS5g8vXKwe16Rh6m39VB2LuENW d9h1IWA0jc9aSqwtDxtmqZkTKqAf/44= X-Google-Smtp-Source: ABdhPJxa8m43PMHA61u5Ww5Ml6q/R/vAQGU/GdVnORUghQEqiEyRtkbso0A4RznHxGUZkbbD9YjU1g== X-Received: by 2002:a17:906:8607:: with SMTP id o7mr17321644ejx.142.1593512006007; Tue, 30 Jun 2020 03:13:26 -0700 (PDT) Received: from [192.168.1.148] (235-131-158-163.dynamic.caiway.nl. [163.158.131.235]) by smtp.gmail.com with ESMTPSA id a13sm2334641edk.58.2020.06.30.03.13.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Jun 2020 03:13:25 -0700 (PDT) To: bug-gnu-emacs@gnu.org Subject: 26.3; sigsegv when using nss-docker From: Hans van den Bogert Message-ID: <356361b1-9b17-eab5-108c-1d02b7ea73ce@gmail.com> Date: Tue, 30 Jun 2020 12:13:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------------DDE017D52929FAC03290B9C4" Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::642; envelope-from=hansbogert@gmail.com; helo=mail-ej1-x642.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 30 Jun 2020 11:10:46 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) This is a multi-part message in MIME format. --------------DDE017D52929FAC03290B9C4 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Dear Bug squashers, To reproduce, have 'nss-docker'[1] installed. This library can be added to nsswitch.conf to intercept .docker host requests. I have not had other problematic programs icw nss-docker. Since emacs 26, and most likely due to it's premiered use of multi-threadedness, a simple `m-x list-packages`, with multiple repos configured (e.g. gnu, melpa), will crash with sigsegv with high probability. I am not well-versed enough in debugging multithreaded emacs to conclude if this is a problem in emacs or nss-docker. But to iterate, since I have not encountered this at all with other programs, I'll start at emacs. Thanks in advance for any effort, Hans [1] https://github.com/dex4er/nss-docker Starting program: /usr/bin/emacs -u /tmp [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7fffdb75b700 (LWP 26156)] [New Thread 0x7fffdaa77700 (LWP 26157)] [New Thread 0x7fffd9fdc700 (LWP 26158)] [New Thread 0x7fffd8f51b40 (LWP 26232)] [New Thread 0x7fffd8cffb40 (LWP 26233)] NSS DEBUG: Called _nss_debug_gethostbyname4_r with args (name: elpa.gnu.org) NSS DEBUG: Called _nss_debug_gethostbyname4_r with args (name: stable.melpa.org) [New Thread 0x7fffd8f39b40 (LWP 26234)] _nss_docker_gethostbyname2_r(name="elpa.gnu.org", af=10) _nss_docker_gethostbyname2_r(name="stable.melpa.org", af=10) _nss_docker_gethostbyname3_r(name="elpa.gnu.org", af=10) _nss_docker_gethostbyname2_r(name="elpa.gnu.org", af=2) NSS DEBUG: Called _nss_debug_gethostbyname4_r with args (name: orgmode.org) _nss_docker_gethostbyname3_r(name="elpa.gnu.org", af=2) Thread 6 "emacs" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffd8cffb40 (LWP 26233)] 0x00007fffd8aafcd5 in _nss_docker_gethostbyname3_r (name=0x2e6f732e312e302d , af=2002936162, result=0x6e672d78756e696c, buffer=0x2d34365f3638782f , buflen=7091318039310988591, errnop=0x312e6f732e312e, herrnop=0x302d77626162696c, ttlp=0x302e6f732e6563, canonp=0x697672657373746e) at libnss_docker.c:72 72 ) { (gdb) bt full #0 0x00007fffd8aafcd5 in _nss_docker_gethostbyname3_r (name=0x2e6f732e312e302d , af=2002936162, result=0x6e672d78756e696c, buffer=0x2d34365f3638782f , buflen=7091318039310988591, errnop=0x312e6f732e312e, herrnop=0x302d77626162696c, ttlp=0x302e6f732e6563, canonp=0x697672657373746e) at libnss_docker.c:72 name_len = 3414407380873671541 hostname = "86_64-linux-gnu/libX11-xcb.so\000libXxf86vm.so.1\000/usr/lib/x86_64-linux-gnu/libXxf86vm.so.1\000libXxf86vm.so.1\000/usr/lib/i386-linux-gnu/libXxf86vm.so.1\000libXxf86vm.so\000/usr/lib/x86_64-linux-gnu/libXxf86vm.so\000li"... hostname_suffix_ptr = 0x312e6f732e616162 docker_api_addr = {sun_family = 12593, sun_path = ".so.6\000libX11.so.6\000/usr/lib/i386-linux-gnu/libX11.so.6\000libX11.so\000/usr/lib/x86_64-linux-gnu/libX11.so\000libX11-x"} docker_api_addr_len = 1869819507 buffer_size = 3346019690390575202 buffer_offset = 7795575320214437942 sockfd = 788541486 req_message_buffer = "86_64-linux-gnu/libX11-xcb.so.1\000libX11-xcb.so.1\000/usr/lib/i386-linux-gnu/libX11-xcb.so.1\000libX11-xcb.so\000/usr/lib" req_message_len = 7596498840077020928 res_message_buffer = Python Exception value requires 102400 bytes, which is more than max-value-size: #1 0x00007fffd8ab0518 in _nss_docker_gethostbyname2_r (name=0x3ba8368 "stable.melpa.org", af=10, result=0x7fffd8cfe7d0, buffer=0x7fffd8cfea40 "\377\002", buflen=1024, errnop=0x7fffd8cff948, herrnop=0x7fffd8cff9ac) at libnss_docker.c:340 #2 0x00007fffebf70f9f in gaih_inet (name=name@entry=0x3ba8368 "stable.melpa.org", service=, req=req@entry=0x3ba8338, pai=pai@entry=0x7fffd8cfe9c8, naddrs=naddrs@entry=0x7fffd8cfe9c4, tmpbuf=tmpbuf@entry=0x7fffd8cfea30) at ../sysdeps/posix/getaddrinfo.c:873 th = {h_name = 0x0, h_aliases = 0x0, h_addrtype = 0, h_length = 0, h_addr_list = 0x0} localcanon = 0x0 fct = 0x7fffd8ab04a4 <_nss_docker_gethostbyname2_r> fct4 = pat = 0x7fffd8cfe7b8 no_inet6_data = 0 nip = 0x2c5eb30 status = no_more = 0 no_data = 0 inet6_status = NSS_STATUS_UNAVAIL res_ctx = 0x7fffc8000b20 res_enable_inet6 = tp = st = 0x7fffd8cfe6f0 at = 0x7fffd8cfe6b0 got_ipv6 = false canon = 0x0 orig_name = 0x3ba8368 "stable.melpa.org" alloca_used = port = malloc_name = false addrmem = 0x0 canonbuf = 0x0 result = 0 #3 0x00007fffebf72ce4 in __GI_getaddrinfo (name=, service=, hints=0x3ba8338, pai=pai@entry=0x3ba8318) at ../sysdeps/posix/getaddrinfo.c:2300 tmpbuf = {data = 0x7fffd8cfea40, length = 1024, __space = {__align = {__max_align_ll = 767, __max_align_ld = 5.1301383008835767187e-4937}, __c = "\377\002", '\000' , "\002@\352\317\330\377\177\000\000\000\000\000\000\000\000\000\000ff02::2\000ip6-allrouters", '\000' , "v\352\317\330\377\177\000\000\000\000\000\000\000\000\000\000ts\n", '\000' ...}} i = 0 last_i = 0 nresults = 0 p = 0x0 gaih_service = {name = 0x3ba8379 "443", num = 443} pservice = local_hints = {ai_flags = 0, ai_family = 0, ai_socktype = 0, ai_protocol = 0, ai_addrlen = 0, ai_addr = 0x0, ai_canonname = 0x0, ai_next = 0x0} in6ai = 0x0 in6ailen = 0 seen_ipv4 = false seen_ipv6 = false check_pf_called = false end = 0x7fffd8cfe9c8 naddrs = 0 __PRETTY_FUNCTION__ = "getaddrinfo" #4 0x00007fffecb5a058 in handle_requests (arg=) at gai_misc.c:317 req = 0x3ba8300 srchp = lastp = runp = 0x3d84690 ---Type to continue, or q to quit---xbackq __PRETTY_FUNCTION__ = "handle_requests" #5 0x00007fffecd646db in start_thread (arg=0x7fffd8cffb40) at pthread_create.c:463 pd = 0x7fffd8cffb40 now = unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140736830896960, -2868501273485909582, 140736830894080, 0, 64505488, 140737488329792, 2868433241719562674, 2868459701649662386}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}} not_first_call = #6 0x00007fffebf8c88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 (gdb) xbacktrace Undefined command: "xbacktrace". Try "help". In GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2019-09-16 built on lcy01-amd64-030 Windowing system distributor 'The X.Org Foundation --------------DDE017D52929FAC03290B9C4 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit Dear Bug squashers,

To reproduce, have 'nss-docker'[1] installed. This library can be added to
nsswitch.conf to intercept .docker host requests.
I have not had other problematic programs icw nss-docker.

Since emacs 26, and most likely due to it's premiered use of
multi-threadedness, a simple `m-x list-packages`, with multiple repos
configured (e.g. gnu, melpa), will crash with sigsegv with high
probability.

I am not well-versed enough in debugging multithreaded emacs to conclude
if this is a problem in emacs or nss-docker. But to iterate, since I
have not encountered this at all with other programs, I'll start at
emacs.

Thanks in advance for any effort,

Hans

[1] https://github.com/dex4er/nss-docker

Starting program: /usr/bin/emacs -u /tmp
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffdb75b700 (LWP 26156)]
[New Thread 0x7fffdaa77700 (LWP 26157)]
[New Thread 0x7fffd9fdc700 (LWP 26158)]
[New Thread 0x7fffd8f51b40 (LWP 26232)]
[New Thread 0x7fffd8cffb40 (LWP 26233)]
NSS DEBUG: Called _nss_debug_gethostbyname4_r with args (name: elpa.gnu.org)
NSS DEBUG: Called _nss_debug_gethostbyname4_r with args (name: stable.melpa.org)
[New Thread 0x7fffd8f39b40 (LWP 26234)]
_nss_docker_gethostbyname2_r(name="elpa.gnu.org", af=10)
_nss_docker_gethostbyname2_r(name="stable.melpa.org", af=10)
_nss_docker_gethostbyname3_r(name="elpa.gnu.org", af=10)
_nss_docker_gethostbyname2_r(name="elpa.gnu.org", af=2)
NSS DEBUG: Called _nss_debug_gethostbyname4_r with args (name: orgmode.org)
_nss_docker_gethostbyname3_r(name="elpa.gnu.org", af=2)

Thread 6 "emacs" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd8cffb40 (LWP 26233)]
0x00007fffd8aafcd5 in _nss_docker_gethostbyname3_r (name=0x2e6f732e312e302d ,
af=2002936162, result=0x6e672d78756e696c, buffer=0x2d34365f3638782f ,
buflen=7091318039310988591, errnop=0x312e6f732e312e, herrnop=0x302d77626162696c, ttlp=0x302e6f732e6563, canonp=0x697672657373746e)
at libnss_docker.c:72
72 ) {
(gdb) bt full
#0 0x00007fffd8aafcd5 in _nss_docker_gethostbyname3_r (name=0x2e6f732e312e302d , af=2002936162, result=0x6e672d78756e696c, buffer=0x2d34365f3638782f , buflen=7091318039310988591, errnop=0x312e6f732e312e, herrnop=0x302d77626162696c, ttlp=0x302e6f732e6563, canonp=0x697672657373746e)
at libnss_docker.c:72
name_len = 3414407380873671541
hostname = "86_64-linux-gnu/libX11-xcb.so\000libXxf86vm.so.1\000/usr/lib/x86_64-linux-gnu/libXxf86vm.so.1\000libXxf86vm.so.1\000/usr/lib/i386-linux-gnu/libXxf86vm.so.1\000libXxf86vm.so\000/usr/lib/x86_64-linux-gnu/libXxf86vm.so\000li"...
hostname_suffix_ptr = 0x312e6f732e616162
docker_api_addr =
{sun_family = 12593, sun_path = ".so.6\000libX11.so.6\000/usr/lib/i386-linux-gnu/libX11.so.6\000libX11.so\000/usr/lib/x86_64-linux-gnu/libX11.so\000libX11-x"}
docker_api_addr_len = 1869819507
buffer_size = 3346019690390575202
buffer_offset = 7795575320214437942
sockfd = 788541486
req_message_buffer = "86_64-linux-gnu/libX11-xcb.so.1\000libX11-xcb.so.1\000/usr/lib/i386-linux-gnu/libX11-xcb.so.1\000libX11-xcb.so\000/usr/lib"
req_message_len = 7596498840077020928
res_message_buffer = Python Exception value requires 102400 bytes, which is more than max-value-size:
#1 0x00007fffd8ab0518 in _nss_docker_gethostbyname2_r (name=0x3ba8368 "stable.melpa.org", af=10, result=0x7fffd8cfe7d0, buffer=0x7fffd8cfea40 "\377\002", buflen=1024, errnop=0x7fffd8cff948, herrnop=0x7fffd8cff9ac) at libnss_docker.c:340
#2 0x00007fffebf70f9f in gaih_inet (name=name@entry=0x3ba8368 "stable.melpa.org", service=, req=req@entry=0x3ba8338, pai=pai@entry=0x7fffd8cfe9c8, naddrs=naddrs@entry=0x7fffd8cfe9c4, tmpbuf=tmpbuf@entry=0x7fffd8cfea30) at ../sysdeps/posix/getaddrinfo.c:873
th = {h_name = 0x0, h_aliases = 0x0, h_addrtype = 0, h_length = 0, h_addr_list = 0x0}
localcanon = 0x0
fct = 0x7fffd8ab04a4 <_nss_docker_gethostbyname2_r>
fct4 =
pat = 0x7fffd8cfe7b8
no_inet6_data = 0
nip = 0x2c5eb30
status =
no_more = 0
no_data = 0
inet6_status = NSS_STATUS_UNAVAIL
res_ctx = 0x7fffc8000b20
res_enable_inet6 =
tp =
st = 0x7fffd8cfe6f0
at = 0x7fffd8cfe6b0
got_ipv6 = false
canon = 0x0
orig_name = 0x3ba8368 "stable.melpa.org"
alloca_used =
port =
malloc_name = false
addrmem = 0x0
canonbuf = 0x0
result = 0
#3 0x00007fffebf72ce4 in __GI_getaddrinfo (name=, service=, hints=0x3ba8338, pai=pai@entry=0x3ba8318)
at ../sysdeps/posix/getaddrinfo.c:2300
tmpbuf =
{data = 0x7fffd8cfea40, length = 1024, __space = {__align = {__max_align_ll = 767, __max_align_ld = 5.1301383008835767187e-4937}, __c = "\377\002", '\000' , "\002@\352\317\330\377\177\000\000\000\000\000\000\000\000\000\000ff02::2\000ip6-allrouters", '\000' , "v\352\317\330\377\177\000\000\000\000\000\000\000\000\000\000ts\n", '\000' ...}}
i = 0
last_i = 0
nresults = 0
p = 0x0
gaih_service = {name = 0x3ba8379 "443", num = 443}
pservice =
local_hints =
{ai_flags = 0, ai_family = 0, ai_socktype = 0, ai_protocol = 0, ai_addrlen = 0, ai_addr = 0x0, ai_canonname = 0x0, ai_next = 0x0}
in6ai = 0x0
in6ailen = 0
seen_ipv4 = false
seen_ipv6 = false
check_pf_called = false
end = 0x7fffd8cfe9c8
naddrs = 0
__PRETTY_FUNCTION__ = "getaddrinfo"
#4 0x00007fffecb5a058 in handle_requests (arg=) at gai_misc.c:317
req = 0x3ba8300
srchp =
lastp =
runp = 0x3d84690
---Type to continue, or q to quit---xbackq
__PRETTY_FUNCTION__ = "handle_requests"
#5 0x00007fffecd646db in start_thread (arg=0x7fffd8cffb40) at pthread_create.c:463
pd = 0x7fffd8cffb40
now =
unwind_buf =
{cancel_jmp_buf = {{jmp_buf = {140736830896960, -2868501273485909582, 140736830894080, 0, 64505488, 140737488329792, 2868433241719562674, 2868459701649662386}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call =
#6 0x00007fffebf8c88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) xbacktrace
Undefined command: "xbacktrace". Try "help".

In GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
of 2019-09-16 built on lcy01-amd64-030
Windowing system distributor 'The X.Org Foundation
--------------DDE017D52929FAC03290B9C4-- ------------=_1594053122-10814-1-- From unknown Sun Jun 22 00:53:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42140: 26.3; sigsegv when using nss-docker Resent-From: Hans van den Bogert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Jul 2020 08:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42140 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Cc: 42140-done@debbugs.gnu.org Received: via spool by 42140-done@debbugs.gnu.org id=D42140.159411175416790 (code D ref 42140); Tue, 07 Jul 2020 08:50:02 +0000 Received: (at 42140-done) by debbugs.gnu.org; 7 Jul 2020 08:49:14 +0000 Received: from localhost ([127.0.0.1]:35478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsjHt-0004Mi-NH for submit@debbugs.gnu.org; Tue, 07 Jul 2020 04:49:13 -0400 Received: from mail-wr1-f49.google.com ([209.85.221.49]:33756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsjHr-0004MP-3Y for 42140-done@debbugs.gnu.org; Tue, 07 Jul 2020 04:49:12 -0400 Received: by mail-wr1-f49.google.com with SMTP id f18so36205253wrs.0 for <42140-done@debbugs.gnu.org>; Tue, 07 Jul 2020 01:49:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:cc:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=rP0n1DFofadYG7GMZR9HlA6+ob0MsynBm6hGr8W6tno=; b=FdzLRkyqN2aoisw1RGeRQR8YP1VoJ6AXu456HcePeHAyjdRQb8qD39mw2wz4AKCOC7 YhQHBLNEcuCh4+n+9u2JRGp0e3Lc8R7upF/HVHTuHGvSaumXSmZgw62XckzUCOPastG/ C1ArkN+QbQ6RdayxYENvA/SjWXohqNFt/liOJ3XCXo454TJCKCZ/SMARS26zLOPTUYjF dWY3dtp3balrT7JkXoTCLLAw5EghEldYgwnz/3Ju3Ks+hFiVILxDSbsSvlvc1527W+df d7jQvqFh5sx/nz5rKZMOGGVfjlPx126W+WYNohiuM4ZJDD2IHbcjFJ5/0DQX2S0D0ugD O1Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=rP0n1DFofadYG7GMZR9HlA6+ob0MsynBm6hGr8W6tno=; b=AJrADWmPU0sWBuZt/808v42b66a0oOyI/S+ajyigFdIB0BeI/dsG3K3vJ1fQz3mA/8 dsdB/YNT2bO+LKPkv6vp5bQERMfvFoCsI7FMKLK7xScg4zTzFFNS1DwNWSU0Lxjx/itz vQjV2Os/Yd9xxn7B8J5TG5Y60G0nNNXWuPO3jsMAaYc19jRe90azRUWtsWttGUMiKjFZ x+IzoXT7+RZnEblTqgVc3SRiabBXcNeN5Le1bb32C4mpYef8qnAifDQcqlC2HYyZB2+6 BQWHkfc4k9sMP7tswirDRPSEHn9EKtniqOq3mprmz4bJ3jekqt7+swFpSgX+U2llgr2e 6bTw== X-Gm-Message-State: AOAM533BB1jOJpBcRgC2qJnEIlEQ2yyApR1KXnYZ2pvZq9BNY399qE07 BboVnSH2yQPi+QqtsjFZBsTObeghAaY= X-Google-Smtp-Source: ABdhPJwG/GS/yms0Hy2t/LG+J4I7i/MbUQPxSV49fOUzj8yN955jEuobITrJ0hoZVIRfZVkHfNT93w== X-Received: by 2002:adf:e60e:: with SMTP id p14mr51357760wrm.31.1594111744660; Tue, 07 Jul 2020 01:49:04 -0700 (PDT) Received: from [192.168.1.197] (office.worldstream.nl. [93.190.136.1]) by smtp.gmail.com with ESMTPSA id p25sm86641wmg.39.2020.07.07.01.49.03 for <42140-done@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Jul 2020 01:49:03 -0700 (PDT) References: <356361b1-9b17-eab5-108c-1d02b7ea73ce@gmail.com> <83k0zozhnl.fsf@gnu.org> <83pn98sizu.fsf@gnu.org> From: Hans van den Bogert Message-ID: Date: Tue, 7 Jul 2020 10:49:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <83pn98sizu.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 7/6/20 6:31 PM, Eli Zaretskii wrote: > Thanks for telling us. Could this be a bug with your kernel or the > standard C library? The kernel seems unlikely, the only difference I can see is that nss_docker's _nss_docker_gethostbynameX_r seem 'off' on assembly level compared to for example, the equivalent functions of `nss_mdns_m [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (hansbogert[at]gmail.com) 1.2 MISSING_HEADERS Missing To: header -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.49 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.49 listed in wl.mailspike.net] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) On 7/6/20 6:31 PM, Eli Zaretskii wrote: > Thanks for telling us. Could this be a bug with your kernel or the > standard C library? The kernel seems unlikely, the only difference I can see is that nss_docker's _nss_docker_gethostbynameX_r seem 'off' on assembly level compared to for example, the equivalent functions of `nss_mdns_minimal` and libc's `nss_dns`. The offsets when referencing stack locations on function entry are large (0xNNNNN), compared to the straightforward function entry assembly I see in nss_mdns and nss_dns, with 'normal' offsets of 0xNNN. I've compared compiler flags and all, but I can't explain it. The weird things remains of course, why does the shared library work fine when it's called through the non async variant, `gethostbyname`. But I think the discussion is out of scope for this list/tracker, though any pointers are welcome of course. Regards,