From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id GComKfer92BwXQEAgWs5BA (envelope-from ) for ; Wed, 21 Jul 2021 07:09:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 6E+8JPer92BUUwAAbx9fmQ (envelope-from ) for ; Wed, 21 Jul 2021 05:09:11 +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 6227F1A31D for ; Wed, 21 Jul 2021 07:09:10 +0200 (CEST) Received: from localhost ([::1]:46132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m64Tl-0006Wp-BG for larch@yhetil.org; Wed, 21 Jul 2021 01:09:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m64TJ-0006Uc-I6 for guix-devel@gnu.org; Wed, 21 Jul 2021 01:08:42 -0400 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]:51107) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m64TH-0003hU-Ni for guix-devel@gnu.org; Wed, 21 Jul 2021 01:08:41 -0400 Received: by mail-pj1-x1036.google.com with SMTP id cu14so1021291pjb.0 for ; Tue, 20 Jul 2021 22:08:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=Tvi0/ZigNKMceviRsWxJygrOiom1a0+Y3ZFmUSVKvqw=; b=pQnyZ69sS+psoQEWtnNC6SmdewrU4PyM4BTcGQuQ79Axu2zjcjD98mD07EDFczWcOv LLWOABwCIrccMC7QydGYj+MiiNnKCyDsV++WhxTw4XCbBBbm52ouk6N6S22katq1cQnI JHmA6+v2x0ntxmS9fImNmTGitkvmEqIaBotigq3Pym5ambJ8yqVv69Bk2DFPrgZU0TYh n67LNyBDVZe0beN4tTeNF58BCO177xllLf0DwD06/DA7OH74Miz7bDzNQec/dKvQOGDF altxutNqaTw8iPZVU8DXRuc1R+a6J2FQ/GBRKEwBTCS3kWJP0kSkj8/7fkPEkfg6WLXO 6NFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=Tvi0/ZigNKMceviRsWxJygrOiom1a0+Y3ZFmUSVKvqw=; b=JtQ6vc2y0972SxLUzCvXPvMkEeduaRy0GqqVES9gLxaFLg6d6CSZx2JXF/5RbegzOW /ZITOdiItdFj3Rm2hspMLRoEerrJop2X50jtj9WN0u6ytJWwMmKWajryQ26IQ7qmjUq1 8HNNyRwP3ZffPmRwv3Cb3Hsexlg3h28H5q/h10NZbIgS4gdgi0grscMhOpwACjkC7fow uCunaaic3OD/N+PBjQX0AUL4k1IyOL6qxkCEx3ZgxFIuxhRUVlE8XqoHoncslXL5HUYy GU9ohXVdrmVoOGvbgCvc+De/ORgmTv72ncB5Rma0emGYLCbIDNGbRTGa+TrKzcWvdWu8 OAHw== X-Gm-Message-State: AOAM531PKrOpedcl2+Vb2t3UJMXw8kunKgizZoBn5xPgDOH6goZQnh6s 66KA2MPkMypG1qa3v3g7uIVj/jQkmas8cg== X-Google-Smtp-Source: ABdhPJznvtZFvIckR305jmQWWzs7sCB7iu2XNUpPa1/o37qcoIw/Qng/azbhB6b1xw1346EMCfTnhQ== X-Received: by 2002:a17:90a:43c3:: with SMTP id r61mr2024714pjg.11.1626844117471; Tue, 20 Jul 2021 22:08:37 -0700 (PDT) Received: from garuda-lan ([2601:601:9d01:3f90::b00d]) by smtp.gmail.com with ESMTPSA id j21sm20973101pjz.26.2021.07.20.22.08.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jul 2021 22:08:36 -0700 (PDT) From: Chris Marusich To: 48941@debbugs.gnu.org Subject: Re: bug#48941: [powerpc64le-linux] libfaketime CLOCK_MONOTONIC test hangs Date: Tue, 20 Jul 2021 22:08:31 -0700 Message-ID: <874kco8d9s.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=cmmarusich@gmail.com; helo=mail-pj1-x1036.google.com X-Spam_score_int: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 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, FAKE_REPLY_C=1.486, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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: , Cc: guix-devel@gnu.org 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=1626844151; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Tvi0/ZigNKMceviRsWxJygrOiom1a0+Y3ZFmUSVKvqw=; b=aSwV6qHsiJT8fcNspfTMKlrGMCXcB9TajRu7nXN0w2jOF837bnoMwY5jikhY0LpNKeUXX/ OMZqwisJhh3mTaqu/YSTjkfNX86YhJy1Nj5h5w36Nm/bwis1fAsqCMvhSJBWAliPKDRVBa 10sezMy9qOoi8dCge2bjmkFDSS/eFkpNb/crf2uN9HvmtKfrvhzWV5aTUzDgiq5CcR3b5h 3JTbkcq4gbxea82inxaL7GXB5eeRD1eniStk69Hfjxj8RPDnozSxKqBTIcdN8j7hFMGWb7 oSPnyC/p0rHQ+59O2+L5eCtomENbv1YM0WIKoJo+0yKrVJp0/UybcMpnONNnmg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626844151; a=rsa-sha256; cv=none; b=o7P/a7733Pdz9LiL3OY88zz/sdE/+7qic6lZhicTf4oyrAQ98wLKRdAOtCm64ht5a9AnRn q78TgXsgGVSkgFcGICIYiv/ZRjRyuSwZeFGA6HHyV1fxHxwWz0pVutdNg07wDtCN8YXZPi Nn5TBUhyTxdur0WqU+SrN4uRjHqdNiE161TTzfrxaJfQG5GhroYlTd28kX+Vz1vxhzXTB1 f0GF6cGS/sV6Khgve+dakI68v4AtOF0611cRxEgxPhFTq3sp6Rm1alues3DN+SesFzyI4n idf/szJT6rpcnVXXMwsv+dCWw9njR06GjrPW6lN1XA+7rJrX/YYmWuqLQyV7Sw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=pQnyZ69s; dmarc=pass (policy=none) header.from=gmail.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.72 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=pQnyZ69s; dmarc=pass (policy=none) header.from=gmail.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: 6227F1A31D X-Spam-Score: -1.72 X-Migadu-Scanner: scn0.migadu.com X-TUID: st4B50+71phf --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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: =2D-8<---------------cut here---------------start------------->8--- [0] [env] marusich@suzaku:/tmp/guix-build-libfaketime-0.9.9.drv-0/source/te= st $ gdb ./timetest GNU gdb (GDB) 10.2 Copyright (C) 2021 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later 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: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./timetest... (gdb)=20 =2D-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: =2D-8<---------------cut here---------------start------------->8--- $ echo $GUIX_ENVIRONMENT /gnu/store/32fjhp30k34fh0g9f1gmgcj8pc5wldq6-profile =2D-8<---------------cut here---------------end--------------->8--- By the way, this directory corresponds to glibc 2.33: =2D-8<---------------cut here---------------start------------->8--- $ realpath /gnu/store/32fjhp30k34fh0g9f1gmgcj8pc5wldq6-profile/lib/debug /gnu/store/8akrlhc25d7xvi85gzvginw0vdi4zyg4-glibc-2.33-debug/lib/debug =2D-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: =2D-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 =2D-8<---------------cut here---------------end--------------->8--- Now run it: =2D-8<---------------cut here---------------start------------->8--- (gdb) run Starting program: /tmp/guix-build-libfaketime-0.9.9.drv-0/source/test/timet= est=20 /bin/sh: /lib/powerpc64le-linux-gnu/libc.so.6: version `GLIBC_2.33' not fou= nd (required by ../src/libfaketime.so.1) /bin/sh: /lib/powerpc64le-linux-gnu/libc.so.6: version `GLIBC_2.32' not fou= nd (required by /gnu/store/kmblbljiygayhlc5gb02an9imhy90ws9-glibc-2.33/lib/= libpthread.so.0) /bin/sh: /lib/powerpc64le-linux-gnu/libc.so.6: version `GLIBC_2.32' not fou= nd (required by /gnu/store/kmblbljiygayhlc5gb02an9imhy90ws9-glibc-2.33/lib/= libdl.so.2) /bin/sh: /lib/powerpc64le-linux-gnu/libc.so.6: version `GLIBC_2.32' not fou= nd (required by /gnu/store/kmblbljiygayhlc5gb02an9imhy90ws9-glibc-2.33/lib/= librt.so.1) During startup program exited with code 1. (gdb)=20 =2D-8<---------------cut here---------------end--------------->8--- Huh? What happened? I've double checked that I'm using gdb provided by Guix: =2D-8<---------------cut here---------------start------------->8--- $ type -P gdb /gnu/store/32fjhp30k34fh0g9f1gmgcj8pc5wldq6-profile/bin/gdb =2D-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. =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAmD3q88VHGNtbWFydXNp Y2hAZ21haWwuY29tAAoJEN1AmhXYIkadEpsQAIJLVTNnKRcnkie5ZVnnElRq9ARJ Vbe9LOeTunNHTSNe/EvpxXyBRu3jkSF5nK5BaiA49WpdtL3y2R+V+jv8cHbupg+D jwXxzyIZXcb+IazfctTysyCM/3ocVK/f0ENdajzNbCyEF0327CsTpruYxVIhGcyl xKN1a/mPbRJlWq6ay59nr3CL19CoUIOpRnzZdi114Y4RhOX1o1ULSkhO6g988Q8C wde1iBbK6SffzMKimk5ChjOk1SzfaPef+IZL8PDl9B4poPGjiXgBLef3AOrvobFq z5zx6jNfi2tMMO0dDoSUDNjcnkfZHooyu3VM+McpIqa5fTs0cdK1qYn+EP9vzltk EPIcd37AgQuKPQFB15w67zKPLlk7BFfQ3V/WHM2Hft9u0+Uw53mSum5XugJEUVFz hb3CS22Th84fGhUHRHfldfA9jWpfdFA2xlqPOxH0+XO+81II+/GrBtrKaKq8BXEL YagM4LkOiDF6yYN6f2ItkRtJiCadAg+ws5vbfmFN77bmbP2m5HZb6sHhBntY4R2M lUcG9g/1JjGo3Gm/cPo+isCjAC7QZOknCdlPP75X0+fD7+DQLzcCHdl4t3YnZxbF UcJfXf05SRiOyC8YaK0oj/jvlivDYgWcX6CttVW1USGb/7cTIlyjp2lIwbPSIXOq axD/y2F4IwjJ78GR =ef4c -----END PGP SIGNATURE----- --=-=-=--