IPC with 32/64 bit communication

Having problems with building or using the JCEF Java binding? Ask your questions here.

IPC with 32/64 bit communication

Postby Phylanx » Wed Nov 25, 2020 2:51 am

Hi!

One of our customers reported a crash of a renderer sub process with exit code "0xe0000008" that means an "out of memory" as I understand it.
We checked the customers environment and it seems that there should be enough physical and virtual memory available.
We also could reproduce it in dev environment with loads of memory physically and virtually available.

We run jcef in 32 bit mode, windowed rendering.
Customer has 3325 installed but we could reproduce it internally with newest 4147 too.

Long story short now my question (and I know that different architectures can't be loaded in the same process):
Is it in any way possible to start the main process in 32 bit mode (the java.exe) and all sub processes in 64 bit mode?
Phylanx
Expert
 
Posts: 153
Joined: Thu Aug 11, 2016 8:17 am

Re: IPC with 32/64 bit communication

Postby magreenblatt » Wed Nov 25, 2020 10:20 am

Is it in any way possible to start the main process in 32 bit mode (the java.exe) and all sub processes in 64 bit mode?

Why not just use a 64-bit JVM if the host system is 64-bit?
magreenblatt
Site Admin
 
Posts: 11083
Joined: Fri May 29, 2009 6:57 pm

Re: IPC with 32/64 bit communication

Postby Phylanx » Thu Nov 26, 2020 2:10 am

because all the rest of the application is still only 32bit.
We have other third party libraries and dependencies that limit us to 32bit.

We estimated an analysis of what we have to do to run our application with 64 bit.
only the analysis alone is estimated with about 50 PDs and then we didn't even start with the implementation ^^.


Or another idea:
Is it possible to run java in 32bit and let everything jcef native specific run in a 64 bit process?
that would fix a lot of problems for us!
Phylanx
Expert
 
Posts: 153
Joined: Thu Aug 11, 2016 8:17 am

Re: IPC with 32/64 bit communication

Postby Phylanx » Thu Nov 26, 2020 8:32 am

Another question...
Somewhere else i read about the LARGE ADDRESS AWARE linker option.
I checked it and this option is set on the jcef_helper project that I opened in Visual Studio.
Also the resulting jcef_helper.exe has the flag set (can be checked with the "dumpbin /headers" statement).

But in memory analysis (e.g. with VMMap) there is a huge 2GB area of free unfragmented and unused memory.
Is there something that we have to set on the environment or elsewhere to ensure that this memory can be used too?
Phylanx
Expert
 
Posts: 153
Joined: Thu Aug 11, 2016 8:17 am

Re: IPC with 32/64 bit communication

Postby magreenblatt » Thu Nov 26, 2020 1:18 pm

There is no supported way to mix 32-bit and 64-bit executables in the same JCEF installation. If you’re running out of memory with 32-bit and /LARGEADDRESSAWARE then your only options are to (a) fix the excessive memory usage in your HTML/JS code, or (b) use 64-bit executables. I suggest you look into (a) since if you’re already hitting the 3GB limit then there’s no reason to think you won’t also exhaust available system memory with a 64-bit build at some point, due to whatever unresolved memory issue is currently causing you problems.
magreenblatt
Site Admin
 
Posts: 11083
Joined: Fri May 29, 2009 6:57 pm

Re: IPC with 32/64 bit communication

Postby Phylanx » Fri Nov 27, 2020 2:30 am

ok, i guess we'll have to fix the memory usage.

our usecase is the following:
one of our departments uses pdf.js for rendering PDFs (e.g. for creating a per site preview) and that's extremely memory intense.
A 20MB PDF with some graphics in it results in a 400MB memory usage on the renderer process.

We found out that a newer pdf.js version reduces that amount of memory to about 100MB, so that would work.
Unfortunatly this newer pdf.js version requires at least chrome version 74 (or 76) due to the used ES-standard.
currently we use version 64 (3325) but are upgrading to 4147.

I hope we can find an organisational solution for this specific case until we have implemented both version upgrades.
Phylanx
Expert
 
Posts: 153
Joined: Thu Aug 11, 2016 8:17 am

Re: IPC with 32/64 bit communication

Postby Phylanx » Fri Nov 27, 2020 2:36 am

But still.
I fear that the LARGEADDRESSAWARE doesn't work.
In my memory analysis with VMMap we had memory crashes even with 2GB of free memory in the process memory map (the 2 GB in an untouched state, all addresses in the second half of the memory) and also physical and virtual memory are widely not fully used.
Also we worked on a physical machine, no Citrix/VM/... environment where the usable memory is limited by a invisible manager.

Could you check this on one of your test environments please?
Phylanx
Expert
 
Posts: 153
Joined: Thu Aug 11, 2016 8:17 am

Re: IPC with 32/64 bit communication

Postby amaitland » Fri Nov 27, 2020 6:55 am

Try increasing the js heap size?
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1010
Joined: Wed Jan 14, 2015 2:35 am

Re: IPC with 32/64 bit communication

Postby Phylanx » Fri Nov 27, 2020 9:42 am

OK, we have breaking news :-)

We tried the "new" jcef version (4147) in combination with pdf.js version 2.5 (newest stable).
The behavior was much better.

At first, the new pdf.js needs way less memory, but still the native memory fragmentation causes more and more memory to be taken as the big heap blocks can't be collected.
So we would run into an out of memory in a unreasonable time.

BUT (and that's the nice point):
The new JCEF version 4147 seems to handle the other 2GB memory that was unused by version 3325.
Was there any relevant change in between?

Or can it be that the LargeAddressAware is on runtime only enabled in some circumstances? (eg admin rights, special user settings,...).
We had different users in the testing progress.

//EDIT:
After retrying the old version seems to also use the unused memory.
Might be this is a os user setting? We'll retest this on monday!

@amaitland:
how can we increase the JS heap size if we would want to?
Phylanx
Expert
 
Posts: 153
Joined: Thu Aug 11, 2016 8:17 am

Re: IPC with 32/64 bit communication

Postby amaitland » Fri Nov 27, 2020 2:33 pm

Search for chrome increase js heap size

Just try passing the values in on the command line first, not sure on the JCEF specifics.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1010
Joined: Wed Jan 14, 2015 2:35 am

Next

Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 4 guests