Tag Info

Hot answers tagged

7

Prevent the fork bomb from exhausting the process limit with a reasonable per user process limit using ulimit. That way, a single user will exhaust their process quota long before the system limit is reached.


4

I have seen this issue before. You need to crank up the MaxStartups value on the SSH servers you are connecting to. Note the default value is 10. You can do this by editing /etc/ssh/sshd_config and reloading the SSH daemon (hopefully you control the remote servers). From man sshd_config: MaxStartups Specifies the maximum number of concurrent ...


2

Not sure how you could even send a STOP signal, since spawning kill would require an available process handle. Besides, in my experience systems become overloaded and unusable long before running out of processes. Have you considered simply enforcing per-user process limits with ulimit? That would prevent your users from launching fork bombs (accidentally ...


2

Looking at the output of sysctl kernel.pid_max. The default should be 32768. The safest way of changing it is to edit /etc/sysctl.cfg to whatever value you want, and then run sysctl -p to make it active. This way it will survive reboots. However, you're probably going to run into limits in CPU, RAM and Disk IO long before you hit the max number of ...


2

Sounds an awful lot like you're running out of memory. fork() will basically only fail because of ulimit limits (number of process or file descriptors) or lack of memory. So if you're not hitting your ulimits, that means you're out of memory. root is usually excempt from limits such as max # of processes but check your limits.conf to be sure. Depending on ...


2

Use version control. If there is a current version control system in place for development use that. If there isn't one already in place, think about using git. Why git? There's as much or as little administrative overhead as you need. You can run a central server, or not. It's up to you. SVN is a good alternative (and widely deployed) but it can be more ...


2

I think you want to look in /etc/security/limits.conf, you're likely hitting a defined nproc limit. The manpage for it describes the limits contained within. This is likely what's killing your attempted forkbombing.


1

The reason your shell seems to hang when you run sudo /etc/cron.daily/apt is the call to random_sleep(). If you comment it out (on my Ubuntu 14.04, it was line 425), you can at least confirm that the script works when you run it interactively.


1

my understanding is that the puppetmaster does not handle manifest execution on clients at all, it simply pushes the manifest out to puppet client upon request. on the puppet client, running manually shows whats going on: strace puppet agent -t it appears to be a serial process execution, with no forking. in fact, forking would subvert all the ...


1

fork creates new child process. It returns the child pid to/in the parent process, 0 to/in the child process, or undef if the fork is unsuccessful. The code you posted executes #Do somthing in parent process and #Run system command in child process but it does not check for possible fork failure. URL(s): http://perldoc.perl.org/functions/fork.html


1

You can look into ulimit -a. On my system (Ubuntu 12.04), it gives: $ ulimit -a core file size (blocks, -c) unlimited data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 29951 max locked memory (kbytes, -l) 64 ...


1

Is there a way to handle software updates easily with so many modifications? Any VCS with good branch-merge facilities. Which to select - depends from a lot of factors and habits How to keep my modifications upon next software release? In SVN world it named as "Vendor Branches" - your changes in one branch, upstream in another, you update vendor ...


1

The only thing you need is a repeatable build process that takes the source from upstream and applies your patches, in order, until you end up with the result that you want. (This implies that you need to track your own changes in the form of patches, of course.) This can be something as simple as a shell script that runs the proper commands, or you can go ...


1

You need a post-start stanza which will query the service as to whether or not it is providing whatever service it is expected to be running. So something like post-start script for try in 1 2 3 4 5 ; do if xyzadmin --ping ; then exit 0 fi sleep 1 done logger -t xyz-upstart -p daemon.err "failed to start within $try seconds, ...


1

Not sure about the specifics of Perl, but in other dynamic languages such as Python you would get a memory allocation failure and a subsequent crash of your program. Some languages (Python included) allow you to install a handler for the condition, Perl likely does the same. I'm not sure where you get the idea that malloc waits when it cannot allocate ...


1

Some BSD systems have the ability to reserve the last 5 or so processes for root. Maybe your system has that ability.



Only top voted, non community-wiki answers of a minimum length are eligible