Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telegram desktop crashes when starting a voice call #3412

Closed
vranki opened this issue May 18, 2017 · 58 comments
Closed

Telegram desktop crashes when starting a voice call #3412

vranki opened this issue May 18, 2017 · 58 comments

Comments

@vranki
Copy link

vranki commented May 18, 2017

Steps to reproduce

  1. Start telegram desktop
  2. Call a contact (on Android)
  3. Contact answers..

Expected behaviour

Voice call should begin.

Actual behaviour

Telegram crashes (window closes).

Configuration

Operating system:
Ubuntu 17.04

Version of Telegram Desktop:
1.1.2

Used theme:
Default?

**Logs**:

log.txt:
[2017.05.18 16:44:49] Launched version: 1001002, alpha: [FALSE], beta: 0, debug mode: [FALSE], test dc: [FALSE]
[2017.05.18 16:44:49] Executable dir: /home/vranki/apps/Telegram/, name: Telegram
[2017.05.18 16:44:49] Initial working dir: /home/vranki/
[2017.05.18 16:44:49] Working dir: /home/vranki/.local/share/TelegramDesktop/
[2017.05.18 16:44:49] Arguments: "/home/vranki/apps/Telegram/Telegram" "--"
[2017.05.18 16:44:49] Logs started
[2017.05.18 16:44:49] Connecting local socket to /tmp/dff346c49be531143b97cac12931a143-{87A94AB0-E370-4cde-98D3-ACC110C5967D}...
[2017.05.18 16:44:49] Socket connect error 0, starting server and app...
[2017.05.18 16:44:49] Moved logging from '/home/vranki/.local/share/TelegramDesktop/log_start0.txt' to '/home/vranki/.local/share/TelegramDesktop/log.txt'!
[2017.05.18 16:44:49] Opened '/home/vranki/.local/share/TelegramDesktop/tdata/working' for reading, the previous Telegram Desktop launch was not finished properly :( Crash log size: 965
[2017.05.18 16:44:50] App Error: _basePath is empty in writeSettings()
[2017.05.18 16:44:50] Error: failed to load 'gdk_x11_drawable_get_xdisplay' function!
[2017.05.18 16:44:50] Getting DE, XDG_CURRENT_DESKTOP: 'X-Cinnamon'
[2017.05.18 16:44:50] Getting DE, DESKTOP_SESSION: 'cinnamon'
[2017.05.18 16:44:50] Getting DE, KDE_SESSION_VERSION: ''
[2017.05.18 16:44:50] Getting DE, GNOME_DESKTOP_SESSION_ID: 'this-is-deprecated'
[2017.05.18 16:44:50] DE: Gnome
[2017.05.18 16:44:50] Tray Icon: Try Qt = [TRUE], Prefer appindicator = [FALSE]
[2017.05.18 16:44:50] App Info: reading settings...
[2017.05.18 16:44:50] App Info: reading encrypted settings...
[2017.05.18 16:44:50] OpenAL Logging Level: (not set)
[2017.05.18 16:44:50] Audio Playback Devices: OpenAL Soft
[2017.05.18 16:44:50] Audio Playback Default Device: OpenAL Soft
[2017.05.18 16:44:50] Audio Capture Devices: Built-in Audio Analog Stereo;Monitor of Built-in Audio Analog Stereo;Monitor of PCM2902 Audio Codec Analog Stereo;PCM2902 Audio Codec Analog Stereo
[2017.05.18 16:44:50] Audio Capture Default Device: Built-in Audio Analog Stereo
[2017.05.18 16:44:50] App Info: reading map...
[2017.05.18 16:44:50] App Info: reading encrypted map...
[2017.05.18 16:44:50] App Info: reading encrypted user settings...
[2017.05.18 16:44:50] App Info: encrypted user settings read.
[2017.05.18 16:44:50] App Info: reading encrypted mtp data...
[2017.05.18 16:44:50] MTP Info: read keys, current: 3, to destroy: 0
[2017.05.18 16:44:50] Map read time: 9
[2017.05.18 16:44:50] Using Qt tray icon.
[2017.05.18 16:44:50] Tray Icon: Using Qt tray icon, available: [TRUE]
[2017.05.18 16:44:50] Not using Unity Launcher count.
[2017.05.18 16:44:54] Notifications Server: cinnamon
[2017.05.18 16:47:29] Audio Info: recreating audio device and reattaching the tracks

log_start0.txt:

[2017.05.18 16:46:43] Launched version: 1001002, alpha: [FALSE], beta: 0, debug mode: [TRUE], test dc: [FALSE]
[2017.05.18 16:46:43] Executable dir: /home/vranki/apps/Telegram/, name: Telegram
[2017.05.18 16:46:43] Initial working dir: /home/vranki/
[2017.05.18 16:46:43] Working dir: /home/vranki/.local/share/TelegramDesktop/
[2017.05.18 16:46:43] Arguments: "/home/vranki/apps/Telegram/Telegram" "--"
[2017.05.18 16:46:43] Logs started
[2017.05.18 16:46:43] Connecting local socket to /tmp/dff346c49be531143b97cac12931a143-{87A94AB0-E370-4cde-98D3-ACC110C5967D}...
[2017.05.18 16:46:43] Socket connected, this is not the first application instance, sending show command...
[2017.05.18 16:46:43] Show command written, waiting response...
[2017.05.18 16:46:43] Show command response received, pid = 3574, activating and quitting...

last_call_log.txt:

libtgvoip v0.4 on Linux 4.10.0-20-generic (#22-Ubuntu SMP Thu Apr 20 09:22:42 UTC 2017) x86_64
Log started on 18/05/2017 at 16:47:35

05-18 16:47:35 I: update data saving mode, config 0, enabled 0, reqd by peer 0
05-18 16:47:35 W: Starting voip controller
05-18 16:47:35 V: trying bind to port 23963
05-18 16:47:35 D: Bound to local UDP port 23963
05-18 16:47:35 E: can't set thread priority: Operation not permitted
05-18 16:47:35 I: Receive thread starting
05-18 16:47:35 E: can't set thread priority: Operation not permitted
05-18 16:47:35 E: can't set thread priority: Operation not permitted
05-18 16:47:35 V: Call state changed to 2
05-18 16:47:35 I: Detected IPv4 connectivity, will not try IPv6
05-18 16:47:35 D: Received init
05-18 16:47:35 I: Peer version is 3
05-18 16:47:35 W: Received duplicated packet for seq 1
05-18 16:47:35 W: Received duplicated packet for seq 1
05-18 16:47:35 W: Received duplicated packet for seq 1
05-18 16:47:35 W: Received duplicated packet for seq 1
05-18 16:47:35 W: Received duplicated packet for seq 1
05-18 16:47:35 D: Received ping from 91.108.8.8:540
05-18 16:47:35 D: Received ping from 91.108.8.2:527
05-18 16:47:35 D: Received ping from 91.108.12.3:528
05-18 16:47:35 D: Received ping from 91.108.12.2:526
05-18 16:47:35 V: Call state changed to 2
05-18 16:47:35 D: Received ping from 91.108.16.1:537
05-18 16:47:35 D: Received ping from 91.108.16.2:537
05-18 16:47:35 D: Received init ack
05-18 16:47:35 I: peer version from init ack 3
05-18 16:47:35 I: before create audio io

@zaps166
Copy link

zaps166 commented May 18, 2017

I've got assertion very often (call to someone and someone accepts a call): Assertion 'c->callback' failed at pulsecore/socket-client.c:126, function do_call(). Aborting. - I'm unable to use call on Linux/Pulseaudio.

D/tgvoip: === Updating voip config ===
V/tgvoip: audio_bitrate_step_decr -> 1000.000000
V/tgvoip: audio_bitrate_step_incr -> 1000.000000
V/tgvoip: audio_congestion_window -> 1024.000000
V/tgvoip: audio_frame_size -> 60.000000
V/tgvoip: audio_init_bitrate -> 16000.000000
V/tgvoip: audio_init_bitrate_edge -> 8000.000000
V/tgvoip: audio_init_bitrate_gprs -> 8000.000000
V/tgvoip: audio_init_bitrate_saving -> 8000.000000
V/tgvoip: audio_max_bitrate -> 20000.000000
V/tgvoip: audio_max_bitrate_edge -> 16000.000000
V/tgvoip: audio_max_bitrate_gprs -> 8000.000000
V/tgvoip: audio_max_bitrate_saving -> 8000.000000
V/tgvoip: jitter_losses_to_reset -> 20.000000
V/tgvoip: jitter_max_delay_20 -> 25.000000
V/tgvoip: jitter_max_delay_40 -> 15.000000
V/tgvoip: jitter_max_delay_60 -> 10.000000
V/tgvoip: jitter_max_slots_20 -> 50.000000
V/tgvoip: jitter_max_slots_40 -> 30.000000
V/tgvoip: jitter_max_slots_60 -> 20.000000
V/tgvoip: jitter_min_delay_20 -> 6.000000
V/tgvoip: jitter_min_delay_40 -> 4.000000
V/tgvoip: jitter_min_delay_60 -> 1.000000
V/tgvoip: jitter_resync_threshold -> 0.500000
V/tgvoip: use_system_aec -> true
V/tgvoip: use_system_ns -> true
V/tgvoip: new endpoint 40005: 91.108.8.5:522
V/tgvoip: new endpoint 40007: 91.108.8.7:525
V/tgvoip: new endpoint 10003: 91.108.12.3:528
V/tgvoip: new endpoint 10002: 91.108.12.2:536
V/tgvoip: new endpoint 50002: 91.108.16.2:536
V/tgvoip: new endpoint 50004: 91.108.16.4:534
W/tgvoip: Set remote endpoints
I/tgvoip: update data saving mode, config 0, enabled 0, reqd by peer 0
W/tgvoip: Starting voip controller
V/tgvoip: trying bind to port 23292
D/tgvoip: Bound to local UDP port 23292
I/tgvoip: Receive thread starting
V/tgvoip: Call state changed to 2
I/tgvoip: Detected IPv4 connectivity, will not try IPv6
D/tgvoip: Received init
I/tgvoip: Peer version is 3
W/tgvoip: Received duplicated packet for seq 1
W/tgvoip: Received duplicated packet for seq 1
W/tgvoip: Received duplicated packet for seq 1
W/tgvoip: Received duplicated packet for seq 1
W/tgvoip: Received duplicated packet for seq 1
D/tgvoip: Received ping from 91.108.8.5:522
D/tgvoip: Received ping from 91.108.8.7:525
D/tgvoip: Received ping from 91.108.12.2:536
D/tgvoip: Received ping from 91.108.12.3:528
V/tgvoip: Call state changed to 2
D/tgvoip: Received ping from 91.108.16.2:536
D/tgvoip: Received ping from 91.108.16.4:534
D/tgvoip: Received init ack
I/tgvoip: peer version from init ack 3
I/tgvoip: before create audio io
Assertion 'c->callback' failed at pulsecore/socket-client.c:126, function do_call(). Aborting.
Przerwane

@Fil0sOFF
Copy link

Crashes for me also on ubuntu 16.04. I use the prebuilt binary.
Here's a log from ~/.TelegramDesktop/tdata/working

Binary: Telegram
Launched: 19.05.2017 15:25:08
Platform: Linux64bit
UserTag: 44a3d0be9dc7c055
Username: fil0soff
Version: 1001002

Caught signal 6 (SIGABRT) in thread 140166635173632

Backtrace:
/home/sergeyp/Telegram/Telegram(_ZN14SignalHandlers8internal7HandlerEiP7siginfoPv+0x175)[0xbfbdc5]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f7b7316f390]
[0x1]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7f7b728ab428]
[0x1]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7f7b728ab428]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7f7b728ad02a]
/usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-8.0.so(+0x43528)[0x7f7b48751528]
/usr/lib/x86_64-linux-gnu/libpulse.so.0(pa_mainloop_dispatch+0x2bc)[0x7f7b48bb82ac]
/usr/lib/x86_64-linux-gnu/libpulse.so.0(pa_mainloop_iterate+0x3c)[0x7f7b48bb84bc]
/usr/lib/x86_64-linux-gnu/libpulse.so.0(pa_mainloop_run+0x20)[0x7f7b48bb8560]
/usr/lib/x86_64-linux-gnu/libpulse.so.0(+0x327a9)[0x7f7b48bc67a9]

@john-preston
Copy link
Member

@Fil0sOFF Can you please look for dumps (files ending with ".dmp") in ~/.local/share/TelegramDesktop/tdata/dumps or in ~/.TelegramDesktop/tdata/dumps ?

@zaps166
Copy link

zaps166 commented May 19, 2017

In my case there is also no dump files (exactly like here: #3413 (comment))

@zaps166
Copy link

zaps166 commented May 19, 2017

Currently Telegram is unusable using pulseaudio module - crashes/asserts almost everytime, so I've switched to plain ALSA dmix on my OS.
@john-preston Is it any envvar which enforces using ALSA module in telegram if pulseaudio is running in OS?

@Fil0sOFF
Copy link

@john-preston the dumps directory is empty for me.

@nimais2003
Copy link

ok

@ferlanero
Copy link

Accepting call crashes Telegram 1.1.2 on ArchLinux x64 too.

Steps to reproduce
Start telegram desktop
Call a contact
Contact answers..

Expected behaviour
Voice call should begin.

Actual behaviour
Telegram crashes (window closes).

Configuration
Operating system:
Archlinux x64

Version of Telegram Desktop:
1.1.2

Used theme:
Default

@john-preston
Copy link
Member

@ferlanero No crash dumps in "tdata" folder?

Can you run Telegram from Terminal with a "catchsegv ./Telegram" command and copy the stack traces here after the crash? (or in a text file and attach it here).

@ferlanero
Copy link

@john-preston No, no crash dmps in "tdata" folder

@ferlanero
Copy link

ferlanero commented May 21, 2017

@john-preston After running Telegram from terminal with a "catchsegv /home/martarina/Telegram/Telegram"

martarina@martarina-X551CA:~$ sudo catchsegv /home/martarina/Telegram/Telegram
[sudo] password for martarina: 
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 80: saw unknown, expected number
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 80: saw unknown, expected number
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 80: saw unknown, expected number
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 80: saw unknown, expected number
D/tgvoip: === Updating voip config ===
V/tgvoip: audio_bitrate_step_decr -> 1000.000000
V/tgvoip: audio_bitrate_step_incr -> 1000.000000
V/tgvoip: audio_congestion_window -> 1024.000000
V/tgvoip: audio_frame_size -> 60.000000
V/tgvoip: audio_init_bitrate -> 16000.000000
V/tgvoip: audio_init_bitrate_edge -> 8000.000000
V/tgvoip: audio_init_bitrate_gprs -> 8000.000000
V/tgvoip: audio_init_bitrate_saving -> 8000.000000
V/tgvoip: audio_max_bitrate -> 20000.000000
V/tgvoip: audio_max_bitrate_edge -> 16000.000000
V/tgvoip: audio_max_bitrate_gprs -> 8000.000000
V/tgvoip: audio_max_bitrate_saving -> 8000.000000
V/tgvoip: jitter_losses_to_reset -> 20.000000
V/tgvoip: jitter_max_delay_20 -> 25.000000
V/tgvoip: jitter_max_delay_40 -> 15.000000
V/tgvoip: jitter_max_delay_60 -> 10.000000
V/tgvoip: jitter_max_slots_20 -> 50.000000
V/tgvoip: jitter_max_slots_40 -> 30.000000
V/tgvoip: jitter_max_slots_60 -> 20.000000
V/tgvoip: jitter_min_delay_20 -> 6.000000
V/tgvoip: jitter_min_delay_40 -> 4.000000
V/tgvoip: jitter_min_delay_60 -> 1.000000
V/tgvoip: jitter_resync_threshold -> 0.500000
V/tgvoip: use_system_aec -> true
V/tgvoip: use_system_ns -> true
V/tgvoip: new endpoint 40007: 91.108.8.7:530
V/tgvoip: new endpoint 40004: 91.108.8.4:533
V/tgvoip: new endpoint 10004: 91.108.12.5:525
V/tgvoip: new endpoint 10002: 91.108.12.2:527
V/tgvoip: new endpoint 50001: 91.108.16.1:525
V/tgvoip: new endpoint 50004: 91.108.16.4:526
W/tgvoip: Set remote endpoints
I/tgvoip: update data saving mode, config 0, enabled 0, reqd by peer 0
W/tgvoip: Starting voip controller
V/tgvoip: trying bind to port 18227
D/tgvoip: Bound to local UDP port 18227
I/tgvoip: Receive thread starting
V/tgvoip: Call state changed to 2
I/tgvoip: Detected IPv4 connectivity, will not try IPv6
D/tgvoip: Received init ack
I/tgvoip: peer version from init ack 3
I/tgvoip: before create audio io
Assertion 'c->callback' failed at pulsecore/socket-client.c:126, function do_call(). Aborting.
Aborted

@ferlanero
Copy link

Calling with version 1.1 of Telegram Desktop has no issues in Ubuntu 16.04 and ArchLinux, both x64. Problem appears on version 1.1.1 and above.

@anyone2009
Copy link

Have the same issue, telegram version 1.1.2 on ubuntu 16.04

@ghost
Copy link

ghost commented May 23, 2017

Telegram desktop crashes when I answer phone calls. When I initiate the call, it works fine.

OS: Linux Mint 18.1 - Mate

Can provide more info if needed.

@PKeidel
Copy link

PKeidel commented May 23, 2017

Same here, also on Ubuntu. Assertion 'c->callback' failed at pulsecore/socket-client.c:126, function do_call(). Aborting.

@john-preston
Copy link
Member

@PKeidel Can you please test the latest 1.1.4 alpha version from https://desktop.telegram.org/changelog#alpha-version?

@zaps166
Copy link

zaps166 commented May 25, 2017

Telegram 1.1.4 alpha precompiled binary: crash still happens, but seems to be less often.

@llybin
Copy link

llybin commented May 27, 2017

Checked on 1.1.6, looks fixed, thanks!
Archlinux

@anarsoul
Copy link

1.1.6 still crashes for me:

D/tgvoip: === Updating voip config ===
V/tgvoip: audio_bitrate_step_decr -> 1000.000000
V/tgvoip: audio_bitrate_step_incr -> 1000.000000
V/tgvoip: audio_congestion_window -> 1024.000000
V/tgvoip: audio_frame_size -> 60.000000
V/tgvoip: audio_init_bitrate -> 16000.000000
V/tgvoip: audio_init_bitrate_edge -> 8000.000000
V/tgvoip: audio_init_bitrate_gprs -> 8000.000000
V/tgvoip: audio_init_bitrate_saving -> 8000.000000
V/tgvoip: audio_max_bitrate -> 20000.000000
V/tgvoip: audio_max_bitrate_edge -> 16000.000000
V/tgvoip: audio_max_bitrate_gprs -> 8000.000000
V/tgvoip: audio_max_bitrate_saving -> 8000.000000
V/tgvoip: jitter_losses_to_reset -> 20.000000
V/tgvoip: jitter_max_delay_20 -> 25.000000
V/tgvoip: jitter_max_delay_40 -> 15.000000
V/tgvoip: jitter_max_delay_60 -> 10.000000
V/tgvoip: jitter_max_slots_20 -> 50.000000
V/tgvoip: jitter_max_slots_40 -> 30.000000
V/tgvoip: jitter_max_slots_60 -> 20.000000
V/tgvoip: jitter_min_delay_20 -> 6.000000
V/tgvoip: jitter_min_delay_40 -> 4.000000
V/tgvoip: jitter_min_delay_60 -> 1.000000
V/tgvoip: jitter_resync_threshold -> 0.500000
V/tgvoip: use_system_aec -> true
V/tgvoip: use_system_ns -> true
V/tgvoip: new endpoint 10002: 91.108.12.2:522
V/tgvoip: new endpoint 10003: 91.108.12.3:533
V/tgvoip: new endpoint 40005: 91.108.8.5:522
V/tgvoip: new endpoint 10001: 91.108.8.1:539
V/tgvoip: new endpoint 50004: 91.108.16.4:528
V/tgvoip: new endpoint 50002: 91.108.16.2:535
D/tgvoip: out device #0: alsa_output.pci-0000_00_1b.0.analog-stereo (Built-in Audio Analog Stereo)
D/tgvoip: in device #0: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor (Monitor of Built-in Audio Analog Stereo)
D/tgvoip: in device #1: alsa_input.pci-0000_00_1b.0.analog-stereo (Built-in Audio Analog Stereo)
W/tgvoip: Set remote endpoints
I/tgvoip: update data saving mode, config 0, enabled 0, reqd by peer 0
W/tgvoip: Starting voip controller
V/tgvoip: trying bind to port 31095
D/tgvoip: Bound to local UDP port 31095
I/tgvoip: Receive thread starting
V/tgvoip: Call state changed to 2
I/tgvoip: Detected IPv4 connectivity, will not try IPv6
D/tgvoip: Received init
I/tgvoip: Peer version is 3
W/tgvoip: Received duplicated packet for seq 1
W/tgvoip: Received duplicated packet for seq 1
W/tgvoip: Received duplicated packet for seq 1
W/tgvoip: Received duplicated packet for seq 1
W/tgvoip: Received duplicated packet for seq 1
V/tgvoip: Call state changed to 2
D/tgvoip: Received ping from 91.108.12.2:522
D/tgvoip: Received ping from 91.108.12.3:533
D/tgvoip: Received ping from 91.108.8.5:522
D/tgvoip: Received init ack
I/tgvoip: peer version from init ack 3
I/tgvoip: before create audio io
V/tgvoip: starting encoder, packets per frame=3
Assertion '!e->next' failed at pulsecore/queue.c:104, function pa_queue_pop(). Aborting.
I/tgvoip: decoder: packets per frame 3
W/tgvoip: jitter: found no packet for timestamp 0 (last put = 0, lost = 0)
W/tgvoip: jitter: found no packet for timestamp 60 (last put = 0, lost = 0)
V/tgvoip: Trying to recover late packet
W/tgvoip: jitter: found no packet for timestamp 0 (last put = 0, lost = 0)
V/tgvoip: Call state changed to 3
V/tgvoip: PLC
I/tgvoip: Sending public endpoints request
D/tgvoip: Sending public endpoints request to 91.108.12.2:522
D/tgvoip: Received ping from 91.108.8.1:539
D/tgvoip: Received ping from 91.108.16.4:528
D/tgvoip: Received ping from 91.108.16.2:535
Aborted (core dumped)

@bboerner
Copy link

bboerner commented Jun 4, 2017

Fwiw - I encountered it today using Telegram 1.1.7. It worked previously. The only thing I could think was that I had replaced the CPU / MoBo a few nights ago.

I eliminated all traces of Telegram I could find, downloaded v1.1.7 tarball and re-installed. Re-validated for new session and then calls would complete.

Ubuntu 14.04 with Xenial HWE kernel & xorg-server stack.

@llybin
Copy link

llybin commented Jun 24, 2017

Still crashes, no dumps in a folder.

@Oggesus
Copy link

Oggesus commented Jun 28, 2017

1.1.7. Lubuntu/Xubuntu. The problem is about libtgvoip.

Fatal error in /home/antanubis/TBuild/tdesktop/Telegram/ThirdParty/libtgvoip/webrtc_dsp/webrtc/modules/audio_processing/aec/aec_core.cc, line 205
# Check failed: 0 < AvaliableSpace() (0 vs. 0)

(gdb) Quit
(gdb) bt f
#0  0xb7fd9ce5 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb7aa6ea9 in __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:54
        resultvar = <optimized out>
        resultvar = <optimized out>
        pid = 16174
        selftid = 16218
#2  0xb7aa8407 in __GI_abort () at abort.c:89
        save_stage = 2
        act = {__sigaction_handler = {sa_handler = 0xb7a88148, sa_sigaction = 0xb7a88148}, sa_mask = {
            __val = {3081669401, 213065716, 3086895760, 134868660, 5, 3087005976, 213067284, 3086915778, 
              3087006416, 3078951184, 1, 5, 0, 166176776, 219648544, 219648556, 2210447492, 0, 
              3087003648, 135616020, 3083001024, 3081604815, 3083001024, 3081245112, 2210447528, 
              215463492, 3086915595, 224427764, 2210456172, 220071808, 2210447528, 3086942256}}, 
          sa_flags = 0, sa_restorer = 0xb7aa82b0 <__GI_abort>}
        sigs = {__val = {32, 0 <repeats 31 times>}}
#3  0x08aaff00 in rtc::FatalMessage::~FatalMessage() ()
No symbol table info available.
#4  0x08ac39dc in webrtc::BlockBuffer::ExtractExtendedBlock(float*) ()
No symbol table info available.
#5  0x08ac9019 in webrtc::WebRtcAec_ProcessFrames(webrtc::AecCore*, float const* const*, unsigned int, unsigned int, int, float* const*) ()
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#6  0x08ab2ca0 in ?? ()
No symbol table info available.
#7  0x08ab236a in webrtc::WebRtcAec_Process(void*, float const* const*, unsigned int, float* const*, unsigned int, short, int) ()
No symbol table info available.
#8  0x08aab992 in tgvoip::EchoCanceller::ProcessInput(unsigned char*, unsigned char*, unsigned int) ()
No symbol table info available.
#9  0x08aaf5a8 in tgvoip::OpusEncoder::RunThread() ()
No symbol table info available.
#10 0x08aaf483 in tgvoip::OpusEncoder::StartThread(void*) ()
No symbol table info available.
#11 0xb7caa295 in start_thread (arg=0x83c0eb40) at pthread_create.c:333
        __res = <optimized out>
        pd = 0x83c0eb40
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {-1211375616, 0, 4001536, -2084510872, 763339823, 
                972976711}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, 
              cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
---Type <return> to continue, or q <return> to quit---
#12 0xb7b6205e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114
No locals.
(gdb) 

@matthiasbeyer
Copy link

I can reproduce, telegram crashes for me when starting a voice-call (window doesn't respond anymore and I have to killall telegram-desktop).

OS: NixOS unstable (as of 17.09pre110094.1add3519df (Hummingbird))
Telegram: 1.1.7

@YanDoroshenko
Copy link

Can confirm.
Arch Linux, Telegram 1.1.23 from AUR.

@grishka
Copy link
Contributor

grishka commented Dec 7, 2017

@zaps166 I've rewritten my threading wrappers completely since the last public release, so it's safe to say it's been fixed.

@auchri auchri closed this as completed Dec 7, 2017
@reagentoo
Copy link

@grishka really?

@grishka
Copy link
Contributor

grishka commented Dec 22, 2017

@reagentoo really what?

@reagentoo
Copy link

@grishka

I've rewritten my threading wrappers completely since the last public release, so it's safe to say it's been fixed.

@grishka
Copy link
Contributor

grishka commented Dec 22, 2017

@reagentoo yes, really, I've removed tgvoip_thread_t, tgvoip_mutex_t and all related functions, they're all classes now.

@reagentoo
Copy link

@grishka Could you please explain in more detail why it is not necessary to fix @zaps166 's last remark?

@grishka
Copy link
Contributor

grishka commented Dec 22, 2017

@reagentoo because thread entry points no longer return anything.

@eisaev
Copy link

eisaev commented Dec 22, 2017

@grishka
void* AudioInputALSA::StartThread(void* arg){
____^____
and
void* AudioOutputALSA::StartThread(void* arg){
____^____
maybe it's a typo?

@grishka
Copy link
Contributor

grishka commented Dec 22, 2017

@eisaev I'm talking about an upcoming, unreleased version. There, they all return just void instead of a pointer. The internal wrapper function that is directly passed to the OS-specific threading API does still return void* on *nix and DWORD on Windows because that's what pthread/WinAPI thread entry points are supposed to do. The use of this wrapper function (which always returns 0) makes such bugs impossible.

@eisaev
Copy link

eisaev commented Dec 22, 2017

@grishka I hope that the optimizer of the compiler agree with your point of view.

@reagentoo
Copy link

@grishka tgvoip have stable segfault when calling if it built with clang. Backtraces higher.

@pfactum
Copy link

pfactum commented Dec 27, 2017

v1.2.1 still crashes. Also found similar (and newer) reports: #4219, #4195, #4029.

@grishka
Copy link
Contributor

grishka commented Dec 27, 2017

How many times, exactly, do I have to repeat that those refactorings are for an upcoming release of the library and they haven't ever been released as part of any client yet?

@pfactum
Copy link

pfactum commented Dec 27, 2017

In each new bugreport, I assume. Feel free to close them if needed, BTW.

@auchri auchri reopened this Dec 27, 2017
@auchri auchri closed this as completed Dec 27, 2017
@reagentoo
Copy link

Nice! ;)

@luisalvarado
Copy link

I tried to follow the comments here, but do not know if this is fixed or not. I came from this issue #3870 because this is still happening on Telegram Desktop 1.2.6

Basically the first call always drops telegram from me and it crashes the app. The 2nd call might crash or it might not, but currently it is very difficult to hold a call over the desktop now.

@grishka
Copy link
Contributor

grishka commented Jan 23, 2018

@luisalvarado the above fix is already in 1.2.6, so it has to be something else. Could you please post a crash log?

@luisalvarado
Copy link

@grishka Hi friend, well I tried running debug mode by typing debugmode in the settings section, executing over the terminal the Telegram executable with the -debug and in both cases it did not create the corresponding log file for me. The folder has all the right permissions and everywhere I have read I am suppose to see a log file next to the Telegram files. My telegram files are in my home folder under the telegram folder and am in Ubuntu. Anything else I should do to provide you with the corresponding information?

Thank you again.

@grishka
Copy link
Contributor

grishka commented Jan 28, 2018

@luisalvarado could you please try running it with gdb? E.g. gdb /path/to/Telegram and then run. It will output the log into the terminal. Then, when it crashes, use the bt command to get the stack trace. Thank you in advance.

@pfactum
Copy link

pfactum commented Jan 28, 2018

@grishka I've managed to get this with 1.2.8:

(gdb) bt
#0  0x00007ffff17c0860 in raise () at /usr/lib/libc.so.6
#1  0x00007ffff17c1ec9 in abort () at /usr/lib/libc.so.6
#2  0x00007fffd4791f24 in pa_queue_pop () at /usr/lib/pulseaudio/libpulsecommon-11.1.so
#3  0x00007fffd4790847 in  () at /usr/lib/pulseaudio/libpulsecommon-11.1.so
#4  0x00007fffd47917be in  () at /usr/lib/pulseaudio/libpulsecommon-11.1.so
#5  0x00007fffd505504d in pa_mainloop_dispatch () at /usr/lib/libpulse.so.0
#6  0x00007fffd5055280 in pa_mainloop_iterate () at /usr/lib/libpulse.so.0
#7  0x00007fffd5055301 in pa_mainloop_run () at /usr/lib/libpulse.so.0
#8  0x00007fffd50636ae in  () at /usr/lib/libpulse.so.0
#9  0x00007fffd47a281c in  () at /usr/lib/pulseaudio/libpulsecommon-11.1.so
#10 0x00007ffff243408c in start_thread () at /usr/lib/libpthread.so.0
#11 0x00007ffff1881e7f in clone () at /usr/lib/libc.so.6

Not sure if this is something very useful. Also, cannot reproduce it reliably, just occasionally. Let me know if I should recompile something with debug info enabled.

@pfactum
Copy link

pfactum commented Jan 28, 2018

@grishka With libpulse having debug symbols:

(gdb) bt
#0  0x00007ffff17c0860 in raise () at /usr/lib/libc.so.6
#1  0x00007ffff17c1ec9 in abort () at /usr/lib/libc.so.6
#2  0x00007fffd5055944 in pa_operation_unref (o=<optimized out>) at pulse/operation.c:68
#3  0x00007fffd478bebf in pdispatch_free (pd=<optimized out>) at pulsecore/pdispatch.c:266
#4  0x00007fffd478bebf in pa_pdispatch_unref (pd=0x7fff8c003da0) at pulsecore/pdispatch.c:433
#5  0x00007fffd503e4eb in context_unlink (c=0x7fff58001730) at pulse/context.c:215
#6  0x00007fffd503ed28 in pa_context_set_state (c=0x7fff58001730, st=PA_CONTEXT_TERMINATED) at pulse/context.c:308
#7  0x00005555562626f5 in tgvoip::audio::AudioInputPulse::~AudioInputPulse() ()
#8  0x0000555556262749 in tgvoip::audio::AudioInputPulse::~AudioInputPulse() ()
#9  0x000055555624b558 in tgvoip::VoIPController::~VoIPController() ()
#10 0x00005555559ff2fa in Calls::Call::destroyController() ()
#11 0x0000555555a2e41f in Calls::Call::setState(Calls::Call::State) ()
#12 0x0000555555a35f9e in Calls::Call::handleUpdate(MTPBoxed<MTPphoneCall> const&) ()
#13 0x0000555555a361e4 in Calls::Instance::handleCallUpdate(MTPBoxed<MTPphoneCall> const&) ()
#14 0x0000555555f91f2e in MainWidget::feedUpdate(MTPBoxed<MTPupdate> const&) ()
#15 0x0000555555f94990 in MainWidget::feedUpdateVector(MTPBoxed<MTPvector<MTPBoxed<MTPupdate> > > const&, bool) ()
#16 0x0000555555f94f96 in MainWidget::feedUpdates(MTPBoxed<MTPupdates> const&, unsigned long long) ()
#17 0x0000555555a00098 in  ()
#18 0x0000555555b27800 in  ()
#19 0x0000555556192aac in MTP::Instance::Private::execCallback(int, int const*, int const*) ()
#20 0x0000555555da33c7 in MTP::internal::Session::tryToReceive() ()
#21 0x000055555602ee56 in  ()
#22 0x00007ffff35e7932 in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#23 0x00007ffff45bae3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#24 0x00007ffff45c2816 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#25 0x00007ffff35b66c0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#26 0x00007ffff35b9326 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt5Core.so.5
#27 0x00007ffff3613584 in  () at /usr/lib/libQt5Core.so.5
#28 0x00007ffff2695e38 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#29 0x00007ffff2696081 in  () at /usr/lib/libglib-2.0.so.0
#30 0x00007ffff269610e in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#31 0x00007ffff3612b71 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#32 0x00007fffe42052f2 in  () at /usr/lib/libQt5XcbQpa.so.5
#33 0x00007ffff35b4d0b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#34 0x00007ffff35bdff8 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#35 0x0000555555a8ed66 in Core::Launcher::executeApplication() ()
#36 0x0000555555a8ee60 in Core::Launcher::exec() ()
#37 0x00005555559099a7 in main ()

@pfactum
Copy link

pfactum commented Jan 28, 2018

@grishka One more:

(gdb) bt
#0  0x00007ffff17c0860 in raise () at /usr/lib/libc.so.6
#1  0x00007ffff17c1ec9 in abort () at /usr/lib/libc.so.6
#2  0x00007fffd4792344 in pa_queue_push (q=<optimized out>, p=p@entry=0x7fffc0009ba0) at pulsecore/queue.c:72
#3  0x00007fffd478fe15 in pa_pstream_send_packet (p=0x7fff80001c30, packet=0x7fffc000a4d0, ancil_data=0x0) at pulsecore/pstream.c:464
#4  0x00007fffd478e69b in pa_pstream_send_tagstruct_with_ancil_data (p=0x7fff80001c30, t=0x7fffc0002910, ancil_data=ancil_data@entry=0x0) at pulsecore/pstream-util.c:45
#5  0x00007fffd478e817 in pa_pstream_send_tagstruct_with_creds (p=<optimized out>, t=t@entry=0x7fffc0002910, creds=creds@entry=0x0)
    at pulsecore/pstream-util.c:61
#6  0x00007fffd5060e11 in pa_stream_cork (s=0x7fff44040340, b=<optimized out>, cb=<optimized out>, userdata=<optimized out>)
    at pulse/stream.c:2293
#7  0x000055555626112c in tgvoip::audio::AudioOutputPulse::Stop() ()
#8  0x000055555624b23e in tgvoip::VoIPController::~VoIPController() ()
#9  0x00005555559ff2fa in Calls::Call::destroyController() ()
#10 0x0000555555a2e41f in Calls::Call::setState(Calls::Call::State) ()
#11 0x0000555555a35f9e in Calls::Call::handleUpdate(MTPBoxed<MTPphoneCall> const&) ()
#12 0x0000555555a361e4 in Calls::Instance::handleCallUpdate(MTPBoxed<MTPphoneCall> const&) ()
#13 0x0000555555f91f2e in MainWidget::feedUpdate(MTPBoxed<MTPupdate> const&) ()
#14 0x0000555555f94990 in MainWidget::feedUpdateVector(MTPBoxed<MTPvector<MTPBoxed<MTPupdate> > > const&, bool) ()
#15 0x0000555555f94f96 in MainWidget::feedUpdates(MTPBoxed<MTPupdates> const&, unsigned long long) ()
#16 0x0000555555a00098 in  ()
#17 0x0000555555b27800 in  ()
#18 0x0000555556192aac in MTP::Instance::Private::execCallback(int, int const*, int const*) ()
#19 0x0000555555da33c7 in MTP::internal::Session::tryToReceive() ()
#20 0x000055555602ee56 in  ()
#21 0x00007ffff35e7932 in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#22 0x00007ffff45bae3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#23 0x00007ffff45c2816 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#24 0x00007ffff35b66c0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#25 0x00007ffff35b9326 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt5Core.so.5
#26 0x00007ffff3613584 in  () at /usr/lib/libQt5Core.so.5
#27 0x00007ffff2695e38 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#28 0x00007ffff2696081 in  () at /usr/lib/libglib-2.0.so.0
#29 0x00007ffff269610e in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#30 0x00007ffff3612b71 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#31 0x00007fffe42052f2 in  () at /usr/lib/libQt5XcbQpa.so.5
#32 0x00007ffff35b4d0b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#33 0x00007ffff35bdff8 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#34 0x0000555555a8ed66 in Core::Launcher::executeApplication() ()
#35 0x0000555555a8ee60 in Core::Launcher::exec() ()
#36 0x00005555559099a7 in main ()

@pfactum
Copy link

pfactum commented Jan 28, 2018

@grishka Sorry for the noise, another one with an assertion statement before crash:

Assertion 'q->length == 0' failed at pulsecore/queue.c:63, function pa_queue_free(). Aborting.

Thread 1 "telegram-deskto" received signal SIGABRT, Aborted.
0x00007ffff17c0860 in raise () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff17c0860 in raise () at /usr/lib/libc.so.6
#1  0x00007ffff17c1ec9 in abort () at /usr/lib/libc.so.6
#2  0x00007fffd47925ab in pa_queue_free (q=0x7fff740033d0, free_func=free_func@entry=0x7fffd478f870 <item_free>)
    at pulsecore/queue.c:61
#3  0x00007fffd4791be7 in pstream_free (p=0x7fff74003720) at pulsecore/pstream.c:408
#4  0x00007fffd4791be7 in pa_pstream_unref (p=0x7fff74003720) at pulsecore/pstream.c:1170
#5  0x00007fffd503e50c in context_unlink (c=0x7fff7c0750c0) at pulse/context.c:221
#6  0x00007fffd503ed28 in pa_context_set_state (c=0x7fff7c0750c0, st=PA_CONTEXT_TERMINATED) at pulse/context.c:308
#7  0x00005555562611e5 in tgvoip::audio::AudioOutputPulse::~AudioOutputPulse() ()
#8  0x0000555556261239 in tgvoip::audio::AudioOutputPulse::~AudioOutputPulse() ()
#9  0x000055555624b5de in tgvoip::VoIPController::~VoIPController() ()
#10 0x00005555559ff2fa in Calls::Call::destroyController() ()
#11 0x0000555555a2e41f in Calls::Call::setState(Calls::Call::State) ()
#12 0x0000555555a35f9e in Calls::Call::handleUpdate(MTPBoxed<MTPphoneCall> const&) ()
#13 0x0000555555a361e4 in Calls::Instance::handleCallUpdate(MTPBoxed<MTPphoneCall> const&) ()
#14 0x0000555555f91f2e in MainWidget::feedUpdate(MTPBoxed<MTPupdate> const&) ()
#15 0x0000555555f94990 in MainWidget::feedUpdateVector(MTPBoxed<MTPvector<MTPBoxed<MTPupdate> > > const&, bool) ()
#16 0x0000555555f94f96 in MainWidget::feedUpdates(MTPBoxed<MTPupdates> const&, unsigned long long) ()
#17 0x0000555555a00098 in  ()
#18 0x0000555555b27800 in  ()
#19 0x0000555556192aac in MTP::Instance::Private::execCallback(int, int const*, int const*) ()
#20 0x0000555555da33c7 in MTP::internal::Session::tryToReceive() ()
#21 0x000055555602ee56 in  ()
#22 0x00007ffff35e7932 in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#23 0x00007ffff45bae3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#24 0x00007ffff45c2816 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#25 0x00007ffff35b66c0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#26 0x00007ffff35b9326 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt5Core.so.5
#27 0x00007ffff3613584 in  () at /usr/lib/libQt5Core.so.5
#28 0x00007ffff2695e38 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#29 0x00007ffff2696081 in  () at /usr/lib/libglib-2.0.so.0
#30 0x00007ffff269610e in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#31 0x00007ffff3612b71 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#32 0x00007fffe42052f2 in  () at /usr/lib/libQt5XcbQpa.so.5
#33 0x00007ffff35b4d0b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#34 0x00007ffff35bdff8 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#35 0x0000555555a8ed66 in Core::Launcher::executeApplication() ()
#36 0x0000555555a8ee60 in Core::Launcher::exec() ()
#37 0x00005555559099a7 in main ()

I'll probably stop hammering it now and will wait for your reply.

@grishka
Copy link
Contributor

grishka commented Jan 28, 2018

It seems like I'm not deinitializing PulseAudio correctly... Thank you, I'll look into it.

@github-actions
Copy link

github-actions bot commented Mar 8, 2021

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests