From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uJEqGPMv+GBKywAAgWs5BA (envelope-from ) for ; Wed, 21 Jul 2021 16:32:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id gHr7E/Mv+GCyAwAA1q6Kng (envelope-from ) for ; Wed, 21 Jul 2021 14:32:19 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 920268ED for ; Wed, 21 Jul 2021 16:32:18 +0200 (CEST) Received: from localhost ([::1]:47190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6DGi-0000Xj-N4 for larch@yhetil.org; Wed, 21 Jul 2021 10:32:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6DG8-0000Xb-HQ for guix-devel@gnu.org; Wed, 21 Jul 2021 10:31:40 -0400 Received: from mail-40130.protonmail.ch ([185.70.40.130]:56150) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6DG5-0008SH-IA for guix-devel@gnu.org; Wed, 21 Jul 2021 10:31:40 -0400 Date: Wed, 21 Jul 2021 14:31:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1626877886; bh=VOkQHaf4r1W4KUUDzvAjnnzl1VDczy3C6up3zbTaRNc=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=sNwc7eMO+DqAxPXXyG7LKv5rPtsdrbKJevJqZfHRSB4CHKPbXeHw+xtVLVybBhXWE omnFaso5AEk0VH0YDOkm38e7nRZplw49pZBWUhVm2EwCGIeuz4EMbEnc8XLLb90WVY qdFDfbSey7oVqAMAM8AXuu9PQtm7PJGbOQ96zD4w= To: Chris Marusich From: Kaelyn Cc: 48941@debbugs.gnu.org, guix-devel@gnu.org Subject: Re: bug#48941: [powerpc64le-linux] libfaketime CLOCK_MONOTONIC test hangs Message-ID: In-Reply-To: <874kco8d9s.fsf@gmail.com> References: <874kco8d9s.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.130; envelope-from=kaelyn.alexi@protonmail.com; helo=mail-40130.protonmail.ch 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, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Kaelyn Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1626877938; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=VOkQHaf4r1W4KUUDzvAjnnzl1VDczy3C6up3zbTaRNc=; b=GhDznnA1+kK23Vij11gNymV3TVlEoSiaio8zwg1/akWZPy12DSek32dpK7cFCjVjE7Rk6j WcG/7UOsdrMZFJaRVeRs/sHnA7GV/eRYUAX8Mxw5HlBLCMjL6XhxqBNbyUmRFkYoGGGEk0 I1kdZ/wDYjdFZzyqBD4yZXeFxDcKF0XFPnueIxisa2jCRuW6KjUzMgD5Ejq6iVKpKcZaoD Qcc42hQFRIRWtOOwSE1xRFzxj5WTehyOQSUNWm5+aW50laXE7/ANNbvRw0d/dH+jQWk9s2 I9Zh2oRzMgSLw604/ihHJ2zMWS1vCaJblcsmo1+8mjTs56rgjn4GTTIIOe3bCA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626877938; a=rsa-sha256; cv=none; b=F4nxjRdgPbZYeENjapwg/iFqL5hdvoSb3hEV3gNBM/TdZbnfmW4R2QnFz38mR9SO1fDbJj dz8GFuuiqhEU25l418KtDGu+ldse/vfDoP3rjr09kG82XylUVERc2RGu8dR4PhkoWyLSSI A7wMLjDoZBHPE2KRq++9gO5WoyfpVlo3VR2MUMl2Gv5qzniD3fcMFbjmAajcR9dg9vGsUe QQ8vQrfTE3UVBzNmFmoKbvI/uF0OT3SxYHY1lj79fKuWhACisDbQ99XzXlDpO1gB73S8TW Sp9YVfCEnNP1aBCeHOkaS6OcqyNVzVy+S2UeA6sdPATF7J/ksgU5G16b767SqQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail header.b=sNwc7eMO; dmarc=pass (policy=quarantine) header.from=protonmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -1.61 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail header.b=sNwc7eMO; dmarc=pass (policy=quarantine) header.from=protonmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 920268ED X-Spam-Score: -1.61 X-Migadu-Scanner: scn1.migadu.com X-TUID: oDcxWDY6aqt2 Hi, =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me= ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Wednesday, July 21st, 2021 at 1:08 AM, Chris Marusich wrote: > Hi, > > I need a little help figuring out how to use gdb in Guix for bug 48941: > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D48941 > > Here's the situation. A libfaketime test hangs forever. Upstream > > suggested I debug it. I'm trying to, but gdb errors out. What am I > > doing wrong? It's probably something simple, but I can't see what. > > I'll describe what I've done. First, I started a build like so: > > ./pre-inst-env guix build --keep-failed libfaketime > > While the problematic test hung, I found the PID of the test and killed > > it. This caused the build to fail, leaving the build environment for me > > to play around in. > > I entered a pure environment that contains all the things I need to > > debug the test (gcc 10.3.0 is currently the default gcc on > > core-updates): > > ./pre-inst-env guix environment --pure libfaketime --ad-hoc gcc-toolchain= @10.3.0 gcc-toolchain@10.3.0:debug gdb > > In the pure environment, I confirmed I can build and run the hanging > > test via the following commands (I added -g in order to get debug > > symbols): > > make FAKETIME_COMPILE_CFLAGS=3D'-DFORCE_MONOTONIC_FIX -g' CC=3Dgcc PREFIX= =3D/tmp/guix-build-libfaketime-0.9.9.drv-0/myprefix > > make FAKETIME_COMPILE_CFLAGS=3D'-DFORCE_MONOTONIC_FIX -g' CC=3Dgcc PREFIX= =3D/tmp/guix-build-libfaketime-0.9.9.drv-0/myprefix test > > OK, so I can trigger the hang. Great! Next step, fire up GDB: > > --8<---------------cut here---------------start------------->8--- > > [0] [env] marusich@suzaku:/tmp/guix-build-libfaketime-0.9.9.drv-0/source/= test > > $ gdb ./timetest > > GNU gdb (GDB) 10.2 > > Copyright (C) 2021 Free Software Foundation, Inc. > > License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.ht= ml > > This is free software: you are free to change and redistribute it. > > There is NO WARRANTY, to the extent permitted by law. > > Type "show copying" and "show warranty" for details. > > This GDB was configured as "powerpc64le-unknown-linux-gnu". > > Type "show configuration" for configuration details. > > For bug reporting instructions, please see: > > https://www.gnu.org/software/gdb/bugs/. > > Find the GDB manual and other documentation resources online at: > > http://www.gnu.org/software/gdb/documentation/. > > For help, type "help". > > Type "apropos word" to search for commands related to "word"... > > Reading symbols from ./timetest... > > (gdb) > > --8<---------------cut here---------------end--------------->8--- > > The debug symbols provided by gcc-toolchain@10.3.0:debug are under > > $GUIX_ENVIRONMENT/lib/debug. This is the value of GUIX_ENVIRONMENT: > > --8<---------------cut here---------------start------------->8--- > > $ echo $GUIX_ENVIRONMENT > > /gnu/store/32fjhp30k34fh0g9f1gmgcj8pc5wldq6-profile > > --8<---------------cut here---------------end--------------->8--- > > By the way, this directory corresponds to glibc 2.33: > > --8<---------------cut here---------------start------------->8--- > > $ realpath /gnu/store/32fjhp30k34fh0g9f1gmgcj8pc5wldq6-profile/lib/debug > > /gnu/store/8akrlhc25d7xvi85gzvginw0vdi4zyg4-glibc-2.33-debug/lib/debug > > --8<---------------cut here---------------end--------------->8--- > > Let's tell GDB where to find those debug symbols: > > (gdb) set debug-file-directory /gnu/store/32fjhp30k34fh0g9f1gmgcj8pc5wldq= 6-profile/lib/debug > > Let's also tell GDB to set the environment variables that upstream > > recommended when running the test program: > > --8<---------------cut here---------------start------------->8--- > > (gdb) set environment LD_PRELOAD=3D../src/libfaketime.so.1 > > (gdb) set environment FAKETIME=3D-10d > > (gdb) set environment NO_FAKE_STAT=3D1 > > --8<---------------cut here---------------end--------------->8--- > > Now run it: > > --8<---------------cut here---------------start------------->8--- > > (gdb) run > > Starting program: /tmp/guix-build-libfaketime-0.9.9.drv-0/source/test/tim= etest > > /bin/sh: /lib/powerpc64le-linux-gnu/libc.so.6: version `GLIBC_2.33' not f= ound (required by ../src/libfaketime.so.1) /bin/sh: /lib/powerpc64le-linux-= gnu/libc.so.6: version` GLIBC_2.32' not found (required by /gnu/store/kmblb= ljiygayhlc5gb02an9imhy90ws9-glibc-2.33/lib/libpthread.so.0) Are you using Guix on a foreign distro? This line looks like your distro's = normal libc.so was being used and it was from glibc-2.31 or older. The x86-= 64 systems I have that run pure Guix don't have any /lib*/ directories. You= might try running gdb with LD_LIBRARY_PATH=3D/gnu/store/kmblbljiygayhlc5gb= 02an9imhy90ws9-glibc-2.33/lib to have the Guix libc.so picked up before the= other one. HTH Cheers, Kaelyn > > /bin/sh: /lib/powerpc64le-linux-gnu/libc.so.6: version `GLIBC_2.32' not f= ound (required by /gnu/store/kmblbljiygayhlc5gb02an9imhy90ws9-glibc-2.33/li= b/libdl.so.2) /bin/sh: /lib/powerpc64le-linux-gnu/libc.so.6: version` GLIBC= _2.32' not found (required by /gnu/store/kmblbljiygayhlc5gb02an9imhy90ws9-g= libc-2.33/lib/librt.so.1) > > During startup program exited with code 1. > > (gdb) > > --8<---------------cut here---------------end--------------->8--- > > Huh? What happened? I've double checked that I'm using gdb provided by > > Guix: > > --8<---------------cut here---------------start------------->8--- > > $ type -P gdb > > /gnu/store/32fjhp30k34fh0g9f1gmgcj8pc5wldq6-profile/bin/gdb > > --8<---------------cut here---------------end--------------->8--- > > I also tried running gdb by invoking it via that absolute file name, and > > it still errored out in the same way. > > I'm operating in a --pure environment. All the tools are provided by > > Guix. I'm surprised that /bin/sh and /lib are even mentioned above. > > If anyone can provide any advice, I'd be very grateful. I'm not sure > > how to proceed. > > -------------------------------------------------------------------------= ---------------------------------------------------------------------------= ---------------------------------------------------------------------------= ---------------------------------------------------------------------------= ------------------------------------------ > > Chris