telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
26.23k stars 5.2k forks source link

v4.15.0 crashes on Debian Bullseye when using proxy #27503

Closed mdednev closed 7 months ago

mdednev commented 8 months ago

Steps to reproduce

  1. Start Telegram with local proxy (cntlm at 127.0.0.1:3128) without authenticaion (empty usename/password).
  2. Wait for a while.
  3. Get crash with error message:
    Scudo ERROR: CHECK failed @ /usr/src/tdesktop/Telegram/ThirdParty/scudo/list.h:219 (Next->Prev) == (X) ((u64)op1=140543809198912, (u64)op2=140543911295808)

Expected behaviour

Running without crashes.

Actual behaviour

Telegram crashes after running for some time.

Operating system

Debian GNU/Linux 11 (bullseye)

Version of Telegram Desktop

4.15.0

Installation source

Static binary from official website

Crash ID

38dcb717-fda2-4bf2-b7c2f197-9a64b2cc

Logs

makc@maximus:Telegram$ gdb --args ./Telegram 
GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./Telegram...
(No debugging symbols found in ./Telegram)
(gdb) r
Starting program: /opt/Telegram/Telegram 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fd2f6bff700 (LWP 3863111)]
[New Thread 0x7fd2f63fe700 (LWP 3863112)]
[Detaching after fork from child process 3863113]
[New Thread 0x7fd2f5bfd700 (LWP 3863114)]
[New Thread 0x7fd2f50e8700 (LWP 3863115)]
[New Thread 0x7fd2f338a700 (LWP 3863116)]
[New Thread 0x7fd2f23ff700 (LWP 3863118)]
[New Thread 0x7fd2f1573700 (LWP 3863119)]
[New Thread 0x7fd2f0d72700 (LWP 3863120)]
[New Thread 0x7fd2f0571700 (LWP 3863121)]
[New Thread 0x7fd2ef9c4700 (LWP 3863127)]
[New Thread 0x7fd2ef11e700 (LWP 3863128)]
[New Thread 0x7fd2ee878700 (LWP 3863129)]
[New Thread 0x7fd2ede88700 (LWP 3863130)]
[New Thread 0x7fd2ecfb5700 (LWP 3863131)]
[New Thread 0x7fd2ec691700 (LWP 3863132)]
[New Thread 0x7fd2ebe0d700 (LWP 3863133)]
[New Thread 0x7fd2eb519700 (LWP 3863134)]
[New Thread 0x7fd2ead18700 (LWP 3863135)]
[New Thread 0x7fd2e8d2c700 (LWP 3863136)]
[New Thread 0x7fd2e852b700 (LWP 3863137)]
[New Thread 0x7fd2e7d2a700 (LWP 3863138)]
[New Thread 0x7fd2e7529700 (LWP 3863139)]
[Detaching after fork from child process 3863140]
[New Thread 0x7fd2e6d28700 (LWP 3863141)]
[New Thread 0x7fd2e6527700 (LWP 3863142)]
[New Thread 0x7fd2e4d20700 (LWP 3863143)]
QPainter::begin: Paint device returned engine == 0, type: 2
QWidget::render: Cannot render with an inactive painter
[New Thread 0x7fd2e5ca8700 (LWP 3863146)]
[New Thread 0x7fd2e451f700 (LWP 3863147)]
[New Thread 0x7fd2e3d1e700 (LWP 3863148)]
[New Thread 0x7fd2e351d700 (LWP 3863149)]
[New Thread 0x7fd2e2d1c700 (LWP 3863150)]
[New Thread 0x7fd2e251b700 (LWP 3863151)]
[New Thread 0x7fd2e1d1a700 (LWP 3863152)]
[New Thread 0x7fd2e1519700 (LWP 3863153)]
[Thread 0x7fd2e4d20700 (LWP 3863143) exited]
[New Thread 0x7fd2e4d20700 (LWP 3863155)]
[New Thread 0x7fd2d6196700 (LWP 3863156)]
[New Thread 0x7fd2d5995700 (LWP 3863157)]
[New Thread 0x7fd2d5194700 (LWP 3863158)]
[New Thread 0x7fd2d310b700 (LWP 3863176)]
[New Thread 0x7fd2d290a700 (LWP 3863213)]
[New Thread 0x7fd2d2109700 (LWP 3863214)]
[New Thread 0x7fd2d1908700 (LWP 3863215)]
[New Thread 0x7fd2d1107700 (LWP 3863216)]
[New Thread 0x7fd2d0906700 (LWP 3863217)]
[New Thread 0x7fd2d0105700 (LWP 3863220)]
[New Thread 0x7fd2cd0ec700 (LWP 3863221)]
[New Thread 0x7fd2cf904700 (LWP 3863223)]
[New Thread 0x7fd2cf103700 (LWP 3863227)]
[New Thread 0x7fd2cc8eb700 (LWP 3863228)]
[New Thread 0x7fd2cb4df700 (LWP 3863229)]
[New Thread 0x7fd2cacde700 (LWP 3863230)]
[New Thread 0x7fd2cc0ea700 (LWP 3863231)]
[New Thread 0x7fd2ca4dd700 (LWP 3863232)]
[New Thread 0x7fd2c9cdc700 (LWP 3863233)]
[New Thread 0x7fd2cdaf2700 (LWP 3863234)]
[New Thread 0x7fd2c94db700 (LWP 3863235)]
[New Thread 0x7fd2c8cda700 (LWP 3863236)]
[New Thread 0x7fd2c84d9700 (LWP 3863237)]
[New Thread 0x7fd2c7cd8700 (LWP 3863283)]
[New Thread 0x7fd2c74d7700 (LWP 3863289)]
[New Thread 0x7fd2c6cd6700 (LWP 3863293)]
[Thread 0x7fd2f338a700 (LWP 3863116) exited]
[Thread 0x7fd2ef11e700 (LWP 3863128) exited]
[Thread 0x7fd2f0d72700 (LWP 3863120) exited]
[Thread 0x7fd2ee878700 (LWP 3863129) exited]
[Thread 0x7fd2d2109700 (LWP 3863214) exited]
[Thread 0x7fd2d1908700 (LWP 3863215) exited]
[Thread 0x7fd2ecfb5700 (LWP 3863131) exited]
[Thread 0x7fd2ef9c4700 (LWP 3863127) exited]
[Thread 0x7fd2d290a700 (LWP 3863213) exited]
[Thread 0x7fd2d0906700 (LWP 3863217) exited]
[Thread 0x7fd2ede88700 (LWP 3863130) exited]
[Thread 0x7fd2ec691700 (LWP 3863132) exited]
[New Thread 0x7fd2ec691700 (LWP 3863411)]
[Thread 0x7fd2c6cd6700 (LWP 3863293) exited]
[Thread 0x7fd2d1107700 (LWP 3863216) exited]
[New Thread 0x7fd2d1107700 (LWP 3863510)]
[Thread 0x7fd2ec691700 (LWP 3863411) exited]
[New Thread 0x7fd2ec691700 (LWP 3863618)]
[Thread 0x7fd2ec691700 (LWP 3863618) exited]
[Thread 0x7fd2cd0ec700 (LWP 3863221) exited]
[New Thread 0x7fd2cd0ec700 (LWP 3863706)]
[Thread 0x7fd2cd0ec700 (LWP 3863706) exited]
[New Thread 0x7fd2cd0ec700 (LWP 3863792)]
[Thread 0x7fd2cd0ec700 (LWP 3863792) exited]
[New Thread 0x7fd2cd0ec700 (LWP 3863867)]
[New Thread 0x7fd2ec691700 (LWP 3863868)]
[New Thread 0x7fd2c6cd6700 (LWP 3863869)]
[New Thread 0x7fd2ede88700 (LWP 3863870)]
[New Thread 0x7fd2f338a700 (LWP 3863883)]
[Thread 0x7fd2d1107700 (LWP 3863510) exited]
[Thread 0x7fd2ec691700 (LWP 3863868) exited]
[New Thread 0x7fd2ec691700 (LWP 3863991)]
[Thread 0x7fd2ec691700 (LWP 3863991) exited]
[Thread 0x7fd2cd0ec700 (LWP 3863867) exited]
[New Thread 0x7fd2cd0ec700 (LWP 3864097)]
[Thread 0x7fd2cd0ec700 (LWP 3864097) exited]
[New Thread 0x7fd2cd0ec700 (LWP 3864208)]
[Thread 0x7fd2cd0ec700 (LWP 3864208) exited]
[Thread 0x7fd2ede88700 (LWP 3863870) exited]
[New Thread 0x7fd2ede88700 (LWP 3864296)]
[Thread 0x7fd2ede88700 (LWP 3864296) exited]
[New Thread 0x7fd2ede88700 (LWP 3864376)]
[Thread 0x7fd2f338a700 (LWP 3863883) exited]
[New Thread 0x7fd2f338a700 (LWP 3864460)]
[Thread 0x7fd2f338a700 (LWP 3864460) exited]
[Thread 0x7fd2e451f700 (LWP 3863147) exited]
[Thread 0x7fd2e251b700 (LWP 3863151) exited]
[Thread 0x7fd2e351d700 (LWP 3863149) exited]
[Thread 0x7fd2e5ca8700 (LWP 3863146) exited]
[Thread 0x7fd2e8d2c700 (LWP 3863136) exited]
[Thread 0x7fd2e2d1c700 (LWP 3863150) exited]
[Thread 0x7fd2e852b700 (LWP 3863137) exited]
[Thread 0x7fd2e7529700 (LWP 3863139) exited]
[Thread 0x7fd2e1519700 (LWP 3863153) exited]
[Thread 0x7fd2e1d1a700 (LWP 3863152) exited]
[Thread 0x7fd2e3d1e700 (LWP 3863148) exited]
[Thread 0x7fd2e7d2a700 (LWP 3863138) exited]
[New Thread 0x7fd2e7d2a700 (LWP 3864544)]
[Thread 0x7fd2e7d2a700 (LWP 3864544) exited]
[New Thread 0x7fd2e7d2a700 (LWP 3864642)]
[Thread 0x7fd2e7d2a700 (LWP 3864642) exited]
[New Thread 0x7fd2e7d2a700 (LWP 3864719)]
Scudo ERROR: CHECK failed @ /usr/src/tdesktop/Telegram/ThirdParty/scudo/list.h:219 (Next->Prev) == (X) ((u64)op1=140543809198912, (u64)op2=140543911295808)
--Type <RET> for more, q to quit, c to continue without paging--

Thread 76 "pool-Telegram" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fd2ede88700 (LWP 3864376)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50      ../sysdeps/unix/sysv/linux/raise.c: Нет такого файла или каталога.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff76c3537 in __GI_abort () at abort.c:79
#2  0x0000555556152020 in  ()
#3  0x00005555566bb9c4 in  ()
#4  0x00005555566bb061 in scudo::reportCheckFailed(char const*, int, char const*, unsigned long, unsigned long) ()
#5  0x00005555566c8591 in void scudo::teardownThread<scudo::Allocator<scudo::DefaultConfig, &malloc_postinit> >(void*) ()
#6  0x00007ffff787ccd1 in __nptl_deallocate_tsd () at pthread_create.c:301
#7  __nptl_deallocate_tsd () at pthread_create.c:250
#8  0x00007ffff787ceba in start_thread (arg=<optimized out>) at pthread_create.c:488
#9  0x00007ffff779ca6f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Aokromes commented 8 months ago

plz enable beta, restart telegram and send crash id on next start and post id here.

mdednev commented 8 months ago

plz enable beta, restart telegram and send crash id on next start and post id here.

Error log:

makc@maximus:Telegram$ ./Telegram
QPainter::begin: Paint device returned engine == 0, type: 2
QWidget::render: Cannot render with an inactive painter
qt.gui.imageio.jpeg: Corrupt JPEG data: premature end of data segment
qt.gui.imageio.jpeg: Corrupt JPEG data: premature end of data segment
qt.gui.imageio.jpeg: Corrupt JPEG data: premature end of data segment
qt.gui.imageio.jpeg: Corrupt JPEG data: premature end of data segment
Scudo ERROR: CHECK failed @ /usr/src/tdesktop/Telegram/ThirdParty/scudo/list.h:219 (Next->Prev) == (X) ((u64)op1=140142787382080, (u64)op2=140142114241344)

Crash ID: 38dcb717-fda2-4bf2-b7c2f197-9a64b2cc

ApiId: 2040
Binary: Telegram
Launched: 20.02.2024 20:03:57
OpenGL: Enabled
OpenGL Renderer: [not-initialized]
Platform: Linux
UserTag: 52d3d073fa5f96ff
Version: 4015000

Caught signal 6 (SIGABRT) in thread 140142114244352
Google Breakpad caught a crash, minidump written in thread 140142114244352
Minidump: /home/makc/.local/share/TelegramDesktop/tdata/dumps/38dcb717-fda2-4bf2-b7c2f197-9a64b2cc.dmp
john-preston commented 8 months ago

38dcb717-fda2-4bf2-b7c2f197-9a64b2cc

Did you send this report? Because I don't see it :(

john-preston commented 8 months ago

Can you try once again, send the report and post the CrashID after that.

mdednev commented 8 months ago

I've sent crash report once again. Crash report ID: 7a339b95-8467-45cc-41c43887-5ae4651e изображение

ilya-fedin commented 8 months ago

Can you build tdesktop with ASAN? It looks like a memory corruption.

mdednev commented 8 months ago

I could try to build, but I need the instructions.

ilya-fedin commented 8 months ago

That's quite a good question, I wasn't able to build with asan myself, it ends with a gcc crash.

freggala commented 8 months ago

I've got the same problem here on Debian Bookworm (Linux 6.1.0-17-amd64)

Aokromes commented 8 months ago

tried with remote proxy, doesn't crash for me, socks 5 proxy.

Aokromes commented 8 months ago

I've got the same problem here on Debian Bookworm (Linux 6.1.0-17-amd64)

can you try with 199.58.185.9 socks 5 port 4145?

ilya-fedin commented 8 months ago

Are you folks sure it's happening due to proxy?

mdednev commented 8 months ago

Are you folks sure it's happening due to proxy?

Yes, I've tried to use Telegram for several hours on the same machine without proxy using 4G LTE mobile connection and there were no crashes. The only difference was proxy. So 99% that the issue is somehow related to proxy connection.

ilya-fedin commented 8 months ago

The only difference was proxy. So 99% that the issue is somehow related to proxy connection.

Can you reproduce with the proxy provided by @Aokromes? If not it means the problem is only with some ones which in turn means access to your proxy is needed for debugging.

mdednev commented 8 months ago

I'm using CNTLM HTTP(S) proxy. Not Socks5, as @Aokromes suggests to try. изображение

mdednev commented 8 months ago

I've tried to setup and run tinyproxy, bound to the 127.0.0.1:3130 without direct access to global network and Telegram also crashes when I try to use this local HTTP proxy. So this is not only CNTLM issue, it seems that it's HTTP proxy interaction problem.

ilya-fedin commented 7 months ago

How long should I use the proxy? I found some but I don't get the crash yet. This might be related to exact system configuration so would be nice if someone prepared a VM image where this is reproducible (or made reproductions steps right from installing the system in a VM). If the issue won't get reproduced, it will be marked accordingly and closed eventually.

github-actions[bot] commented 7 months ago

This issue has been automatically closed because no developer succeeded to reproduce the issue with the given reproduction steps. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you find what's missing to reproduce the issue so that we can investigate further.

Note that GitHub is a developer communication platform. If you're an ordinary user seeking for help, get to support crew via Settings -> Ask question in the application.