# firefox continuously core dumping



## hruodr (Jan 24, 2019)

This happens with firefox from upgrade to upgrade. Sometimes more stable, sometimes crashes continuously. Characteristic of bloat software: it does not evolve, only mutate and get fatter.


```
# uname -a
FreeBSD fbsd.local 11.2-RELEASE FreeBSD 11.2-RELEASE #0 r335510: Fri Jun 22 04:32:14 UTC 2018     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
# firefox --version
Mozilla Firefox 64.0.2
```


----------



## drhowarddrfine (Jan 24, 2019)

I don't have the problem but did you report it on bugzilla?


----------



## Sevendogsbsd (Jan 24, 2019)

I never got cores on www/firefox but get them from time to time on x11-fm/xfe and on a couple of other non-bloated apps. I would not say the cores are because the app is bloated. Another member (name escapes me) posted in his profile he is getting cores all the time.


----------



## aragats (Jan 24, 2019)

hruodr said:


> This happens with firefox from upgrade to upgrade.


Agree, FF is getting worse in the stability aspect.
I posted another issue recently.
I have less problems with FF in my desktop (Xeon E5-1650, 16G RAM), but yesterday it crashed there too.
In my laptop (i7-3520M, 16G RAM) I had to switch to Chromium because of those issues with FF...


----------



## xtaz (Jan 24, 2019)

Try adding the following to /etc/sysctl.conf:


```
net.local.stream.recvspace=16384
net.local.stream.sendspace=16384
```

I have no idea why but doing that solved the problem for me a long time ago. I've never had a single core dump since then. I can't even remember where I got that from now. Must have been somewhere on this forum or the mailing lists.


----------



## Sevendogsbsd (Jan 24, 2019)

Coredumps in FF stopped with that fix or in general?


----------



## drhowarddrfine (Jan 24, 2019)

xtaz said:


> I can't even remember where I got that from now.


Actually, that's a fix for chromium crashing. I don't know if that fixes anything in FF or not.


----------



## xtaz (Jan 24, 2019)

Interesting! Well FF used to regularly crash for me and leave a core and I found that mentioned as a possible fix. I tried it and seriously FF has never crashed since. It could be a coincidence, but what can I say? It's worth a try!


----------



## BSD User (Jan 24, 2019)

FF is my primary browser and it runs without any issues. I haven't experienced any crashes on 12.0 yet.

*Xfce Version 4.12*
FreeBSD 12.0-RELEASE r341666 GENERIC  amd64
Mozilla Firefox 64.0.2


----------



## hruodr (Jan 24, 2019)

Thanks, xtaz. Perhaps I try it, perhaps I wait until it again become stable.

One of the problems with firefox is, that after some new versions I have to customize it again because of unwanted "features".

I am really not enthusiastic to begin with also continuously adapting my system to every version of firefox.


----------



## Vull (Jan 24, 2019)

I use firefox regularly and don't get the coredumps on my i386 system with only 3 GB of RAM and 6,096,384 KB of swap in a dedicated swap partition. Not sure what else might be possibly different about my configuration, but I don't get the coredumps with firefox version 63 or 64, nor with the esr version 63, and it doesn't seem to matter whether I use packages or ports.

I use the same settings in /etc/sysctl.conf which xtaz suggested above, plus the procfs addition to /etc/fstab (which has been somewhat inconsistently and ambiguously recommended for KDE, both in the installation output and on the kde.org website): 
	
	



```
proc            /proc           procfs  rw      0       0
```
 I'm not sure if the procfs config is related to this problem or not, but if you're not already using it, it might be worth a try.


----------



## Deleted member 30996 (Jan 25, 2019)

I'm currently using www/firefox on one machine and www/firefox-esr on another. I updated Firefox yesterday and Firefox-ESR today.

Firefox has crashed 3 times in the past 2-3 hours. Firefox-ESR hasn't crashed in approximately the same time. I don't use any variables on either to prevent crashing.


----------



## sidetone (Jan 25, 2019)

xtaz said:


> Try adding the following to /etc/sysctl.conf:
> 
> 
> ```
> ...


Thread Firefox is leaking memory on my systems.67657

In short, it's a kernel bug having to do with a process that Firefox uses. The recommended fix is in /usr/ports/www/firefox/pkg-message.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=181741 is the bug, and https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229893#c0 shows how it relates to Firefox.


----------



## drhowarddrfine (Jan 25, 2019)

sidetone said:


> The recommended fix is


But both those were closed as fixed.


----------



## xtaz (Jan 25, 2019)

It seems so. I'm running 12.0. I'm going to remove those lines from my config and see how it goes. Before I added those lines FF would crash around once every 3 days maybe.


----------



## Sevendogsbsd (Jan 25, 2019)

Curious, do the folks running FF leave their systems running 24x7? I have never had a FF crash or core dump that I can remember anyway, but I shut my system down every night.


----------



## aragats (Jan 25, 2019)

Sevendogsbsd said:


> do the folks running FF leave their systems running 24x7?


Yes! And the FF is running with several open tabs.
However, the issues haven't happen before.
Moreover, besides the crashes and unkillable residual processes I found several other less noticeable issues. For example, suddenly sound disappears on certain sites, Ublock Origin stops blocking ads etc.
I have never seen such things before recent updates.


----------



## Sevendogsbsd (Jan 25, 2019)

Interesting. I am building it now so I can test later to see if I have any issues. I should leave it running all weekend to see what happens.


----------



## xtaz (Jan 25, 2019)

I don't leave mine running. It's on a laptop which I shut down every time I stop using it because FreeBSD won't do hibernate to disk, only RAM. So it's a fresh boot. FF used to crash and leave a core probably 2 or 3 times a week. Other days it would work fine all day without any issues at all. It tended to do it when I moved the mouse over something on the page. If I just left it alone it would be fine.


----------



## Deleted member 30996 (Jan 25, 2019)

Sevendogsbsd said:


> Curious, do the folks running FF leave their systems running 24x7?



Yes, I always have at least 2 up running 24/7. I was going to post using the one I have running www/firefox but Firefox has already crashed when trying to switch between 2 tabs and not up 10 minutes.

It's a T400 with 2.4GHz Core2 Duo, 8GB RAM and Switchable Graphics with Intel GMA 4500MHD and ATI Mobility Radeon HD 3470 that defaults to the Radeon driver. It's never short on resources and no other programs ever crash.

I agree that Firefox is becoming a bloated mess and don't care for it nearly as much as before it adopted Quantum Strangeness and broke all my extensions. I'm using the machine with www/firefox-esr to post with now and it hasn't crashed anytime lately that I recall. I'd happily use www/seamonkey all the time but using a browser with known vulnerabilities doesn't appeal to me.

Speaking of which:

https://www.zdnet.com/article/websites-can-steal-browser-data-via-extensions-apis/


----------



## Sevendogsbsd (Jan 25, 2019)

Thanks for that Trihexagonal - I was using seamonkey but wasn't sure it got the patch/update love that chromium and firefox do. Using chromium now with success, except my google paranoia, but my need for a secure browser outweighs that and I don't sign into the browser anyway. I use a browser all the time so need it to be reasonably secure.

I never use extensions for that very reason.


----------



## Sevendogsbsd (Jan 26, 2019)

Built and installed www/firefox, running in the background, may use for some searches, etc. I am just going to let it run today and see how it fares. I'll post back if I get any crashes. It is completely "stock" with zero personal configuration, although I did customize the build options:


```
# This file is auto-generated by 'make config'.
# Options for firefox-65.0_1,1
_OPTIONS_READ=firefox-65.0_1,1
_FILE_COMPLETE_OPTIONS_LIST=CANBERRA DBUS DEBUG FFMPEG GCONF LIBPROXY OPTIMIZED_CFLAGS PROFILE TEST ALSA JACK PULSEA
UDIO SNDIO
OPTIONS_FILE_UNSET+=CANBERRA
OPTIONS_FILE_SET+=DBUS
OPTIONS_FILE_UNSET+=DEBUG
OPTIONS_FILE_SET+=FFMPEG
OPTIONS_FILE_SET+=GCONF
OPTIONS_FILE_UNSET+=LIBPROXY
OPTIONS_FILE_SET+=OPTIMIZED_CFLAGS
OPTIONS_FILE_SET+=PROFILE
OPTIONS_FILE_UNSET+=TEST
OPTIONS_FILE_UNSET+=ALSA
OPTIONS_FILE_UNSET+=JACK
OPTIONS_FILE_UNSET+=PULSEAUDIO
OPTIONS_FILE_SET+=SNDIO
```


----------



## PMc (Jan 26, 2019)

hruodr said:


> This happens with firefox from upgrade to upgrade. Sometimes more stable, sometimes crashes continuously. Characteristic of bloat software: it does not evolve, only mutate and get fatter.



Thanks, same here. You hit the mark.

Mine doesn't crash or malfunction in any way (except after the last update it was somehow pissed at first). It just leaves a fat core after exiting almost every day, bloating my backup server. (Probably, if it's in a state that it cannot properly exit anymore, it would crash sooner or later.)
Rel. 60.3 ESR

Caught myself thinking some script should remove the dungheaps during /etc/rc.local, but then there also was a way in unix to seriously get rid of coredumps... ah, ulimit.


----------



## hruodr (Jan 26, 2019)

*PMc, sidetone* mentioned a bug that was fixed on 2018-08-17, but I have a FreeBSD 11.2 from 2018-06-22 (r335510). I think, the solution is to wait a little.


----------



## Minbari (Jan 26, 2019)

I'm using the latest firefox available from ports (65.0_1,1) and I don't have any crush. The only available options are:

```
ALSA           : on
    CANBERRA       : off
    DBUS           : on
    DEBUG          : off
    FFMPEG         : on
    GCONF          : on
    JACK           : on
    LIBPROXY       : off
    OPTIMIZED_CFLAGS: on
    PROFILE        : on
    PULSEAUDIO     : off
    SNDIO          : off
    TEST           : off
```

Till now with this config Ff works like a charm. In the past when I had pulseaudio and/or sndio enabled I had a lots of core dumps.


----------



## Sevendogsbsd (Jan 26, 2019)

I actually have everything on my system that can play sound and that can be configured with sndio, using sndio. I have been running that build of FF all day with no cores, but I am not using it heavily, except for surfing around and watching some youtube vids. 

This core thing has got me puzzled because it seems to happen randomly, and infrequently, at least to me. I suppose it is possible to view the core itself in a text editor or use "strings" (?) so you can see what actually caused it, if you have skill I suppose. I do not


----------



## PMc (Jan 27, 2019)

hruodr said:


> *PMc, sidetone* mentioned a bug that was fixed on 2018-08-17, but I have a FreeBSD 11.2 from 2018-06-22 (r335510). I think, the solution is to wait a little.



Aye, that would appear in 11.3. I put those recommended buffer space adjustments in. Lets see...


----------



## gnath (Jan 27, 2019)

For my laptop with 11.2-RELEASE-p8 I have no problem with FF. But since last few months I had same core dump for www/palemoon & FF on my desktop with port system. Have build FF wih same setting of FF package but without improvement. I noticed that after opening of 2/3 tab the next tab crashed in FF. Then that sysctl setting started appearing from update of FF without any result. After disabling the swap partition I had no problem so far. Can not say any reason.


----------



## drhowarddrfine (Jan 27, 2019)

I'm stuck doing some development work on Chromium right now. I left FF open and tried to make myself do as much there as I could last night--about five hours--and had no issues but some of you say you leave FF on all the time. When I develop, I do the same but it depends on the browser I'm testing in or start with.


----------



## Sevendogsbsd (Jan 27, 2019)

Been running my "test" build of www/firefox all morning with between 13 and 21 tabs open to various sites, mainly the junk on FF's front page when you first open it. I am randomly closing the browser and letting the warning about "you have 1 billion tabs open" come up. No logins, no configuration, nothing, just the build I mentioned in a prev post.

No core dumps so far. Memory is 4-5gb used but I have www/chromium up as well.


----------



## Deleted member 9563 (Jan 27, 2019)

For me Firefox always seems to come up clean with all tabs intact and no problems. However, it seems like it's some script on some website that causes it to lock up and I have to kill it. I don't know what it is. It has never crashed by itself. 

There may indeed be a significant difference between the situation with people who close FF sometimes and those of us who leave it running indefinitely. I have a dozen or more windows with FF, and many hundred tabs in those, so I know I'm pushing it.


----------



## Vull (Jan 27, 2019)

I can browse this forum all day without closing Firefox. When I look at my statistics from "top" they are consistent and don't seem to show any obvious memory leaks. The same is essentially true of freshports.org, wikpedia.org, wictionary.org, google.com, my own localhost and local area network php development sites, and most of the other sites I use frequently. But if I go to some of the other less well-behaved sites I use every now and then, like facebook.com in particular, then when I check "top" I can see that my memory usage will remain obscenely bloated, even after I've closed the tab, and it won't completely recover until I've closed down Firefox completely and restarted it.


----------



## xtaz (Jan 28, 2019)

For what it's worth, I removed the config lines from /etc/sysctl.conf that I mentioned earlier in this thread and have actually not had it crash at all. So it does, at least for me, appear that this isn't an issue on 12.0 like it was on 11.x For the others that still have an issue, it could be a dodgy extension or something? I personally only have ublock origin. That's the only extension I have installed.


----------



## PMc (Jan 28, 2019)

xtaz said:


> For what it's worth, I removed the config lines from /etc/sysctl.conf that I mentioned earlier in this thread and have actually not had it crash at all. So it does, at least for me, appear that this isn't an issue on 12.0 like it was on 11.x



That sounds correct. As far as I glanced over the commitlogs, the fix was introduced after 11.2, and well before 12.0..


----------



## PMc (Feb 5, 2019)

I can now confirm that the above mentioned remedy (increasing net.local.stream.send/recvspace) does *NOT *solve my coredump issue: they continue to appear - and they appear long after firefox has been terminated, probably at system shutdown.

What happens is: when firefox is ended, after closing all windows one firefox process does stay and sleep - it does nothing. Then wenn trying to start firefox anew, this process writes a coredump. (Qualified as: _the usual crap_, not worth debugging.)


----------



## aragats (Feb 5, 2019)

PMc said:


> they appear long after firefox has been terminated, probably at system shutdown.


I described such situation in another thread. Couldn't find a remedy though.


----------



## MathematicsStudent (Feb 20, 2019)

Same here. Firefox hangs as soon as i open heavy websites  (i.e. Youtube and Outlook). I use uBlock Origin and HttpsEverywhere. Desktop Computer with AMD A4-5300 APU and 8 GB of RAM, FreeBSD 12.0 x64 as operating system.
PS: after using `truss` to track system calls it seems to be a d-bus related issue. Firefox fails to read the machine id which is supposed to be stored in /etc/machine-id or /var/lib/dbus/machine-id.
*Possible fix*
Gain root privileges:
`su`
then type
`dbus-uuidgen >> /var/lib/dbus/machine-id`
to generate (and store) a valid machine id.
Close Firefox and launch it again, now the problematic websites should work fine. Now Youtube and Outlook works without any issue, even when open at the same time.


----------



## Deleted member 30996 (Feb 21, 2019)

I just updated www/firefox to the latest version in ports. 

The first thing I did was opened a window here, then opened another to youtube and my tab crashed and core dumped. I tried again as I write and it crashed 6 times in a row with this salient message:




I updated to the latest version in hopes it would solve this problem but seems to have made it worse. 

In addition, it has developed the habit of taking a shot every time you bookmark a page, making it, to me, potentially:

 

Maybe I don't want a shot taken of every site I visit, "Godzilla".

I get better performance out of www/firefox-esr and moving to that on all my machines. It doesn't crash and knows its role.


----------



## PMc (Feb 21, 2019)

Yeah, friends, it is getting more and more gadget-compatible. Internet for the illiterates.



MathematicsStudent said:


> PS: after using `truss` to track system calls it seems to be a d-bus related issue.



Thats why I don't install dbus.


----------



## drhowarddrfine (Feb 21, 2019)

I've not been following this thread but Trihexagonal images caught my eye.

On my workstation at home, I have absolutely no problems with Firefox but, yesterday, I was at a friend's house who, for fun, tried to install Clear Linux. I believe he got that exact same error message after installing Firefox. (He can't get Linux to work properly either.)


----------



## MathematicsStudent (Feb 21, 2019)

It appears that dbus is not the real cause of Firefox core dumps. In my case setting up dbus properly solved the issue, but this fix cannot apply for PMc who doesn't run dbus. It is weird! Can someone else start firefox with `truss -o filename_of_your_choice firefox`, make it crash and share the result  of `tail -n 100 filename_of_your_choice` or `tail -n 100 filename_of_your_choice | grep  -i dbus`?


----------



## Deleted member 30996 (Feb 22, 2019)

```
$ truss -o /usr/home/jitte/Documents/funkfox01.txt firefox
truss: Unable to enable LWP events for pid 4818: No such process
$
```

funkfox.txt was created but blank once I got it to crash.


----------



## PMc (Feb 22, 2019)

MathematicsStudent said:


> It appears that dbus is not the real cause of Firefox core dumps. In my case setting up dbus properly solved the issue, but this fix cannot apply for PMc who doesn't run dbus. It is weird!



In my case it is most likely a different issue, as it practically never happened while running, only when terminating: it seemed to disappear orderly (I stop it explicitely before shutting down the machine), but next day the core file was there.
And this issue seems to have become significantly better after I 

added the above mentioned buffer adjustments,
added 4G ram.
I suppose the reason is in the latter, because now the beast lives in RAM, while before it was partially paged out and had to do some paging work when terminating. Coding errors manifesting only with unusual delays at such a place are not unlikely, and difficult to pinpoint.


----------



## Deleted member 30996 (Feb 22, 2019)

I'm using my T400 Fluxbox desktop with:

FreeBSD 11.2-RELEASE-p9
Intel Core2 Duo P8600 @ 2.40GHz
8GB RAM
RV620/M82 [Mobility Radeon HD 3450/3470] 
Swap: 3979M Total, 3979M Free

It's the machine I've been using the most for some time now and was logged in 8 hours at a site last night using www/palemoon without a tab crashing and at least 6 open at all times.


----------



## rsronin (Feb 22, 2019)

I am on 12.0-RELEASE-p3, pkg only, plasma5-plasma and some (kde5) apps. Firefox version 65.0.1_1,1 runs fine here on HP Microserver n54l with 4GB of memory and 8GB of swap space.

I have this in /boot/loader.conf:

`#
kern.ipc.shmall=32768
kern.ipc.shmseg=1024
kern.ipc.shmmni=1024
kern.maxproc=100000
#`

And this in /etc/sysctl.conf:

`# Enhance shared memory X11 interface
kern.ipc.shmmax=67108864
kern.ipc.shmall=32768

kern.sched.preempt_thresh=224

#kern.maxfiles=100000
hw.syscons.bell=0

kern.ipc.shm_allow_removed=1

net.local.stream.recvspace=65536
net.local.stream.sendspace=65536
#net.local.stream.recvspace=16384`

Those were collected from various sources in and outside this forum.

I use some some add-ons like ublock-origin and clear cookies and cache on a regular basis.


----------



## xavi (Feb 22, 2019)

Bit late to this post, but for everyone still experiencing problems with Firefox core-dumping you might want to take a look at the thread 'Kernel Panics With Firefox 63.x' on the questions mailing list and read all the subsequent entries.


----------

