td icon indicating copy to clipboard operation
td copied to clipboard

bug: client can't recover from connection loss

Open ernado opened this issue 1 year ago • 12 comments

Logs: https://gist.github.com/ernado/a9aa2b9b8ca02f65087013b3973b6cc0

Related: #1021

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

ernado avatar Mar 25 '23 10:03 ernado

this is easy to reproduce if you connect an account that consists of very large groups with a large flow of messages (several chats with 1000 messages per hour will be enough)

borzovplus avatar Jul 24 '23 05:07 borzovplus

Hi, any news?

Logs:

  • https://gist.github.com/iyear/ea718b9e90c09da301028b5865c730ad
  • https://gist.github.com/iyear/d7b4998f619d56d1ab440dc56392ece2

After received EOF, client can't recover from connection loss

  • https://gist.github.com/iyear/ce8d9c5a0eca4b14ec19a8929afe1c5c

It prints Some connection dead, try to create new connection, cancel waiting and successfully Read loop started, but then Closing DC

iyear avatar Oct 07 '23 07:10 iyear

Sorry, no news.

I'll try to debug it yet another time, but not sure that will succeed.

ernado avatar Jan 21 '24 09:01 ernado

I'm trying to find a way to reproduce this issue. Tried something like that:

sudo ss -K dst 149.154.167.50

Just closing connection does not reproduce this issue, so probably another way is needed.

If anobody have ideas how to reproduce it in controlled environment (I'm using echobot started locally) I will be very happy.

ernado avatar Jan 21 '24 10:01 ernado

I've tried to reproduce it in #1293 using kubernetes + cilium network policy rules, but no success either.

ernado avatar Jan 21 '24 11:01 ernado

Error: group:
    github.com/gotd/td/internal/mtproto.(*Conn).Run
        github.com/gotd/[email protected]/internal/mtproto/conn.go:214
  - task readLoop:
    github.com/gotd/td/internal/tdsync.(*LogGroup).Go.func1
        github.com/gotd/[email protected]/internal/tdsync/log_group.go:48
  - read:
    github.com/gotd/td/internal/mtproto.(*Conn).readLoop
        github.com/gotd/[email protected]/internal/mtproto/read.go:193
  - read:
    github.com/gotd/td/transport.(*connection).Recv
        github.com/gotd/[email protected]/transport/connection.go:70
  - read intermediate:
    github.com/gotd/td/internal/proto/codec.Intermediate.Read
        github.com/gotd/[email protected]/internal/proto/codec/intermediate.go:73
  - read length:
    github.com/gotd/td/internal/proto/codec.readLen
        github.com/gotd/[email protected]/internal/proto/codec/codec.go:35
  - EOF

ernado avatar Feb 01 '24 11:02 ernado

issuing same on v0.99.2

gulldan avatar Apr 23 '24 12:04 gulldan

+, problem still exists on v0.99.2

sevenineone avatar Apr 23 '24 12:04 sevenineone

+, I confirm this issue, it continues to exist on v0.99.2 :(

ffrxp avatar Apr 23 '24 20:04 ffrxp

+, problem still exists on v0.99.2

zyjsmabshncuos avatar Apr 25 '24 03:04 zyjsmabshncuos

Hey, I’m aware of this issue, but it is not trivial to fix.

This issue is my top priority, that’s why it is still pinned.

To make this issue fixed one can:

  1. Fix it yourself, it is easier to do with reproducer
  2. Provide a relatively easy reproducer so I can fix it faster
  3. Fund this issue so I can allocate more time to it
  4. Upvote

Anyway, thank you for using gotd and keeping this issue alive 💜This will be eventually fixed by me.

ernado avatar Apr 25 '24 06:04 ernado