Closed
Bug 1419618
Opened 8 years ago
Closed 8 years ago
Firefox nightly aborts in _dbus_check_is_valid_bus_name if profile name has a space
Categories
(Core Graveyard :: X-remote, defect)
Core Graveyard
X-remote
Tracking
(firefox57 unaffected, firefox58 unaffected, firefox59 affected)
RESOLVED
DUPLICATE
of bug 1420124
Tracking | Status | |
---|---|---|
firefox57 | --- | unaffected |
firefox58 | --- | unaffected |
firefox59 | --- | affected |
People
(Reporter: info, Unassigned)
References
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36
Steps to reproduce:
Firefox x64 nightly version 59.0a1 on Fedora 26 and 27 has been crashing for me if I choose my long-time profile "spage shared". The same profile works fine with the Fedora system firefox version 57.
Actual results:
I start it from a terminal and have it set to always ask for a profile.
After I choose my profile "spage shared",
dbus[372]: arguments to dbus_bus_request_name() were incorrect, assertion "_dbus_check_is_valid_bus_name (name)" failed in file ../../dbus/dbus-bus.c line 1122.
This is normally a bug in some application using the D-Bus library.
D-Bus not built with -rdynamic so unable to print a backtrace
Redirecting call to abort() to mozalloc_abort
Thread 1 "firefox" received signal SIGSEGV, Segmentation fault.
I installed debug info for D-Bus and ran Firefox under gdb and set various breakpoints. One of the last functions with a recognizable D-Bus name is
_dbus_check_is_valid_bus_name( "org.mozilla.firefox.spage shared")
After this, I get the assertion error and abort. Backtrace gives
(gdb) bt
#0 0x0000000000408955 in mozalloc_abort(char const*) ()
#1 0x000000000040891f in abort ()
#2 0x00007fffeebd98c4 in _dbus_abort () at ../../dbus/dbus-sysdeps.c:93
#3 0x00007fffeebd0150 in _dbus_warn_check_failed (
format=format@entry=0x7fffeebdfe68 "arguments to %s() were incorrect, assertion \"%s\" failed in file %s line %d.\nThis is normally a bug in some application using the D-Bus library.\n")
at ../../dbus/dbus-internals.c:281
#4 0x00007fffeebd086a in _dbus_warn_return_if_fail (
function=function@entry=0x7fffeebdabe0 <__func__.4674> "dbus_bus_request_name",
assertion=assertion@entry=0x7fffeebda9c0 "_dbus_check_is_valid_bus_name (name)",
file=file@entry=0x7fffeebda9e5 "../../dbus/dbus-bus.c", line=line@entry=1122)
at ../../dbus/dbus-internals.c:936
#5 0x00007fffeebb2c07 in dbus_bus_request_name (connection=0x7ffff6858120, name=<optimized out>,
flags=<optimized out>, error=0x0) at ../../dbus/dbus-bus.c:1122
#6 0x00007fffe8e7c4ad in nsDBusRemoteService::Startup(char const*, char const*) ()
from /home/spage/programs/firefox/libxul.so
#7 0x00007fffe8e7cdac in nsRemoteService::Startup(char const*, char const*) ()
from /home/spage/programs/firefox/libxul.so
#8 0x00007fffe8f4c6ef in XREMain::XRE_mainRun() [clone .cold.89] ()
from /home/spage/programs/firefox/libxul.so
#9 0x00007fffe9f05e78 in XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) ()
from /home/spage/programs/firefox/libxul.so
#10 0x00007fffe9f05ad6 in XRE_main(int, char**, mozilla::BootstrapConfig const&) ()
from /home/spage/programs/firefox/libxul.so
#11 0x0000000000421d39 in do_main(int, char**, char**) ()
#12 0x0000000000415ecf in main ()
I think the problem is the space in my profile name.
Looking inexpertly at source, nsDBusRemoteService::Startup creates a D-Bus name using
interfaceName = nsPrintfCString("org.mozilla.%s.%s", aAppName, aProfileName);
and then calls
dbus_bus_request_name(mConnection, interfaceName.get(),
but https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names indicates spaces aren't allowed in D-Bus names. If I call the external validation function:
(gdb) call dbus_validate_bus_name("org.mozilla.firefox.spage", 0)
$1 = 1 [OK!]
(gdb) call dbus_validate_bus_name("org.mozilla.firefox.spage shared", 0)
$2 = 0 [oh noes, invalid!]
Expected results:
Mangle the Firefox profile name to make it valid before trying to create a D-Bus service out of the name.
It's a shame that the assertion doesn't report the problematic bus name, I would have debugged this a lot quicker. But I think that's a bug in D-Bus.
Workaround: In the Firefox profile manager, rename your profile to be a valid element of a D-Bus name, i.e. remove spaces and probably any funny characters.
Updated•8 years ago
|
Updated•8 years ago
|
status-firefox57:
--- → unaffected
status-firefox58:
--- → unaffected
status-firefox59:
--- → affected
Updated•8 years ago
|
Flags: needinfo?(stransky)
Comment 1•8 years ago
|
||
Thanks, we already have that as Bug 1420124.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Flags: needinfo?(stransky)
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•