From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E8F1C433EF for ; Sat, 25 Sep 2021 18:02:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 284DA60F70 for ; Sat, 25 Sep 2021 18:02:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229665AbhIYSEa (ORCPT ); Sat, 25 Sep 2021 14:04:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229608AbhIYSE3 (ORCPT ); Sat, 25 Sep 2021 14:04:29 -0400 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [IPv6:2607:5300:60:148a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01DD0C061570; Sat, 25 Sep 2021 11:02:54 -0700 (PDT) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mUC0g-007HJ0-Gg; Sat, 25 Sep 2021 18:02:50 +0000 Date: Sat, 25 Sep 2021 18:02:50 +0000 From: Al Viro To: Rustam Kovhaev Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, binutils@sourceware.org, gdb-patches@sourceware.org Subject: Re: [RFC][PATCH] coredump: save timestamp in ELF core Message-ID: References: <20210925171507.1081788-1-rkovhaev@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210925171507.1081788-1-rkovhaev@gmail.com> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Sat, Sep 25, 2021 at 10:15:07AM -0700, Rustam Kovhaev wrote: > Hello Alexander and linux-fsdevel@, > > I would like to propose saving a new note with timestamp in core file. > I do not know whether this is a good idea or not, and I would appreciate > your feedback. > > Sometimes (unfortunately) I have to review windows user-space cores in > windbg, and there is one feature I would like to have in gdb. > In windbg there is a .time command that prints timestamp when core was > taken. > > This might sound like a fixed problem, kernel's core_pattern can have > %t, and there are user-space daemons that write timestamp in the > report/journal file (apport/systemd-coredump), and sometimes it is > possible to correctly guess timestamp from btime/mtime file attribute, > and all of the above does indeed solve the problem most of the time. > > But quite often, especially while researching hangs and not crashes, > when dump is written by gdb/gcore, I get only core.PID file and some > application log for research and there is no way to figure out when > exactly the core was taken. > > I have posted a RFC patch to gdb-patches too [1] and I am copying > gdb-patches@ and binutils@ on this RFC. > Thank you! IDGI. What's wrong with the usual way of finding the creation date of any given file, including the coredump one?