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=-4.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 3AEE7C433DF for ; Sun, 16 Aug 2020 00:37:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 10FA5206C0 for ; Sun, 16 Aug 2020 00:37:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JDfKrPCx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728226AbgHPAhF (ORCPT ); Sat, 15 Aug 2020 20:37:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbgHPAhF (ORCPT ); Sat, 15 Aug 2020 20:37:05 -0400 Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3060DC061786 for ; Sat, 15 Aug 2020 17:37:05 -0700 (PDT) Received: by mail-qt1-x832.google.com with SMTP id w9so9845400qts.6 for ; Sat, 15 Aug 2020 17:37:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Rqory6RW3CNYR2hveDLeRFFPPL3sJ+4XUKnOrQgSUjE=; b=JDfKrPCxpx07/e64Wk1EsNLLMPGfwSylvcnfyKBFXh3/B4V3xwmCqe8ceo54FcWPGq kzx2jOji4q0ZF5xqReNRLhrVsTyiMRWuUElIXXN56chSfcYabNPSkTmnHU72kQHptrhE Bog5oMTO8IY876UTnBj+MBwRvdBjOl3JFlboyUMZuDxYexq0Y1MvIync31ABimrM7VK1 rIaxLcGfsj/z2J0+E9if1gCJPi1RLTKlMDlKQocLJXnSYg7WtBm2FszQvxUoEglrYKOt gSNgVaR3Tw84NzI4+flgFIWOl+WD9miZ9fxmn9huXou6c1f4sq80xd4KepVXYSDPYofp dnkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Rqory6RW3CNYR2hveDLeRFFPPL3sJ+4XUKnOrQgSUjE=; b=c2gKoWNW4Tet5KU3ILnKSUHzRVgW0PiIIOr8swRSoMd+VspudSqFPW1qlxULw21OcL t6r9BTyc/h8UObp5qUY+9/+tDGHeyX5hTSttOdDkfxZlFggmumRuw47wqKVArOjSzPb0 6IqAtVq84ZWatzsedveXcTmoJFl5ODoojUdYiCtmtLOfwOsMgUFdsTB+PZqcAmpdNhWX 3vNTsZpjMwHgOiy1UDi/iXYEFM+v1819eR/EMPhxz13Sdfz9cPQ50K8CJEnqCFtmhNSS MCVIOUO3rZ1hkLOooCfPc6jFHkX8Jufl4NxXF556cXYxoDmHzII8LhLskN4IH7wTV6nu 3eHw== X-Gm-Message-State: AOAM533YM9hFZGHRcO+05AomkVCwysDLZX3lQ5s/EY1UfbUHnBYkQAWU CJni3UXSaIIWdEx6wdr83uy49AWPvGb3u1k7U1c= X-Google-Smtp-Source: ABdhPJwUOm7kffZRzpPO7yjQR99c/Yz2O1fgHGKYb42D+LbowlYMeKMlM9w4kWEATmTXkJsMeNi8t0p0mcuH14/mzPw= X-Received: by 2002:ac8:70cd:: with SMTP id g13mr8075686qtp.53.1597538224407; Sat, 15 Aug 2020 17:37:04 -0700 (PDT) MIME-Version: 1.0 References: <8e734ada-7f28-22df-5f30-027aca3695d1@gmail.com> <5fa9e01f-137d-b0f8-211a-975c7ed56419@gmail.com> <63024e23-2b71-937a-6759-17916743c16c@gmail.com> <904b4d74-09ec-0bd3-030a-59b09fb1a7da@kernel.dk> In-Reply-To: <904b4d74-09ec-0bd3-030a-59b09fb1a7da@kernel.dk> From: Josef Date: Sun, 16 Aug 2020 02:36:53 +0200 Message-ID: Subject: Re: io_uring process termination/killing is not working To: Jens Axboe , Pavel Begunkov , io-uring@vger.kernel.org Cc: norman@apache.org Content-Type: multipart/mixed; boundary="00000000000061a2a105acf3da47" Sender: io-uring-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org --00000000000061a2a105acf3da47 Content-Type: text/plain; charset="UTF-8" > Please try: > > https://git.kernel.dk/cgit/linux-block/commit/?h=io_uring-5.9&id=41d3344604e80db0e466f9deca5262b0914e4827 > > There was a bug with the -EAGAIN doing repeated retries on sockets that > are marked non-blocking. > no it's not working, however I received the read event after the second request (instead of the third request before) via Telnet -- Josef Grieb --00000000000061a2a105acf3da47 Content-Type: text/x-c-code; charset="US-ASCII"; name="io_uring_read_issue.c" Content-Disposition: attachment; filename="io_uring_read_issue.c" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kdwcsjui0 I2luY2x1ZGUgPGVycm5vLmg+CiNpbmNsdWRlIDxmY250bC5oPgojaW5jbHVkZSA8bmV0aW5ldC9p bi5oPgojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPHN0ZGxpYi5oPgojaW5jbHVkZSA8c3Ry aW5nLmg+CiNpbmNsdWRlIDxzdHJpbmdzLmg+CiNpbmNsdWRlIDxzeXMvc29ja2V0Lmg+CiNpbmNs dWRlIDx1bmlzdGQuaD4KI2luY2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7CiAgICBhZGRfYWNjZXB0KHNvY2tfbGlzdGVuX2ZkKTsKICAgIGlvX3VyaW5nX3N1Ym1pdCgm cmluZyk7CgogICAgd2hpbGUgKDEpIHsKICAgICAgICBzdHJ1Y3QgaW9fdXJpbmdfY3FlICpjcWU7 CiAgICAgICAgaW9fdXJpbmdfd2FpdF9jcWUoJnJpbmcsICZjcWUpOwoKICAgICAgICBwcmludGYo IlJlczogcmVzOiAlZFxuIiwgY3FlLT5yZXMpOwogICAgICAgIAogICAgICAgIGlmIChjcWUtPnVz ZXJfZGF0YSA9PSAxKSB7CiAgICAgICAgICAgIHByaW50ZigiUG9sbCBFdmVudFxuIik7CiAgICAg ICAgfQogICAgICAgIAogICAgICAgIGlmIChjcWUtPnVzZXJfZGF0YSA9PSAyICYmIGNxZS0+cmVz ID4gMCkgewogICAgICAgICAgICBwcmludGYoIkFjY2VwdCBFdmVudFxuIik7CiAgICAgICAgICAg ICAgICAgICAgCiAgICAgICAgICAgIGFkZF9wb2xsKHNvY2tfbGlzdGVuX2ZkLCBQT0xMSU4pOwog ICAgICAgICAgICBhZGRfYWNjZXB0KHNvY2tfbGlzdGVuX2ZkKTsKCiAgICAgICAgICAgIGFkZF9w b2xsKGNxZS0+cmVzLCBQT0xMSU4pOwogICAgICAgICAgICBhZGRfcmVhZChjcWUtPnJlcyk7CiAg ICAgICAgfQoKICAgICAgICBpZiAoY3FlLT51c2VyX2RhdGEgPT0gMykgewogICAgICAgICAgICBw cmludGYoIlJlYWQgQnVmOiAlcyBcbiIsIGJ1Zik7CiAgICAgICAgfQogICAgICAgIGlvX3VyaW5n X3N1Ym1pdCgmcmluZyk7CgogICAgICAgIGlvX3VyaW5nX2NxZV9zZWVuKCZyaW5nLCBjcWUpOwog ICAgfQoKICAgIGlvX3VyaW5nX3F1ZXVlX2V4aXQoJnJpbmcpOwoKICAgIHJldHVybiAwOwp9 --00000000000061a2a105acf3da47--