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 X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B36F0C433C1 for ; Sat, 20 Mar 2021 00:26:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7512A61981 for ; Sat, 20 Mar 2021 00:26:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229640AbhCTAZ3 (ORCPT ); Fri, 19 Mar 2021 20:25:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229634AbhCTAZV (ORCPT ); Fri, 19 Mar 2021 20:25:21 -0400 Received: from hr2.samba.org (hr2.samba.org [IPv6:2a01:4f8:192:486::2:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDD3DC061760 for ; Fri, 19 Mar 2021 17:25:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=samba.org; s=42; h=Date:Message-ID:From:Cc:To; bh=sh0Hysut1X62czHpxpWCKG/K7xGFHqqqcBK8e7aDtiw=; b=Ih8gx8eqIUQ2dcZTTKjSA8IGk4 MKSXJMEwlkKAjkNa8btLzbJDgaSXBn5ZaSjx99aUfr6l9Op1xXSn+ZNX2K/sk9NGKaljxKKJNKExk 9IDmyydWS+vGU8wb0LJnAdP6qzNik4uZFGCx1JaFdT7ZnxE66kh5sDKDEjnsr9sCAH9hHlh3v8Ytk DieLb31vgzvNk6YKNCaVLtqxcEEBZJZHaliu0ln/66sAjSgvWHPXClMnC2Dv2oWyhA2P/dJCz9vgc j7LfPstSERTVbZkmE99pTI5RBmSGwSsur4AhPJByizbb1CETZDfCEtaq5BYep1jJS2byqBw9u4gOW ofSaUSZRwlcvdNkohULscHV1ToBY3WYB5XftJErAq3GJgFq/WGiyjS38ZCsNMioHogNHohqwaIyOr 0WMdqX6XNkK0waZ7j2ambmxCMOtJSlVsLhraA1Ve8xLDgRB21XxnEO6woGUFvkLlGHb9RLHcgX/S9 HKrtf1rxXLhSeYspLZ29cgT0; Received: from [127.0.0.2] (localhost [127.0.0.1]) by hr2.samba.org with esmtpsa (TLS1.3:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim) id 1lNPQd-0007eq-1J; Sat, 20 Mar 2021 00:25:19 +0000 Subject: Re: Problems with io_threads To: Jens Axboe Cc: io-uring References: From: Stefan Metzmacher Message-ID: <85472dbd-7113-fe2b-fe0e-100d8fc34860@samba.org> Date: Sat, 20 Mar 2021 01:25:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org Am 20.03.21 um 00:46 schrieb Jens Axboe: > On Mar 19, 2021, at 5:27 PM, Stefan Metzmacher wrote: >> >> Hi Jens, >> >> as said before I found some problems related to >> the new io_threads together with signals. >> >> I applied the diff (at the end) to examples/io_uring-cp.c >> in order to run endless in order to give me time to >> look at /proc/... >> >> Trying to attach gdb --pid to the pid of the main process (thread group) >> it goes into an endless loop because it can't attach to the io_threads. >> >> Sending kill -STOP to the main pid causes the io_threads to spin cpu >> at 100%. >> >> Can you try to reproduce and fix it? Maybe same_thread_group() should not match? > > Definitely, I’ll go over this shortly and make sure we handle (and ignore) signals correctly. Thanks! Also a kill -9 to a io_thread kills the application. metze