From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id SEnBNuCrnGSLpxAAWB0awg (envelope-from ) for ; Wed, 28 Jun 2023 17:53:36 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=K8H+wVOr; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D1C7B1E0BB; Wed, 28 Jun 2023 17:53:36 -0400 (EDT) Received: from sourceware.org (server2.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 C32541E0AC for ; Wed, 28 Jun 2023 17:53:34 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DFEF6385841A for ; Wed, 28 Jun 2023 21:53:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DFEF6385841A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1687989213; bh=Yl1UiDxZlG7sua+4qC8eX1XUC9dNHivWk16abkhMapY=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=K8H+wVOr9F6mMkGQQUIhRkLjy5JLQFoH8OTauC1/MB2g7LQfyb33oyVt5ithEdDfa 6YOv4FKK+X+3mSZYFDv+KZA1GLHUCoKZrhul5MYrGhdQxGUefCJy0whZlwYvUE69BT 3UK0B8xd/GXYVIdpzCGCsHQRmUZxvQo/ygHvvi6w= Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id AA2C43858D35 for ; Wed, 28 Jun 2023 21:53:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AA2C43858D35 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-3fa9850bfebso184905e9.1 for ; Wed, 28 Jun 2023 14:53:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687989185; x=1690581185; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Yl1UiDxZlG7sua+4qC8eX1XUC9dNHivWk16abkhMapY=; b=XgsTGqOjJpB2a6AkkrYmbEeftqX1/VwOZ0pZKfrdjqlBak+Kn6Nta3MvfqjtuO80z9 VqufKNiD5haAcgC2gVI3/bDw0XgAW5qdOkDXU9utn4jxvrZiDohQibB+mvJ/UT6gbesB 3QciDl0z2lHr39BqXPXLYq9fRM1+bJzNZCzp2LxV281LGxdzq31m9bgDpa0Rp3ffqC9e PVxA23oE+jYwHelz+sbhcephO0FQXmBVtIhgRvF1WNdHL/9SqNyM16bPQg62VsP5evXd 30BSt65ZT10ouQoMVSgZpf/AqfgOiXblkrWX/iZUs8u+KlkaUPYyYRzT1kBdHMz2k+N4 2VIg== X-Gm-Message-State: AC+VfDxEcYdZhKW1rjusgCloYIPV4YPpnvq/eNQ33IX3p7YMSqiyNkBw 5BcLMprSs8mTp2CO0hJ0ZrFGsRjtDs8C184ia7Ez93okUPhwu0s84MUOruG/kn8OhK/lUKb0sq5 3vfXfAav1PnHm/m8SRpuuwUHAFTBx5tZkPJfTIZRBx5J6nWjo9cjDZxU4/+GC X-Google-Smtp-Source: ACHHUZ4MBaobAMFutBFVf0wRaQQ74nXcALuIx6VdThznrvbzoMm72TFvHMtiLTqasSW8zOvIGx/gUQ== X-Received: by 2002:a1c:f70f:0:b0:3f8:c9a4:4998 with SMTP id v15-20020a1cf70f000000b003f8c9a44998mr25088916wmh.28.1687989185130; Wed, 28 Jun 2023 14:53:05 -0700 (PDT) Received: from sbrinz-thinkpad (nrwh-14-b2-v4wan-164652-cust345.vm23.cable.virginm.net. [81.96.125.90]) by smtp.gmail.com with ESMTPSA id n20-20020a7bcbd4000000b003fb739d27aesm6735471wmi.35.2023.06.28.14.53.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 14:53:04 -0700 (PDT) To: Piotr Czak , gdb@sourceware.org Subject: Re: GDB does not work on DMTCP restart. In-Reply-To: References: Date: Wed, 28 Jun 2023 22:52:49 +0100 Message-ID: <5s8rc345la.fsf@undo.io> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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: Magne Hov via Gdb Reply-To: Magne Hov Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" Hi Piotr, In my experience there is a number of things GDB gets wrong when tracing a dmtc_restart process restoring a different process state from a checkpoint. Normally when a process replaces its process image it does so with an exec call, which GDB knows how to handle, but with DMTCP there is no exec call and all the pieces of interesting memory that GDB has started tracking is suddenly changed under its feet. The fact that the `sharedlibrary` command shows no loaded libraries suggests that GDB is failing to find the dynamic linker map of the loaded checkpoint. Often, an appropriate `symbol-file PATH-TO-MAIN-EXE` command is sufficient to help GDB realise where the main executable segments are located, including the dynamic symbols that are required for GDB to inspect the dynamic loader. Kind regards, On Mon, Jun 19 2023, Piotr Czak via Gdb wrote: > Hello everyone, > > My name is Piotr and I'd like to ask for suggestions and help with one issue > I have. > > I'm using DMTCP to save a checkpoint of some applications and restart from it. > In some cases I need to use gdb to debug issues. I noticed that in one design > gdb does not see debug symbols when used after the restart from a checkpoint. > It works on "save" when executed under the DMTCP when the checkpoint is > created but not after restarting from it. This is happening > only on some tests to which I have limited access. In that case gdb cannot > connect current application location with sources, it shows me wrong but > always the same location. > I can set a breakpoint but it is never hit even if I know that this part of the > code is executed. From the log I see that gdb thinks that my function > is in some > file which is not correct. If I remember well, the line number in the > log message > was correct. > I also cannot display variables. > The result of sharedlibrary command is empty. > In case of issues I'm not able to do any debugging. All of these debug > features work when I try to save DMTCP checkpoint. > > Unfortunately, since it is related to my work I cannot provide more > detailed information but I will be grateful if you could provide me with > some suggestions what could be a reason for the issue or how to debug the > issue. > > Thanks, > Best Regards, > Piotr -- Magne Hov | Software Engineer | Direct: +44 7395 395 648 | mhov@undo.io Undo | Record. Replay. Resolve