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

'Teamviewer' terminated by Segmentation fault (core dumped) #151784

Open
khrj opened this issue Dec 22, 2021 · 16 comments
Open

'Teamviewer' terminated by Segmentation fault (core dumped) #151784

khrj opened this issue Dec 22, 2021 · 16 comments
Labels
0.kind: bug Something is broken

Comments

@khrj
Copy link
Member

khrj commented Dec 22, 2021

Describe the bug

Teamviewer exits with "Segmentation fault (core dumped)" about 20 seconds after connecting remotely from a device (server is NixOS, client is macOS)

Steps To Reproduce

Steps to reproduce the behavior:

  1. Launch teamviewer
  2. Connect to NixOS using a remote computer
  3. Teamviewer exits on NixOS machine with Segmentation fault (core dumped)

Expected behavior

Teamviewer doesn't quit after 20 seconds of remote access

Screenshots

image

Additional context

Possibly fixed in next minor version 15.25.5 (unstable is on 15.24.5)

Notify maintainers

@jagajaga
@jraygauthier

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

- system: `"x86_64-linux"`
 - host os: `Linux 5.10.84, NixOS, 22.05 (Quokka)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.5.0pre20211206_d1aaa7e`
 - channels(root): `"nixos-21.05.4481.c5f1ee98224"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: teamviewer
# a list of nixos modules affected by the problem
module: teamviewer
@khrj khrj added the 0.kind: bug Something is broken label Dec 22, 2021
@jraygauthier
Copy link
Member

jraygauthier commented Dec 22, 2021

@khrj Can you provide the version of both the client and server $ teamviewer --version? Are you able to reproduce using a nixos client of the same version (e.g.: from a vm) to the nixos server?
I am running on 21.05 myself and had no issue whatsoever connecting to a windows server from nixos and the reverse last time I checked.

UPDATE:

I just retested the window to nixos 21.05 case and indeed I can confirm the observed segmentation fault. Windows side version is 15.22.3, nixos version is 15.22.3 as well.

@jraygauthier
Copy link
Member

When the problem occurs, the daemon remains up bot prints some session error message:

$ sudo teamviewerd -f
Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 key

the crash actually occurs with the teamviewer client that is run server side:

$ teamviewer

Init...
CheckCPU: SSE2 support: yes
Checking setup...
Launching TeamViewer ...
Launching TeamViewer GUI ...
Segmentation fault (core dumped)

Most likely we should be able to debug what is the actual problem by loading the core dump from gdb.

I tried to reset the content under /var/lib/teamviewer but it did not fix the issue.

There does not seem to be much helping information in the daemon log other then that the client disconnected:

# ..
2021/12/22 15:37:39.463 608305 139738388338240 S!! EmergingUdpConnection::AsyncSendTo::Handler Send error system:101 to 2605:380:58:351:188:172:251:37:5938
2021/12/22 15:37:39.463 608305 139738388338240 S!! EmergingUdpConnection::AsyncSendTo::Handler Send error system:101 to 2605:380:57:351:162:250:7:75:5938
2021/12/22 15:37:39.463 608305 139738388338240 S!! EmergingUdpConnection::AsyncSendTo::Handler Send error system:101 to 2a00:11c0:2d:351:162:250:3:72:5938
2021/12/22 15:37:39.463 608305 139738388338240 S!! EmergingUdpConnection::AsyncSendTo::Handler Send error system:101 to 2607:f0d0:2702:df::3:5938
2021/12/22 15:37:39.463 608305 139738388338240 S!! EmergingUdpConnection::AsyncSendTo::Handler Send error system:101 to 2605:380:32:351:162:250:5:69:5938
# ..
2021/12/22 15:37:53.242 608305 139738237367872 S!! TcpProcessConnector::HandleRead error 104 reading from process 608376: Connection reset by peer, Errorcode=104
2021/12/22 15:37:53.243 608305 139738237367872 S   TcpProcessConnector::CloseConnection(): PID=608376
2021/12/22 15:37:53.243 608305 139738237367872 S!! InterProcessNetwork::ProcessDisconnected(): ReadFailed session=450215437 ptype=2, Errorcode=104
2021/12/22 15:37:53.243 608305 139738237367872 S   ProcessControlBase[2]::ProcessDisconnected: Process pid 608376 in session 450215437 disconnected
2021/12/22 15:37:53.243 608305 139738237367872 S   OSSessionControl[2]::TerminateWindowsSession(): terminating TVSession 1535482027 in WindowsSession 450215437 isOutgoing: 0 
2021/12/22 15:37:53.243 608305 139738237367872 S   SessionControl::TerminateSession: Session termination reason IPC_Error
2021/12/22 15:37:53.243 608305 139738237367872 S   TcpProcessConnector::CloseConnection(): Shutdown socket returned error 107: Transport endpoint is not connected
2021/12/22 15:37:53.243 608305 139738237367872 S   NetworkControl::UpdateOnlineState alwaysOnline=0 delayOffline=0 otherProcess=0 restart=0 termsOfUseAccepted=1
2021/12/22 15:37:53.243 608305 139738237367872 S   TeamViewer is going offline!
# ..

@isFakeAccount
Copy link

I have the same issue on Pop!_OS 21.10. Following is my metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.8-76051508-generic, Pop!_OS, 21.10`
 - multi-user?: `no`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.5.1`
 - channels(kira): `"nixgl, nixpkgs-22.05pre340506.5c37ad87222"`
 - nixpkgs: `/home/kira/.nix-defexpr/channels/nixpkgs`

@isFakeAccount
Copy link

isFakeAccount commented Dec 28, 2021

@jraygauthier I was able to solve this issue by using nixGL. So instead I run the command

nixGL teamviewer

Though I have been able to figure out how to start the daemon. I have the following line in my ~/.config/nixpkgs/config.nix

{
  services.teamviewer.enable = true;
}

I am not sure what else I need.

@jraygauthier
Copy link
Member

@isFakeAccount: Thanks, but this is clearly not the same issue.

@jraygauthier
Copy link
Member

Loading core dump with gdb gave me that:

$ coredumpctl gdb
           PID: 177727 (TeamViewer)
           UID: 1000 (my-user)
           GID: 100 (users)
        Signal: 11 (SEGV)
     Timestamp: Wed 2022-01-19 19:27:26 EST (2min 42s ago)
  Command Line: /nix/store/1r7x2yclq3xbfn6cg02b5fba2rmcvza5-teamviewer-15.22.3/share/teamviewer/tv_bin/TeamViewer
    Executable: /nix/store/1r7x2yclq3xbfn6cg02b5fba2rmcvza5-teamviewer-15.22.3/share/teamviewer/tv_bin/TeamViewer
 Control Group: /user.slice/user-1000.slice/session-2.scope
          Unit: session-2.scope
         Slice: user-1000.slice
       Session: 2
     Owner UID: 1000 (my-user)
       Boot ID: ddd0f8257ef643a7a4e9235234130f92
    Machine ID: 14a0c8436c784b45a8927f528521e17c
      Hostname: my-host
       Storage: /var/lib/systemd/coredump/core.TeamViewer.1000.ddd0f8257ef643a7a4e9235234130f92.177727.1642638446000000.lz4
       Message: Process 177727 (TeamViewer) of user 1000 dumped core.

GNU gdb (GDB) 10.2
# ,,
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/nix/store/jsp3h3wpzc842j0rz61m5ly71ak6qgdn-glibc-2.32-54/lib/libthread_db.so.1".
--Type <RET> for more, q to quit, c to continue without paging--
Core was generated by `/nix/store/1r7x2yclq3xbfn6cg02b5fba2rmcvza5-teamviewer-15.22.3/share/teamviewer'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000e396d0 in ?? ()
[Current thread is 1 (Thread 0x7fca967fc640 (LWP 177860))]
(gdb) bt
#0  0x0000000000e396d0 in ?? ()
#1  0x0000000000e77d71 in ?? ()
#2  0x0000000000e045de in ?? ()
#3  0x0000000000e01db6 in ?? ()
#4  0x0000000000dd34c1 in ?? ()
#5  0x0000000000d0487a in ?? ()
#6  0x000000000136398b in ?? ()
#7  0x00007fcb59caae9e in start_thread () from /nix/store/jsp3h3wpzc842j0rz61m5ly71ak6qgdn-glibc-2.32-54/lib/libpthread.so.0
#8  0x00007fcb59a994af in clone () from /nix/store/jsp3h3wpzc842j0rz61m5ly71ak6qgdn-glibc-2.32-54/lib/libc.so.6
(gdb)

@jraygauthier
Copy link
Member

A quick linux teamview libpthread start_thread crash google search lead me to the following:

  • TeamViewer 15.17.6 crash on Fedora 34 — TeamViewer Support

    This pretty much looks like the same issue. An excerpt:

    I'm having the same problem. The session is running only for 15-20
    seconds before TeamViewer crashes on the remote machine.

    As a workaround, I have cleaned up all TeamViewer files, downgraded
    TeamViewer to the version 15.13.6

    I've done fast bisecting and:

    • teamviewer-15.15.5-0.x86_64 - works
    • teamviewer-15.16.8-0.x86_64 - crash
    • teamviewer-15.17.6-0.x86_64 - crash

    Now I'm running teamviewer_15.19.3.x86_64.rpm. Under client there is
    option: Extras / Options / Remote control / Play computer sounds and
    music.

So a workaround would be to disable audio (yet to be tested here).

We can decide to revert back to 15.15.5 hoping federa user find the cause
for us or a newer version fixes the problem.

Alternatively we can attempt to investigate what is wrong with our packaging.

@jraygauthier
Copy link
Member

jraygauthier commented Jan 20, 2022

I confirm the audio disable workaround works fine.
Before establishing a connection, from the computer that connects to nixos (in my case the Windows computer) Uncheck the Extras -> Options -> Remote control -> Play computer sound and music checkbox:

image

It really needs to be disabled on the computer that connects and not on the target nixos.

@jraygauthier
Copy link
Member

jraygauthier commented Jan 20, 2022

The most logical culprit feature that has been added to 15.16.8 (and was not in 15.15.5) would be they started supporting hearing target linux audio from the connected computer:

[Linux] v15.16.8 — TeamViewer Support :

image

So the issue most likely is with the code that perform the sampling of this audio on the target nixos computer.

@tpwrules
Copy link
Contributor

I have this issue when connecting from 15.25.5 on Ubuntu 20.04 to 15.22.3 on NixOS.

The workaround of disabling the "Play computer sounds and music" checkbox stops the crashes for me.

@vegabook
Copy link

This issue is still happening for me before connecting to remote computer, so disabling remote audio will do nothing. I closed my issue on this above (#151784) because I think this issue covers it but I want to maintain that it's still basically not working if I want to control a remote Windows computer from Linux.

@jraygauthier
Copy link
Member

@vegabook : current issue should remain open as long as the audio issue / crash is not fixed at this root. The above is merely a workaround. Unfortunately, I do not have much time lately to invest here. Help is welcome.

still happening for me before connecting to remote computer

This seems odd, this workflow works fine here. There is certainly something different. Do you have more information?

@vegabook
Copy link

vegabook commented Apr 19, 2022

Well the only information I have is I've tried it on Ubuntu and on Steam Deck (Arch) with identical results. My original issue has all the tech details. #169040

Basically, segfaults as soon as launched.

@jraygauthier
Copy link
Member

@vegabook : It might not be the same cause for the segmentation fault then. You should re-open your ticket.

@vegabook
Copy link

@vegabook : It might not be the same cause for the segmentation fault then. You should re-open your ticket.

Hey @jraygauthier I can't seem to reopen it. Shall I copy it into a new open issue?

@jraygauthier
Copy link
Member

@vegabook : No trouble, I just re-opened it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

5 participants