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

Error launch in linux #163

Open
kronic opened this issue Sep 9, 2024 · 21 comments
Open

Error launch in linux #163

kronic opened this issue Sep 9, 2024 · 21 comments
Labels

Comments

@kronic
Copy link

kronic commented Sep 9, 2024

LaunchProcess: failed to execvp:
/home/kronic/Desktops/Desktop1/Test/CefGlueBrowserProcess/Xilium.CefGlue.BrowserProcess
[0909/134807.636500:ERROR:gpu_process_host.cc(992)] GPU process exited unexpectedly: exit_code=32512
LaunchProcess: failed to execvp:
/home/kronic/Desktops/Desktop1/Test/CefGlueBrowserProcess/Xilium.CefGlue.BrowserProcess
[0909/134807.653680:ERROR:gpu_process_host.cc(992)] GPU process exited unexpectedly: exit_code=32512
LaunchProcess: failed to execvp:
/home/kronic/Desktops/Desktop1/Test/CefGlueBrowserProcess/Xilium.CefGlue.BrowserProcess
[0909/134807.671287:ERROR:gpu_process_host.cc(992)] GPU process exited unexpectedly: exit_code=32512
LaunchProcess: failed to execvp:
/home/kronic/Desktops/Desktop1/Test/CefGlueBrowserProcess/Xilium.CefGlue.BrowserProcess
[0909/134807.702008:ERROR:gpu_process_host.cc(992)] GPU process exited unexpectedly: exit_code=32512
LaunchProcess: failed to execvp:
/home/kronic/Desktops/Desktop1/Test/CefGlueBrowserProcess/Xilium.CefGlue.BrowserProcess
[0909/134807.718619:ERROR:gpu_process_host.cc(992)] GPU process exited unexpectedly: exit_code=32512
LaunchProcess: failed to execvp:
/home/kronic/Desktops/Desktop1/Test/CefGlueBrowserProcess/Xilium.CefGlue.BrowserProcess
[0909/134807.736568:ERROR:gpu_process_host.cc(992)] GPU process exited unexpectedly: exit_code=32512
[0909/134807.736736:FATAL:gpu_data_manager_impl_private.cc(448)] GPU process isn't usable. Goodbye.
@puttys
Copy link

puttys commented Sep 13, 2024

I have same error on both ubuntu 24.04 and debian 12

@joaompneves
Copy link
Collaborator

@Haltroy can you help?

@Haltroy
Copy link
Contributor

Haltroy commented Sep 22, 2024

Never tried the NuGet package version (we used the demo app for our PR). I'll try but I need more than just this log (some system information like GPU name, distribution name and version etc.) so I can look at it properly.
Did some digging and the error code turns out to be custom so we cannot go forward without a proper log ((if this is the only log then can you show us how did you produced it?)).

@puttys
Copy link

puttys commented Sep 23, 2024

I doesn't use nuget , use the latest code , also tried Linux support (Final) #153 , but the same error occured .
I tested 2 platforms :
os : ubuntu 24.04 LTS
runtime : dotnet 8
cpu : Intel(R) Xeon(R) CPU E3-1226 v3 @ 3.30GHz
kernel : Linux 6.8.0-45-generic
gpu : VGA compatible controller: Intel Corporation Xeon E3-1200 v3 Processor Integrated Graphics Controller (rev 06)

os : Debian GNU/Linux 12 (bookworm)
runtime : dotnet 8
cpu : Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz
kernel : Linux 6.1.0-9-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.27-1 (2023-05-08) x86_64 GNU/Linux
gpu : 00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)

my error is :

MESA-INTEL: warning: Haswell Vulkan support is incomplete
[0923/105412.779529:WARNING:sandbox_linux.cc(400)] InitializeSandbox() called with multiple threads in process gpu-process.
Segmentation fault (core dumped)

@Haltroy
Copy link
Contributor

Haltroy commented Sep 23, 2024

Made a simple C# Avalonia project with nothing but a textbox (so I can navigate to a website) and the browser control (added to a panel right after the InitializeComponent(); line in the main constructor of the window). I don't see any issues so far. Will try that on a Debian VM.
AFAIK Debian with GNOME desktop environment always caused some different issues with CefGlue (I haven't figured that out yet).
And the Demo application is broken again (this time it's the libCEF that is missing and copying over it didn't do much nothing is visible).

@Haltroy
Copy link
Contributor

Haltroy commented Sep 23, 2024

OK I installed Debian 12 with GNOME and it gave this error:

libva error: /usr/lib/x86_64-linux-gnu/dri/virtio_gpu_drv_video.so init failed

I'm installing KDE Plasma next (to same machine) and will try other video options.
Also, any key input to Cef Browser causes it to crash without any log. This is just weird.

@Haltroy
Copy link
Contributor

Haltroy commented Sep 23, 2024

It did run on KDE Plasma but not on GNOME. Weird.
image

@Haltroy
Copy link
Contributor

Haltroy commented Sep 23, 2024

OK Switched to another video adapter. This time it did load on GNOME.
image

EDIT: Tried the failing adapter. Now it is working there too. My theory is that it is using something that GNOME doesn't implement (or at lest provide) but KDE does when it fails initializing GPU DRI driver. I'll figure out what its using.

EDIT 2: It uses llvmpipe as backup driver on both DEs now. I guess installing LLVM might fix it. The keyboard issue still persists and I have no idea how to fix that one up myself.

@puttys
Copy link

puttys commented Sep 23, 2024

I tested on kde on debian , it run like a charm, but failed with gnome .

@Haltroy
Copy link
Contributor

Haltroy commented Sep 23, 2024

GNOME is just weird. They have a different philosophy than other DEs. They only implement stuff that they are going to use and nothing else. This is a well known issue in the Linux community.
Also, Debian moves so slow on packages to be more stable and sometimes some stuff might not get backported (new feature or a fix getting implemented for an older version of a package, mostly security or critical bugs).
Other than just telling people to switch desktop environments (or distributions if newer drivers fixes the issue) is to keep your packages up-to-date and install LLVM (or something that provides that llvmpipe driver so it can fallback to there).
I'm working on that random crash (or crashes caused by keyboard) issue for now.

@redplane
Copy link

redplane commented Oct 4, 2024

Coming from this thread OutSystems/WebView#355.
@joaompneves , does it mean I need to install KDE instead of GNOME ?

@joaompneves
Copy link
Collaborator

Coming from this thread OutSystems/WebView#355. @joaompneves , does it mean I need to install KDE instead of GNOME ?

I'm not the linux expert here. Can't help on that matter.

@redplane
Copy link

redplane commented Oct 4, 2024

Is CEF different from Electron, since I can start the electron app on my Ubuntu machine, but CefGlue example cannot. If this is about chromium, electron should not be successful either.

@Haltroy
Copy link
Contributor

Haltroy commented Oct 4, 2024

Coming from this thread OutSystems/WebView#355. @joaompneves , does it mean I need to install KDE instead of GNOME ?

No, I just couldn't figure out why GNOME is doing this. It should work fine since anything that is Chrome/Chromium/CEF based works fine.

Is CEF different from Electron, since I can start the electron app on my Ubuntu machine, but CefGlue example cannot. If this is about chromium, electron should not be successful either.

Electron uses CEF. To keep is simple, every Electron app is like a tab on a Chromium website that happens to be the only tab to display. These issues are nothing to do about CEF or Electron. It's kinda our fault or something is not working as expected that I couldn't find it.

Looking at the error code. Looks like some of libraries are still not copied to the output of example app (or apps in this case since this repo's example app does the same thing too) for some reason using dotnet cli. As far as I know somehow my Rider installation is the only one who can build it properly and I haven't figured out why yet.

Anyways, your issue is different than this one. This is GPU process dying and yours is build process not copying the output files of libraries to the output of example app. This is a kinda known issue on here so try copying missing DLLs to the bin folder of example app and if the CefGlueBrowserProcess folder is missing in the example app copy it from BrowserProcess's bin folder.

If you still want to try out CefGlue on Avalonia my advice is to create a new clean Avalonia project and add CefGlue.Avalonia package there. Then just add the browser programmatically via code (not as inside the axaml file since Avalonia can't find a default constructor for it) (should be added to view right after InitializeComponent(); called) and it should work.

I'm still on process of finding the actual root cause of GPU crash issue while also figuring out how to build the example app properly using dotnet cli.

@Haltroy
Copy link
Contributor

Haltroy commented Oct 16, 2024

Just tested on an Arch VM (I had one laying around I kinda forgot why I made that VM) which bas just base (nothing was installed) so I installed GNOME into it and made a super basic app that creates AvaloniaCefBrowser and sets it as window's content. It worked without any issues.
It's just the combination of GNOME and Debian systems that causes this for no reason and after trying some time it just fixes itself.
At first I thought it might be the X11 library name that's causing the issue but checking package contents in Ubuntu and Debian shows that the library name is right (we used libX11.so.6 which I though ti would be different like libX11.so.[some other number]). This was one of the reasons why CefNet couldn't load libCEF properly.

TL;DL I have no idea what's causing it and issue fixes itself out of nowhere but I'm not giving up on that yet.

@kronic
Copy link
Author

kronic commented Oct 16, 2024

I have an error in astra linux

@Haltroy
Copy link
Contributor

Haltroy commented Oct 16, 2024

I have an error in astra linux

OK so whats the issue? What's it saying? Same log or something different this time?

Also if you are running the example app make sure that required DLLs are copied to the bin folder. Sometimes dotnet CLI can't copy them I have no idea why (IMO everything is set up correctly in the solution).

I though the link was logs from an astralinux machine but nope that's just straight up the whole installation ISO of astralinux.

@kronic
Copy link
Author

kronic commented Oct 16, 2024

This is the console output when running the example, see message 1. The libraries are all in place.

@Haltroy
Copy link
Contributor

Haltroy commented Nov 3, 2024

Cannot produce the issue despite using the distro mentioned.
resim

I took me some time (5GB ISO is kind a huge for my dorm Wi-Fi, also it's wiki is in Russian and have no English translations and the .NET guide on the wiki doesn't work so I just used Microsoft's Debian installation guide instead). But I managed to make the exact same example app using nothing but a simple Avalonia app and the CefGlue.Avalonia package.

I guess this is an issue with your graphics card. Try setting "disable-gpu" in your CefSettings or use WindowlessRender (OSR) mode instead and make sure it is running properly and the drivers are up-to-date (if using a proprietary driver like Nvidia). Also try out other distributions if possible (sometimes Debian forks can have bad packaging practices -cough LTT's linux challenge- which explains why there's no dotnet packages in the repos despite AstraLinux wiki claiming that there is).

@mr-migre
Copy link

This is the console output when running the example, see message 1. The libraries are all in place.

Hello there! I`ve also Astra Linux and had same problem.
If you are tried to start CEF Browser(or Xilium.CefGlue.BrowserProcess) from or inside other application - you have to made
chmod +x path/to/CEF/browser_in_yourApp/
in my case it was /MyApp/CefGlueBrowserProcess/Xilium.CefGlue.BrowserProcess
so chmod +x /MyApp/CefGlueBrowserProcess/Xilium.CefGlue.BrowserProcess after install App and you will see magic ))

@Haltroy
Copy link
Contributor

Haltroy commented Nov 29, 2024

So I guess this issue solved itself. (Except the Example app deciding to not copy stuff randomly at build sometimes and debuggers aren't working on the Example app).

The executable flag getting removed might be because NuGet packages are basically ZIP files which doesn't store Unix codes (such as executable flags). There's nothing we can do on that part aside form just telling the dotnet to re-mark the BrowserProcess executable as executable on Linux.

Also for AstraLinux users: If the AstraLinux's .NET didn't work just use the Debian instructions for installing .NET on official Microsoft. That's how I got it working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants