WebKit exits Eclipse JVM if process forking fails due to memory availability.
Issue
When Eclipse JVM is configured to use 30% or more of the total available system memory as its max heap size(-Xmx and -Xms) process forking can encounter a situation where the forked process incorrectly attempts to reserve as much memory as the parent process. In this state there is insufficient memory available to successfully fork, resulting in the following error:
Unable to fork a new child process: Failed to fork (Cannot allocate memory)
Resulting in a dump with the backtrace:
#0 0x00007fff6cad8b11 in _g_log_abort () at /lib64/libglib-2.0.so.0
#1 0x00007fff6cad9e32 in g_logv () at /lib64/libglib-2.0.so.0
#2 0x00007fff6cad9f9f in g_log () at /lib64/libglib-2.0.so.0
#3 0x00007fff2da4aa75 in WebKit::ProcessLauncher::launchProcess() () at /lib64/libwebkit2gtk-4.0.so.37
#4 0x00007fff2d8d8d10 in WebKit::AuxiliaryProcessProxy::connect() () at /lib64/libwebkit2gtk-4.0.so.37
#5 0x00007fff2d9383c8 in WebKit::WebProcessProxy::create(WebKit::WebProcessPool&, WebKit::WebsiteDataStore*, WebKit::WebProcessProxy::IsPrewarmed, WebKit::WebProcessProxy::ShouldLaunchProcess) () at /lib64/libwebkit2gtk-4.0.so.37
#6 0x00007fff2d956a0e in WebKit::WebProcessPool::createNewWebProcess(WebKit::WebsiteDataStore*, WebKit::WebProcessProxy::IsPrewarmed) () at /lib64/libwebkit2gtk-4.0.so.37
#7 0x00007fff2d957025 in WebKit::WebProcessPool::processForRegistrableDomain(WebKit::WebsiteDataStore&, WebKit::WebPageProxy*, WebCore::RegistrableDomain const&) ()
at /lib64/libwebkit2gtk-4.0.so.37
#8 0x00007fff2d957171 in WebKit::WebPageProxy::launchProcess(WebCore::RegistrableDomain const&, WebKit::WebPageProxy::ProcessLaunchReason) ()
at /lib64/libwebkit2gtk-4.0.so.37
#9 0x00007fff2d95a833 in WebKit::WebPageProxy::loadData(IPC::DataReference const&, WTF::String const&, WTF::String const&, WTF::String const&, API::Object*, WebCore::ShouldOpenExternalURLsPolicy) () at /lib64/libwebkit2gtk-4.0.so.37
#10 0x00007fff2d9f56be in webkit_web_view_load_html () at /lib64/libwebkit2gtk-4.0.so.37
#11 0x00007fff323f558a in ()
#12 0x0000000700000008 in ()
#13 0x00007fff354fddc0 in ()
#14 0x00007ffff455eff0 in ()
#15 0x0000000000000000 in ()
Environment
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Eclipse
- GNOME Desktop
- webkit2gtk
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.