https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291122
Bug ID: 291122
Summary: www/firefox: initial window is 500x120 pixels;
profile's xulstore.json is getting absurd values
written on exit
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: [email protected]
Reporter: [email protected]
Flags: maintainer-feedback?([email protected])
Assignee: [email protected]
I started noticing the behavior a couple of weeks ago, and after my usual daily
updates didn't seem to help, I finally poked around enough to determine that
the profile's xulstore.json file is being rewritten as firefox exits (as
expected), but with seriously bogus values.
My environment (as of today):
FreeBSD g1-120.catwhisker.org 14.3-STABLE FreeBSD 14.3-STABLE #602
stable/14-n272914-fa1337393b84: Thu Nov 20 11:45:05 UTC 2025
[email protected]:/common/S1/obj/usr/src/amd64.amd64/sys/CANARY amd64
1403506 1403506
Installed ports are all updated as of the ports tree at
main-n726256-41c4cade8808. In particular, firefox is:
g1-120(14.3-S)[15] pkg info -o firefox\*
firefox-145.0.1,2 www/firefox
The window manager I am using is www/piewm (based on an early version of tvtwm,
which is what I had been using in SunOS ca. 1993 or so, and continued when I
started using FreeBSD in 1998, until I discovered piewm a few years later).
After starting firefox, and manually re-sizing the window so it's actually
usable, the xulstore.json file looks like:
{"chrome://browser/content/browser.xhtml":{"main-window":{"screenX":"0","screenY":"-1080","width":"1380","height":"1051","sizemode":"normal"},"sidebar-title":{"value":"Bookmarks"},"toolbar-menubar":{"autohide":"-moz-missing\n"}},"chrome://browser/content/places/bookmarksSidebar.xhtml":{"place:CqewroxEONFH0b8ILWSXYA==":{"open":"true"},"place:Zb6FJ+zKg63cESydVyD3sQ==":{"open":"true"},"place:U223EZSYgg2CPFnv/86HPg==":{"open":"true"}}}
Feeding it to jq, we get:
{
"chrome://browser/content/browser.xhtml": {
"main-window": {
"screenX": "0",
"screenY": "-1080",
"width": "1380",
"height": "1051",
"sizemode": "normal"
},
"sidebar-title": {
"value": "Bookmarks"
},
"toolbar-menubar": {
"autohide": "-moz-missing\n"
}
},
"chrome://browser/content/places/bookmarksSidebar.xhtml": {
"place:CqewroxEONFH0b8ILWSXYA==": {
"open": "true"
},
"place:Zb6FJ+zKg63cESydVyD3sQ==": {
"open": "true"
},
"place:U223EZSYgg2CPFnv/86HPg==": {
"open": "true"
}
}
}
The important part for this issue is the
chrome://browser/content/browser.xhtml{main-window} part: that has the window
geometry.
When I quit firefox (gracefully), that file gets overwritten, and the geometry
part gets:
"main-window": {
"screenX": "1",
"screenY": "-2",
"width": "0",
"height": "0",
"sizemode": "normal"
},
I managed to "catch it in the act" via ktrace:
55049 BgIOThreadPool #7 RET _umtx_op 0
55049 BgIOThreadPool #7 CALL access(0x1672d93d0f08,0<F_OK>)
55049 BgIOThreadPool #7 NAMI
"/home/david/.mozilla/firefox/ikr1zr7v.default/xulstore.json"
55049 BgIOThreadPool #7 RET access 0
55049 BgIOThreadPool #7 CALL
mkdir(0x1672c0d4aa48,0755<S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH>)
55049 BgIOThreadPool #7 NAMI "/home/david/.mozilla/firefox/ikr1zr7v.default"
55049 BgIOThreadPool #7 RET mkdir -1 errno 17 File exists
55049 BgIOThreadPool #7 CALL
openat(AT_FDCWD,0x1672d09f0008,0x601<O_WRONLY|O_CREAT|O_TRUNC>,0666<S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH>)
55049 BgIOThreadPool #7 NAMI
"/home/david/.mozilla/firefox/ikr1zr7v.default/xulstore.json.tmp"
55049 BgIOThreadPool #7 RET openat 92/0x5c
55049 BgIOThreadPool #7 CALL write(0x5c,0x1672c0d30408,0x20c)
55049 BgIOThreadPool #7 GIO fd 92 wrote 524 bytes
"{"chrome://browser/content/browser.xhtml":{"main-window":{"screenX":"1","screenY":"-2","width":"0","height":"0","sizemode":"normal"},"sidebar-title":{"value":"Bookmarks"},"toolbar-menubar":{"autohide":"-moz-missing\\n"}},"chrome://browser/content/places/bookmarksSidebar.xhtml":{"place:CqewroxEONFH0b8ILWSX\
YA==":{"open":"true"},"place:Zb6FJ+zKg63cESydVyD3sQ==":{"open":"true"},"place:U223EZSYgg2CPFnv/86HPg==":{"open":"true"},"place:5RxX05RMJ2IXs2jwAFaagA==":{"open":"true"},"place:QOzH1kYvvT/L8EpVMDI82w==":{"open":"true"}}}"
55049 BgIOThreadPool #7 RET write 524/0x20c
55049 BgIOThreadPool #7 CALL close(0x5c)
55049 BgIOThreadPool #7 RET close 0
55049 BgIOThreadPool #7 CALL
fstatat(AT_FDCWD,0x1672d93d0f08,0x1672c9fdd510,0)
55049 BgIOThreadPool #7 NAMI
"/home/david/.mozilla/firefox/ikr1zr7v.default/xulstore.json"
55049 BgIOThreadPool #7 STRU struct stat {dev=168, ino=14025176,
mode=0100644, nlink=1, uid=1001, gid=0, rdev=18446744073709551615,
atime=1763690823.309314000, mtime=1763690823.309347000,
ctime=1763690823.309387000, birthtime=1763690823.309313000, size=533,
blksize=32768, blocks=8, flags=0x0 }
55049 BgIOThreadPool #7 RET fstatat 0
55049 BgIOThreadPool #7 CALL access(0x1672d09f0008,0<F_OK>)
55049 BgIOThreadPool #7 NAMI
"/home/david/.mozilla/firefox/ikr1zr7v.default/xulstore.json.tmp"
55049 BgIOThreadPool #7 RET access 0
55049 BgIOThreadPool #7 CALL
fstatat(AT_FDCWD,0x1672d93d0f08,0x1672c9fdd510,0)
55049 BgIOThreadPool #7 NAMI
"/home/david/.mozilla/firefox/ikr1zr7v.default/xulstore.json"
55049 BgIOThreadPool #7 STRU struct stat {dev=168, ino=14025176,
mode=0100644, nlink=1, uid=1001, gid=0, rdev=18446744073709551615,
atime=1763690823.309314000, mtime=1763690823.309347000,
ctime=1763690823.309387000, birthtime=1763690823.309313000, size=533,
blksize=32768, blocks=8, flags=0x0 }
55049 BgIOThreadPool #7 RET fstatat 0
55049 BgIOThreadPool #7 CALL
fstatat(AT_FDCWD,0x1672d09f0008,0x1672cee67d10,0)
55049 BgIOThreadPool #7 NAMI
"/home/david/.mozilla/firefox/ikr1zr7v.default/xulstore.json.tmp"
55049 BgIOThreadPool #7 STRU struct stat {dev=168, ino=14025128,
mode=0100644, nlink=1, uid=1001, gid=0, rdev=18446744073709551615,
atime=1763692594.914967000, mtime=1763692594.914987000,
ctime=1763692594.914987000, birthtime=1763692594.914967000, size=524,
blksize=32768, blocks=8, flags=0x0 }
55049 BgIOThreadPool #7 RET fstatat 0
55049 BgIOThreadPool #7 CALL access(0x1672c0d4aa48,0<F_OK>)
55049 BgIOThreadPool #7 NAMI "/home/david/.mozilla/firefox/ikr1zr7v.default"
55049 BgIOThreadPool #7 RET access 0
55049 BgIOThreadPool #7 CALL
fstatat(AT_FDCWD,0x1672c0d4aa48,0x1672cc9d0910,0)
55049 BgIOThreadPool #7 NAMI "/home/david/.mozilla/firefox/ikr1zr7v.default"
55049 BgIOThreadPool #7 STRU struct stat {dev=168, ino=14027414, mode=040700,
nlink=27, uid=1001, gid=0, rdev=18446744073709551615, atime=1762955742,
mtime=1763692594.914972000, ctime=1763692594.914972000, birthtime=1762920197,
size=4096, blksize=32768, blocks=8, flags=0x0 }
55049 BgIOThreadPool #7 RET fstatat 0
55049 BgIOThreadPool #7 CALL rename(0x1672d09f0008,0xdd07d4801fc)
55049 BgIOThreadPool #7 NAMI
"/home/david/.mozilla/firefox/ikr1zr7v.default/xulstore.json.tmp"
55049 BgIOThreadPool #7 NAMI
"/home/david/.mozilla/firefox/ikr1zr7v.default/xulstore.json"
55049 BgIOThreadPool #7 RET rename 0
So I *think* this is probably a bug in firefox, rather than FreeBSD, but I'm
not at all familiar with the process of reporting bugs there... and there is at
least a plausibility(?) that there's some weird interaction between firefox and
ancient concepts like "window managers" (vs. "Desktop Environments") that
someone may have overlooked, because... who would use such an archaic thing in
this day and age? And writing this up might at least give someone else who is
experiencing the issue a fighting chance.
And yes, I even tried moving ~/.mozilla/firefox aside (wholesale), but the
symptoms persisted.
In the mean time, I have saved "good" copies of the xulstore.json file &
written a script to run before firing up firefox, which restores the file from
the saved copy. Which is a bit klunky, but at least it makes firefox's
handling of windows no worse than it historically has been.
If I should be reporting this to Mozilla, I'd appreciate a wee bit of guidance.
Thanks!
--
You are receiving this mail because:
You are the assignee for the bug.