firefox-21.0_1,1 hangs/sleeps when started as non-root

Hi,

Just installed a fresh FreeBSD 9.1, built all packages from ports from May 18th. When Firefox is started as a user, the process hangs or sleeps before showing anything. There is no output of any kind, it appears to wait for something. I can start and use it as root. This is in Fluxbox and KDE4. Opera works ok (in Fluxbox).

Any ideas?
 
Make sure your ~/.mozilla folder belongs to you (or any other folder that resembles ~/.firefox). If your username is teig, use # chown -R teig:teig /home/teig to return all file ownerships in /home/teig to yourself, or # chown -R teig:teig ~teig/.mozilla to just give the ~/.mozilla folder back to yourself (user teig.

This can happen if you compile www/firefox while logged in as root with $ su -m to enable certain optimizations of firefox.
 
Yes, I was thinking along those lines as well. I've removed .mozilla and .cache/mozilla, to no avail. .cache/mozilla and .mozilla are rebuilt upon starting Firefox (at least partly). I haven't checked for files outside my $HOME. I'll investigate further.
 
Hi,

It still hangs. When started and hanging as non-root I have this:
Code:
.mozilla/firefox/74gln15p.default:
total 11496
drwx------      512 28 maj 22:11 .
drwx------      512 28 maj 08:04 ..
-rw-r--r--        0 28 maj 22:11 .parentlock
-rw-------    65536 28 maj 08:05 cert8.db
-rw-------      174 28 maj 22:11 compatibility.ini
-rw-r--r--      125 28 maj 08:04 extensions.ini
-rw-r--r--   458752 28 maj 08:04 extensions.sqlite
-rw-r--r--   295496 28 maj 08:04 extensions.sqlite-journal
-rw-------   131072 28 maj 08:05 key3.db
-rw-r--r--      169 28 maj 08:04 localstore.rdf
lrwxr-xr-x       20 28 maj 22:11 lock -> 192.168.5.102:+16583
-rw-r--r--    65536 28 maj 08:04 permissions.sqlite
-rw-r--r-- 10485760 28 maj 08:04 places.sqlite
-rw-r--r--    32768 28 maj 22:11 places.sqlite-shm
-rw-r--r--    65616 28 maj 08:04 places.sqlite-wal
-rw-------      609 28 maj 22:11 prefs.js
-rw-------   131072 28 maj 08:04 secmod.db
-rwx------       29 28 maj 08:04 times.json
drwxr-xr-x      512 28 maj 08:04 webapps

Compared to the same directory as root a number of files are missing. The abnormal files are extensions.sqlite-journal and places.sqlite-wal, which should not be present and should be 0, respectively.

Other than owner issues I haven't found other suggestions.
 
Which webpages did you visit as the root user? Did you visit YouTube or a similar page?

If you did, check UPDATING:
Code:
20121010:
AFFECTS: users of www/firefox and www/seamonkey
AUTHOR: gecko@FreeBSD.org

When using Firefox or SeaMonkey compiled with ALSA option ON it may
crash on assert in cubeb_refill_stream as described in ports/170473.
To fix either set media.use_cubeb -> false in about:config or rebuild
audio/alsa-plugins with ARIFF_OSS option disabled (default).

which you'll probably have to do as the root user, logged in from your own account via # su -m. This, however, may not be the cure, since you tried with completely deleting the ~/.mozilla. This fixed the problem for me last month.

Does the problem persist, if you use more conservative config flags for building?
 
No, it was OSNews or something simple, just to check that it worked.

Well, checked UPDATING and there's also sqlite3 option requirements, but these are already default. Have removed firefox completely, rebuilt and reinstalled, no change. Rebuilt and reinstalled sqlite3 as well, no change. There aren't that many firefox build options enabled by default. Will try turning some of them off.
 
Oh, I thought you had some optimizations turned on. It should work with the default config flags, but maybe you could try that too.

I remember I had to add myself to be a member of group `webcamd' to be able to use my webcam as a non-root user. It's just a wild guess, but maybe firefox expects you to be a member of certain groups if you want to use it as a non-root user (although it's unlikely). I am a member of groups wheel, daemon and operator.

You can check this in the file /etc/group, for editing you have to use pw(8)() (because you have to change some other files as well, to be consistent).

Another thing you can try is running $ firefox straight from the terminal. Maybe it will give you more clues if there is something missing, because it usually displays error messages in stdout.
 
No changes so far. Removed and added myself from those groups using pw, no change. I am starting Firefox from the command line, there's no output, other than PID etc. I have also checked the Mozilla KnowledgeBase on 'firefox hangs', nothing new there.
 
After you ran firefox in the terminal you used the '&' in the end of the command, didn't you? You must not do that now, because you don't want it to run in the background -- the information you want will be hidden otherwise. That's why I wrote $ firefox and not $ firefox &. Keep that terminal open, and open up another one, in which you will run # ps aux | grep firefox, to see if that process is being executed.

I know it will take a while, but what happens if you build a different version of firefox? Try www/firefox-esr for example.
 
Still no output using just firefox. firefox-esr is working just fine. Thanks for keeping the suggestions coming!
 
Maybe it had something to do with your configuration flags (maybe with one of the dependencies). If you use plain make to build your ports, try
Code:
# cd /usr/ports/www/firefox
# make all-depends-list
to see which dependencies firefox has. If you want to try with default flags for all dependencies, you can then run # make rmconfig-recursive, but make sure you backup your /var/db/pkg directory before you do it.
 
Back
Top