telegramdesktop / tdesktop

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

Failed to set real-time priority for thread #16189

Closed mrLSD closed 3 years ago

mrLSD commented 3 years ago

After updating to v2.7.2 I can't run Telegram.:

$ ./Telegram 
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)

OS: Ubuntu 16.04

$ uname -a
Linux iMac 4.15.0-142-generic #146~16.04.1-Ubuntu SMP Tue Apr 13 09:27:15 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Crash report:

UserTag: 6888370ffdf78c4c
Version: 2007002

Caught signal 11 (SIGSEGV) in thread 140544522823936

Backtrace:
/home/pc/Music/Telegram/Telegram[0x2165034]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7fd3106c9390]

Google Breakpad caught a crash, minidump written in thread 140544522823936
Minidump: /home/pc/.local/share/TelegramDesktop/tdata/dumps/bce1eee8-10f6-4430-a9e6cab5-5fd51011.dmp

Backtrace:
/home/pc/Music/Telegram/Telegram[0x2165034]
/home/pc/Music/Telegram/Telegram[0x216550c]
/home/pc/Music/Telegram/Telegram(_ZN15google_breakpad16ExceptionHandler12GenerateDumpEPNS0_12CrashContextE+0x375)[0x30e7965]
/home/pc/Music/Telegram/Telegram(_ZN15google_breakpad16ExceptionHandler13SignalHandlerEiP9siginfo_tPv+0xb0)[0x30e7cb0]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7fd3106c9390]
ilya-fedin commented 3 years ago

I have a feel Debian 9 & Ubuntu 16.04 have bugs in glib fixed by these commits: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/313

We need to contact glib maintainers in Debian and Ubuntu somehow in order to get this fixed, but I have no idea how to reach them 🙄

Probably the fastest way to get rid of this issue is to update distro to a modern version.

ilya-fedin commented 3 years ago

Looks like I can blacklist certain glib versions

ilya-fedin commented 3 years ago

If anyone want to test if https://github.com/desktop-app/lib_base/pull/62 fixes the issue, you're welcome. I'm not sure whether will it fix the issue or not in practice since I can't reproduce.

Dees7 commented 3 years ago

Where can I get new build? (can't find) Should I build it?

ilya-fedin commented 3 years ago

Yeah, you should build tdesktop from dev branch and cherry-pick the commit from my PR to the lib_base submodule.

Jorilx commented 3 years ago

(Just for the record, 2.7.2 works correctly on ancient Linux Mint 17.3 :D glib 2.40)

ilya-fedin commented 3 years ago

Oh, that complicates things even more

ilya-fedin commented 3 years ago

It was broken in 2.46.0 probably https://gitlab.gnome.org/GNOME/glib/-/commit/7cba800a84730c9c5843acdd775e42b8c1438edf

Jorilx commented 3 years ago

Getting the crash on Linux Mint 18.3 too (glib 2.48.2)

Dees7 commented 3 years ago

I'm not able build it. Looks Dockerfile wrong. On image build I get error. can't build image manually too. =(

The command 'scl enable devtoolset-9 -- bash -c make -j$(nproc)' returned a non-zero code: 2
ilya-fedin commented 3 years ago

@Dees7 https://github.com/telegramdesktop/tdesktop/blob/dev/docs/building-cmake.md

Dees7 commented 3 years ago

building-cmake.md

Command docker build -t tdesktop:centos_env Telegram/build/docker/centos_env/ failed with error The command 'scl enable devtoolset-9 -- bash -c make -j$(nproc)' returned a non-zero code: 2

ilya-fedin commented 3 years ago

@PashaTurok no, it doesn't help

@Dees7 it is definitely not the actual error, you should share more output

Dees7 commented 3 years ago
Step 225/383 : RUN git clone -b 1.0.2 --depth=1 $GIT/GNOME/mm-common.git
 ---> Using cache
 ---> cd8f2fdc27a9
Step 226/383 : WORKDIR mm-common
 ---> Using cache
 ---> 69e07d134ad5
Step 227/383 : RUN NOCONFIGURE=1 ./autogen.sh
 ---> Using cache
 ---> a1fdc5d7fee2
Step 228/383 : RUN ./configure --enable-network
 ---> Using cache
 ---> 1cd4156fae46
Step 229/383 : RUN make -j$(nproc)
 ---> Running in b9d592020486
  GEN      util/mm-common-get.1
  GEN      util/mm-common-prepare.1
  GEN      doctags/libstdc++.tag
  GEN      skeletonmm.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 43 4628k   43 2026k    0     0  22651      0  0:03:29  0:01:31  0:01:58  4212
curl: (56) Recv failure: Connection reset by peer
make: *** [Makefile:1041: doctags/libstdc++.tag] Error 56
The command 'scl enable devtoolset-9 -- bash -c make -j$(nproc)' returned a non-zero code: 2
ilya-fedin commented 3 years ago

@Dees7 you have connectivity problems to url that mm-common tries to access

baWedekind commented 3 years ago

Just as an extra bit of information, the "real-time priority" error happens on startup, but the segfault with nullpointer happens upon unlock. I figure I should mention since most people probably don't use a password.

ilya-fedin commented 3 years ago

@baWedekind https://github.com/telegramdesktop/tdesktop/issues/16189#issuecomment-827108458

baWedekind commented 3 years ago

oops my bad

alexeibs commented 3 years ago

@ilya-fedin Is it possible to download an older version of Telegram binary from somewhere? Seems like the easiest solution if it still works.

ilya-fedin commented 3 years ago

There are github releases, but once you run it, you'll lose all data of the old instance since downgrade is not supported.

v98765 commented 3 years ago

@ilya-fedin Is it possible to download an older version of Telegram binary from somewhere? Seems like the easiest solution if it still works.

try to download previous version 2.7.1. from https://github.com/telegramdesktop/tdesktop/releases, skip upgrade, uncheck automatically update in advanced settings

alexeibs commented 3 years ago

Thank you. I've already started building a new binary from source code. I'll try 2.7.1 if the build process fails. How long does it take usually? It's building CMakeFiles/tw_owt.dit now.

typoworx-de commented 3 years ago

Any news on this? Having this issue with pre-compiled binaries after running update. Even reinstalling binaries from https://desktop.telegram.org/ doesn't fix the problem!!!

Very disappointing!

Aokromes commented 3 years ago

Any news on this? Having this issue with pre-compiled binaries after running update. Even reinstalling binaries from desktop.telegram.org doesn't fix the problem!!!

Very disappointing!

you need to wait to 2.7.3 to be compiled.

Dees7 commented 3 years ago

if anyone want to test if desktop-app/lib_base#62 fixes the issue

For Ubuntu It fix error. Telegram run

typoworx-de commented 3 years ago

Any news on this? Having this issue with pre-compiled binaries after running update. Even reinstalling binaries from https://desktop.telegram.org/ doesn't fix the problem!!!

Very disappointing!

Just for notice. I tried downloading older telegram release as mentioned by https://github.com/telegramdesktop/tdesktop/issues/16189#issuecomment-827495436. But even then this is the most I get at all:

image

And then same error-message even tested back to Telegram release 2.6.2. ldd Telegram does not show any missing libraries.

How can this be, if the error obviously has to do with the current release?

edited Had to click "Skip" on Update window obviously, as it then will update the crashed release again ... works for now.

PavelTurk commented 3 years ago

As a workaround I decided to use telegram snap. But... sms with code doesn't come. I've tried about 10 times and have been waiting for sms about two hours. Does telegram snap work?

arturokkboss33 commented 3 years ago

I re-installed it with snap and it worked for me, however in terminal you can see that the same error is reported
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1) However, the app keep running without problems for me. Using Ubuntu 16.04

PavelTurk commented 3 years ago

@arturokkboss33 Thank you for his note. I've still been waiting for sms.

alexeibs commented 3 years ago

I got an error while building 2.7.3 from the dev branch:

SourceFiles/calls/calls.style(211): error 805: variable 'callMuteMainBlobMinRadius' already defined
gmake[2]: *** [Telegram/CMakeFiles/td_ui_styles.dir/build.make:103: Telegram/gen/styles/td_ui_style.timestamp] Error 255
gmake[1]: *** [CMakeFiles/Makefile2:2280: Telegram/CMakeFiles/td_ui_styles.dir/all] Error 2
gmake: *** [Makefile:104: all] Error 2

Looks like there is problem with https://github.com/telegramdesktop/tdesktop/commit/819ce06dfb4b055e24f8bf6e90510d5e5fcf64e5

I managed to build 2.7.2 with glib workaround though. It's working now

ilya-fedin commented 3 years ago

But... sms with code doesn't come.

You can't login in tdesktop via sms, that was disabled at server side. You should login in Telegram mobile app first, then the code will be sent there.

PavelTurk commented 3 years ago

@ilya-fedin Thank you. But it is very disappointing. The ability to log in messenger on PC without necessity to install it on phone was one of the main features I respected Telegram for.

Aokromes commented 3 years ago

@ilya-fedin Thank you. But it is very disappointing. The ability to log in messenger on PC without necessity to install it on phone was one of the main features I respected Telegram for.

i think you can workaround it loging with webpage.

PavelTurk commented 3 years ago

Oh! Finally I logged in. So, as a workaround - use snap, if you don't want to install Telegram on phone (or you can't) use Android emulator in Android Studio. Just don't forget to set virtual phone camera as you PC camera.

Aokromes commented 3 years ago

https://github.com/telegramdesktop/tdesktop/releases/tag/v2.7.3

baWedekind commented 3 years ago

can confirm, updating to 2.7.3 fixes this in my case :+1:

DeckerSU commented 3 years ago

Update to 2.7.3 - https://updates.tdesktop.com/tlinux/tsetup.2.7.3.tar.xz , fixes the issue in Ubuntu 16.04.

Jorilx commented 3 years ago

Works on Devuan 2.1 too, thanks!

cubotto commented 3 years ago

Work also in Devuan ascii Thanks

superclarkk commented 3 years ago

Environment:

## Latest Ubuntu 20.04 with all the updates installed
## Telegram Desktop 2.7.4 installed from https://telegram.org/dl/desktop/linux

# uname -a
Linux xxxxxxx 5.8.0-53-generic #60~20.04.1-Ubuntu SMP Thu May 6 09:52:46 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

# cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.2 LTS"

Problem Description:

Unfortunately, although Telegram seems to work without any issues that I've found so far, I do get the following "Failed to set real-time priority" errors when it's started from the shell:

$ [ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
error: : cannot open
error: : cannot open
error: : cannot open
error: : cannot open
error: : cannot open
error: : cannot open
  OpenType support missing for "DAOpenSansSemibold", script 13
  OpenType support missing for "DAOpenSansSemibold", script 12

Also, I have installed the fonts-open-sans package to attempt to resolve the OpenType warnings, but it didn't solve it.

Any advice would be appreciated.

ilya-fedin commented 3 years ago

Just ignore these warnings

superclarkk commented 3 years ago

OK, but what do the 3 different warnings mean?

What can't telegram open? Why is DAOpenSansSemibold missing, and why is it used?

It would be nice to clear them up

ilya-fedin commented 3 years ago

OK, but what do the 3 different warnings mean?

[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1) means openal is unable to set real-time priority for audio thread.

error: : cannot open is a meaningless warning from hunspell thrown whenever tdesktop creates an object to store words in custom dictionary.

OpenType support missing for means Qt can't display some characters for whatever reason.

It would be nice to clear them up

I don't think it's possible, they aren't under tdesktop control.

What can't telegram open?

Whyever it can't, it's not related to these warnings.

superclarkk commented 3 years ago

@ilya-fedin Appreciate the answer. Thank you :)

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.