DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD General

NetBSD General Other questions regarding NetBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 11th January 2014
DaBSD DaBSD is offline
Shell Scout
 
Join Date: Jan 2013
Location: Russia/Iceland
Posts: 102
Default correct ulimit stack value

Just in case someone needs it, on my fresh NetBSD 6.1.2 (i386) install with 1GB memory, I experienced problems with running Emacs (installed from binary) which gave me segmentation fault (as already discussed somewhere on this forum). I followed the following recommendation:

https://groups.google.com/forum/#!to...ug/GeV3IX56gzs

.. and set stack size to 20000 in /etc/profile:
Code:
ulimit -s 20000
All fine, Emacs started launching. However, another program stopped to do, Firefox. It lead me to finding an interesting pattern: Firefox 'liked' lower stack size while Emacs was 'up for' a higher one. Consequently, if I set its value too low or too high one of the programs wouldn't run. At the end I found a value satisfactory for either program: ulimit -s 8000, so now I have both of them running.

I hope this advice will be useful for those who might experience a similar problem.
Reply With Quote
  #2   (View Single Post)  
Old 11th January 2014
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Quote:
Originally Posted by DaBSD View Post
I hope this advice will be useful for those who might experience a similar problem.
Thank you!

I had experienced the same problems over the last half year or so. I was able to solve the emacs by going to 8192 from 2048. I still have trouble with firefox, it will only run in "safe mode". I spent a lot of time on it and couldn't fix it. Will look at it again tomorrow based on your hint that smaller may be better. (Of course, maybe something else is wrong.)
Reply With Quote
  #3   (View Single Post)  
Old 12th January 2014
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

I tried ulimit -s 8000, but alas firefox still doesn't run. The process begins, but no window emerges and top(1) shows it as "parked". This is on 6.1.2 i386 with 384 MB ram. On the laptop (4 GB) firefox runs OK. I don't know if amount of ram is the problem, as seamonkey runs fine. I previously tried things like starting with no ~/.mozilla/firefox directory with much the same result.

My work-around is to use

Code:
[exec]   (Firefox) {ulimit -s 2048 ; /usr/pkg/bin/firefox -safe-mode}
in the ~/.fluxbox/menu file.
Reply With Quote
  #4   (View Single Post)  
Old 15th January 2014
DaBSD DaBSD is offline
Shell Scout
 
Join Date: Jan 2013
Location: Russia/Iceland
Posts: 102
Default

There must be different solutions for computers with different memory size or possibly other parameters. So I suggest that you try other, lower values than 8000, setting them just from command line.
Reply With Quote
  #5   (View Single Post)  
Old 15th January 2014
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Quote:
Originally Posted by DaBSD View Post
There must be different solutions for computers with different memory size or possibly other parameters. So I suggest that you try other, lower values than 8000, setting them just from command line.
It's a good idea (although now I am using 2048 for Firefox 24.0 and it won't work without -safe-mode). However, everything has changed. Yesterday I downloaded an entire new Q4 set of binary packages, which includes Firefox 26.0. So I'll have to install them all, see if it works better, and if not then try various settings systematically as you suggest. I'm hoping Sunday will be possible for the big package upgrade.
Reply With Quote
  #6   (View Single Post)  
Old 17th January 2014
DaBSD DaBSD is offline
Shell Scout
 
Join Date: Jan 2013
Location: Russia/Iceland
Posts: 102
Default

OK, fingers crossed!
Reply With Quote
  #7   (View Single Post)  
Old 17th January 2014
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Thanks I had time to upgrade the packages on the laptop (running HEAD) last night. Everything still seems ok on that one. We'll see what happens on the desktop ...
Reply With Quote
  #8   (View Single Post)  
Old 19th January 2014
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

No luck. Firefox 26.0 is behaving much like before. Running

% firefox &

with various stack limits I get:

Code:
8192	segfault
8000    park
4096	asked about safe mode, but parks
2048	park
If given the -safe-mode flag it runs if stack limit is < 8192. Oh well.

On the plus side, SeaMonkey is now up-to-date and I prefer it as a browser anyway, so I'll just use that.
Reply With Quote
  #9   (View Single Post)  
Old 27th January 2014
DaBSD DaBSD is offline
Shell Scout
 
Join Date: Jan 2013
Location: Russia/Iceland
Posts: 102
Default

Quote:
Originally Posted by IdOp View Post
No luck. Firefox 26.0 is behaving much like before.
OK, too bad. I read somewhere in the bugtracker that this bug had been present since 5.x and they promised to get rid of it in the 6 series, but with no luck. NetBSD 7 is coming soon, hopefully it will be free of it.
Reply With Quote
Old 28th January 2014
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Quote:
Originally Posted by DaBSD View Post
OK, too bad. I read somewhere in the bugtracker that this bug had been present since 5.x and they promised to get rid of it in the 6 series, but with no luck. NetBSD 7 is coming soon, hopefully it will be free of it.
Interesting, thanks. There is a difference along that line in my two machines. The laptop, where there is no problem, is running HEAD (not the latest, from December or so), which is perhaps the precursor to 7. The desktop, with the problem, is 6.1.2. The laptop has had HEAD for a while (well before December), but before that it was 6.X and if I recall correctly the problem was absent then too. (Maybe I don't recall correctly though.)

Another minor tweak: the desktop now has 512 meg RAM, up from 384, but the problem persists.
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
How to configure OpenBSD (5.1) to make use of Comcast's native dual stack IPv6 SlyM OpenBSD General 7 11th March 2013 10:27 PM
Stack Protector (PaX) for FreeBSD bryn1u FreeBSD Security 1 14th January 2013 06:56 PM
could ulimit value make them start faster ? daemonfowl OpenBSD General 0 16th August 2012 09:15 PM
is this a correct attitude ? daemonfowl OpenBSD General 6 28th March 2012 08:31 PM
Correct tag for ports & docs vigol FreeBSD Ports and Packages 1 6th December 2009 02:06 PM


All times are GMT. The time now is 10:02 AM.


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