From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) by gnuweeb.org (Postfix) with ESMTPSA id 4DEC08060C for ; Fri, 26 Aug 2022 01:34:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1661477667; bh=+ERqxsa9csmJWG7Nja63/4ctrYbQ/TrJYfUspKcJ6f4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=FkDMRiv8dRv8ZaktpUsRmOff/SkJnI15L0XrKjG3zJkPG9wHRcY6gTdQvfsRCqdfJ jDDXYbHonKspcxxTfnK/sNyZMh6wU6q/LTNcbqm68Cm5nHd4CCyD6Hx6E4cMsUlTi6 wu5XkXNAG+TEB7XXiQ6iCpZU4VbYi4VEtXpxEq0a68PQexRbYE8jF+AyYKHI7L8QfO FGNW4wt94Q1Axu/EcA44hYukOXDcAbPk54akHlb6TZjjXRUiykDFkOGXmUZLN2+wqy o8PlnGuPEb84xtf4N0V5ahvctHtCj3i7pC5wVXYEea7gbV4Ufpr0/rFfRaxorDp7wt Ivn5sdOm4LFYg== Received: by mail-lj1-f171.google.com with SMTP id z20so256099ljq.3 for ; Thu, 25 Aug 2022 18:34:27 -0700 (PDT) X-Gm-Message-State: ACgBeo3HNfh6653uiQDwE15R007/BX9WMp3PrtA5VgkxDfd1ICMqbgNI kmxuY55NIx2KnUwndcYJtejSD/Mkl3b7UNLIOcs= X-Google-Smtp-Source: AA6agR4y4W5EMxj3TR//2v9/rKiO3MpWdtfdpru2g99fllMoPq3jq59aVAW+fwZ77eDdQcK/I6b8DxxhuPSW/71P2Ic= X-Received: by 2002:a2e:9604:0:b0:25e:4ed7:ef45 with SMTP id v4-20020a2e9604000000b0025e4ed7ef45mr1638505ljh.389.1661477665379; Thu, 25 Aug 2022 18:34:25 -0700 (PDT) MIME-Version: 1.0 References: <78e1a565-e450-61d8-47b3-87920131cfda@gnuweeb.org> <44ee99d2-d4e6-3638-89ce-152818a9a9bc@gnuweeb.org> In-Reply-To: <44ee99d2-d4e6-3638-89ce-152818a9a9bc@gnuweeb.org> From: Alviro Iskandar Setiawan Date: Fri, 26 Aug 2022 08:34:14 +0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] ncns update (chunked request body support) To: Ammar Faizi Cc: Kanna Scarlet , Muhammad Rizki , "GNU/Weeb Mailing List" Content-Type: text/plain; charset="UTF-8" List-Id: On Fri, Aug 26, 2022 at 1:36 AM Ammar Faizi wrote: > On 8/25/22 4:57 PM, Alviro Iskandar Setiawan wrote: > > pulled into my next branch for testing only, tq > > I am not sure what is going on here, but it always fails when > the written bytes is more than 16K bytes. The current WIP commit > is here: > > https://gitlab.torproject.org/ammarfaizi2/ncns/-/commit/20627519f6e882ab7d2309f6a6b6e451fb19edc4 > > Can you spot a mistake in this version? > > I have been debugging this for more than 5 hours and haven't > been able to figure out what is going wrong. I was going to > say that it's a Chromium bug. But thinking of the Chromium > stability so far, I doubt to claim so. you're tired, get some rest plz, tq for your hard work > Please review! found it, the problem is not in that commit, but the previous one https://gitlab.torproject.org/ammarfaizi2/ncns/-/commit/d113a1611f2eca1f45fd8dd0fe3a02aa92abeb6e#63c8f17eb62643be824f57c1bed41bbf7c80ed5e_50_127 if you split the buffer in the middle of the queue, then you put the rest of the splitted buffer into the tail, then it may get skipped because the EOF mark can be queued earlier. Even if it doesn't hit EOF it's still wrong because the FIFO order is violated when the condition (c.len_ <= dst_len_) evaluates to true tq -- Viro