Replies: 3 comments 5 replies
-
I found that v1.0.0 MTProto.Stop() calls At the time before restart I have 127 dangling goroutines like that one spawned within last ~8h:
|
Beta Was this translation helpful? Give feedback.
-
@paskal Thanks a lot for full explanation and this data, i really appreciate your work! Looks like there are more problems in code than only messages are stuck somewhere, but also probable we have channel like, which looks like catastrophic level (that explains, why our internal project required force restarting after few days of working). So, i think that we have more problems with tcp connection handling (if i understand correctly, literally all problems, include panics, goroutines leak, channels leak, etc etc etc), and that is really important bug. My idea how to fix it: we need to split core package (mtproto) to 3 separated submodules: transport, which will handle sending and receiving messages to different transports like tcp, websockets (like i started implementing for #78 issue), http, etc. cause currently i see that tcp connection is the most unstable in all package; submodule session which will handle all session stuff, including the oldest fuckin bug (durov brothers, i hate you for seqno, this is the worst way to guarantee that message recieved) about But, @paskal please understand me, i currently don't have enough time for this project, our team was splitted to another different projects, and, as you can see, only me left to maintain mtproto. even though i have a lot of my main work, so i need help with implementations and especially with docs, cause the main reason why still no one accepted maintainer status except me is the implementation is too hard to understand it, so i am required to well document it, and, guess what, i don't have time to do that. |
Beta Was this translation helpful? Give feedback.
-
@paskal even though, i will help you as much as i can, so i won't abandon this project at least until one year |
Beta Was this translation helpful? Give feedback.
-
Hi there, first of all, thanks for making mtproto available in native Go!
I have an MR umputun/feed-master#37, which is a real-life scenario that stuck after I run it. Here is pprof, here is a stack trace of a running application.
Desired behaviour
On new RSS item appearance, the application should connect to Telegram server (as there is no working reconnection in
github.com/xelaj/mtproto
v1.0.0, nether in v1.0.1 according to #79, but v1.0.1 also lost control to catch panics and crashes the whole application), upload the file and send it in the message with the media, disconnect from the server and repeat the cycle for the next RSS item.As an observer, I would see new telegram messages when new RSS items are appearing.
Observed behaviour
On the new RSS item appearance, with some fairly high probability application "chokes" on some item and stops responding. In the stack trace I see a lot of these:
As an observer, I see that few messages pass through to the telegram but afterwards, all items processing logic is stuck likely within the telegram message posting logic (telegram.go) as that's the only place in the program with the logic changed.
Probable cause
I don't know for sure yet (that is my question), but I suspect it might be the warning channel handling code, which I had to write as without warning handling library throws panics I can't catch.
I would be extremely grateful if someone will help me with this issue and trace the origin of the stuck application or the goroutine leak if that's what I observe.
Beta Was this translation helpful? Give feedback.
All reactions