Open bodqhrohro opened 2 years ago
Hey there!
This issue was inactive for a long time and will be automatically closed in 30 days if there isn't any further activity. We therefore assume that the user has lost interest or resolved the problem on their own.
Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue.
Thanks!
Not sure if this is still relevant, but probably yes. I changed the hardware since the report, and TelegramDesktop behaves totally different there: it occupies twice as more RAM at the start (460 MB), and occasionally jumps to 601 MB when opening a chat with the same GIF, which makes no serious consequences here, but may do on a weaker hardware. Possibly the time required to display the spinner is significant too, as it's shorter here.
It also definitely happens only when a GIF is autoplayed. If I raise the autoplay limit and run Telegram outside of a memory-limited cgroup, I managed to get a rapid burst to ≈680 MB on this hardware with a specially crafted 5MB highres GIF:
https://user-images.githubusercontent.com/2134486/220025208-71a92e4f-9e19-444b-9d84-732248c7eda1.MP4
Still far from the aforementioned number though.
The machine where I catched it first has a E450 CPU, 6GB of overfilled RAM and a HDD.
And?
If TelegramDesktop needs too much RAM to cache the video frames, it should better show them with lags than put the whole system down.
Hey there!
This issue was inactive for a long time and will be automatically closed in 30 days if there isn't any further activity. We therefore assume that the user has lost interest or resolved the problem on their own.
Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue.
Thanks!
Seems to be relevant in 4.9.1, I've just checked the last GIF and got a burst from 400 MB to 533 MB.
Hey there!
This issue was inactive for a long time and will be automatically closed in 30 days if there isn't any further activity. We therefore assume that the user has lost interest or resolved the problem on their own.
Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue.
Thanks!
Still relevant, 491 MB → 611 MB rapidly.
Hey there!
This issue was inactive for a long time and will be automatically closed in 30 days if there isn't any further activity. We therefore assume that the user has lost interest or resolved the problem on their own.
Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue.
Thanks!
Still relevant, RAM usage fluctuates between 439 MB and 517 MB when I switch from and to a chat with such a GIF.
Steps to reproduce
I'm still not sure about exact conditions, despite I experience this for many months. It happens with GIFs and sometimes with static images too. It's enough to switch to a chat with a preview or scroll the history up. The burst happens nearly when a blurred preview is shown a spinner over while a full version of a media file is downloaded.
Another precondition is having the RAM almost full, with several hundreds of MBs of free RAM remaining. Here are my memory management settings:
Also ZRam enabled and no disk swap.
Expected behaviour
No accidental RAM consumption growth.
Actual behaviour
If I don't notice the burst in a few seconds and kill TelegramDesktop immediately, things go rapid. The system freezes so fast and deep (with Load Average going near 100–200 on a 2-core CPU) that I cannot even switch to a text TTY anymore, even in the raw (Alt+SysRq+R) keyboard mode when kernel hotkeys (Alt+F) are invoked rather than X.Org ones (Ctrl+Alt+F). I can only invoke the manual OOM killer (Alt+SysRq+F), and as TelegramDesktop gains a very low OOM score, I have to hit it tens of times and kill almost all userspace processes, sometimes even such important ones as dbus-daemon, until TelegramDesktop process is finally reached.
An example of post-mortem:
A GIF on which the bug is reproduced more-or-less reliably (1.6 GB RES on one run, just 400 MB RES on next run, how does that even work?)
https://user-images.githubusercontent.com/2134486/186154052-ccda030c-1a2f-465b-839e-189db9a10513.mp4
Operating system
Debian GNU/Linux 12, compiz-reloaded 0.8.18
Version of Telegram Desktop
4.1.1
Installation source
Static binary from official website
Logs
No response