FS#70624 - [telegram-desktop] telegram-desktop segfaults when attempting to record audio

Attached to Project: Community Packages
Opened by Marco Cilloni (mcilloni) - Wednesday, 28 April 2021, 09:40 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Monday, 17 May 2021, 08:16 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Jiachen Yang (farseerfc)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:

The `telegram-desktop` binaries shipped in community immediately segfault when attempting to record audio:

[ 106.062361] QThread[6944]: segfault at 7f36cc089000 ip 00007f3715276822 sp 00007f36e37fcf38 error 6 in libc-2.33.so[7f3715138000+14c000]

Swapping in-place `telegram-desktop` with `telegram-desktop-bin` from the AUR (aka the official binaries) immediately fixed the issue.

Additional info:
* package version(s) 2.7.3-1
* link to upstream bug report, if any: https://github.com/telegramdesktop/tdesktop/issues/16217

Steps to reproduce:
1. Install telegram-desktop from the `community` repository
2. Attempt to record audio
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Monday, 17 May 2021, 08:16 GMT
Reason for closing:  Fixed
Comment by Sven-Hendrik Haase (Svenstaro) - Wednesday, 28 April 2021, 20:20 GMT
Can you check 2.7.4?
Comment by Jonathon (jonathon) - Wednesday, 28 April 2021, 20:37 GMT
Confirm segfault with 2.7.4 running with PipeWire 0.3.26:

```
$ /usr/bin/telegram-desktop

(telegram-desktop:394706): lib_base-WARNING **: 21:34:43.464: Unfortunately, GTK integration conflicts with qgtk2 platformtheme and style. Therefore, QT_QPA_PLATFORMTHEME and QT_STYLE_OVERRIDE will be unset.
lib_base-Message: 21:34:43.466: This can be ignored by setting DESKTOP_APP_I_KNOW_ABOUT_GTK_INCOMPATIBILITY environment variable to any value, however, if qgtk2 theme or style is used, this will lead to a crash.
lib_base-Message: 21:34:43.466: GTK integration can be disabled by setting DESKTOP_APP_DISABLE_GTK_INTEGRATION to any value. Keep in mind that this will lead to some features being unavailable.

(telegram-desktop:394706): Telegram-WARNING **: 21:34:43.600: Application was built without embedded fonts, this may lead to font issues.
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
error: : cannot open
error: : cannot open
error: : cannot open
Invalid return value 0 for stream protocol
Invalid return value 0 for stream protocol
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once.
QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once.
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
[1] 394706 segmentation fault (core dumped) /usr/bin/telegram-desktop
```
Comment by franky (frankyboy) - Friday, 30 April 2021, 02:23 GMT
attaching logs from gdb with telegram compiled with debug symbols
Name : telegram-desktop
Version : 2.7.4-1
[Switching to Thread 0x7fffb119a640 (LWP 752376)]
0x00007fffede37822 in __memmove_avx_unaligned_erms () from /usr/lib/libc.so.6
#0 0x00007fffede37822 in __memmove_avx_unaligned_erms () at /usr/lib/libc.so.6
#1 0x0000555556f0dfe2 in memmove (__len=18446744073709549696, __src=0x7fffefc5e0d8, __dest=<optimized out>)
at /usr/include/bits/string_fortified.h:36
goodSize = -1920
s = <optimized out>
fadeSamples = 14400
levelindex = <optimized out>
samplesSinceUpdate = <optimized out>
news = <optimized out>
skipSamples = 19200
samplesFull = <optimized out>
framesize = 1920
encoded = <optimized out>
samples = 4096

log with thread in name collected with `thread apply all bt full`
Comment by franky (frankyboy) - Friday, 30 April 2021, 23:46 GMT
little note: with ffmpeg-2:4.3.2-6-x86_64.pkg.tar.zst telegram-desktop is recording audio without crashes.
Comment by yucel (friday13) - Saturday, 15 May 2021, 17:33 GMT Comment by Sven-Hendrik Haase (Svenstaro) - Sunday, 16 May 2021, 00:16 GMT
I pushed a hopefully fixed package to [community] as rel -2. Anyone mind testing?
Comment by Asem (asem) - Monday, 17 May 2021, 07:32 GMT
Thanks svenstaro , i tested and the app no longer crashes dutring voice recording
Comment by Marco Cilloni (mcilloni) - Monday, 17 May 2021, 08:06 GMT
Same here, it works fine now. Thanks a lot Svenstaro for the great work.

Loading...