MeshAgent icon indicating copy to clipboard operation
MeshAgent copied to clipboard

Linux desktop connection problem

Open heldner opened this issue 1 year ago • 10 comments

Hello! I have a problem with desktop connection to linux machines. Meshagent regulary segfaults after consentpromise resolved. To reproduce:

  1. In browser push connect button
  2. In xorg session press 'Yes' in consentpromise window
  3. Meshagent segfaults. I'm added some logs and have this messages:
notifybar-desktop run child: require('notifybar-desktop')('Sharing desktop with: Stanislav Korolev').on('close', function(){process.exit();});
forked child with pid: 409757
kvm_consentpromise_resolved: WS after null // before return of function kvm_consentpromise_resolved(always) in meshcore.js

[2024-04-04 04:23:31 PM] [A3B011846D2E56B8] microstack/ILibParsers.c:2891 (0,0) ** CRASH **
/lib/x86_64-linux-gnu/libc.so.6(+0x37860) [0x73c2fb943860]                                                                                                                                     
./meshagent() [0x433b9f]                                                             
./meshagent() [0x433fdb]                                                                       
=> /build/microstack/ILibProcessPipe.c:454                                                     
./meshagent() [0x4ed9a1]                                                                       
./meshagent() [0x47780b]                                                                                                                                                                       
./meshagent() [0x477bd8]                       
./meshagent() [0x43ab3e]                                                                                                                                                                       
./meshagent() [0x477c7f]                                                                       
./meshagent() [0x478099]                                                                       
./meshagent() [0x43ad9f]                       
./meshagent() [0x43abb6]                                                                       
./meshagent() [0x43abdd]                                                                                                                                                                       
./meshagent() [0x4cbd2c]                                                                                                                                                                       
=> /build/microscript/ILibduktape_EventEmitter.c:280                                           
./meshagent() [0x47780b]                                                                                                                                                                       
./meshagent() [0x477bd8]                                                                                                                                                                       
=> /build/duk_js_call.c:2423                                                                                                                                                                   
./meshagent() [0x43ab3e]                                                                                                                                                                       
=> /build/duk_api_call.c:223                                                                                                                                                                   
./meshagent() [0x477c7f]                                                                                                                                                                       
./meshagent() [0x478099]                                                                                                                                                                       
=> /build/duk_js_call.c:2720                   
./meshagent() [0x43ad9f]                       
./meshagent() [0x43abb6]                                                                       
./meshagent() [0x43abdd]                                                                       
=> /build/duk_api_call.c:249                                                                   
./meshagent() [0x4e249d]                       
./meshagent() [0x47780b]                                                                                                                                                                       
./meshagent() [0x477bd8]                       
./meshagent() [0x43ab3e]                                                                                                                                                                       
./meshagent() [0x477c7f]                       
./meshagent() [0x478099]                                                                       
./meshagent() [0x43ad9f]                       
./meshagent() [0x43abb6]                                                                       
./meshagent() [0x43abdd]                                                                       
./meshagent() [0x4d63b0]                       
=> /build/microscript/ILibDuktape_Polyfills.c:1205                                             
./meshagent() [0x419590]                                                                       
./meshagent() [0x411d27]                       
./meshagent() [0x52cba4]                       
=> /build/meshcore/agentcore.c:6174            
./meshagent() [0x52ea49]                       
=> /build/meshconsole/main.c:383 (discriminator 1)                                             
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x73c2fb93009b]                       
./meshagent() [0x404e5a]  

At this time I see small window notifybar-desktop, and agent is not starting with message:

Unable to open database (1/10)...

I'm tried to enable debug logs with these instructions, without success:

MeshAgent run
MeshAgent dbTool.js list

Forcing Core version from Cmdline

    Download meschore.js and rename to CoreModule.js and put it alongside MeshAgent.exe
    Stop MeshAgent service
    Run MeshAgent.exe dbTool.js import CoreModule

Please help with this bug?

heldner avatar Apr 04 '24 07:04 heldner

I will have a look later today/2moz for u on this, Plz can u follow the bug template report in the future as it has information that I need to help replicate the issue

si458 avatar Apr 04 '24 07:04 si458

Not a problem. Can you, please, provide bug template?

heldner avatar Apr 04 '24 08:04 heldner

@heldner when u open an issue select bug report and all information is in there

si458 avatar Apr 04 '24 09:04 si458

This problem reproduced only when message-box, in my case it's zenity, runs with non-ascii symbols. With ascii it's working fine.

heldner avatar Apr 05 '24 17:04 heldner

In this moment zenity fails with code 255, when title or caption passed in cyrillic. Code goes to next invocation of zenity and sometimes it works and all goes fine, or it fails as I mentioned above. If title and caption defined in english all working fine. https://github.com/Ylianst/MeshAgent/blob/17a37ea4a698a84b21cab6a85bdb9d736b929d57/modules/message-box.js#L404

heldner avatar Apr 08 '24 11:04 heldner

@si458 is it possible to fix it?

heldner avatar Apr 17 '24 16:04 heldner

Sorry I've not had chance to look at it, won't have chance until weekend now, but will try my best!

Can u share what node version, meshcentral version, server os running meshcentral you are on?

Also share what the remote OS and architecture it is?

You didn't follow the bug template originally which has all this information asked for so I can try and replicate the issue

si458 avatar Apr 17 '24 17:04 si458

Hello @si458 ! Here is my versions:

$ node --version
v20.11.1
$ lsb_release -d
Description:	Debian GNU/Linux 11 (bullseye)
$ npm list | grep mesh
meshcentral@ /opt/meshcentral
├── [email protected]

heldner avatar May 17 '24 07:05 heldner

Thanks @heldner

Is the remote computers OS the debian 11 or the server running meshcentral thats debain 11?

Is it x64 or arm64? Server/computer or Raspberry Pi?

si458 avatar May 17 '24 07:05 si458

Both server and client are on debian 11. All of them on x64 architecture.

heldner avatar Jun 26 '24 07:06 heldner