Closed Bug 1308997 Opened 5 years ago Closed 5 years ago

Firefox doesn't start on the first attempt

Categories

(Toolkit :: Startup and Profile System, defect)

49 Branch
x86_64
Linux
defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: g.djavadyan, Unassigned)

Details

Attachments

(2 files)

Attached file strace_firefox.log
Dear Firefox developers,

Beginning from ~47/48 version Firefox doesn't start on the first attempt and becomes defunct process. I have to kill the process and attempt to start it again. Most of the time it starts on 2nd-3rd attempt. The strace log of the failed attempt is attached. Below is build info:

-----
Build platform
target
x86_64-pc-linux-gnu
Build tools
Compiler 	Version 	Compiler flags
/usr/bin/x86_64-pc-linux-gnu-gcc -std=gnu99 	5.4.0 	-Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -march=core2 -mtune=generic -pipe -fno-strict-aliasing -fno-math-errno -pthread -pipe
/usr/bin/x86_64-pc-linux-gnu-g++ -std=gnu++11 	5.4.0 	-Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wc++14-compat -Wno-invalid-offsetof -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -march=core2 -mtune=generic -pipe -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -pthread -pipe -freorder-blocks -Os -fomit-frame-pointer
Configure options

--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --enable-application=browser PKG_CONFIG=x86_64-pc-linux-gnu-pkg-config --enable-default-toolkit=cairo-gtk3 --disable-tests CC=x86_64-pc-linux-gnu-gcc CXX=x86_64-pc-linux-gnu-g++ HOST_CC=x86_64-pc-linux-gnu-gcc HOST_CXX=x86_64-pc-linux-gnu-g++ MOZ_JEMALLOC4=1 --enable-replace-malloc XARGS=/usr/bin/xargs --enable-system-hunspell --disable-crashreporter --enable-dbus --disable-debug --disable-debug-symbols --enable-extensions=default --disable-gconf --enable-gio --disable-gnomeui --disable-gold --disable-install-strip --enable-ion --enable-necko-wifi --enable-official-branding --enable-optimize --enable-pulseaudio --enable-skia --enable-startup-notification --disable-strip --disable-system-cairo --enable-system-ffi --disable-system-sqlite --disable-updater --libdir=/usr/lib64 --prefix=/usr --with-default-mozilla-five-home=/usr/lib64/firefox --with-google-api-keyfile=/var/tmp/portage/www-client/firefox-49.0/work/firefox-49.0/google-api-key --with-intl-api --with-nspr-prefix=/usr --with-nss-prefix=/usr --with-system-bz2 --without-system-graphite2 --without-system-harfbuzz --without-system-icu --without-system-jpeg --without-system-libvpx --with-system-nspr --with-system-nss --with-system-png --with-system-zlib --x-includes=/usr/include --x-libraries=/usr/lib64
---------

Many thanks in advance!
Does the same problem happen with a binary from mozilla.org ?
Component: General → Untriaged
Flags: needinfo?(g.djavadyan)
Yes, I experience the same behavior using official Firefox binary for x86_64 Linux (firefox-49.0.1.tar.bz2). The strace log is attached.
Flags: needinfo?(g.djavadyan)
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

I have tested your issue on latest Firefox release (49.0) and latest Nightly (Build ID: 20161012143919) and could not reproduce it. I have successfully started the browsers from the terminal and also from the Launcher. I've tried with firefox-49.0.1.tar.bz2 (linux-x86_64) and firefox-52.0a1.en-US.linux-x86_64.tar.bz2, all worked ok from the first try.

Can you please retest this using the latest Nightly build (https://nightly.mozilla.org/) and report back the results?
Component: Untriaged → Startup and Profile System
Flags: needinfo?(g.djavadyan)
Product: Firefox → Toolkit
(In reply to Vlad Bacia-Mociran [:VladB] from comment #4)
> Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
> 
> I have tested your issue on latest Firefox release (49.0) and latest Nightly
> (Build ID: 20161012143919) and could not reproduce it. I have successfully
> started the browsers from the terminal and also from the Launcher. I've
> tried with firefox-49.0.1.tar.bz2 (linux-x86_64) and
> firefox-52.0a1.en-US.linux-x86_64.tar.bz2, all worked ok from the first try.
> 
> Can you please retest this using the latest Nightly build
> (https://nightly.mozilla.org/) and report back the results?

Instead, can we find someone to just look at the strace log provided by the reporter? AIUI that should be helpful in determining *why* we're not starting on their machine. I don't have the tools and knowledge to do so, but the platform team should.
Flags: needinfo?(vlad.bacia)
Hey, don't shoot the QA. I don't have this kind of knowledge either. That's why I moved it into a more appropriate component to find someone with more experience on this area. And at first glance it seemed to be a startup issue.
Flags: needinfo?(vlad.bacia)
(In reply to Vlad Bacia-Mociran [:VladB] from comment #6)
> Hey, don't shoot the QA. I don't have this kind of knowledge either. That's
> why I moved it into a more appropriate component to find someone with more
> experience on this area. And at first glance it seemed to be a startup issue.

Not shooting anybody, I just think we should take advantage of whatever data is provided in the bug as soon as possible. If we decide it isn't helpful, we can ask for other things. Maybe :glandium can help with the straces, or suggest someone else who can.
Flags: needinfo?(mh+mozilla)
(In reply to Vlad Bacia-Mociran [:VladB] from comment #4)
> Can you please retest this using the latest Nightly build
> (https://nightly.mozilla.org/) and report back the results?

Exactly same problem using firefox-52.0a1.en-US.linux-x86_64.tar.bz2:
$ ps -ef | grep firefox
user     14760 14649  0 17:43 pts/4    00:00:00 ./firefox
user     14763 14760  0 17:43 pts/4    00:00:00 [firefox] <defunct>

The process started successfully on the second try:
$ ps -ef | grep firefox
user     14776 14649 21 17:44 pts/4    00:00:06 ./firefox
user     14857 14776  9 17:44 pts/4    00:00:01 /home/user/Install/firefox52/plugin-container -greomni /home/user/Install/firefox52/omni.ja -appomni /home/user/Install/firefox52/browser/omni.ja -appdir /home/user/Install/firefox52/browser 14776 true tab

I also tried with clean profile and got the same results.
Flags: needinfo?(g.djavadyan)
Backtrace:

(gdb) bt
#0  0x00007ffff6d41616 in sigsuspend () from /lib64/libc.so.6
#1  0x00007fffddda9799 in tdb_runtime_check_for_robust_mutexes () from /usr/lib64/libtdb.so.1
#2  0x00007fffded16fc5 in tdb_wrap_open () from /usr/lib64/samba/libtdb-wrap-samba4.so
#3  0x00007fffe1f7c5f0 in ?? () from /usr/lib64/libsmbconf.so.0
#4  0x00007fffe1f7c975 in gencache_parse () from /usr/lib64/libsmbconf.so.0
#5  0x00007fffe1f7d1a2 in gencache_get_data_blob () from /usr/lib64/libsmbconf.so.0
#6  0x00007fffe1f7d249 in gencache_get () from /usr/lib64/libsmbconf.so.0
#7  0x00007fffe1f7865d in wins_srv_is_dead () from /usr/lib64/libsmbconf.so.0
#8  0x00007fffe1b313ee in resolve_wins_send () from /usr/lib64/samba/libgse-samba4.so
#9  0x00007fffe1b31831 in resolve_wins () from /usr/lib64/samba/libgse-samba4.so
#10 0x00007fffe23ed014 in _nss_wins_gethostbyname_r () from /usr/lib64/libnss_wins.so.2
#11 0x00007ffff6e07412 in gethostbyname_r () from /lib64/libc.so.6
#12 0x00007fffe7670825 in PR_GetHostByName () from /usr/lib64/libnspr4.so
#13 0x00007fffea3663ec in ?? () from /usr/lib64/firefox/libxul.so
#14 0x00007fffea366dd9 in ?? () from /usr/lib64/firefox/libxul.so
#15 0x00007fffea366e6f in ?? () from /usr/lib64/firefox/libxul.so
#16 0x00007fffea3670d6 in ?? () from /usr/lib64/firefox/libxul.so
#17 0x00007fffea36716e in ?? () from /usr/lib64/firefox/libxul.so
#18 0x00007fffea36ca91 in ?? () from /usr/lib64/firefox/libxul.so
#19 0x00007fffea36d832 in ?? () from /usr/lib64/firefox/libxul.so
#20 0x00007fffea36dac6 in XRE_main () from /usr/lib64/firefox/libxul.so
#21 0x00000000004059a3 in ?? ()
#22 0x000000000040506a in ?? ()
#23 0x00007ffff6d2e710 in __libc_start_main () from /lib64/libc.so.6
#24 0x00000000004052e9 in _start ()
The backtrace showed that the problem is related to name resolution using WINS protocol. My system uses it as a third method after hosts file and DNS.

$ grep hosts /etc/nsswitch.conf 
hosts:       files dns wins

After I removed wins source from nsswitch.conf I can't reproduce the problem anymore. So, the problem actually in Samba subsystem.

Many thanks for participation!
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
Flags: needinfo?(mh+mozilla)
You need to log in before you can comment on or make changes to this bug.