Firefox "STOPS" and hangs

JayArr

Member

Reaction score: 3
Messages: 50

Hi All

I've got this bug whereby Firefox just freezes sometimes. I can go for days without a problem then have it freeze up two or three times in one day. When it freezes I can switch to a terminal running top and see that one of the 4-5 processes called Firefox is in a state of STOP. I can kill the other Firefox processes but I cannot kill the one in the STOP state. If I just walk away the last process will eventually terminate itself but it can take as much as five minutes. I need to find a way to kill this off faster so I can restart Firefox and continue working.

I've reloaded Firefox and upgraded it twice, I've also made sure my system is all up to date but the bug continues. I'm past trying to stop it, now I just want to minimize it's effect by finding a way to kill and restart as quickly as possible.

If I kill all the other Firefox processes I can sometimes restart Firefox and it will tell me bookmarks are unavailable. That gives a bit of a clue that it may be tied to the sqlite that accesses the bookmarks database but I'm not 100% sure.

I'm looking for suggestions on tools, commands etc that will help me trace from the "STOP"ed process to whatever it's waiting for, is there some way to find what it is associated with or connected to a process listed in top?
 

PMc

Well-Known Member

Reaction score: 155
Messages: 471

Just guessing: it might be related to one of the many subsystems and libraries firefox relies on.
So, if You build it from source, I would try to disable as much of the options as possible - and see if that makes the error go away. Otherwise, if installing package, this should be used by many people, so others would run into the error also - so, probably something is different on Your system. You might check pkg info -d firefox and see if any of these packages might need an upgrade.

Then, killing: if you use kill -9 and it doesn't go away, there is not much more one can do.

Ups - just found this one here: http://freebsd.1045724.x6.nabble.com/Processes-stuck-in-STOP-state-on-12-0-BETA3-td6293519.html
You might search if there is more to the matter.
 
OP
OP
J

JayArr

Member

Reaction score: 3
Messages: 50

Thanks PMc

It's installed from packages and like I said, everythings up to date. I am using xfce but that shouldn't be the cause. At any rate, I'm through with chasing why it stops and looking pragmatically at how I can quickly just kill it all off and start over.

Thanks for the link, I'll check out the procstat command to see what comes up next time it stops.
 

PMc

Well-Known Member

Reaction score: 155
Messages: 471

It's installed from packages and like I said, everythings up to date. I am using xfce but that shouldn't be the cause. At any rate, I'm through with chasing why it stops and looking pragmatically at how I can quickly just kill it all off and start over.
Doesn't look like that would work. But as there was somebody with quite precisely the same problem description as You (albeit on a BETA version), I think this is the really interesting information: it's not specific to You.
Thanks for the link, I'll check out the procstat command to see what comes up next time it stops.
That was Konstantin asking that user - but then there was no more reply. :( Otherwise that thing might probably have been hunted down in BETA.
Not sure if You or me get much clue from that procstat -k. :/

But what You actually could do is followup on that message in that mailing-list. You could also deliberately search the web if there are more similar reports - where there are two, there may be more.

BTW, You didn't mention which OS version You use?
 
OP
OP
J

JayArr

Member

Reaction score: 3
Messages: 50

Sometimes the fact that there is no further reply is an indication that the OP found a solution and wasn't polite enough to return and share. (Not always but sometimes) so I don't mind chasing down the rabbit hole a little.

I've searched quite a bit, I've probably spent close to four hours looking for a solution but all I get is advice to make sure everything is up to date and using the latest versions. This is normally good advice but I've done that and been 100% up to date and the bug still exists so that's not the solution. A lifetimes experience tells me that sometime in the near future the bug will just disappear as versions progress and the conflict is eventually removed, what I need is a solution until then. For now I'm keeping Chromium installed and open, when Firefox freezes I can continue to work with Chromium but it's really slow compared to Firefox and "not quite ready for prime time" for eg, I can't print just the frame, I have to print the whole page, that just won't work with my finance software.

I'm running 11.2 with Firefox 68
 

PMc

Well-Known Member

Reaction score: 155
Messages: 471

A lifetimes experience tells me that sometime in the near future the bug will just disappear as versions progress and the conflict is eventually removed,
Yes, thats quite true with firefox. My solution then was to go with firefox-esr - which seems to save me a bunch of troubles.
 
OP
OP
J

JayArr

Member

Reaction score: 3
Messages: 50

OK, I upgraded Firefox to 69 as T-Daemon suggested and now I've lost the ability to print just the frame of a page. Since this is vital to my finance software I need to roll back to 68. Any hints on how to do that?
 
OP
OP
J

JayArr

Member

Reaction score: 3
Messages: 50

I just looked at Firefox-ESR and I wouldn't mind paying but there is no mention of FreeBSD, are you using the Linux version?
 
OP
OP
J

JayArr

Member

Reaction score: 3
Messages: 50

UPDATE: I found the frame print command for Firefox 69, it's no longer in any of my print dialogs but it does exist if you right click in the frame and then go This Frame then Print Frame
 

PMc

Well-Known Member

Reaction score: 155
Messages: 471

I just looked at Firefox-ESR and I wouldn't mind paying but there is no mention of FreeBSD, are you using the Linux version?
No, it builds from ports, and is certainly also available as FreeBSD package.
 
OP
OP
J

JayArr

Member

Reaction score: 3
Messages: 50

OK, I see it now as an available package, I was looking on the website before and couldn't find a FreeBSD version.

Now that I've updated to FF69 I'm going to wait a day or so, if it still freezes and goes into a stop state I'll pull FF69 and try ESR.
 
OP
OP
J

JayArr

Member

Reaction score: 3
Messages: 50

Well, that lasted about 6 hours LOL, it just froze up as usual so the upgrade I did this morning was a waste of 15 minutes.

I'll pull firefox69 tonight and try ESR

Here is the result of procstat -k on the STOPed process

$ procstat -k 33970
PID TID COMM TDNAME KSTACK
33970 100201 firefox - mi_switch thread_suspend_check ast doreti_ast
33970 100443 firefox StreamTrans #103 mi_switch thread_suspend_check ast doreti_ast
33970 100448 firefox Gecko_IOThread mi_switch thread_suspend_check ast doreti_ast
33970 100450 firefox JS Watchdog mi_switch thread_suspend_check ast doreti_ast
33970 100451 firefox JS Helper mi_switch thread_suspend_check ast doreti_ast
33970 100452 firefox JS Helper mi_switch thread_suspend_check ast doreti_ast
33970 100453 firefox JS Helper mi_switch thread_suspend_check ast doreti_ast
33970 100454 firefox JS Helper mi_switch thread_suspend_check ast doreti_ast
33970 100455 firefox Timer mi_switch thread_suspend_check ast doreti_ast
33970 100456 firefox Socket Thread mi_switch thread_suspend_check ast doreti_ast
33970 100458 firefox - mi_switch thread_suspend_check ast doreti_ast
33970 100459 firefox - mi_switch thread_suspend_check ast doreti_ast
33970 100460 firefox Cache2 I/O mi_switch thread_suspend_check ast doreti_ast
33970 100461 firefox Cookie mi_switch thread_suspend_check ast doreti_ast
33970 100467 firefox GMPThread mi_switch thread_suspend_check ast doreti_ast
33970 100468 firefox Worker Launcher mi_switch thread_suspend_check ast doreti_ast
33970 100469 firefox SoftwareVsyncThread mi_switch thread_suspend_check ast doreti_ast
33970 100470 firefox Compositor mi_switch sleepq_wait _sleep bwait bufwrite softdep_process_journal softdep_sync_buf ffs_syncvnode ffs_truncate ffs_write VOP_WRITE_APV vn_io_fault_doio vn_io_fault1 vn_rdwr vn_rdwr_inchunks elf64_coredump sigexit postsig
33970 100471 firefox ImgDecoder #1 mi_switch thread_suspend_check ast doreti_ast
33970 100472 firefox ImageIO mi_switch thread_suspend_check ast doreti_ast
33970 100477 firefox ImageBridgeChild mi_switch thread_suspend_check ast doreti_ast
33970 100478 firefox IPDL Background mi_switch thread_suspend_check ast doreti_ast
33970 100479 firefox DOM Worker mi_switch thread_suspend_check ast doreti_ast
33970 100480 firefox QuotaManager IO mi_switch thread_suspend_check ast doreti_ast
33970 100484 firefox StyleThread#0 mi_switch thread_suspend_check ast doreti_ast
33970 100485 firefox StyleThread#1 mi_switch thread_suspend_check ast doreti_ast
33970 100486 firefox StyleThread#2 mi_switch thread_suspend_check ast doreti_ast
33970 100495 firefox ProcessHangMon mi_switch thread_suspend_check ast doreti_ast
33970 100510 firefox - mi_switch thread_suspend_check ast doreti_ast
33970 100511 firefox DataStorage mi_switch thread_suspend_check ast doreti_ast
33970 100513 firefox Cache I/O mi_switch thread_suspend_check ast doreti_ast
33970 100514 firefox mozStorage #1 mi_switch thread_suspend_check ast doreti_ast
33970 100516 firefox HTML5 Parser mi_switch thread_suspend_check ast doreti_ast
33970 100517 firefox mozStorage #2 mi_switch thread_suspend_check ast doreti_ast
33970 100518 firefox URL Classifier mi_switch thread_suspend_check ast doreti_ast
33970 100519 firefox Classifier Update mi_switch thread_suspend_check ast doreti_ast
33970 100520 firefox ImgDecoder #2 mi_switch thread_suspend_check ast doreti_ast
33970 100529 firefox localStorage DB mi_switch thread_suspend_check ast doreti_ast
33970 100530 firefox mozStorage #3 mi_switch thread_suspend_check ast doreti_ast
33970 100545 firefox mozStorage #4 mi_switch thread_suspend_check ast doreti_ast
33970 100550 firefox DOM Worker mi_switch thread_suspend_check ast doreti_ast
33970 100560 firefox DOM Worker mi_switch thread_suspend_check ast doreti_ast
33970 100602 firefox mozStorage #5 mi_switch thread_suspend_check ast doreti_ast
33970 100604 firefox mozStorage #6 mi_switch thread_suspend_check ast doreti_ast
33970 100607 firefox DOM Worker mi_switch thread_suspend_check ast doreti_ast
33970 100645 firefox mozStorage #7 mi_switch thread_suspend_check ast doreti_ast
33970 101280 firefox mozStorage #8 mi_switch thread_suspend_check ast doreti_ast
33970 101540 firefox IndexedDB #82 mi_switch thread_suspend_check ast doreti_ast
33970 101541 firefox IndexedDB #83 mi_switch thread_suspend_check ast doreti_ast
33970 101545 firefox ExtensionProtocolHa mi_switch thread_suspend_check ast doreti_ast
33970 101559 firefox DNS Resolver #44 mi_switch thread_suspend_check ast doreti_ast
33970 101571 firefox SSL Cert #34 mi_switch thread_suspend_check ast doreti_ast
$
It looks like this thread is the problem:

33970 100470 firefox Compositor mi_switch sleepq_wait _sleep bwait bufwrite softdep_process_journal softdep_sync_buf ffs_syncvnode ffs_truncate ffs_write VOP_WRITE_APV vn_io_fault_doio vn_io_fault1 vn_rdwr vn_rdwr_inchunks elf64_coredump sigexit postsig
"coredump sigexit postsig"?

Is this what I'm waiting for?

Is there some way to instruct FF not to do a core dump?
 

oops

Member

Reaction score: 25
Messages: 58

Is there some way to instruct FF not to do a core dump?
sysctl kern.coredump=0 for every process or limits -c0 firefox for new process or pgrep firefox | xargs -n1 limits -c0 -P for existing process.
 
OP
OP
J

JayArr

Member

Reaction score: 3
Messages: 50

OK, I ran sysctl kern.coredump=0

I also ran echo 'kern.coredump=0' >> /etc/sysctl.conf so it comes into play in future boots.

Let's see if that helps. If it at least causes Firefox to just crash and exit without the five minute delay that would be an acceptable interim solution.
 
OP
OP
J

JayArr

Member

Reaction score: 3
Messages: 50

Hey, since I put those core dump commands in it hasn't frozen up once!
 
OP
OP
J

JayArr

Member

Reaction score: 3
Messages: 50

UPDATE: It has crashed a couple of times but when that happens it doesn't freeze up. My conclusion is that it was the coredump that was causing it to appear like it was hung up or frozen. Now that core dumps aren't allowed the crash simply ends the processes and I can immediately restart Firefox.
 
Top