Ylianst/MeshAgent

Linux desktop connection problem

Opened this issue · 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?

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

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

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

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

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.

ret.child = require('child_process').execFile(this.zenity.path, parms, { uid: uid, env: { XAUTHORITY: xinfo.xauthority ? xinfo.xauthority : "", DISPLAY: xinfo.display } });

@si458 is it possible to fix it?

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

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
├── meshcentral@1.1.21

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?

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