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

v40 not working at all #21

Closed
veyselerden opened this issue Mar 28, 2021 · 39 comments
Closed

v40 not working at all #21

veyselerden opened this issue Mar 28, 2021 · 39 comments

Comments

@veyselerden
Copy link

2021-03-28 20-19-32 ekran görüntüsü

On both elementary OS 5.1 and 6 it stays like this but idk if it's anything with the elementary OS or the flatpak version itself.

Terminal output:
`(epiphany:2): epiphany-WARNING **: 20:20:43.138: Web process crashed
flatpak-spawn: Invalid byte sequence in conversion input
Try "flatpak-spawn --help" for more information.

Note that the directories

'/var/lib/flatpak/exports/share'
'/home/veysel/.var/app/org.gnome.Epiphany/data/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.

error: app/org.gnome.Epiphany/x86_64/stable (commit 32b86d07919232c5c0fd18449eaa8dd6a33a97c3e6a050703bf097228dde9a33) not installed`

@mcatanzaro
Copy link
Collaborator

Please post a backtrace for the web process crash (flatpak-coredumpctl org.gnome.Epiphany).

Since elementary does not have coredumpctl working by default, you'll have to research how to get that working.

@veyselerden
Copy link
Author

Isn't this a problem for you right now? Then it must be something with the elementary devs should solve. This makes this issue unfunctional. Closing it then.

BTW I couldn't get to have an output, i've installed debug package for org.gnome.Epiphany too but it gives this:
Traceback (most recent call last): File "flatpak-coredumpctl", line 83, in <module> coredumper.run() File "flatpak-coredumpctl", line 44, in run subprocess.check_call(["coredumpctl", "dump"] + shlex.split(self.coredumpctl_matches), File "/usr/lib/python3.8/subprocess.py", line 364, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['coredumpctl', 'dump']' returned non-zero exit status 1.

@monreal
Copy link

monreal commented Apr 4, 2021

Looks like I am getting the same crash on Fedora 34 (beta).

@monreal
Copy link

monreal commented Apr 4, 2021

$ flatpak-coredumpctl org.gnome.Epiphany
Executable /app/bin/epiphany doesn't seem to be a flatpaked application.
Running: "flatpak" "run" "--filesystem=home" "--filesystem=/tmp" "--command=gdb" "--devel" "org.gnome.Epiphany" "/app/bin/epiphany" "/tmp/tmpl94japx_"
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /app/bin/epiphany...
(No debugging symbols found in /app/bin/epiphany)
[New LWP 2]
[New LWP 12]
[New LWP 18]
[New LWP 13]
[New LWP 6]
[New LWP 9]
[New LWP 4]
[New LWP 11]
[New LWP 14]
[New LWP 15]
[New LWP 16]
[New LWP 10]
[New LWP 25]
[New LWP 3]
[New LWP 5]
[New LWP 7]
[New LWP 24]
[New LWP 30]
[New LWP 56]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/x86_64-linux-gnu/libthread_db.so.1".
--Type for more, q to quit, c to continue without paging--
Core was generated by `epiphany'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007fb8e796a2ac in ____strtoll_l_internal ()
from /usr/lib/x86_64-linux-gnu/libc.so.6
[Current thread is 1 (Thread 0x7fb8ddbf9bc0 (LWP 2))]
(gdb) bt
#0 0x00007fb8e796a2ac in ____strtoll_l_internal ()
at /usr/lib/x86_64-linux-gnu/libc.so.6
#1 0x00007fb8e466d304 in WebKit::ProcessLauncher::launchProcess() ()
at /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37
#2 0x00007fb8e44ef373 in WebKit::AuxiliaryProcessProxy::connect() ()
at /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37
#3 0x00007fb8e457d608 in WebKit::WebProcessProxy::create(WebKit::WebProcessPool&, WebKit::WebsiteDataStore*, WebKit::WebProcessProxy::IsPrewarmed, WebKit::WebProcessProxy::ShouldLaunchProcess) ()
at /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37
#4 0x00007fb8e4589dfe in WebKit::WebProcessPool::createNewWebProcess(WebKit::WebsiteDataStore*, WebKit::WebProcessProxy::IsPrewarmed) ()
at /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37
#5 0x00007fb8e455088a in WebKit::WebPageProxy::launchProcess(WebCore::RegistrableDomain const&, WebKit::WebPageProxy::ProcessLaunchReason) ()
at /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37
#6 0x00007fb8e4552c5a in WebKit::WebPageProxy::loadAlternateHTML(IPC::ArrayReference<unsigned char, 18446744073709551615ul> const&, WTF::String const&, WTF::URL const&, WTF::URL const&, API::Object*) ()
at /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37
#7 0x00007fb8e461199e in webkit_web_view_load_alternate_html ()
at /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37
#8 0x00007fb8e892b620 in ephy_web_view_load_error_page ()
at /app/lib/epiphany/libephymain.so
#9 0x00007fb8e7dbbf3f in g_closure_invoke ()
at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
--Type for more, q to quit, c to continue without paging-- c
#10 0x00007fb8e7dced4b in signal_emit_unlocked_R.isra.0 () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00007fb8e7dd5861 in g_signal_emit_valist () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x00007fb8e7dd59c3 in g_signal_emit () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#13 0x00007fb8e45ec78e in NavigationClient::processDidTerminate(WebKit::WebPageProxy&, WebKit::ProcessTerminationReason) () at /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37
#14 0x00007fb8e4554e9f in WebKit::WebPageProxy::dispatchProcessDidTerminate(WebKit::ProcessTerminationReason) () at /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37
#15 0x00007fb8e45839d8 in WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch(WebKit::ProcessTerminationReason) () at /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37
#16 0x00007fb8e446d483 in WTF::Detail::CallableWrapper<IPC::Connection::connectionDidClose()::{lambda()#1}, void>::call() () at /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37
#17 0x00007fb8e370c6f3 in WTF::RunLoop::performWork() () at /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-4.0.so.18
#18 0x00007fb8e375cf5d in WTF::RunLoop::RunLoop()::{lambda(void*)#1}::_FUN(void*) () at /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-4.0.so.18
#19 0x00007fb8e375d883 in WTF::RunLoop::{lambda(_GSource*, int ()(void), void*)#1}::_FUN(_GSource*, int ()(void), void*) () at /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-4.0.so.18
#20 0x00007fb8e7cc4dbf in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007fb8e7cc5168 in g_main_context_iterate.constprop () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007fb8e7cc5233 in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007fb8e7eef66d in g_application_run () at /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#24 0x000056081e3b70bc in ()
#25 0x00007fb8e7950062 in __libc_start_main () at /usr/lib/x86_64-linux-gnu/libc.so.6
#26 0x000056081e3b739e in ()

@mcatanzaro
Copy link
Collaborator

mcatanzaro commented Apr 4, 2021

Well you're missing debuginfo. Can you please run flatpak install org.gnome.Epiphany.Debug org.gnome.Sdk.Debug//40, then flatpak update, then try again? That will show us which line of code is crashing. This time, use bt full instead of plain bt so I can see the stack variables.

@mcatanzaro mcatanzaro reopened this Apr 4, 2021
@mcatanzaro
Copy link
Collaborator

I think what's happening is the web process crashes immediately after it is launched. GSubprocess notices, g_subprocess_get_identifier() returns nullptr, and then the UI process crashes when passing that to g_ascii_strtoll(). The UI process should crash if the web process crashes on startup, but it should crash better, with an assert rather than a null pointer dereference.

To get a backtrace for the web process crash, look up the pid of the crashing web process using coredumpctl -- it will probably be listed immediately before the UI process crash at the bottom of the coredumpctl output -- then run use flatpak-coredumpctl org.gnome.Epiphany -m PID to get it in gdb.

@monreal
Copy link

monreal commented Apr 4, 2021

Well, I installed all the packages now and now get this:

flatpak-coredumpctl org.gnome.Epiphany
Executable /app/bin/epiphany doesn't seem to be a flatpaked application.
Running: "flatpak" "run" "--filesystem=home" "--filesystem=/tmp" "--command=gdb" "--devel" "org.gnome.Epiphany" "/app/bin/epiphany" "/tmp/tmpors_u7ni"
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /app/bin/epiphany...
Reading symbols from /usr/lib/debug//app/bin/epiphany.debug...
[New LWP 2]
[New LWP 12]
[New LWP 18]
[New LWP 13]
[New LWP 6]
[New LWP 9]
[New LWP 4]
[New LWP 11]
[New LWP 14]
[New LWP 15]
[New LWP 16]
[New LWP 10]
[New LWP 25]
[New LWP 3]
[New LWP 5]
[New LWP 7]
[New LWP 24]
[New LWP 30]
[New LWP 56]

There's a gdb process causing 100% cpu load on one core but there doesn't seem to be a crash now. coredumpctl does not show any dumps after 10:29:07 CEST this morning when I posted the above output.

Also, there is no window popping up when run in flatpak-coredumpctl. I window is drawn however when run normally. No web rendering but menus etc seem to be working fine.

@mcatanzaro
Copy link
Collaborator

There's a gdb process causing 100% cpu load on one core but there doesn't seem to be a crash now. coredumpctl does not show any dumps after 10:29:07 CEST this morning when I posted the above output.

Patience! :) Either it will print a backtrace, or you can report a bug against gdb if not. But it will probably print a backtrace. It just takes a while because the debuginfo is huge.

Also, there is no window popping up when run in flatpak-coredumpctl. I window is drawn however when run normally. No web rendering but menus etc seem to be working fine.

Perhaps you mistyped here? You cannot use flatpak-coredumpctl to do anything other than open a core dump in gdb.

@monreal
Copy link

monreal commented Apr 4, 2021

After letting it run for about 10 minutes I got another entry in coredumpctl:

...
Sun 2021-04-04 10:29:07 CEST 60869 1000 1000 SIGSEGV present /app/bin/epiphany 4.4M
Sun 2021-04-04 23:22:43 CEST 16784 1000 1000 SIGSEGV present /app/bin/epiphany 4.2M
(end)

How would I tell if this is a web or UI process?

@monreal
Copy link

monreal commented Apr 4, 2021

No idea if this is helpful:

flatpak-coredumpctl org.gnome.Epiphany -m 16784
Executable /app/bin/epiphany doesn't seem to be a flatpaked application.
Running: "flatpak" "run" "--filesystem=home" "--filesystem=/tmp" "--command=gdb" "--devel" "org.gnome.Epiphany" "/app/bin/epiphany" "/tmp/tmpv89mbb34"
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /app/bin/epiphany...
Reading symbols from /usr/lib/debug//app/bin/epiphany.debug...
[New LWP 2]
[New LWP 5]
[New LWP 18]
[New LWP 10]
[New LWP 6]
[New LWP 13]
[New LWP 14]
[New LWP 15]
[New LWP 16]
[New LWP 90144]
[New LWP 12]
[New LWP 3]
[New LWP 7]
[New LWP 25]
[New LWP 11]
[New LWP 9]
[New LWP 4]
[New LWP 30]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/x86_64-linux-gnu/libthread_db.so.1".

warning: the debug information found in "/usr/lib/debug//usr/lib/x86_64-linux-gnu/libicudata.so.67.1.debug" does not match "/usr/lib/x86_64-linux-gnu/libicudata.so.67" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug//usr/lib/x86_64-linux-gnu/libicudata.so.67.1.debug" does not match "/usr/lib/x86_64-linux-gnu/libicudata.so.67" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug//usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0.debug" does not match "/usr/lib/x86_64-linux-gnu/libX11-xcb.so.1" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug//usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0.debug" does not match "/usr/lib/x86_64-linux-gnu/libX11-xcb.so.1" (CRC mismatch).

Core was generated by `epiphany'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 __GI_____strtol_l_internal (nptr=0x0, endptr=endptr@entry=0x0, base=base@entry=0, group=group@entry=0, loc=0x7f80b09347c0 <_nl_C_locobj>) at ../stdlib/strtol_l.c:292
292 while (ISSPACE (s))
[Current thread is 1 (Thread 0x7f80a6a3dbc0 (LWP 2))]
(gdb) bt
#0 __GI_____strtol_l_internal (nptr=0x0, endptr=endptr@entry=0x0, base=base@entry=0, group=group@entry=0, loc=0x7f80b09347c0 <_nl_C_locobj>) at ../stdlib/strtol_l.c:292
#1 0x00007f80b07ae79e in __GI___strtol_l (nptr=, endptr=endptr@entry=0x0, base=base@entry=0, loc=) at ../stdlib/strtol_l.c:547
#2 0x00007f80b0b29cbd in g_ascii_strtoll (nptr=, endptr=endptr@entry=0x0, base=base@entry=0) at ../glib/gstrfuncs.c:1261
#3 0x00007f80ad4b1304 in WebKit::ProcessLauncher::launchProcess() (this=0x7f80a4fb9d20) at ../Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:191
#4 0x00007f80ad333373 in WebKit::ProcessLauncher::create(WebKit::ProcessLauncher::Client
, WebKit::ProcessLauncher::LaunchOptions&&) (launchOptions=..., client=0x7f80a41fe9c0)
at DerivedSources/ForwardingHeaders/wtf/ThreadSafeRefCounted.h:43
#5 WebKit::AuxiliaryProcessProxy::connect() (this=this@entry=0x7f80a41fe9c0) at ../Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp:111
#6 0x00007f80ad3c1608 in WebKit::WebProcessProxy::create(WebKit::WebProcessPool&, WebKit::WebsiteDataStore*, WebKit::WebProcessProxy::IsPrewarmed, WebKit::WebProcessProxy::ShouldLaunchProcess) (processPool=..., websiteDataStore=websiteDataStore@entry=
0x7f80a4fed000, isPrewarmed=isPrewarmed@entry=WebKit::WebProcessProxy::IsPrewarmed::No, shouldLaunchProcess=shouldLaunchProcess@entry=WebKit::WebProcessProxy::ShouldLaunchProcess::Yes)
at ../Source/WebKit/UIProcess/WebProcessProxy.cpp:150
#7 0x00007f80ad3cddfe in WebKit::WebProcessPool::createNewWebProcess(WebKit::WebsiteDataStore*, WebKit::WebProcessProxy::IsPrewarmed)
(this=this@entry=0x7f80a4fde000, websiteDataStore=0x7f80a4fed000, isPrewarmed=isPrewarmed@entry=WebKit::WebProcessProxy::IsPrewarmed::No)
at ../Source/WebKit/UIProcess/WebProcessPool.cpp:640
#8 0x00007f80ad3ce32a in WebKit::WebProcessPool::processForRegistrableDomain(WebKit::WebsiteDataStore&, WebKit::WebPageProxy*, WebCore::RegistrableDomain const&)
(this=this@entry=0x7f80a4fde000, websiteDataStore=..., page=page@entry=0x7f80549f9000, registrableDomain=...) at ../Source/WebKit/UIProcess/WebProcessPool.cpp:1007
#9 0x00007f80ad39488a in WebKit::WebPageProxy::launchProcess(WebCore::RegistrableDomain const&, WebKit::WebPageProxy::ProcessLaunchReason)
(this=this@entry=0x7f80549f9000, registrableDomain=..., reason=reason@entry=WebKit::WebPageProxy::ProcessLaunchReason::InitialProcess)
at DerivedSources/ForwardingHeaders/wtf/RawPtrTraits.h:43
#10 0x00007f80ad396c5a in WebKit::WebPageProxy::loadAlternateHTML(IPC::ArrayReference<unsigned char, 18446744073709551615ul> const&, WTF::String const&, WTF::URL const&, WTF::URL const&, API::Object*) (this=this@entry=0x7f80549f9000, htmlData=..., encoding=..., baseURL=..., unreachableURL=..., userData=userData@entry=0x0) at ../Source/WebKit/UIProcess/WebPageProxy.cpp:1549
#11 0x00007f80ad45599e in webkit_web_view_load_alternate_html(WebKitWebView*, gchar const*, gchar const*, gchar const*)
(webView=, content=content@entry=0x5557fa1a8600 "\n<!--\n Copyright © 2010, 2011 Vinicius Depizzol\n Copyright © 2016 Gabriel Ivascu\n\n Thi"..., contentURI=0x7fff9ffa7768 "",
contentURI@entry=0x5557faa33360 "ephy-about:overview", baseURI=0x7fff9ffa77b0 "", baseURI@entry=0x0) at ../Source/WebKit/Platform/IPC/ArrayReference.h:43
#12 0x00007f80b176f620 in ephy_web_view_load_error_page
(view=0x5557faa26860 [EphyWebView], uri=0x5557faa33360 "ephy-about:overview", page=, error=, user_data=) at ../embed/ephy-web-view.c:2291
#16 0x00007f80b0c199c3 in <emit signal ??? on instance 0x5557faa26860 [EphyWebView]> (instance=, signal_id=, detail=detail@entry=0) at ../gobject/gsignal.c:3553
#13 0x00007f80b0bfff3f in g_closure_invoke
(closure=0x5557faa37270, return_value=return_value@entry=0x0, n_param_values=2, param_values=param_values@entry=0x7fff9ffa7ae0, invocation_hint=invocation_hint@entry=0x7fff9ffa7a60)
at ../gobject/gclosure.c:810
#14 0x00007f80b0c12d4b in signal_emit_unlocked_R
(node=node@entry=0x5557faa24da0, detail=detail@entry=0, instance=instance@entry=0x5557faa26860, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fff9ffa7ae0) at ../gobject/gsignal.c:3741
#15 0x00007f80b0c19861 in g_signal_emit_valist (instance=, signal_id=, detail=, var_args=var_args@entry=0x7fff9ffa7c80)
at ../gobject/gsignal.c:3497
#17 0x00007f80ad458589 in webkitWebViewWebProcessTerminated(_WebKitWebView*, WebKitWebProcessTerminationReason) (webView=, reason=reason@entry=WEBKIT_WEB_PROCESS_CRASHED)
at ../Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp:4424
#18 0x00007f80ad43078e in NavigationClient::processDidTerminate(WebKit::WebPageProxy&, WebKit::ProcessTerminationReason) (this=, reason=)
at ../Source/WebKit/UIProcess/API/glib/WebKitNavigationClient.cpp:113
#19 0x00007f80ad398e9f in WebKit::WebPageProxy::dispatchProcessDidTerminate(WebKit::ProcessTerminationReason) (this=0x7f80549f9000, reason=reason@entry=WebKit::ProcessTerminationReason::Crash)
at /usr/include/c++/10.2.0/bits/unique_ptr.h:421
#20 0x00007f80ad3c79d8 in WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch(WebKit::ProcessTerminationReason) (this=0x7f80a41ffa00, reason=)
at DerivedSources/ForwardingHeaders/wtf/RawPtrTraits.h:43
#21 0x00007f80ad2b1483 in operator() (__closure=0x7f80a4f99018) at DerivedSources/ForwardingHeaders/wtf/RawPtrTraits.h:43
#22 WTF::Detail::CallableWrapper<IPC::Connection::connectionDidClose()::<lambda()>, void>::call(void) (this=0x7f80a4f99010) at DerivedSources/ForwardingHeaders/wtf/Function.h:52
#23 0x00007f80ac5506f3 in WTF::Function<void ()>::operator()() const (this=) at ../Source/WTF/wtf/Function.h:80
#24 WTF::RunLoop::performWork() (this=0x7f80a4ff9000) at ../Source/WTF/wtf/RunLoop.cpp:128
--Type for more, q to quit, c to continue without paging--c
#25 0x00007f80ac5a0f5d in operator() (userData=, __closure=0x0) at ../Source/WTF/wtf/glib/RunLoopGLib.cpp:80
#26 _FUN(gpointer) () at ../Source/WTF/wtf/glib/RunLoopGLib.cpp:82
#27 0x00007f80ac5a1883 in operator() (__closure=0x0, userData=0x7f80a4ff9000, callback=0x7f80ac5a0f50 <_FUN(gpointer)>, source=0x5557f9fdc4f0) at ../Source/WTF/wtf/glib/RunLoopGLib.cpp:53
#28 _FUN(GSource*, GSourceFunc, gpointer) () at ../Source/WTF/wtf/glib/RunLoopGLib.cpp:56
#29 0x00007f80b0b08dbf in g_main_dispatch (context=0x5557f9f35300) at ../glib/gmain.c:3337
#30 g_main_context_dispatch (context=0x5557f9f35300) at ../glib/gmain.c:4055
#31 0x00007f80b0b09168 in g_main_context_iterate (context=context@entry=0x5557f9f35300, block=block@entry=1, dispatch=dispatch@entry=1, self=) at ../glib/gmain.c:4131
#32 0x00007f80b0b09233 in g_main_context_iteration (context=context@entry=0x5557f9f35300, may_block=may_block@entry=1) at ../glib/gmain.c:4196
#33 0x00007f80b0d3366d in g_application_run (application=0x5557f9f2a6a0 [EphyShell], argc=-1610973116, argv=) at ../gio/gapplication.c:2560
#34 0x00005557f96830bc in main (argc=, argv=) at ../src/ephy-main.c:431

@mcatanzaro
Copy link
Collaborator

How would I tell if this is a web or UI process?

epiphany is the UI process. The web process is WebKitWebProcess.

No idea if this is helpful:

That's a great backtrace for the UI process crash, which confirms my previous theory and is enough to fix the UI process crash. I will fix that now.

As for the web process side of this... if you really don't see WebKitWebProcess crashing in coredumpctl, then that's real bad luck. Check your journal and look for anything at all suspicious. Maybe it's being killed by systemd-oomd or something weird like that?

@monreal
Copy link

monreal commented Apr 5, 2021

Just tried again, this is the full journal output:

Apr 05 17:16:29 flippy systemd[1153]: Started app-flatpak-org.gnome.Epiphany-38448.scope.
Apr 05 17:16:29 flippy systemd[1153]: Starting flatpak portal...
Apr 05 17:16:30 flippy systemd[1153]: Started flatpak portal.
Apr 05 17:16:30 flippy systemd[1153]: Started app-flatpak-org.gnome.Epiphany-38500.scope.
Apr 05 17:16:30 flippy systemd[1153]: app-flatpak-org.gnome.Epiphany-38500.scope: Deactivated successfully.
Apr 05 17:17:27 flippy audit[38462]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=38462 comm="epiphany" exe="/app/bin/epiphany" sig=11 res=1
Apr 05 17:17:27 flippy kernel: show_signal_msg: 2 callbacks suppressed
Apr 05 17:17:27 flippy kernel: epiphany[38462]: segfault at 0 ip 00007f88084a12ac sp 00007ffce8d6fd80 error 4 in libc-2.31.so[7f8808485000+150000]
Apr 05 17:17:27 flippy kernel: Code: 41 54 45 31 e4 55 53 48 83 ec 28 48 89 74 24 08 85 c9 0f 85 ce 02 00 00 83 ff 01 0f 84 8d 01 00 00 83 ff 24 0f 87 84 01 00 00 <49> 0f be 55 00 49 8b 48 68 4c 89 eb 48 89 d0 f6 44 5>
Apr 05 17:17:27 flippy systemd[1]: Created slice system-systemd\x2dcoredump.slice.
Apr 05 17:17:27 flippy audit: BPF prog-id=81 op=LOAD
Apr 05 17:17:27 flippy audit: BPF prog-id=82 op=LOAD
Apr 05 17:17:27 flippy audit: BPF prog-id=83 op=LOAD
Apr 05 17:17:27 flippy systemd[1]: Started Process Core Dump (PID 48094/UID 0).
Apr 05 17:17:27 flippy audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@0-48094-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? >
Apr 05 17:17:28 flippy systemd-coredump[48095]: [🡕] Process 38462 (epiphany) of user 1000 dumped core.

                                            Stack trace of thread 2:
                                            #0  0x00007f88084a12ac n/a (/usr/lib/x86_64-linux-gnu/libc-2.31.so + 0x3e2ac)
                                            #1  0x00007f8805026373 n/a (/usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37.53.1 + 0x9db373)

Apr 05 17:17:28 flippy systemd[1]: systemd-coredump@0-48094-0.service: Deactivated successfully.
Apr 05 17:17:28 flippy audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@0-48094-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? a>
Apr 05 17:17:28 flippy audit: BPF prog-id=83 op=UNLOAD
Apr 05 17:17:28 flippy audit: BPF prog-id=82 op=UNLOAD
Apr 05 17:17:28 flippy audit: BPF prog-id=81 op=UNLOAD
Apr 05 17:17:28 flippy systemd[1153]: app-flatpak-org.gnome.Epiphany-38448.scope: Deactivated successfully.
Apr 05 17:17:28 flippy systemd[1153]: app-flatpak-org.gnome.Epiphany-38448.scope: Consumed 1min 18.922s CPU time.

@mcatanzaro
Copy link
Collaborator

Well it looks like nothing is happening to the web process at all, but that seems unlikely. Let me install this and see if I can reproduce....

@mcatanzaro
Copy link
Collaborator

I've determined this requires both (a) flatpak, and (b) a non-English locale to reproduce. With Tech Preview:

LANG=es_ES.utf8 flatpak run org.gnome.Epiphany.Devel -p

However @alatiera reports that's not enough to make it crash for him. He doesn't see the crash unless he sets some random environment variable to include a UTF-8 character, e.g. FOO="📦\$".

There are no web process crashes in coredumpctl because the web process is not actually being launched. I missed this very important information from the first comment:

(epiphany:82): epiphany-WARNING **: 11:14:37.327: Web process crashed
flatpak-spawn: Invalid byte sequence in conversion input
Try "flatpak-spawn --help" for more information.

"Web process crashed" is a lie, WebKit reports a web process crash whenever the connection to the web process closes unexpectedly, but a crash is not the only reason that could happen. In this case, it happens because flatpak-spawn quits.

@mcatanzaro
Copy link
Collaborator

Oh and this very important tidbit at the top of the log:

(process:2): Gtk-WARNING **: 11:23:25.510: Locale not supported by C library.
	Using the fallback 'C' locale.

That's not good.

@alatiera
Copy link
Member

alatiera commented Apr 5, 2021

So here's what I have, I get a "Locale not supported" warning first and then the process crashes.

alatiera@almost-working ~> LANG="random" flatpak run org.gnome.Epiphany.Devel

(process:2): Gtk-WARNING **: 19:22:37.525: Locale not supported by C library.
	Using the fallback 'C' locale.
Fontconfig warning: ignoring random: not a valid language tag
flatpak-spawn: Invalid byte sequence in conversion input
Try "flatpak-spawn --help" for more information.

(epiphany:2): epiphany-WARNING **: 19:22:37.797: Web process crashed
flatpak-spawn: Invalid byte sequence in conversion input
Try "flatpak-spawn --help" for more information.

With LANG=C it also crashes right away

latiera@almost-working ~> LANG=C flatpak run org.gnome.Epiphany.Devel
flatpak-spawn: Invalid byte sequence in conversion input
Try "flatpak-spawn --help" for more information.

(epiphany:2): epiphany-WARNING **: 19:22:21.211: Web process crashed
flatpak-spawn: Invalid byte sequence in conversion input
Try "flatpak-spawn --help" for more information.

(epiphany:2): epiphany-WARNING **: 19:22:21.238: Web process crashed
flatpak-spawn: Invalid byte sequence in conversion input
Try "flatpak-spawn --help" for more information.

If I override PS1 afterwards it stops crashing, flatpak passes PS1=[📦 $FLATPAK_ID \W]\$ which is Unicode.

alatiera@almost-working ~> LANG=C flatpak run --env=PS1="\$" org.gnome.Epiphany.Devel

If I add a random env var with an emoji afterwards it crashes again

alatiera@almost-working ~> flatpak run --env=LANG=C --env=PS1="\$" --env=FOO="📦\$" org.gnome.Epiphany.Devel
flatpak-spawn: Invalid byte sequence in conversion input
Try "flatpak-spawn --help" for more information.

(epiphany:2): epiphany-WARNING **: 19:27:35.072: Web process crashed
flatpak-spawn: Invalid byte sequence in conversion input
Try "flatpak-spawn --help" for more information.

(epiphany:2): epiphany-WARNING **: 19:27:35.097: Web process crashed
flatpak-spawn: Invalid byte sequence in conversion input
Try "flatpak-spawn --help" for more information.

SIdenote, flatpak run --env=LANG=C --env=PS1="\$" --env=FOO="📦" org.gnome.Epiphany.Devel gets it to crash but this does not LANG=C flatpak run --env=PS1="\$" --env=FOO="📦" org.gnome.Epiphany.Devel

@alatiera
Copy link
Member

alatiera commented Apr 5, 2021

These are from my system with UK locales:

alatiera@almost-working ~> locale
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=

First noticed this issue on a machine with UK lang but Greek format locales

[alatiera@laptop ~]$ cat env.txt 
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC=el_GR.UTF-8
LC_TIME=el_GR.UTF-8
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY=el_GR.UTF-8
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER=el_GR.UTF-8
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT=el_GR.UTF-8
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=

@monreal
Copy link

monreal commented Apr 5, 2021

Region & Language > Language is set to "English United States)" and Region & Language > Formats to "Deutschland (Deutsch)" which results in this output:

$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=de_DE.UTF-8
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Setting all LC_* to en_US.UTF-8 fixes the problem...

@mcatanzaro
Copy link
Collaborator

Hmm:

$ flatpak run --command=/bin/bash org.gnome.Epiphany.Devel
[📦 org.gnome.Epiphany.Devel ~]$ LANG=es_ES.utf8 locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=es_ES.utf8
LC_CTYPE="es_ES.utf8"
LC_NUMERIC="es_ES.utf8"
LC_TIME="es_ES.utf8"
LC_COLLATE="es_ES.utf8"
LC_MONETARY="es_ES.utf8"
LC_MESSAGES="es_ES.utf8"
LC_PAPER="es_ES.utf8"
LC_NAME="es_ES.utf8"
LC_ADDRESS="es_ES.utf8"
LC_TELEPHONE="es_ES.utf8"
LC_MEASUREMENT="es_ES.utf8"
LC_IDENTIFICATION="es_ES.utf8"
LC_ALL=

The Spanish locale is broken in the sandbox for unknown reasons. But not when using flatpak-spawn:

[📦 org.gnome.Epiphany.Devel ~]$ LANG=es_ES.utf8 flatpak-spawn locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

because flatpak-spawn runs the process with the host environment. But after https://trac.webkit.org/changeset/272179/webkit, we now manually forward the entire environment to flatpak-spawn. So WebKit will now do something like this:

[📦 org.gnome.Epiphany.Devel ~]$ flatpak-spawn --env=LANG=es_ES.utf8 locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=es_ES.utf8
LC_CTYPE="es_ES.utf8"
LC_NUMERIC="es_ES.utf8"
LC_TIME="es_ES.utf8"
LC_COLLATE="es_ES.utf8"
LC_MONETARY="es_ES.utf8"
LC_MESSAGES="es_ES.utf8"
LC_PAPER="es_ES.utf8"
LC_NAME="es_ES.utf8"
LC_ADDRESS="es_ES.utf8"
LC_TELEPHONE="es_ES.utf8"
LC_MEASUREMENT="es_ES.utf8"
LC_IDENTIFICATION="es_ES.utf8"
LC_ALL=

When the locale is broken, we fall back to C locale, and then UTF-8 characters like 📦 are no longer allowed, so that's why the 📦 in PS1 is causing everything to blow up. For example:

[📦 org.gnome.Epiphany.Devel ~]$ flatpak-spawn --env=FOO=\360\237\223\246 locale
flatpak-spawn: Invalid byte sequence in conversion input
Try "flatpak-spawn --help" for more information.

OK, so now we have a minimal reproducer that doesn't involve WebKit or Epiphany at all. I'm guessing that locales are somehow generally broken in the runtime? @alatiera is it time to move this issue to gnome-build-meta?

@mcatanzaro
Copy link
Collaborator

mcatanzaro commented Apr 5, 2021

Checking Epiphany's Add Language dialog, I see only three locales exist within the runtime: English (Canada), English (United Kingdom), and "System languages (en-US, en)" which is English (US).

In contrast, Fedora's Epiphany presents me with several dozens of choices for locale. Selecting one of these locales using the LANG environment variable is not actually going to work, because translations are not going to be installed unless I install the relevant Fedora language pack, but at least it doesn't break and fall back to the C locale.

I don't know how runtime locale extensions work, but it sure seems like the selected locale likely does not exist at all within the runtime.

@matthiasclasen
Copy link

flatpak config might be instructive

@mcatanzaro
Copy link
Collaborator

In my case I have:

$ flatpak config
languages: *unset* (default: en)
extra-languages: *unset*

After changing my formats to German using the Region & Language panel, Epiphany starts crashing. flatpak config seems to notice immediately:

$ flatpak config
languages: *unset* (default: de;en)
extra-languages: *unset*

I guess the problem is use of German formats with English locale. But again, this is not an Epiphany or WebKit bug because flatpak-spawn itself is broken. IMO it is reasonable for WebKit to crash if flatpak-spawn is not working.

@veyselerden please run locale and post the output here, I'm curious to see whether you also have a mixed locale.

@mcatanzaro
Copy link
Collaborator

P.S. Workaround is to run with WEBKIT_FORCE_SANDBOX=0 to disable the flatpak-spawn subsandboxes. (You're still protected by flatpak's primary sandbox, but browser tabs will no longer be subsandboxed separately from each other.)

@mcatanzaro
Copy link
Collaborator

BTW I will fix the UI process crash in https://bugs.webkit.org/show_bug.cgi?id=224209, but that is not the main problem here.

@abderrahim
Copy link

abderrahim commented Apr 6, 2021

So this is a case of flatpak not working correctly by default with mixed locales. For some reason, flatpak doesn't seem to download all the locales by default (See flatpak/flatpak#3514 flatpak/flatpak#3563 flatpak/flatpak#3712).

What you can do is to set the correct languages in flatpak config (if necessary, it may have been fixed at some point) then run flatpak update (or maybe flatpak uninstall org.gnome.Platform.Locale//40 then flatpak update). You can check flatpak info org.gnome.Platform.Locale//40 for installed subdirectories, which should contain all the locales you're using.

Of course, what I'm describing above is a workaround, and flatpak should do the right thing by default.

@mcatanzaro
Copy link
Collaborator

Thanks Abderrahim.

Since there are no changes to make in Epiphany, I'm going to close this in favor of any of flatpak/flatpak#3514 flatpak/flatpak#3563 flatpak/flatpak#3712, which are all duplicates of each other. Once those are fixed, Epiphany will stop crashing. In the meantime, workaround is to manually disable the sandbox or not use mixed locales.

@mcatanzaro
Copy link
Collaborator

Let's continue in flatpak/flatpak#3712.

@janxkoci
Copy link

FYI: I downgraded Ephy to previous version (3.38) with:

flatpak update --commit=2f7bd4f9731f4d665e5194206fbc451e501f6554ab7285a85880ce21874e2ec3 org.gnome.Epiphany

... and the issue doesn't go away. This is probably because webkit is the same and this issue is therefore not related to Ephy per se, but rather webkit & flatpak conflict, as pointed out by @mcatanzaro. Just wanted to log this here.

@alice-mkh
Copy link
Collaborator

alice-mkh commented Apr 20, 2021

It's a webkit issue, you want to downgrade the runtime as well. Try flatpak update org.gnome.Platform//3.38 --commit=edcf9927abf4b19e354070b62e2825b3ce13158f4a51b6010f8b56e62a1c26be (in conjunction with ephy 3.38)

@alatiera
Copy link
Member

Downgrading the runtime won't work, we update webkit in older ones too, cause security and all.

@alice-mkh
Copy link
Collaborator

It will, that's the last commit before webkit 2.32.0.

@mcatanzaro
Copy link
Collaborator

You'll have to pin to that runtime version forever until someone has time to fix the flatpak bug. Sorry. :/

@janxkoci
Copy link

janxkoci commented Apr 20, 2021

You'll have to pin to that runtime version forever until someone has time to fix the flatpak bug.

I figured, I will wait for the fix. Just wanted to log the info that this is really unrelated to Ephy v40 and can be reproduced even in previous versions, if the runtime (and its webkit) has been already updated..

@2-www
Copy link

2-www commented Apr 26, 2023

i have this issue only after updating Platform while Web is running. restarting Web fixes it
my locale is not mixed:

[📦 org.gnome.Epiphany ~]$ flatpak-spawn --env=FOO=$'\360\237\223\246' locale
LANG=uk_UA.UTF-8
LC_CTYPE="uk_UA.UTF-8"
LC_NUMERIC="uk_UA.UTF-8"
LC_TIME="uk_UA.UTF-8"
LC_COLLATE="uk_UA.UTF-8"
LC_MONETARY="uk_UA.UTF-8"
LC_MESSAGES="uk_UA.UTF-8"
LC_PAPER="uk_UA.UTF-8"
LC_NAME="uk_UA.UTF-8"
LC_ADDRESS="uk_UA.UTF-8"
LC_TELEPHONE="uk_UA.UTF-8"
LC_MEASUREMENT="uk_UA.UTF-8"
LC_IDENTIFICATION="uk_UA.UTF-8"
LC_ALL=

@janxkoci
Copy link

janxkoci commented Apr 26, 2023

@2-www Sorry, but any good reason why are you using a 2-years old version of a browser? This has been fixed, if you have similar problem, it's probably better to open a new issue (and mention this one if you think it's helpful).

PS: also, updating components or runtimes while apps are running on them is bound to cause some trouble, I don't consider it an issue. Even my phone works the same way.

@2-www
Copy link

2-www commented Apr 26, 2023

@2-www Sorry, but any good reason why are you using a 2-years old version of a browser? This has been fixed, if you have similar problem, it's probably better to open a new issue (and mention this one if you think it's helpful).

sorry, i didn't notice it's 2021 :(

i opened flatpak/flatpak#5398

PS: also, updating components or runtimes while apps are running on them is bound to cause some trouble, I don't consider it an issue. Even my phone works the same way.

but gnome-software can do this in background without asking the user

@TingPing
Copy link
Member

TingPing commented Apr 26, 2023

PS: also, updating components or runtimes while apps are running on them is bound to cause some trouble, I don't consider it an issue. Even my phone works the same way.

This is, by design, always safe. Any exception to that is a flatpak bug. In this case related to sub-sandboxes.

@mcatanzaro
Copy link
Collaborator

Is it still safe even if you're using flatpak-spawn to launch subprocesses? Need to be sure that flatpak-spawn launches the same version of the application and runtime that was launched originally, not the currently-installed version. Otherwise, WebKit will crash on IPC format assertions. That will not look similar to this issue to an experienced user who looks at the backtrace, but I see how it could be confused with an extremely generic "not working at all" bug report.

@TingPing
Copy link
Member

TingPing commented Apr 26, 2023

@mcatanzaro flatpak-spawn explicitly launches using the same runtime and app commit. Somewhere extension commits are getting lost. This is my theory at least.

EDIT: Their issue may be unrelated but at the very least subsandboxes are meant to be reliable through updates.

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

No branches or pull requests

10 participants