From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6215 invoked by alias); 17 Oct 2017 10:22:33 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 6206 invoked by uid 89); 17 Oct 2017 10:22:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=journal, Hx-languages-length:2314 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 Oct 2017 10:22:31 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EEBBB7EA87; Tue, 17 Oct 2017 10:22:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EEBBB7EA87 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves@redhat.com Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 532AC77FEA; Tue, 17 Oct 2017 10:22:29 +0000 (UTC) Subject: Re: [PATCH 2/2] GDB test suite: Get core files on targets with systemd-coredump To: Andreas Arnez , gdb-patches@sourceware.org References: <1505760152-28775-1-git-send-email-arnez@linux.vnet.ibm.com> <1505760152-28775-3-git-send-email-arnez@linux.vnet.ibm.com> From: Pedro Alves Message-ID: <38b0202f-5c78-a8bb-7bc8-e86f3a02ca33@redhat.com> Date: Tue, 17 Oct 2017 10:22:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1505760152-28775-3-git-send-email-arnez@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-10/txt/msg00502.txt.bz2 On 09/18/2017 07:41 PM, Andreas Arnez wrote: > So far the test suite skips tests if they need system-generated core files > and the core files can not be found. In particular this is usually the > case on systems with an active systemd-coredump service. On such systems, > core files are not written into the local directory, but made accessible > via a command-line utitily "coredumpctl" instead. > > This patch enables processing core files on such systems as well. Note > that there are a few quirks: > > * In my tests, after invoking a command that dumps core, it could happen > that "coredumpctl" did not find the dump immediately afterwards. After > waiting a bit, the dump was found and could be accessed. Thus the patch > performs a single wait-and-retry in case of failure. > > * There does not seem to be a way for a user to remove specific core dumps > from the journal. Thus it can happen that "coredumpctl" returns an old > dump, and the test case continues with that instead of the new one. It > might be possible to improve the logic here, by considering the time > stamps as well. I leave that for a future patch. > > * On the system I've tested it on, the bigcore.exp test case still failed > because coredumpctl truncated the core file after 4G for some reason. I'm a bit unsure about whether this is the right approach, expecially given the caveats above. Also, this seems to mean that running the testsuite on such a system clutters the system log on and on, maybe even triggers dispatch of notifications to admins, etc. I wonder whether there's a way to tell systemd-coredump to let the core dumps be generated on the file system for the current shell environment? Like we try to run "ulimit -c unlimited". Failing that, it may be better to instead make the testsuite skip the tests gracefully, and display a big and visible warning if systemd-coredump is detected as active. I mean, you already have to tweak other things in the system in order to be able to run the testsuite correctly. For example, you have to tweak /proc/sys/kernel/yama/ptrace_scope to make attach tests work at all, for example. systemd-coredump kind of seems like more of the same. Dunno, as I said, I'm unsure. Thanks, Pedro Alves