DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 20th August 2014
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default Firefox/Chrome Core dumps

I'm trying to mitigate core dumps that occur with either multiple tabs or when my viewing history enlarges.

For example this series of photographs from iceland reliably produces a core-dump at about 16-18 pictures. The photos are stunning by the way.
Iceland Photos

I went through the photos a second time periodically "df'ing" my /tmp folder to see if I was running out of space. Firefox is set to "never remember history"

I'm running amd64, 5.5 release with up to date core patches and M:tier package updates. The system uses radeon graphics and has 4GB of ram. Any suggestions to avoid the core dumps would be appreciated.
Reply With Quote
  #2   (View Single Post)  
Old 20th August 2014
st1905 st1905 is offline
Port Guard
 
Join Date: Aug 2014
Posts: 13
Default

Did you try using gdb ? https://developer.mozilla.org/en-US/...zilla_with_gdb
Reply With Quote
  #3   (View Single Post)  
Old 20th August 2014
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Quote:
Originally Posted by shep View Post
I'm trying to mitigate core dumps that occur with either multiple tabs or when my viewing history enlarges.
This may be resource limitations for your login class, and look to limits on memory and files.

ref: login.conf(5), the ulimit command in ksh(1), or the limit command in csh(1).
Reply With Quote
  #4   (View Single Post)  
Old 20th August 2014
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

Thanks

Quote:
Did you try using gdb
I have limited experience with gdb. I was under the impression that firefox-esr would have to be recompiled with debugging symbols. Given the size of firefox-esr, it's multiple dependencies and a sense that this is a common problem, I elected to search the forums and ask.

Quote:
This may be resource limitations for your login class, and look to limits on memory and files.
I did find threads on this problem and have set /etc/login.conf to
Code:
 The default values
# To alter the default authentication types change the line:
#       :tc=auth-defaults:\
# to be read something like: (enables passwd, "myauth", and activ)
#       :auth=passwd,myauth,activ:\
# Any value changed in the daemon class should be reset in default
# class.
#
default:\
        :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin:\
        :umask=022:\
        :datasize-max=2048M:\
        :datasize-cur=2048M:\
        :maxproc-max=256:\
        :maxproc-cur=128:\
        :openfiles-cur=512:\
        :stacksize-cur=4M:\
        :localcipher=blowfish,6:\
        :ypcipher=old:\
        :tc=auth-defaults:\
        :tc=auth-ftp-defaults:
.

One thing I am unclear on is what is are reasonable datasize values for todays web content. The other thing I can add is that the hard drive generates some noise that stops the instant that firefox-esr crashes. The same hard drive noise sequence also occurs with chrome core dumps. I can hear the same noise with routine data transfers that are not associated with core dumps

Code:
PooBear$ ulimit
unlimited

Last edited by shep; 21st August 2014 at 09:27 AM.
Reply With Quote
  #5   (View Single Post)  
Old 20th August 2014
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

Quote:
Originally Posted by shep View Post
I have limited experience with gdb. I was under the impression that firefox-esr would have to be recompiled with debugging symbols. Given the size of firefox-esr, it's multiple dependencies and a sense that this is a common problem, I elected to search the forums and ask.
gdb is always a bad suggestion for someone who has little experience with it. I'd go so far as to say that "use gdb" is a lazy answer. People who know how to use it will already use it. People who don't will just be lost.

Quote:
Originally Posted by shep View Post
Code:
PooBear$ ulimit
unlimited
That's the wrong one. What you actually want is $ ulimit -d
So try something like this as a script (this is actually what chromium does):
Code:
#!/bin/sh

DATASIZE="1048576"

if [ $(ulimit -Sd) -lt ${DATASIZE} ]; then
	ulimit -Sd ${DATASIZE} || \
		xm_log "Cannot increase datasize-cur to at least ${DATASIZE}"
		[ $? -eq 0 ] || exit
fi

exec /usr/local/bin/firefox
Alternatively, for a quick test, you could do something like this in a terminal:
Code:
$ ulimit -d 1048576
$ firefox
I like this better than editing /etc/login.conf. Harder to accidentally screw something up.
Reply With Quote
  #6   (View Single Post)  
Old 21st August 2014
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

Quote:
That's the wrong one. What you actually want is $ ulimit -d
I was trying to output my default limits. I should have read ksh(1) first and used
Code:
ulimit -a
Quote:
PooBear$ ulimit -a
time(cpu-seconds) unlimited
file(blocks) unlimited
coredump(blocks) unlimited
data(kbytes) 2048000
stack(kbytes) 4096
lockedmem(kbytes) 1352386
memory(kbytes) 4055048
nofiles(descriptors) 512
processes 128
I tried your suggestion to execute ulimit -d 2048000 in a terminal prior to running firefox-esr from that same terminal and was able to view the photos without a core dump.

Do I need to generate an executable script setting datasize prior for each running instance of firefox-esr even though I have set a higher limit as default in /etc/login.conf?
Reply With Quote
  #7   (View Single Post)  
Old 21st August 2014
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

Quote:
Originally Posted by shep View Post
Do I need to generate an executable script setting datasize prior for each running instance of firefox-esr even though I have set a higher limit as default in /etc/login.conf?
Technically no, but I would suggest reverting the login.conf stuff to their defaults and using a script instead (i.e. dump my script into ~/bin/firefox and chmod +x ~/bin/firefox). Then whenever you call firefox, you get the increased ulimit.

If you make a mistake with a script, no big deal. If you make a mistake with login.conf, that could be quite problematic.
Reply With Quote
  #8   (View Single Post)  
Old 21st August 2014
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

The core dumps were with the increased datasize. I was not sure that the defaults were being utilized by the firefox-esr window but if they are then I may need to look at other ways the problem could be addressed.

I failed to mention earlier that I also get occasional core dumps with the mutt email client. My sense is the dumps occur when mutt calls getmail to fetch a number of emails, say around 10. After the pop emails have been retrived a prompt to continue appears. When I hit any key to continue the hard drive sounds off and mutt crashes. On restarting mutt the emails are listed and intact. Mutt only crashes when calling another program, ie getmail, xpdf or firefox-esr as listed my mailcap and only when the file content is large.

Is there are way to check the limits on a running instance of firefox-esr? If this is the solution I will generate executable scripts in my home directory for firefox-esr, chrome and mutt as best practice.

Last edited by shep; 21st August 2014 at 02:00 AM.
Reply With Quote
  #9   (View Single Post)  
Old 21st August 2014
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

Quote:
Originally Posted by shep View Post
Is there are way to check the limits on a running instance of firefox-esr? If this is the solution I will generate executable scripts in my home directory for firefox-esr, chrome and mutt as best practice.
ps(1) is where I'd recommend you start ($ ps -aux is nice).

You can crib my script to run any program. Just change DATASIZE and the final exec line to match what you need.

~/bin is by default the first item in your PATH. So it's a safe place to put such things.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chrome only future for Flash on Linux J65nko News 7 24th February 2012 12:53 AM
wine installing firefox, chrome maxrussell General software and network 3 7th December 2009 03:32 AM
SLiM core dumps marc OpenBSD Packages and Ports 7 31st October 2009 06:47 PM
Google Chrome browser drhowarddrfine General software and network 63 15th September 2008 11:09 PM
Upgrading firefox to firefox 3 -keeping plugins+bookmarks kasse FreeBSD Ports and Packages 11 5th July 2008 01:34 PM


All times are GMT. The time now is 04:33 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick