Closed koroki closed 9 months ago
Please check with official build. Distro packages for distro bugtrackers.
Same error with the official build. In fact, you can see this error multiple times in the issues section: https://github.com/telegramdesktop/tdesktop/issues/26366 https://github.com/telegramdesktop/tdesktop/issues/26348
Opening with the terminal only show Segmentation fault error.
In fact, you can see this error multiple times in the issues section:
Although I can't reproduce any of them.
I feel that is the same problem. Fractional scaling in the three cases, wayland, and the problem when open an image with full screen.
The problems starts with an update of mesa (from 23.0 to 23.1) and Telegram (4.8.1 to 4.8.3), around 25th May.
Checking with the oficial build, I can confirm that the error is present in 4.8.3 but not in 4.8.1, using the same system.
I wonder why I can't reproduce... I have 125% scaling as well. Maybe it's a bug in Intel drivers, I have AMD hardware...
I also feel that intel driver is the reason. In fact, new intel driver for newest laptops. I have some problems with some old programs respect the DRI3, wine for example. Anyway, telegram 4.8.1 works properly.
I will do some test with my old AMD laptop if I have time.
I had the same issue on Intel(10th)+Arch+Gnome+wayland+fractional.
The solution for me was to disable an experimental setting, "Enable precise High DPI scaling", as I was also trying to address #26133.
I did not have this option enable.
Is there any way to fully debug telegram? because the error is really annoying
valgrind?
Is there any way to fully debug telegram?
Well, you can send SIGABRT to the process when it hangs and it will crash. The common crash reporting routine should work then in theory.
The problem is that there is no any error from telegram.
Checking the dmseg, I found that:
[ 4792.799577] telegram-deskto[3021]: segfault at 10 ip 00007f0699c19c6d sp 00007ffd7d8309c0 error 4 in libjemalloc.so.2[7f0699c09000+6a000] likely on CPU 6 (core 10, socket 0) [ 4792.799610] Code: 00 48 8b 84 2b b0 01 00 00 4c 39 e8 0f 85 be 02 00 00 4c 89 f0 48 c1 e8 09 25 f8 ff 1f 00 49 03 44 2f 08 48 8d b3 58 03 00 00 <48> 8b 08 48 89 c8 48 c1 e8 30 48 8d 15 c2 d0 27 00 4c 8b 24 c2 f6 [ 4797.185785] bijiben-shell-s[28079]: segfault at 7f2bf0034 ip 00007f2c1e8f3f61 sp 00007ffd08a45498 error 4 in libgobject-2.0.so.0.7600.4[7f2c1e8c8000+35000] likely on CPU 6 (core 10, socket 0) [ 4797.185822] Code: c0 0f 95 c0 48 83 c4 08 0f b6 c0 c3 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 f3 0f 1e fa 48 85 ff 74 47 48 8b 07 48 85 c0 74 3f <48> 8b 00 48 3d fc 03 00 00 77 2c 48 8d 15 cd 61 02 00 48 c1 e8 02 [ 4822.372376] i915 0000:00:02.0: [drm] GPU HANG: ecode 12:1:85dffffb, in telegram-deskto [28188] [ 4822.372394] i915 0000:00:02.0: [drm] telegram-deskto[28188] context reset due to GPU hang [ 4831.416180] i915 0000:00:02.0: [drm] GPU HANG: ecode 12:1:85dffffb, in telegram-deskto [28188] [ 4831.416197] i915 0000:00:02.0: [drm] telegram-deskto[28188] context reset due to GPU hang [ 4839.104708] i915 0000:00:02.0: [drm] GPU HANG: ecode 12:1:85dffffb, in telegram-deskto [28188] [ 4839.104724] i915 0000:00:02.0: [drm] telegram-deskto[28188] context reset due to GPU hang [ 4866.455947] bijiben-shell-s[28657]: segfault at 7f16691a17c9 ip 00007f11c0f27f61 sp 00007fff19f52e08 error 4 in libgobject-2.0.so.0.7600.4[7f11c0efc000+35000] likely on CPU 6 (core 10, socket 0) [ 4866.455984] Code: c0 0f 95 c0 48 83 c4 08 0f b6 c0 c3 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 f3 0f 1e fa 48 85 ff 74 47 48 8b 07 48 85 c0 74 3f <48> 8b 00 48 3d fc 03 00 00 77 2c 48 8d 15 cd 61 02 00 48 c1 e8 02 [ 4907.967212] i915 0000:00:02.0: [drm] GPU HANG: ecode 12:1:85dffffb, in telegram-deskto [28732] [ 4907.967231] i915 0000:00:02.0: [drm] telegram-deskto[28732] context reset due to GPU hang [ 4917.203362] i915 0000:00:02.0: [drm] GPU HANG: ecode 12:1:85dffffb, in telegram-deskto [28732] [ 4917.203384] i915 0000:00:02.0: [drm] telegram-deskto[28732] context reset due to GPU hang [ 4924.959764] i915 0000:00:02.0: [drm] GPU HANG: ecode 12:1:85dffffb, in telegram-deskto [28732] [ 4924.959789] i915 0000:00:02.0: [drm] telegram-deskto[28732] context reset due to GPU hang
This is after serveal errors in the visualization of content.
The problem is that there is no any error from telegram.
You don't need any error to send SIGABRT. Just reproduce the freeze (we're talking about application freeze, right?) and do kill -ABRT $TELEGRAM_PID
. If you have installation of beta versions enabled in settings, you should have a crash report window on next start. Copy the crash ID, send the report and paste the ID here.
It is not freezing actually, telegram makes some kind of glitch with GPU that blocks the desktop. But, if you puch ESC to close the multimedia screen, after that, all works properly.
It is really annoying...
I found a "solution": If I load telegram using vulkan wrapper like descrived here: https://wiki.archlinux.org/title/OpenGL#OpenGL_over_Vulkan_(Zink) There is no problem.
It is not the "proper" solution, but at least works for me.
Probably, this can help also to find the problem.
It is not freezing actually, telegram makes some kind of glitch with GPU that blocks the desktop. But, if you puch ESC to close the multimedia screen, after that, all works properly.
Ah. I have no idea what to suggest then...
I found a "solution": If I load telegram using vulkan wrapper like descrived here: https://wiki.archlinux.org/title/OpenGL#OpenGL_over_Vulkan_(Zink) There is no problem.
Apparently because bugged Intel drivers are no more in action...
Same error with the official build. In fact, you can see this error multiple times in the issues section:
26366
26348
As it happened, #26348 was not related.
I also have this problem. No fractional scaling, by the way.
Kernel parameters like these might help. I did not check, just googled:
i915.enable_psr2_sel_fetch=0
i915.enable_dc=0
i915.enable_psr=0
parm: enable_dc:Enable power-saving display C-states. (-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6; 3=up to DC5 with DC3CO; 4=up to DC6 with DC3CO)
parm: enable_psr:Enable PSR (0=disabled, 1=enable up to PSR1, 2=enable up to PSR2) Default: -1
parm: enable_psr2_sel_fetch:Enable PSR2 selective fetch (0=disabled, 1=enabled) Default: 0
PSR = panel self-refresh.
In my case, the best solution for now is: LIBGL_ALWAYS_SOFTWARE=true
I don't feel the intel drivers was buggy since telegram is the unique program that fails catastrophically.
LIBGL_ALWAYS_SOFTWARE=true
You can just disable OpenGL in Telegram settings?
I don't feel the intel drivers was buggy since telegram is the unique program that fails catastrophically.
Well, I can't reproduce this on my machine, it has AMD APU...
I'm facing the same issue on two laptops, both running Intel 11th gen Tiger Lake processors with Xe graphics
Both running Arch Linux, both Plasma on Wayland, both using resolution scaling (though i didn't test without scaling enabled), with telegram-desktop installed from the official arch repositories
It also happens when using a single monitor, multi-monitor is not a requirement
Sometimes opening images full-screen works, but at some point when i click on an image the entire display freezes, and when the computer recovers from the freeze displaying images doesn't work anymore (it keeps displaying the image it had froze on even when i open other images), and sometimes causes the application to crash/suddenly close altogether
Disabling OpenGL seems to work around the issue
I have the same issue, also with Intel VGA.
syslog gives me:
aug 23 11:15:17 lt-jeanlouis kernel: i915 0000:00:02.0: [drm] GPU HANG: ecode 12:1:85dffffb, in telegram-deskto [3475]
aug 23 11:15:17 lt-jeanlouis kernel: i915 0000:00:02.0: [drm] telegram-deskto[3475] context reset due to GPU hang
aug 23 11:15:24 lt-jeanlouis kernel: i915 0000:00:02.0: [drm] GPU HANG: ecode 12:1:85dffffb, in telegram-deskto [3475]
aug 23 11:15:24 lt-jeanlouis kernel: i915 0000:00:02.0: [drm] telegram-deskto[3475] context reset due to GPU hang
But as Telegram uses Qt, it's more like a Qt <> Intel bug?
But if I just open the image/telegram on my other display which is not scaled, it just works. So it seems like its scaling & intel combination.
My laptop also has a Nvidia card, so I started Telegram with prime-run
and the issue does NOT occur.
So really seems like some Intel bug, therefor I reported it https://gitlab.freedesktop.org/drm/intel/-/issues/9193
But as Telegram uses Qt, it's more like a Qt <> Intel bug?
Who knows... Other Qt applications don't seem to have this (as far as I'm aware) and this started happening since some time (either since Qt 6.5.1 or a mesa update at that time) so it's apparently some combination of something what Telegram does + something that Qt does (or started to do since 6.5.1) + something mesa for intel does (or started to do recently). Personally I have no idea how to debug this.
Note: Telegram uses OpenGL directly but Qt then uses OpenGL as well to compose what Telegram has drawn using OpenGL with what is drawn using QPainter (raster) widgets. Qt also sets up context, FBO and probably does other non-trivial things before and after Telegram draws.
Fedora 38. Fresh kernel, fresh Telegram and Qt. The bug triggered many times before on the same hardware. Now it does not.
I suspect it's a locking problem. Possibly some new lock in Telegram/Qt allows overcoming a bug in Intel drivers (i.e. missing lock in drivers). I have no exact proofs, just my thoughts.
What kind of lock are you talking about? If mutexes, there's no mutexes in drawing, Qt allows drawing only from GUI thread for QtWidgets.
It's not impossible there's some API misuse in Telegram. There was a case when Qt 6.3.1 was out, the viewer started crashing for everyone. It was unknown why it happens just like now but thanks to this Qt update being a little one, I found the commit breaking it and reverted in tdesktop patchset. Unofficial builds had crashes for almost a year I think until the API misuse was found accidentally. People were creating a mesa bug but mesa folks haven't did an action for that time. If this is going to progress just like the 6.3.1 case, this bug is going to be a long standing one.
The problem with this case is I can't reproduce it (as I have no Intel hardware) so I can't bisect Qt to check the Qt change theory and find the offending commit to at least revert it in the tdesktop patchset. If someone affected bisected Qt, that would help a lot.
The logical start is to try Qt 6.5.0 and if it doesn't have the bug, bisect all the changes between 6.5.0 and 6.5.1 (one can first try to find OpenGL- and RHI-related commits and start from reverting them). If 6.5.0 has the bug then it's probably mesa rather than Qt.
Note: it's likely needed to bisect both qtbase and qtwayland (it's Wayland-specific, right?).
one at 100% and the other at 125% scale.
Would the bug appear if you leave connected only the 125%-scaled monitor or set both monitors to 125%? I've remembered that Qt doesn't handle multi-screen setups with different scales on Wayland (doesn't trigger a repaint) so it can have any kind of weird behavior I guess: https://bugreports.qt.io/browse/QTBUG-93380
LIBGL_ALWAYS_SOFTWARE=true
You can just disable OpenGL in Telegram settings?
Yes, correct, with the settings of telegram is enough for avoid the problem.
Are there any changes with 4.9.10 that is built with a newer compiler?
Are there any changes with 4.9.10 that is built with a newer compiler?
Issue still exists on v4.10.1
What does happen with those builds? https://drive.google.com/file/d/1QcWyPXPN8RVpki2qjr9Ranz71ycvH2yr/view?usp=sharing https://drive.google.com/file/d/1lTSd8MxKpXM45FL02NSv42fZ-QCHkPjp/view?usp=sharing
Remember to create a TelegramForcePortable folder near the executables if you don't want them to use the common tdesktop data directory, they are 4.9.10 and downgrade leads to the cleanup of the data directory.
The Telegram-glibc-malloc one seems to fix the issue. The other one has the same issue.
What about these two (warning: they're even older)? https://drive.google.com/file/d/1LZkib2nErouvt9veL0rFXA6e6QSxILcU/view?usp=drive_link https://drive.google.com/file/d/1hXpgIcxbwTF5j7GywGXKIXSh-UryaTcX/view?usp=drive_link
Telegram-debug-jemalloc -> Broken Telegram-debug-glibc-malloc -> Fine!
Telegram-debug-jemalloc -> Broken Telegram-debug-glibc-malloc -> Fine!
What about this one? https://drive.google.com/file/d/1lTSd8MxKpXM45FL02NSv42fZ-QCHkPjp/view?usp=drive_link
What about this one? https://drive.google.com/file/d/1lTSd8MxKpXM45FL02NSv42fZ-QCHkPjp/view?usp=drive_link
Broken
@dupondje in which way? can you give more details? is there any difference to jemalloc?
@dupondje in which way? can you give more details? is there any difference to jemalloc?
When opening an image in a chat, whole screen is lagging and almost freezes. Once the image is finally open, it's just fine again.
And multiple GPU hangs are logged into the kernel log:
sep 26 11:19:20 lt-jeanlouis kernel: i915 0000:00:02.0: [drm] GPU HANG: ecode 12:1:85dffffb, in Telegram-scudo [196022]
sep 26 11:19:20 lt-jeanlouis kernel: i915 0000:00:02.0: [drm] Telegram-scudo [196022] context reset due to GPU hang
sep 26 11:19:28 lt-jeanlouis gnome-shell[1708]: meta_wayland_buffer_process_damage: assertion 'buffer->resource' failed
sep 26 11:19:28 lt-jeanlouis kernel: i915 0000:00:02.0: [drm] GPU HANG: ecode 12:1:85dffffb, in Telegram-scudo [196022]
sep 26 11:19:28 lt-jeanlouis kernel: i915 0000:00:02.0: [drm] Telegram-scudo [196022] context reset due to GPU hang
sep 26 11:19:35 lt-jeanlouis gnome-shell[1708]: meta_wayland_buffer_process_damage: assertion 'buffer->resource' failed
sep 26 11:19:35 lt-jeanlouis kernel: i915 0000:00:02.0: [drm] GPU HANG: ecode 12:1:85dffffb, in Telegram-scudo [196022]
sep 26 11:19:35 lt-jeanlouis kernel: i915 0000:00:02.0: [drm] Telegram-scudo [196022] context reset due to GPU hang
When opening an image in a chat, whole screen is lagging and almost freezes.
In which way the jemalloc variant (or the official release) is broken?
When opening an image in a chat, whole screen is lagging and almost freezes.
In which way the jemalloc variant (or the official release) is broken?
Exactly the same way. Lagging/freezes/cpu hang during opening of image.
sep 26 11:28:00 lt-jeanlouis kernel: i915 0000:00:02.0: [drm] GPU HANG: ecode 12:1:85dffffb, in Telegram-debug- [197532]
sep 26 11:28:00 lt-jeanlouis kernel: i915 0000:00:02.0: [drm] Telegram-debug-[197532] context reset due to GPU hang
sep 26 11:28:08 lt-jeanlouis kernel: i915 0000:00:02.0: [drm] GPU HANG: ecode 12:1:85dffffb, in Telegram-debug- [197532]
sep 26 11:28:08 lt-jeanlouis kernel: i915 0000:00:02.0: [drm] Telegram-debug-[197532] context reset due to GPU hang
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
Good afternoon. I have the same problem on a laptop with ubuntu and an additional monitor. Laptop: Huawei Notebook X Pro 2023 Additional monitor: Huawei Mate view GT standard edition 34" The integrated monitor has a scale of 200%, and the additional monitor has a scale of 100%
Once I managed to get data from the dmesg utility and I saw the following information there:
[51868.055378] audit: type=1326 audit(1698923649.455:468): auid=1000 uid=1000 gid=1000 ses=2 subj=snap.telegram-desktop.telegram-desktop pid=24613 comm="telegram-deskto" exe="/snap/telegram-desktop/5133/usr/bin/telegram-desktop" sig=0 arch=c000003e syscall=141 compat=0 ip=0x7fc68caf193b code=0x50000
[51868.055909] audit: type=1326 audit(1698923649.459:469): auid=1000 uid=1000 gid=1000 ses=2 subj=snap.telegram-desktop.telegram-desktop pid=24613 comm="telegram-deskto" exe="/snap/telegram-desktop/5133/usr/bin/telegram-desktop" sig=0 arch=c000003e syscall=141 compat=0 ip=0x7fc68caf193b code=0x50000
[51875.820392] rfkill: input handler enabled
[51875.842171] i915 0000:00:02.0: [drm] GPU HANG: ecode 12:1:85dffffb, in telegram-deskto [24613]
[51875.842177] i915 0000:00:02.0: [drm] telegram-deskto[24613] context reset due to GPU hang
[51876.332169] rfkill: input handler disabled
[51876.392088] rfkill: input handler enabled
[51877.689377] rfkill: input handler disabled
[51887.948893] rfkill: input handler enabled
[51889.580500] rfkill: input handler disabled
Information about hardware
root@vajrock-nb:~# lscpu
Архитектура: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 39 bits physical, 48 bits virtual
Порядок байт: Little Endian
CPU(s): 16
On-line CPU(s) list: 0-15
ID прроизводителя: GenuineIntel
BIOS Vendor ID: Intel(R) Corporation
Имя модели: 13th Gen Intel(R) Core(TM) i7-1360P
BIOS Model name: 13th Gen Intel(R) Core(TM) i7-1360P CPU @ 4.4GHz
BIOS CPU family: 198
Семейство ЦПУ: 6
Модель: 186
Потоков на ядро: 2
Ядер на сокет: 12
Сокетов: 1
Степпинг: 2
CPU(s) scaling MHz: 16%
CPU max MHz: 5000,0000
CPU min MHz: 400,0000
BogoMIPS: 5222,40
Флаги: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb
rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64
monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdra
nd lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjus
t bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect avx_vn
ni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi vnmi umip pku ospke waitpkg gfni vaes vpclmulqdq rdpid mo
vdiri movdir64b fsrm md_clear serialize arch_lbr ibt flush_l1d arch_capabilities
Virtualization features:
Виртуализация: VT-x
Caches (sum of all):
L1d: 448 KiB (12 instances)
L1i: 640 KiB (12 instances)
L2: 9 MiB (6 instances)
L3: 18 MiB (1 instance)
NUMA:
NUMA node(s): 1
NUMA node0 CPU(s): 0-15
Vulnerabilities:
Gather data sampling: Not affected
Itlb multihit: Not affected
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Mmio stale data: Not affected
Retbleed: Not affected
Spec rstack overflow: Not affected
Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Spectre v2: Mitigation; Enhanced / Automatic IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Srbds: Not affected
Tsx async abort: Not affected
root@vajrock-nb:~# lsgpu
card0 Intel Alderlake_p (Gen12) drm:/dev/dri/card0
└─renderD128 drm:/dev/dri/renderD128
I noticed that the problem with gnome freezing occurred only when using snap telegram-desktop application. The problem was reproduced in Ubuntu 22.04, 23.04, and in the current 23.10 After downloading the application in tar.the xz problem is reproduced a little differently and does not lead to gnome freezing anymore. Also, if telegram-desktop was launched on an additional monitor, where the scale is 100%, then the problem is not reproduced and everything works correctly. After moving the window to the main laptop monitor, where the scale is 200%, the problem begins to reproduce on both monitors. On the main full screen monitor, the mode opens only on the lower left quarter of the screen. An additional monitor displays a quarter of the total full screen output to the full screen. Screenshots of playback of the same video on two different screens:
Does this still happen with 4.13?
On 23/12/23 03:33PM, ilya-fedin wrote:
Does this still happen with 4.13?
It seems to have been fixed in 4.13, thanks a lot!
--
Ярослав де ла Пенья Смирнов Yaroslav de la Peña Smirnov
Steps to reproduce
OS: Arch Linux updated (2023-06-10), gnome+wayland. Hardware: Intel 12th generation integrated graphic card with Dual Screen, one at 100% and the other at 125% scale.
Using intel_gpu_top, telegram put the graphic card at 100% before it is killed.
Expected behaviour
Open the images and videos at full screen without problems
Actual behaviour
Blocks
Operating system
Arch Linux
Version of Telegram Desktop
4.8.3
Installation source
Other (unofficial) source
Crash ID
No response
Logs
No response