Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4238007ybz; Tue, 28 Apr 2020 08:00:44 -0700 (PDT) X-Google-Smtp-Source: APiQypJYN5nmuklNNOb+qpd4CmN8/0SZtp6C4mhDLaw66sl1pW61+i0nzFAqungeRXAUNgnT5FmB X-Received: by 2002:a50:e8c7:: with SMTP id l7mr22392222edn.309.1588086043808; Tue, 28 Apr 2020 08:00:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588086043; cv=none; d=google.com; s=arc-20160816; b=MtZfcNY12pgX++CtJhqB4tfB6U6H9RXDVP4AyEdwT1+wVOB4J26+7NuioV19fWNwRr ZzQpAZcQzZ6MX2r8xExD1KnHN5P9/Xt5sMFy1Tdk2Vz29itjNlvKpA5gEvtEBEvVTl1c d+Of5jciLnvbyGUZUnJdH75/lcVmo3vI48q9tk1GPySQz83kQ8eRoxHmHZcORsgg7I0o Hd94m8Ed/JkhXuIDMS5Q0yUm2GNiOPxfJMvcZtTP+rE/Rontf4vjhiKC0pdQ1VhuhT0x TRYWEfiwzxZEyU1LGpKwWPYJqx+ARQFnhLNVgb8ey5HUt8jRSlD96GLBec85AlOQ8oJi eE2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:dkim-signature:dkim-filter; bh=C19Y7Q0zQ58ch1DAMA7Z2tNyypEx+FfZlqejx6D0qFc=; b=t5NyudQoXCjlYacKBnntqvPhH3QUqOjuFfkDJ6LYgtK3RgbNX7+zMOFXJ9p5zIVv5B CYS9xHJQDxc7F7y0kqjdzZHRHd8UTE71Ftb7sGXLj8o4tdF4mpcG59UGY68grrKmNOYq dOd/jGLf8hPhytJuesZx98eZJ2sCuN3mR0xGMTtyJAEwRBHaI5Jx4ppvLraHAt07Cun1 CnOqJLiGSgGdwFMiq7KoCV6jOlh0Ui+66HlRv9yIo8PTkjV9Gy3r6rkNz0au+44CNN8E LaaUHO2ls1A2BoIOthACGRi1UEPps5kdYEc2Kk9lmefgxw/1uKI8MoljzOUd+vtRhP1I 2QNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=WKMti1ql; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o19si1854042edz.588.2020.04.28.08.00.19; Tue, 28 Apr 2020 08:00:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=WKMti1ql; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728122AbgD1O6W (ORCPT + 99 others); Tue, 28 Apr 2020 10:58:22 -0400 Received: from mail.efficios.com ([167.114.26.124]:35546 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727108AbgD1O6V (ORCPT ); Tue, 28 Apr 2020 10:58:21 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 00FE927D8A1; Tue, 28 Apr 2020 10:58:20 -0400 (EDT) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id qyS4QE5KyFE6; Tue, 28 Apr 2020 10:58:19 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 8AD9627D8A0; Tue, 28 Apr 2020 10:58:19 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 8AD9627D8A0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1588085899; bh=C19Y7Q0zQ58ch1DAMA7Z2tNyypEx+FfZlqejx6D0qFc=; h=Date:From:To:Message-ID:MIME-Version; b=WKMti1qlpDedWfwpWf8tT+yqjC1KtMkJ84KO1DLvz5R71ROSA9EI69dMxFpyy5aG0 cbmZp45DtkwMJYRjHXqq4ZK2qB90alYMOQdGkwRELT0Kr5vD4RtyeE5cZ3PuQOEo4w Rcll+HM9PVkMAF5F7jAGagwznMxCi43fgoc/mQBuJFZsivC1hgc7RHan2iURMui+k6 N7pcYNU+AjCDsw3aAZRZaORjT6xZQPWgs7oeSQDZXX5vsoFDX04AUBcHo63Fhr9xlM ltf6wzFQNfhhMssoCnqgGW45Nc0wP6/GFbUEVhh5uBDIQMhkbHfWPKpsAgBsr1uZcQ FxT+VSZGalHag== X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id uHieuJrZs_Il; Tue, 28 Apr 2020 10:58:19 -0400 (EDT) Received: from mail03.efficios.com (mail03.efficios.com [167.114.26.124]) by mail.efficios.com (Postfix) with ESMTP id 73AC527DB03; Tue, 28 Apr 2020 10:58:19 -0400 (EDT) Date: Tue, 28 Apr 2020 10:58:19 -0400 (EDT) From: Mathieu Desnoyers To: Florian Weimer Cc: Michael Kerrisk , libc-alpha , carlos , Rich Felker , linux-api , Boqun Feng , Will Deacon , linux-kernel , Peter Zijlstra , Ben Maurer , Dave Watson , Thomas Gleixner , Paul , Paul Turner , Joseph Myers , Szabolcs Nagy Message-ID: <437249723.72685.1588085899422.JavaMail.zimbra@efficios.com> In-Reply-To: <87tv13py8j.fsf@mid.deneb.enyo.de> References: <20200326155633.18236-1-mathieu.desnoyers@efficios.com> <87zhawvphv.fsf@mid.deneb.enyo.de> <2102127737.70791.1588008377292.JavaMail.zimbra@efficios.com> <87ftcnrf7d.fsf@mid.deneb.enyo.de> <1080028389.72414.1588077193438.JavaMail.zimbra@efficios.com> <878sifrdo0.fsf@mid.deneb.enyo.de> <190402462.72430.1588077816717.JavaMail.zimbra@efficios.com> <87tv13py8j.fsf@mid.deneb.enyo.de> Subject: Re: [PATCH glibc 5/9] glibc: Perform rseq(2) registration at C startup and thread creation (v17) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [167.114.26.124] X-Mailer: Zimbra 8.8.15_GA_3918 (ZimbraWebClient - FF75 (Linux)/8.8.15_GA_3895) Thread-Topic: glibc: Perform rseq(2) registration at C startup and thread creation (v17) Thread-Index: kRSloVX/dc1bhqo8Fu56s9W7NvdZew== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On Apr 28, 2020, at 8:54 AM, Florian Weimer fw@deneb.enyo.de wrote: > * Mathieu Desnoyers: > >> ----- On Apr 28, 2020, at 8:35 AM, Florian Weimer fw@deneb.enyo.de wrote: >> >>> * Mathieu Desnoyers: >>> >>>> One issue I'm currently facing when running "make check": because >>>> nptl/tst-rseq-nptl.c uses pthread_cancel(), I run into an Abort >>>> with: >>>> >>>> libgcc_s.so.1 must be installed for pthread_cancel to work >>>> Didn't expect signal from child: got `Aborted' >>> >>> This is really unusual. Is the affected test statically linked? >> >> I built glibc without specifying anything particular, and ran >> "make check". It indeed seems to be dynamically linked to libc: >> >> ldd tst-rseq-nptl >> ./tst-rseq-nptl: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found >> (required by ./tst-rseq-nptl) >> linux-vdso.so.1 (0x00007ffd3a2f3000) >> libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0527560000) >> libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f052716f000) >> /home/efficios/glibc-test5/lib/ld-linux-x86-64.so.2 => >> /lib64/ld-linux-x86-64.so.2 (0x00007f0527986000) > > That's expected if the installed glibc is older than the built glibc. > >> After make check I have: >> >> cat tst-rseq-nptl.test-result >> FAIL: nptl/tst-rseq-nptl >> original exit status 134 > > What's in the tst-rseq-nptl.out file? It contains: Didn't expect signal from child: got `Aborted' >> And if I run >> >> ./tst-rseq-nptl >> >> Then I get >> >> libgcc_s.so.1 must be installed for pthread_cancel to work >> Didn't expect signal from child: got `Aborted' >> libgcc_s.so.1 must be installed for pthread_cancel to work >> Aborted (core dumped) > > I'm puzzled why you don't get a GLIBC_2.32 version error in this case. > Do you build with --enable-hardcoded-path-in-tests? Just tried with this, and it fails the same way. However, the output of ldd nptl/tst-rseq-nptl changes: linux-vdso.so.1 (0x00007ffc235c9000) libpthread.so.0 => /home/efficios/git/glibc-build/nptl/libpthread.so.0 (0x00007fd308278000) libc.so.6 => /home/efficios/git/glibc-build/libc.so.6 (0x00007fd307ebc000) /home/efficios/git/glibc-build/elf/ld.so => /lib64/ld-linux-x86-64.so.2 (0x00007fd30869e000) >> Same result if I do ./testrun.sh nptl/tst-rseq-nptl > > That one definitely should work. > > I expect you might see this if libgcc_s.so.1 is installed into a > multiarch subdirectory that upstream glibc does not search. (The > Debian patches are unfortunately not upstream.) My test environment is a Ubuntu 18.04.1 LTS. > > I think on my system, the built glibc can find the system libgcc_s via > /etc/ld.so.cache, so I haven't seen this issue yet. On my system, libgcc_s is provided here: /lib/x86_64-linux-gnu/libgcc_s.so.1 by this package: Package: libgcc1 Architecture: amd64 Version: 1:8.4.0-1ubuntu1~18.04 Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com