From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 7pCHBhsu/WE0LAAAWB0awg (envelope-from ) for ; Fri, 04 Feb 2022 08:46:03 -0500 Received: by simark.ca (Postfix, from userid 112) id 09F2F1F3BA; Fri, 4 Feb 2022 08:46:03 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 81ABF1ECEB for ; Fri, 4 Feb 2022 08:46:02 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 03F553858410 for ; Fri, 4 Feb 2022 13:46:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 03F553858410 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1643982362; bh=PJY116PWttPeQGdguBHnBIXCRkKL9JwkvEd04YMOLt8=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=YWW0Nj/BcUizbYNxoT6avXiYw/JY9tl06fxpZGUwSni+0Tz3zod4zpaTy9KCjWfJg lDp2Ny2pkUqEA5DnJGvgEFDlLy6ah9qIMx4Gyj3ii+kIJxQEwsGuE7EtZ0n8Ha+0ad ZUFrRWUUX6v1mjAesppCiPe7A333b39iKL9t7PXk= Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by sourceware.org (Postfix) with ESMTPS id 03CB73858D20 for ; Fri, 4 Feb 2022 13:45:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 03CB73858D20 Received: by mail-lf1-x12a.google.com with SMTP id b9so12730141lfq.6 for ; Fri, 04 Feb 2022 05:45:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:from:subject:content-transfer-encoding; bh=PJY116PWttPeQGdguBHnBIXCRkKL9JwkvEd04YMOLt8=; b=iYzJIOxrfArkySo+Je/EJnhNitKqcd86LTHNYm+QuChz86VucFtOHscHKOPaN0WPCB CYuw+8L6wI+mhUgUULtmO5q8TVfoTngWC08sZrkFufnNA1Ibua2DjRYCjjUIaIxEv9ET MHzMEy6gkPLORNu3rrelmqBz+reygLFspj2TcOQo8M6zb4rU37pVO06fapFsjvr0dpnk W0IQW5Rq7cLX1A2i4aJ3OpFYF8JxzLa0X0Z1NTrwPelPVrFdV3P+MImDp6ytkqp1xJJa x7UgzvN0d3YmHlL//zN5KF2Y75xXtCtAt1XZD3ZOzduTgKEYL8B6b6alHuGmt960H2Ok FNVQ== X-Gm-Message-State: AOAM533qSMzO/Ruqoa8FPwrwbiJk262btRQTUpKAemiUlQzf72loBZFQ 61+m/I8K5PLFWyl9WBXGnEBDvBZVEao= X-Google-Smtp-Source: ABdhPJwmE4LtgCYv5j65TfLXXJs0axAvFP8ztnD4JPoF9vAFVv3inucDxBnlvIC5sDpN9zfeL1nLYg== X-Received: by 2002:a05:6512:108c:: with SMTP id j12mr2435672lfg.684.1643982334837; Fri, 04 Feb 2022 05:45:34 -0800 (PST) Received: from [192.168.10.175] (37-247-29-68.customers.ownit.se. [37.247.29.68]) by smtp.gmail.com with ESMTPSA id g7sm322433lfv.67.2022.02.04.05.45.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Feb 2022 05:45:34 -0800 (PST) Message-ID: <29e0ef71-4706-9b0f-2a68-e12c54120d8e@gmail.com> Date: Fri, 4 Feb 2022 14:45:33 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: gdb@sourceware.org Subject: Debugging ld.so in gdb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Jacob Kroon via Gdb Reply-To: Jacob Kroon Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" Hi, Since a week or two I have started to see a segfault on my updated Fedora 35 system. I suspect the segfault is related to a recent glibc update. The segfault I see happens when I run the following: $ ldd ./mylib.so I narrowed it down to running: $ LD_TRACE_LOADED_OBJECTS=1 /lib64/ld-linux-x86-64.so.2 ./mylib.so "coredumpctl info" gives me: > Stack trace of thread 143567: > #0 0x00007ff428f73590 n/a (n/a + 0x0) > #1 0x00007ff428f8af0f _dl_map_object_deps (/usr/lib64/ld-linux-x86-64.so.2 + 0x3f0f) > #2 0x00007ff428fa6970 dl_main (/usr/lib64/ld-linux-x86-64.so.2 + 0x1f970) > #3 0x00007ff428fa2c7c _dl_sysdep_start (/usr/lib64/ld-linux-x86-64.so.2 + 0x1bc7c) > #4 0x00007ff428fa4678 _dl_start_final (/usr/lib64/ld-linux-x86-64.so.2 + 0x1d678) > #5 0x00007ff428fa36a8 _start (/usr/lib64/ld-linux-x86-64.so.2 + 0x1c6a8) but inspecting in gdb using "coredumpctl debug" doesn't give me any sane backtrace. The .so is part of a Yocto build. If I copy the file out from its build directory to $HOME and run ldd on it, then there is no crash. So I suspect RUNPATH is involved somehow since it contains $ORIGIN. Any ideas of what I can do to investigate further ? Regards Jacob