Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: client can't recover from connection loss #1030

Open
ernado opened this issue Mar 25, 2023 · 12 comments
Open

bug: client can't recover from connection loss #1030

ernado opened this issue Mar 25, 2023 · 12 comments
Labels
bug Something isn't working Fund help wanted Extra attention is needed

Comments

@ernado
Copy link
Member

ernado commented Mar 25, 2023

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
@borzovplus
Copy link

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)

@iyear
Copy link
Contributor

iyear commented Oct 7, 2023

Hi, any news?

Logs:

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

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

@ernado ernado pinned this issue Jan 21, 2024
@ernado
Copy link
Member Author

ernado commented Jan 21, 2024

Sorry, no news.

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

@ernado
Copy link
Member Author

ernado commented Jan 21, 2024

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 ernado added the help wanted Extra attention is needed label Jan 21, 2024
@ernado
Copy link
Member Author

ernado commented Jan 21, 2024

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

@ernado
Copy link
Member Author

ernado commented Feb 1, 2024

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

@gulldan
Copy link

gulldan commented Apr 23, 2024

issuing same on v0.99.2

@sevenineone
Copy link

+, problem still exists on v0.99.2

@ffrxp
Copy link

ffrxp commented Apr 23, 2024

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

@zyjsmabshncuos
Copy link

+, problem still exists on v0.99.2

@ernado
Copy link
Member Author

ernado commented Apr 25, 2024

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.

@snimshchikov
Copy link
Contributor

Consistent minimal bug reproduction: https://github.com/snimshchikov/gotd-bug-repro
Disclaimer: logs are not the same, but error is very similar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Fund help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

8 participants