From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Ilya Kosarev <i.kosarev@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] test: fix flaky socket test
Date: Tue, 17 Dec 2019 01:03:38 +0100 [thread overview]
Message-ID: <c0c84c2c-9a44-22aa-d30f-12cb392d11a1@tarantool.org> (raw)
In-Reply-To: <1575988613.571435536@f381.i.mail.ru>
Hi! Thanks for the fixes!
> [008] -- true
> [008] +- false
> [008] ...
> [008] received_message
> [008] ---
> [008] -- null
> [008] +-
> [008] ...
> [008] from == nil -- expected true
> [008] ---
> [008] -- true
> [008] +- false
> [008] ...
> [008] from
> [008] ---
> [008] -- null
> [008] +- host: 127.0.0.1
> [008] + family: AF_INET
> [008] + port: 59867
> [008] ...
> [008] e == errno.EAGAIN -- expected true
> [008] ---
> [008] -- true
> [008] +- false
> [008] ...
> [008] -- case: recv, zero datagram, explicit size
> [008] sendto_zero(sending_socket, '127.0.0.1', receiving_socket_port)
> =========================================================================
>
> So socket.test.lua still is unstable. The command with 64
> socket.test.lua gives me an error in 100% cases.
>
> 4. Ok, I guess these are mac os specific issues. I haven't got mac os
> machine access yet, however, I hope to get it soon and fix these problems.
> I still tried to stabilize these cases; if it don't work, I will reconsider them later.
>
These are UDP issues, not Mac. See my commit with review fixes for details.
> > 6. If we close socket in the main fiber, we might attempt to use closed
> > socket in background fiber.
>
> And what? We don't care anymore for the background
> fiber after the socket is not needed anymore. Ok, it will
> stumble into errors in that fiber, but how does it affect
> further execution of the test?
>
> 6. It affects further test execution, as far as it leads
> to the following error:
>
> |[015] c:receive("*l", "Line: ") [015] --- [015] - null [015] -- closed [015] -- 'Line: Fu' [015] +- Connection reset by peer|
>
>
Yeah, I've seen that error. But what I wanted to see here is why
that error happens. Not just what happens. But why.
I did investigation, and found that here:
wch:put("Fu")
c:send("354 Please type your message\n")
sc:close()
c:receive("*l", "Line: ")
it was possible, that put(), send() and close() finish
before the worker fiber manages to send anything to the
client. I've tried to find a better fix, but all of them
after all are about having a flag in the worker fiber,
so your version is ok.
next prev parent reply other threads:[~2019-12-17 0:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-04 13:43 Ilya Kosarev
2019-12-05 21:31 ` Vladislav Shpilevoy
2019-12-06 16:01 ` Ilya Kosarev
2019-12-08 15:52 ` Vladislav Shpilevoy
2019-12-10 14:36 ` Ilya Kosarev
2019-12-17 0:03 ` Vladislav Shpilevoy [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-11-26 21:45 Ilya Kosarev
2019-11-26 1:19 Ilya Kosarev
2019-08-30 15:28 [tarantool-patches] " Ilya Kosarev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c0c84c2c-9a44-22aa-d30f-12cb392d11a1@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=i.kosarev@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH] test: fix flaky socket test' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox