Bug 448355

Summary: Many firefox features stopped working
Product: [Fedora] Fedora Reporter: Alexey Torkhov <atorkhov>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 9CC: bruno, dwalsh, mcepl, rvokal, walters
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-11-17 22:04:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexey Torkhov 2008-05-26 07:35:13 UTC
Description of problem:
After update to F-9 firefox was working fine. But yesterday many of its features
like saving password, bookmarks, changing some config settings, search. That is
the only working thing is browsing.

Version-Release number of selected component (if applicable):
firefox-3.0-0.60.beta5.fc9.i386

How reproducible:
Always.

Additional info:
What additional info should I give?

Comment 1 Matěj Cepl 2008-05-26 13:46:39 UTC
Please, try:

a) quit firefox, move ~/.mozilla somewhere else, restart firefox
b) start firefox with -safe-mode option

Does the problem persists in both cases?

Comment 2 Alexey Torkhov 2008-05-26 19:39:44 UTC
a) Works fine, as it should.
b) Doesn't work, i. e. all stay the same. I didn't select options of safe mode
to reset anything.


Comment 3 Matěj Cepl 2008-05-27 12:43:07 UTC
It is weird -- what did change on 2008-05-25? You said, that after initial
installation of F9 everythings worked fine. However, there was no upgrade of
Firefox in F9 yet (and your version of FF is the current version in F9), so
something else had to happen to trigger this behavior. What did you do?

Comment 4 Bruno Postle 2008-05-29 23:29:46 UTC
I see exactly the same, after upgrading to F9 firefox seemed to be ok.

Then after a reboot, firefox now has no bookmarks and the download manager
doesn't appear.

Some preferences appear broken e.g. 'Edit -> Preferences -> Save files to' is
empty and can't be set.

firefox-3.0-0.60.beta5.fc9.x86_64

I can create an apparently complete bookmarks backup using 'Organise bookmarks
-> Export', reimporting this file still results in no bookmarks.

Comment 5 Alexey Torkhov 2008-05-30 07:31:14 UTC
(In reply to comment #3)
> What did you do?
Didn't do anything special. Didn't tweak it. Didn't install any plugins. Can't
imagine what could lead to such behaviour.

(In reply to comment #4)
> Some preferences appear broken e.g. 'Edit -> Preferences -> Save files to' is
> empty and can't be set.
Same here.

> I can create an apparently complete bookmarks backup using 'Organise bookmarks
> -> Export', reimporting this file still results in no bookmarks.
Yes, I also see all my bookmarks in 'Organize bookmarks', but bookmark menu and
toolbar are empty.

Comment 6 Matěj Cepl 2008-05-30 10:39:56 UTC
Bookmarks stuff is duplicate of bug 444887, so that's out.

Comment 7 Matěj Cepl 2008-05-30 10:45:09 UTC
This bug is hopelessly messy -- I know that this will mean some work for you,
but reporter, could you please make bugs per each issue -- there is no way how
to fix this enchalada? When making bug reports, please, check whether you can
reproduce each of these bugs with the upstream binary from
http://www.mozilla.com/en-US/firefox/all-beta.html?

Please, post here numbers of the new bugs then.

Bruno, when Alexey let us know numbers of the bugs, could you check whether you
can reproduce them (and add your own bug reports for anything not covered by
Alexey), please?

Thanks a lot to both of you.

Comment 8 Bruno Postle 2008-05-30 21:24:20 UTC
The firefox error console shows this on startup:

Error: uncaught exception: [Exception... "Component returned failure code:
0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]"  nsresult:
"0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)"  location: "JS frame ::
file:///usr/lib64/xulrunner-1.9pre/modules/utils.js :: anonymous :: line 95" 
data: no]

Error: this.bookmarks is undefined
Source File: file:///usr/lib64/xulrunner-1.9pre/modules/utils.js
Line: 842

Comment 9 Alexey Torkhov 2008-05-30 21:43:23 UTC
Seems like it was selinux problem: I exec "restorecon -R ~/.mozilla" and it
working now.

Comment 10 Alexey Torkhov 2008-05-30 22:18:31 UTC
Probably it should be user_mozilla_home_t while it was just user_home_t in my case.

Comment 11 Bruno Postle 2008-05-30 22:20:57 UTC
(In reply to comment #9)
> Seems like it was selinux problem: I exec "restorecon -R ~/.mozilla" and it
> working now.

Yep, that works for me too.  audit messages looked like this:

type=AVC msg=audit(1212185392.199:746): avc:  denied  { associate } for 
pid=3635 comm="firefox" name="localstore-1.rdf"
scontext=unconfined_u:object_r:unlabeled_t:s0 tcontext=system_u:object_r:fs_t:s0
tclass=filesystem
type=SYSCALL msg=audit(1212185392.199:746): arch=c000003e syscall=2 success=no
exit=-13 a0=3830848 a1=2c1 a2=1a4 a3=1 items=0 ppid=3621 pid=3635 auid=500
uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500
tty=(none) ses=1 comm="firefox" exe="/usr/lib64/firefox-3.0b5/firefox"
subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)

Comment 12 Matěj Cepl 2008-05-31 06:29:56 UTC
I am an idiot not to ask you about SELinux. Sorry about that. I would strongly
suggest for you to run sealert (set it up in gnome-session-properties) on your
gnome session.

We should probably run restorecon on the upgraded profiles. Not sure how.

Comment 13 Matěj Cepl 2008-05-31 07:18:21 UTC
I think some

if (we-have-not-fresh-profile && !restoreconed)
     run restorecon -R $HOME/.mozilla/

but not sure how to store the value of restoreconed variable.

Comment 14 Alexey Torkhov 2008-05-31 08:26:06 UTC
(In reply to comment #12)
> I would strongly suggest for you to run sealert on your
> gnome session.
It's running, but unfortunately setroubleshootd is failing to start (filled bug
449176 about it).

(In reply to comment #13)
> if (we-have-not-fresh-profile && !restoreconed)
>      run restorecon -R $HOME/.mozilla/
Here probably is also check is selinux enabled needed.

Comment 15 Matěj Cepl 2008-06-01 10:54:40 UTC
> (In reply to comment #13)
> > if (we-have-not-fresh-profile && !restoreconed)
> >      run restorecon -R $HOME/.mozilla/
> Here probably is also check is selinux enabled needed.

Yes, that too, but IMHO more important is not to have yet another state file, so
I think something like:

if [ -d ~/.mozilla ] && \
   [ "x$(secon -t --file ~/.mozilla)" != "xuser_mozilla_home_t" ] \
    && selinuxenabled; then
        /sbin/restorecon -R ~/.mozilla
fi

would be much better.

Martin, what do you think?

Comment 16 Daniel Walsh 2008-06-02 15:02:02 UTC
There was an upgrade breakage where .mozilla in Fedora 8 was labeled
unconfined_mozilla_home_t,  In Fedora 9 this label was changed to
user_mozilla_home_t but the old label was not aliased to the new label.  After
upgrade files labeled unconfined_mozilla_home_t became unlabeled_t and caused
the problems.  This should be fixed with selinux-policy-3.3.1-62 and beyond. 

Comment 17 Daniel Walsh 2008-11-17 22:04:12 UTC
Closing all bugs that have been in modified for over a month.  Please reopen if the bug is not actually fixed.