MeshAgent icon indicating copy to clipboard operation
MeshAgent copied to clipboard

KVM child process has unexpectedly exited

Open devenvtest opened this issue 2 years ago β€’ 21 comments

The version of the software you are using --- How to get the version of mesh agent?

npm view meshcentral version 1.0.12

The Operating System and version  --- 

Distributor ID: Ubuntu Description: Ubuntu 18.04.6 LTS Release: 18.04 Codename: bionic

The observed output -- 

image

The expected output --

Desktop login page Any troubleshooting you took to resolve the issue yourself I have display manger as: /usr/sbin/gdm3

For lightdm, I see the solution mentioned is Open /etc/lightdm/lightdm.conf Uncomment the following line from the [LightDM] section:

user-authority-in-system-dir=false

but when I switched to lightdm I dont see /etc/lightdm/lightdm.conf file. In gdm3 I have tried the below solution, although I dont have error related to Xauthority

Open /etc/gdm/custom.conf or /etc/gdm3/custom.conf
Uncomment: WaylandEnable=false.
Add the following line to the [daemon] section:

DefaultSession=gnome-xorg.desktop

This is the meshagent.log image

devenvtest avatar Apr 25 '22 07:04 devenvtest

Did it generate a .core file? Are you running an Nvidia graphics driver.

krayon007 avatar Apr 25 '22 08:04 krayon007

I assume you restarted the display manager after modifying the conf file?

krayon007 avatar Apr 25 '22 08:04 krayon007

I'm getting this too. Fresh OpenSuse Tumbleweed install with Xorg and KDE in a qemu/libvirt virtual machine.

I've tried changing the video card types from virtio, vga, qxl to no effect.

It can see the sddm login, but as soon as a user logs in, I just get this error.

Nothing useful in dmesg, or journal.

So, I've got a different distro, "hardware", display manager, and desktop environment.

Probably got to do with xauthority. I was just able to connect after running xhost +local:

DomingoMontoya avatar Dec 12 '22 21:12 DomingoMontoya

Do you have more than one DM installed? I have a few different OpenSuse installations. Let me install tumbleweed and see if anything changed, as mine are older.

krayon007 avatar Dec 12 '22 22:12 krayon007

No, just KDE.

DomingoMontoya avatar Dec 12 '22 22:12 DomingoMontoya

Hello. Same here, but my client is using Manjaro (Arch linux based). LX-Qt as desktop and NVIDIA proprietary driver.

Any clue for this? Any file or info I can attach to help to resolve this?

friki67 avatar Jan 29 '23 09:01 friki67

Hello, is there a solution for this problem? I'm using Opensuse 15.4 with XFCE. ./meshagent -info Compiled on: 14:58:52, Nov 21 2022 Commit Hash: 650667126c2df73961de2f478ec6b0923fb17dcd Commit Date: 2022-Nov-2 23:01:45-0700 Using OpenSSL 1.1.1s 1 Nov 2022 Agent ARCHID: 6 Detected OS: openSUSE Leap 15.4 - x64

If nobody is logged in, I can connect, but when logging in, i'm disconnected from the session and I'm unable to reconnect.

error

Cientrax avatar Apr 12 '23 08:04 Cientrax

I just quick fixed it on mine, because I only need access for one user. I wrote a script (~/.local/bin/xhost.sh) and have kde autostart it.

Other options (for all users) would be to create a .desktop file for /etc/xdg/autostart, or put it in sddm scripts, or xorgs xinit.

#!/bin/sh
xhost +local:

should allow all local users (including the meshagent) to control the x server.

DomingoMontoya avatar Apr 12 '23 12:04 DomingoMontoya

I just quick fixed it on mine, because I only need access for one user. I wrote a script (~/.local/bin/xhost.sh) and have kde autostart it.

Other options (for all users) would be to create a .desktop file for /etc/xdg/autostart, or put it in sddm scripts, or xorgs xinit.

#!/bin/sh
xhost +local:

should allow all local users (including the meshagent) to control the x server.

Thank you, this worked for me to.

Cientrax avatar Apr 13 '23 10:04 Cientrax

I just quick fixed it on mine, because I only need access for one user. I wrote a script (~/.local/bin/xhost.sh) and have kde autostart it.

It works for me too, but I would rather avoid workarounds.

artemklevtsov avatar Jul 25 '23 18:07 artemklevtsov

I tried to add --slaveKvmLog="1" to the meshagent command in the meshagent.service. Now I see in the /tmp/slave:

But XAUTHORITY env variable contains /tmp/xauth_pDCTFZ and /home/unikum/.Xauthority does not exists.

~ via πŸ“ v4.3.1 took 2m12s 
πŸ•™[ 11:01:13 ] ❌255 ❯ cat /tmp/slave 
SLAVE/KVM CoreDumps DISABLED
Checking $DISPLAY
ENV[DISPLAY] = 0
Before kvm_init(0).
kvm_init(0) called
XAUTHORITY is /home/unikum/.Xauthority
DisplayString is :0
XOpenDisplay(:0) failed, using XAUTHORITY: /home/unikum/.Xauthority

~ via πŸ“ v4.3.1 
πŸ•™[ 11:03:33 ] ❯ echo $XAUTHORITY
/tmp/xauth_cOElTE

From the man sddm.conf:

The XauthPath= option is no longer necessary, libxau is used instead.

The UserAuthFile= option was removed, the file is always created as /tmp/xauth_XXXXX. This is necessary for to the use of FamilyWild entries.

Related SSDM issue: https://github.com/sddm/sddm/issues/1621

artemklevtsov avatar Jul 25 '23 18:07 artemklevtsov

Hi @Ylianst, We have the following configugration in our environment: Meshcentral [server] version - 1.1.14

Agent installed to Linux with the following VM configuration [ALT Workstation 10.0 (Autolycus)]: image

Device group contains the following settings: Desktop: notify user - false Prompt for user consent - false Show connection toolbar - true

When I try to connect to Desktop, I will receive the similar error: KVM child process has unexpectedly exited.

The logs from the agent:

[2023-11-20 09:31:45 AM] [434BF98C5D4F394C] microstack/ILibParsers.c:2872 (0,0) ** CRASH ** /lib64/libc.so.6(+0x3d410) [0x7f8979d0b410] /usr/local/mesh_services/meshagent/meshagent() [0x4c2bd8] /usr/local/mesh_services/meshagent/meshagent() [0x420e93] /usr/local/mesh_services/meshagent/meshagent() [0x41f2a5] /usr/local/mesh_services/meshagent/meshagent() [0x4cac67] /usr/local/mesh_services/meshagent/meshagent() [0x4d4601] /lib64/libc.so.6(__libc_start_main+0xcd) [0x7f8979cf5e3d] /usr/local/mesh_services/meshagent/meshagent() [0x40dc11]

I tried to use the commands proposed in the thread ( xhost +local: ) with no luck.

Could you please help with fixing the issue?

SerenaOg avatar Nov 20 '23 06:11 SerenaOg

This is specific to the Linux workstation. What Linux distribution and version are you running? What display manager are you using? Is it X11, Wayland or something else? Do you have problems connecting at first boot before someone logs on? What about if someone is already logged in?

I tried to use the commands proposed in the thread ( xhost +local: ) with no luck.

Where did you put this? The comments above mention a couple of different locations, one of which depends on using KDE as the DE. What desktop manager are you using? If you login to the desktop, start a shell and enter that command, can you connect from Mesh?

NiceGuyIT avatar Nov 20 '23 15:11 NiceGuyIT

Here is a list of "KVM Child process has unexpectedly exited" issues for cross referencing.

  • Ylianst/MeshAgent#135 - One solution
  • Ylianst/MeshCentral#602 - Probably the best "global" issue.
  • Ylianst/MeshCentral#3114 - Change of resolution causes problems when logging in. Explanation and troubleshooting.
  • Ylianst/MeshCentral#3170 - Resolved. Needs to be added to docs.
  • Ylianst/MeshCentral#4739 - Should be closed in favor of one of the others. Not enough info and no troubleshooting.
  • Ylianst/MeshCentral#4933 - MeshAgent inside Docker.
  • Ylianst/MeshCentral#4996 - MeshAgent inside Docker. Solution is to build and deploy agent from GitHub.

NiceGuyIT avatar Nov 26 '23 09:11 NiceGuyIT

What Linux distribution and version are you running?

it's Alt Linux version 10.0, this distributive is based on Mandrake and Red Hat.

What display manager are you using? Is it X11, Wayland or something else?

It’s LightDM - This is a screen manager for X Window System X11, Wayland, etc.

Do you have problems connecting at first boot before someone logs on? What about if someone is already logged in?

Yes, I have the similar problem for both cases. The error message "KVM Child process has unexpectedly exited" appears to me in both scenarios: when no users are logged (after restart VM) and when the user is logged in to session. I tried to change settings for device group: Desktop:Notify user=false/true, Desktop:Prompt for user consent=false/true. There are no request messages appeared to user in session for both scenarios.

---- The command ( xhost +local: ) Where did you put this? The comments above mention a couple of different locations, one of which depends on using KDE as the DE. What desktop manager are you using? If you login to the desktop, start a shell and enter that command, can you connect from Mesh?

I opened terminal and run the command from current location with sudo and without. The command successfully completed, but I cannot connect to the session from Mesh.

The application xRDP was installed to this VM previously. This application uses TCP:3389 port. I tried to make the test with uninstallation xRDP. After completing the uninstallation and restarting the VM, Mesh could connect to session. The rest question left for clarification, is the any conflict between MeshAgent and xRDP in Linux?

SerenaOg avatar Nov 27 '23 07:11 SerenaOg