From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id PeE9F03V1GAXIgAAWB0awg (envelope-from ) for ; Thu, 24 Jun 2021 14:56:13 -0400 Received: by simark.ca (Postfix, from userid 112) id 4F9C31F1F2; Thu, 24 Jun 2021 14:56:13 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 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 6D2121E939 for ; Thu, 24 Jun 2021 14:56:12 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C665339B242D for ; Thu, 24 Jun 2021 18:56:11 +0000 (GMT) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by sourceware.org (Postfix) with ESMTPS id 14BA839B242A for ; Thu, 24 Jun 2021 18:55:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 14BA839B242A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f54.google.com with SMTP id m41-20020a05600c3b29b02901dcd3733f24so6923368wms.1 for ; Thu, 24 Jun 2021 11:55:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=GQ7oT415rOOm2eVmKq/mDckwy85knkCXhFDHUcpSkkI=; b=eT7eR+KIFQVcim3gzOI5cp+6rzyUIyVsMJN1J88rCnB7ylFMOkmgOY9Gn7tV/w/NJG 72P/CO3Q7CIBryPfWU/UBLu0HD2KkKDFOg4AOuvYUT2ZRCEw+W4XJ/XC38E+TE5Hvq3I NZubyhUIrCiydDR4vvjgnuoIqbVcFwQkbXx5Rdp87sdCvWK7cuioIBW0yyEGGaktFd3F mkAztPhPbWhZMjyoJx+mvBqzgbh5RpHvOm7Q6yK8HDEjmct0PTuVXJB4t2m01mZXg3pC CzO5oW3x6SuwklfJV1u8pBp7nC1fDSh1CM2EPANW83mw5f4q1FanZwLwO4Yh7ejRwAb2 06uQ== X-Gm-Message-State: AOAM531sr5bS/vrXhMHp9tielqYGQgcTbcyyObVJiHj1HwmpKodfuLFP 8ygKemgo0SCVcIpTsO3Z2hs= X-Google-Smtp-Source: ABdhPJxhu2btIz3HWVStgjf4CkVGU/f5OO3WkBOSU/4eSppS13ZqLtGOm+53h1/gVXm+e7Rn9eUXsg== X-Received: by 2002:a1c:1b83:: with SMTP id b125mr6014072wmb.74.1624560927100; Thu, 24 Jun 2021 11:55:27 -0700 (PDT) Received: from ?IPv6:2001:8a0:f932:6a00:46bc:d03b:7b3a:2227? ([2001:8a0:f932:6a00:46bc:d03b:7b3a:2227]) by smtp.gmail.com with ESMTPSA id s1sm9722094wmj.8.2021.06.24.11.55.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Jun 2021 11:55:26 -0700 (PDT) Subject: Re: [PATCH v2 00/16] Interrupting programs that block/ignore SIGINT From: Pedro Alves To: Konstantin Kharlamov , gdb-patches@sourceware.org, Eli Zaretskii References: <20210614212410.1612666-1-pedro@palves.net> <1c54ccee2e4a2980b0a0e5b7e50818970662afc2.camel@yandex.ru> Message-ID: Date: Thu, 24 Jun 2021 19:55:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <1c54ccee2e4a2980b0a0e5b7e50818970662afc2.camel@yandex.ru> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2021-06-24 7:12 p.m., Konstantin Kharlamov wrote: > Hello! I was referred to your patchset from #gdb IRC channel. Presumably, > someone asked for real world usecases, but I haven't found that question. So I'm > replying to the top message. Hi! > > I was recently fixing some bug in Pipewire. To be exact, I was working on > `pipewire-media-session` (one of daemons that Pipewire is comprised of). Process > of debugging basically included setting breakpoints somewhere, then hopefully > triggering the breakpoint, then inspecting the state. Nothing unusual. > > So, the thing that was slowing me down and annoying is that I couldn't just > pause the debuggee through the usual means of ^C, then add a breakpoint. > Pressing ^C was causing the process to exit! > > Pipewire project seems to have a number of various daemons, and all of them set > SIGINT handlers (judging by git-grepping for SIGINT). So basically, it is hard > to debug Pipewire with GDB due to GDB not being able to interactively pause the > process. > > Now, I tested the patchset, and I confirm it solves the problem! GDB built from > the palves' branch pauses pipewire-media-session correctly on ^C! Awesome! > With that said, I'm not sure if you need/use that in GDB project, but in any > case, the series is: > > Tested-by: Konstantin Kharlamov We don't typically use it, but it doesn't hurt either! > FYI, Tom Tromey mentioned¹ that the problem arises when debuggee uses either > sigwait and signalfd. With git-grep I haven't found matches for sigwait in > Pipewire, but I found ones for signalfd. I see your top message does not mention > that your patchset also fixes situation for signalfd usage — but it seems it > does. So, just for your interest, your patchset might fix even more problems > than you expected ☺ Ahah, yeah. Thanks, I didn't remember signalfd. :-)