News:

SMF - Just Installed!

Main Menu

Fork Bomb

Started by pathra, Aug 02, 2023, 10:52 AM

Previous topic - Next topic

pathra

Re: Fork Bomb
We can't see that image. That top line only works for people sat at your PC. It doesn't work over the internet.

Use a service like photobucket or even facebook to hold the image online then give us the URL of the image. We can then see what you want us to see
Advanced replyAdv Reply   Reply With QuoteReply With Quote
1 Week Ago#3Holger_Gehrke Holger_Gehrke is offline
Ubuntu addict and loving it

Join Date
Dec 2014
Beans
2,418
Re: Fork Bomb
A fork bomb is basically a recursion without a stop condition. To stop fork bombs from taking all resources on the system, you need to limit the allowed depth of recursions. 'ulimit' doesn't have a setting specifically for this, although the maximum stack size ('-s') might do some good. There is a variable FUNCNEST which can be set to the maximum acceptable calling depth. This does not just limit recursions it limits all functions calling functions, so you should not set this limit too low.

Holger
Advanced replyAdv Reply   Reply With QuoteReply With Quote
1 Week Ago#4QIII's AvatarQIII QIII is offline
Dark-Roasted but Half-Baked

Join Date
Jul 2008
Location
The Left Coast of the USA
Beans
Hidden!
Distro
Kubuntu
Re: Fork Bomb
Rebooting should stop a fork bomb. But if it starts running as a result of compromise, things may become difficult.

You certainly don't want the maximum number of processes to be unlimited. The fork bomb will just fill them up.

Is this a personal machine? A work machine?

Admins will sometimes use a fork bomb in pen testing.
Please read The Forum Rules and The Forum Posting Guidelines

A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
This universe is crazy. I'm going back to my own.
Advanced replyAdv Reply   Reply With QuoteReply With Quote
1 Week Ago#5visu12 visu12 is online now
First Cup of Ubuntu

Join Date
Jul 2023
Beans
6
Re: Fork Bomb
Rebooting is the only option to stop this . Its a recording server in night time when nobody monitors the server at that time we loose valuable recording due to this.
Attached Images Attached Images
File Type: jpg 01-how-to-crash-your-linux-system-with-fork-bomb.jpg (77.5 KB, 16 views)
Advanced replyAdv Reply   Reply With QuoteReply With Quote
1 Week Ago#6visu12 visu12 is online now
First Cup of Ubuntu

Join Date
Jul 2023
Beans
6
Re: Fork Bomb
kindly guide how to go with maximum stack size
Advanced replyAdv Reply   Reply With QuoteReply With Quote
1 Week Ago#7Holger_Gehrke Holger_Gehrke is offline
Ubuntu addict and loving it

Join Date
Dec 2014
Beans
2,418
Re: Fork Bomb

That's probably not a fork bomb. The error message says something about a resource not being available. Looks more like it's trying to restart something after it crashed before the clean-up was completely done. Posting the script that produces this error might give us enough insight into what's going on to attempt a solution.

Holger
Advanced replyAdv Reply   Reply With QuoteReply With Quote
1 Week Ago#8Rubi1200's AvatarRubi1200 Rubi1200 is online now
Staff Emeritus

Join Date
Mar 2010
Beans
8,957
Distro
Ubuntu Mate
Re: Fork BombI agree with Holger that seeing what script/s are being run can help us with solutions. But, I also have a question: you say this is a recording server but it appears to have a GUI; why is that?

From a security standpoint, this is not considered to be good practice.
System-Info Script

Boot Info Script

Ubuntu Member
Advanced replyAdv Reply   Reply With QuoteReply With Quote
1 Week Ago#9visu12 visu12 is online now
First Cup of Ubuntu

Join Date
Jul 2023
Beans
6
Re: Fork BombIts a normal ubuntu server & some java application running on it & nothing running with script . Its a 24*7 environment as it runs suddenly while in operation we encounter this issue.
Advanced replyAdv Reply   Reply With QuoteReply With Quote
1 Week Ago#10Holger_Gehrke Holger_Gehrke is offline
Ubuntu addict and loving it

Join Date
Dec 2014
Beans
2,418
Re: Fork BombI may not know all the Java applications around, but almost all of the non-trivial ones I've seen were started by a script which sets all the options for the VM and performed various house-keeping tasks before actually starting the application. You seem to underestimate how deeply scripting - and especially shell scripting - is embedded in the Linux and Unix way of doing things. For example there's more than 300 shell scripts (counted by doing 'for i in /usr/bin/*; do file $i|grep shell;done|wc -l') out of less than 2800 files in /usr/bin on my machine.

Holger