Closed Bug 1276086 Opened 4 years ago Closed 4 years ago

[e10s] GLib-CRITICAL: g_path_get_basename: assertion 'file_name != NULL' failed

Categories

(Toolkit :: Startup and Profile System, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
e10s ? ---
firefox49 --- fixed

People

(Reporter: karlt, Assigned: karlt)

References

Details

Attachments

(1 file)

(process:16940): GLib-CRITICAL **: g_path_get_basename: assertion 'file_name != NULL' failed

https://git.gnome.org/browse/glib/tree/glib/goption.c?h=2.48.1#n1911

#0  0x00007fc63dbfb3f9 in g_option_context_parse ()
    at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/goption.c:1911
#1  0x00007fc63b99168e in gtk_parse_args (argc=0x7fffbaf98040, argv=0x7fffbaf98050) at gtkmain.c:953
#2  0x00007fc63b9916e9 in gtk_init_check (argc=<optimized out>, argv=<optimized out>) at gtkmain.c:992
#3  0x00007fc63b991719 in gtk_init (argc=<optimized out>, argv=<optimized out>) at gtkmain.c:1047
#4  0x00007fc648a068ad in mozilla::dom::ContentChild::Init(MessageLoop*, int, IPC::Channel*) (this=0x7fc638c76030, aIOLoop=0x7fc638afeaf0, aParentPid=16874, aChannel=0x7fc638c4a6c0) at /mnt/ssd1/karl/moz/dev/dom/ipc/ContentChild.cpp:652
#5  0x00007fc648a31eb2 in mozilla::dom::ContentProcess::Init() (this=0x7fc638c76000) at /mnt/ssd1/karl/moz/dev/dom/ipc/ContentProcess.cpp:122
#6  0x00007fc649ea5d40 in XRE_InitChildProcess(int, char**, XREChildData const*) (aArgc=3, aArgv=0x7fffbaf99768, aChildData=0x7fffbaf99600)
    at /mnt/ssd1/karl/moz/dev/toolkit/xre/nsEmbedFunctions.cpp:625
#7  0x000000000042214b in content_process_main(int, char**) (argc=5, argv=0x7fffbaf99768)
    at /mnt/ssd1/karl/moz/dev/ipc/app/../contentproc/plugin-container.cpp:231

These also causes the child process name to show up as "<unknown>" in any subsequent messages. i.e.

(<unknown>:16940): Gtk-CRITICAL
Comment on attachment 8757120 [details]
MozReview Request: bug 1276086 set GLib prgname in child process r?glandium

https://reviewboard.mozilla.org/r/55668/#review52380

::: toolkit/xre/nsEmbedFunctions.cpp:492
(Diff revision 1)
>  #if MOZ_WIDGET_GTK == 2
>    XRE_GlibInit();
>  #endif
> +#ifdef MOZ_WIDGET_GTK
> +  // Setting the name here avoids the need to pass this through to gtk_init().
> +  g_set_prgname(aArgv[0]);

I guess "plugin-container" is better than "(unknown)", but maybe we'd want to make that the application name? (but that's too early for nsIXULAppInfo, right?)
Attachment #8757120 - Flags: review?(mh+mozilla) → review+
tracking-e10s: --- → ?
https://reviewboard.mozilla.org/r/55668/#review52380

> I guess "plugin-container" is better than "(unknown)", but maybe we'd want to make that the application name? (but that's too early for nsIXULAppInfo, right?)

Yes, I was wondering whether this could be called "Firefox content", for example.
I don't know whether or not nsIXULAppInfo works in the content process or whether it is the best solution.
Another option might be the parent process passing a more appropriate aArgv[0] from exec.

At least now the GLib name is set up in the function that calls SetupErrorHandling() with the same name, so we can be consistent about what name is used.
https://reviewboard.mozilla.org/r/55668/#review52380

> Yes, I was wondering whether this could be called "Firefox content", for example.
> I don't know whether or not nsIXULAppInfo works in the content process or whether it is the best solution.
> Another option might be the parent process passing a more appropriate aArgv[0] from exec.
> 
> At least now the GLib name is set up in the function that calls SetupErrorHandling() with the same name, so we can be consistent about what name is used.

nsIXULAppInfo is available in the content process, but gtk_init is called
before InitXPCOM, and so do_GetService is not available, I assume.

https://dxr.mozilla.org/mozilla-central/rev/4d63dde701b47b8661ab7990f197b6b60e543839/dom/ipc/ContentProcess.cpp#120

There is ContentChild::GetAppInfo()

https://dxr.mozilla.org/mozilla-central/rev/4d63dde701b47b8661ab7990f197b6b60e543839/dom/ipc/ContentChild.h#107

but mAppInfo is not set up until the event loop is running.
https://hg.mozilla.org/mozilla-central/rev/2d2f1179fd86
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.