MozillaZine

Firefox crashes when /etc/passwd is missing (Linux)

User Help for Mozilla Firefox
AaylaSecura
 
Posts: 4
Joined: November 24th, 2014, 3:21 pm

Post Posted November 5th, 2017, 4:40 am

I run firefox 57.0 in a restricted sandbox on Linux, mounting tmpfs on top of /etc and only copying a few required files (passwd is not one of them). I have tested this with other browsers, chromium and torbrowser among which, and they work fine. But firefox crashes. The only errors it displays are:

Code: Select all
ExceptionHandler::GenerateDump cloned child ExceptionHandler::WaitForContinueSignal waiting for continue signal...
82
ExceptionHandler::SendContinueSignalToChild sent continue signal to child
2017-11-05 21:36:38: minidump.cc:4808: ERROR: ReadBytes: read 0/32
2017-11-05 21:36:38: minidump.cc:4453: ERROR: Minidump cannot read header
[Child 79, Chrome_ChildThread] WARNING: pipe error: Broken pipe: file /build/firefox-Pa1eQI/firefox-57.0~b9/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 709
[Child 79, Chrome_ChildThread] WARNING: pipe error: Broken pipe: file /build/firefox-Pa1eQI/firefox-57.0~b9/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 709
[Child 79, Chrome_ChildThread] WARNING: pipe error: Broken pipe: file /build/firefox-Pa1eQI/firefox-57.0~b9/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 709
[Child 79, Chrome_ChildThread] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /build/firefox-Pa1eQI/firefox-57.0~b9/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 22


Preserving /etc/passwd fixes it. I can't imagine why firefox would require /etc/passwd and crash without it, why is this happening?
Last edited by DanRaisch on November 5th, 2017, 4:42 am, edited 1 time in total.
Reason: "(Linux)" added to subject line.

therube

User avatar
 
Posts: 17724
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted November 5th, 2017, 8:21 am

(My guess would be that FF simply expects the existence of /etc/passwd [or something like, win.ini], but does not account for its non-existence, & when not finding it, simply farts?)
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

Grumpus

User avatar
 
Posts: 11591
Joined: October 19th, 2007, 4:23 am
Location: ... Da' Swamp

Post Posted November 5th, 2017, 9:19 am

Could relate to group Internet connection permissions.
Look at your groups permissions, checked or unchecked and then look for broken liinks to those system users in groups.
Symlinks may help.
Also there's been a recent update for Posix.

Brummelchen
 
Posts: 2544
Joined: March 19th, 2005, 10:51 am

Post Posted November 5th, 2017, 10:20 am

current is beta-14

AaylaSecura
 
Posts: 4
Joined: November 24th, 2014, 3:21 pm

Post Posted November 5th, 2017, 3:23 pm

Ok, I had some poking around and it turns out it only crashes when /etc/passwd is missing AND there isn't already a profile folder (so first launch after deleting my ~/.mozilla folder). I tried removing one file at a time (yeah...) and pinned the problem down to ~/.mozilla/firefox/<profile>/pluginreg.dat which is an ASCII file containing:

Code: Select all
Generated File. Do not edit.

[HEADER]
Version:0.18t:$
Arch:x86_64-gcc3:$

[PLUGINS]

[INVALID]
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/IcedTeaPlugin.so:$
1484408814000:$


I still don't understand why it relies on /etc/passwd, but it only needs the entry related to the user running firefox (haven't been able to test with a completely empty passwd yet).

Grumpus wrote:Could relate to group Internet connection permissions.
Look at your groups permissions, checked or unchecked and then look for broken liinks to those system users in groups.
Symlinks may help.
Also there's been a recent update for Posix.

Not sure what you mean... Are you talking linux? Internet connectivity does not rely on particular group membership, nor does /etc/passwd store any information related to groups (it's /etc/group that does that). Also, what "links to users and groups"?

Grumpus

User avatar
 
Posts: 11591
Joined: October 19th, 2007, 4:23 am
Location: ... Da' Swamp

Post Posted November 6th, 2017, 6:40 am

Internet connectivity may depend on which of the listed groups the user is a member of whether named user or root.
These are also listed in /etc/passwd and connectivity in some distributions requires a user/root password setting along with the either quiet or page loaded ISP password, in some cases while on line for the password to access the systems network manager for editing or setup.
Much depends on your distribution and method of connection whether it's cable, DSL or wireless.
Look in the groups and see what the permissions are, should be controlled by your "Users and Groups" manager.
How you get to it in Arch I don't know .
But as you seem to imply it's not necessary, maybe so with Arch.

AaylaSecura
 
Posts: 4
Joined: November 24th, 2014, 3:21 pm

Post Posted November 6th, 2017, 2:02 pm

Grumpus wrote:Internet connectivity may depend on which of the listed groups the user is a member of whether named user or root.
These are also listed in /etc/passwd and connectivity in some distributions requires a user/root password setting along with the either quiet or page loaded ISP password, in some cases while on line for the password to access the systems network manager for editing or setup.
Much depends on your distribution and method of connection whether it's cable, DSL or wireless.
Look in the groups and see what the permissions are, should be controlled by your "Users and Groups" manager.
How you get to it in Arch I don't know .
But as you seem to imply it's not necessary, maybe so with Arch.

I'm using a Debian based distro, /etc/passwd only lists the primary group. I connect to a homw WPA2-PSK network via NetworkManager (started as root), so that's not an issue.

I check strace while running outside the sandbox to see what it does between checking for pluginreg.dat and creating it:
Code: Select all
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 6
lseek(6, 0, SEEK_CUR)                   = 0
fstat(6, {st_mode=S_IFREG|0644, st_size=2859, ...}) = 0
mmap(NULL, 2859, PROT_READ, MAP_SHARED, 6, 0) = 0x7f45e091e000
lseek(6, 2859, SEEK_SET)                = 2859
munmap(0x7f45e091e000, 2859)            = 0

This seems kind of useless to me... It does this a few more times, at some point it also opens /etc/passwd read-only and reads the whole file. I don't know what it does with it afterwards though.

Grumpus

User avatar
 
Posts: 11591
Joined: October 19th, 2007, 4:23 am
Location: ... Da' Swamp

Post Posted November 7th, 2017, 5:52 am

If you check the file /etc/Network Manager/connections are any other connections noted?
Secondly, are you running two password entries to access the Internet, one as user and one as root or just a root level?
If at a root level is it possible Firefox is having some form of profile issue between root and User?
Some experience with having the profile wiped or confused and making unwanted connections to an improperly configured root level Firefox.
Also did you check the Groups file to see what permissions were shown for either user or root?

My thinking here is you've crossed a permissions boundary and created a double instance, redundant condition and the passwd file is needed for the back and forth verification.

trustjmh
 
Posts: 53
Joined: May 25th, 2008, 5:49 am

Post Posted November 7th, 2017, 7:41 am

You should start by getting and reading the stack trace if you really care to pin it down.

Here is one read. Something to do with dropping privilege.
https://dxr.mozilla.org/mozilla-central ... util.c#191

Return to Firefox Support


Who is online

Users browsing this forum: Bing [Bot], Google Adsense [Bot], Mark12547, therube and 19 guests