1. Is Euphoria a virus ?
- Posted by Daniel Johnson <dpj22 at CAM.AC.UK> Mar 12, 2000
- 482 views
As a result of somebody running a rather questionable CGI script that I wrote in Eu, my College student server was totally dead for 18 hours. It unfortunately happens that this server handles just about everything student in the college - everybody's web sites, including countless societies, student email, the student linux system, student filespace and the system for common username-password access to multiple machines. All of these facilities were unavailable during this time. So what, you might say. Well the script I wrote was a simple test to see how many dimensions I could get in a sequence before memory ran out. Million-dimensional sequences were no problem, bravo ! But unfortunately when given too much to do, and running out of memory, this programme has an awful tendency to take other tasks down with it (presumably because it takes the memory that they were just about to grab). When this task happens to be inetd and the said machine is locked away somewhere you have a problem ie dead computer. There is an inherent flaw somewhere, perhaps in the ethos of the linux kernel, or perhaps in eu's attitude to memory. The local nerds are convinced that I am unreasonable, and that eu is inherently evil. I wonder whether C, for example, could potentially cause the same problem. What bugs me is that any undebugged programme that uses recursion could cause this same problem, and I don't want to get eaten alive again for crashing the student server. What needs to change ? Eu or Linux ? Daniel -- Today's Proverb : Trust in the Lord with all your heart, do not rely on your own understanding (3v5) Daniel Johnson Engineer, smartypants and clown Jesus College, Cambridge all at a very reasonable price dpj22 at cam.ac.uk zeus.jesus.cam.ac.uk/~dpj22 talk dpj22 at jewish.jesus.cam.ac.uk
2. Re: Is Euphoria a virus ?
- Posted by Irv Mullins <irv at ELLIJAY.COM> Mar 12, 2000
- 442 views
On Sun, 12 Mar 2000, Daniel wrote: > As a result of somebody running a rather questionable CGI script that I > wrote in Eu, my College student server was totally dead for 18 hours. It > unfortunately happens that this server handles just about everything > student in the college - everybody's web sites, including countless > societies, student email, the student linux system, student filespace and > the system for common username-password access to multiple machines. All > of these facilities were unavailable during this time. > > So what, you might say. Well the script I wrote was a simple test to see > how many dimensions I could get in a sequence before memory ran > out. Million-dimensional sequences were no problem, bravo ! But > unfortunately when given too much to do, and running out of memory, this > programme has an awful tendency to take other tasks down with it > (presumably because it takes the memory that they were just about to > grab). When this task happens to be inetd and the said machine is locked > away somewhere you have a problem ie dead computer. Daniel: I tried duplicating the problem, but all I got was a slight slowing of xWindows, and eventually, Euphoria exited with an out-of-memory message and ex.err file when the sequence grew to 20megs. (Understandable, I only have 28megs on the computer). Everything else continues to run normally. If you will send the cgi program in question via private e-mail, I will try again with that. Regards, Irv
3. Re: Is Euphoria a virus ?
- Posted by Daniel Johnson <dpj22 at CAM.AC.UK> Mar 12, 2000
- 467 views
>I tried duplicating the problem, but all I got was a slight slowing of >xWindows, and eventually, Euphoria exited with an out-of-memory >message and ex.err file when the sequence grew to 20megs. (Understandable, >I only have 28megs on the computer). Everything else continues to run normally. Certain machines seemed vulnerable to it, while others showed no side effects. It was probably run 50 times on the webserver with no known side effects prior to the fatal incident. All it did was recursively put sequences inside each other. On most machines it just ran out of memory and quit. >If you will send the cgi program in question via private e-mail, I will try >again with that. Well I guess if you destroy a virus you reduce the chances of finding a cure, but I zapped it anyway. Daniel -- Today's Proverb : Trust in the Lord with all your heart, do not rely on your own understanding (3v5) Daniel Johnson Engineer, smartypants and clown Jesus College, Cambridge all at a very reasonable price dpj22 at cam.ac.uk zeus.jesus.cam.ac.uk/~dpj22 talk dpj22 at jewish.jesus.cam.ac.uk
4. Re: Is Euphoria a virus ?
- Posted by Robert Craig <rds at ATTCANADA.NET> Mar 12, 2000
- 440 views
Daniel Johnson writes: > The local nerds are convinced that I am unreasonable, > and that eu is inherently evil. > I wonder whether C, for example, could potentially > cause the same problem. I'd like to be able to claim that Euphoria has magical properties that allow it to do things that can't be done by C, but the fact is that Euphoria is calling standard C library routines (malloc and free) which are making standard Linux system calls. The same series of calls could be done in C. It sounds like Linux gave so much memory to your process that some important kernel process got blocked, and a kind of "deadlock" occurred. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
5. Re: Is Euphoria a virus ?
- Posted by J Yazel <jyazel at CORE.COM> Mar 12, 2000
- 447 views
Daniel Johnson wrote: > > As a result of somebody running a rather questionable CGI script that I > wrote in Eu, my College student server was totally dead for 18 hours. It > unfortunately happens that this server handles just about everything > student in the college - everybody's web sites, including countless > ----SNIP---- --------------------------------- It is always the responsibility of the operating system to protect applications from each other. If this doesn't happen, then applications (in any language) will frequently destroy each other and the operating system itself.
6. Re: Is Euphoria a virus ?
- Posted by Everett Williams <rett at GVTC.COM> Mar 12, 2000
- 447 views
Daniel Johnson wrote: >There is an inherent flaw somewhere, perhaps in the ethos of the linux >kernel, or perhaps in eu's attitude to memory. The local nerds are >convinced that I am unreasonable, and that eu is inherently evil. > >I wonder whether C, for example, could potentially cause the same >problem. What bugs me is that any undebugged programme that uses recursion >could cause this same problem, and I don't want to get eaten alive again >for crashing the student server. > >What needs to change ? Eu or Linux ? > What needs to change is your willingness to saw on the branch that you are standing on, especially if you have company. It was fairly predictable that the test you were running would bring the machine to it's knees even if it did not crash it. The admins should have put some limits on the resources you were allowed to consume, but then a little common sense on your part would not have hurt either. Next time you want to stress test somebody else's machine, why not warn the admins and request some standalone time. It is fairly understandable that they don't want you playing any more fun and games. It is too bad that Eu gets besmirched along with you. Try apologizing, showing them your code and doing a bit of fence mending. Everett L.(Rett) Williams rett at gvtc.com
7. Re: Is Euphoria a virus ?
- Posted by Irv Mullins <irv at ELLIJAY.COM> Mar 13, 2000
- 449 views
On Sun, 12 Mar 2000, you wrote: > Daniel Johnson wrote: ... > > > >What needs to change ? Eu or Linux ? > > > What needs to change is your willingness to saw on the branch that you > are standing on, especially if you have company. It was fairly predictable > that the test you were running would bring the machine to it's knees even > if it did not crash it. The admins should have put some limits on the > resources you were allowed to consume, but then a little common sense > on your part would not have hurt either. Next time you want to stress test > somebody else's machine, why not warn the admins and request some > standalone time. It is fairly understandable that they don't want you > playing any more fun and games. It is too bad that Eu gets besmirched > along with you. Try apologizing, showing them your code and doing a > bit of fence mending. The consensus of opinion on my Linux maillist was: while it is not at all likely that you could actually crash a Linux server this way (the worst that should happen is a segfault in your program), it is entirely possible that the program could have eaten up 99%+ of the processor's time. That would have pretty much the same result as a crash, unless someone was there to re-nice or kill your runaway program. Perhaps the sysadmin should take a look at putting some quotas on things. Regards, Irv
8. Re: Is Euphoria a virus ?
- Posted by Daniel Johnson <dpj22 at CAM.AC.UK> Mar 14, 2000
- 476 views
> > >What needs to change ? Eu or Linux ? > The consensus of opinion on my Linux maillist was: > while it is not at all likely that you could actually crash a Linux server > this > way (the worst that should happen is a segfault in your program), > it is entirely possible that the program could have eaten up 99%+ of the > processor's time. That would have pretty much the same result as a crash, > unless someone was there to re-nice or kill your runaway program. > Perhaps the sysadmin should take a look at putting some quotas on things. > -Irv Then tell me, could the same effect be achieved by an endless while loop ? If so then I can use neither recursion nor while loops in CGI scripts out of fear that a random bug would cause it to crash when somebody tried it in the middle of the night. This would be somewhat restrictive, which would defeat the object of using Euphoria in the first place. Daniel -- Today's Proverb : He who walks purely walks securely, but he who walks in crooked ways will be found out (10v9) Daniel Johnson Engineer, smartypants and clown Jesus College, Cambridge all at a very reasonable price dpj22 at cam.ac.uk zeus.jesus.cam.ac.uk/~dpj22 talk dpj22 at jewish.jesus.cam.ac.uk
9. Re: Is Euphoria a virus ?
- Posted by Irv Mullins <irv at ELLIJAY.COM> Mar 14, 2000
- 472 views
On Tue, 14 Mar 2000, you wrote: > > > >What needs to change ? Eu or Linux ? > > The consensus of opinion on my Linux maillist was: > > while it is not at all likely that you could actually crash a Linux server > > this > > way (the worst that should happen is a segfault in your program), > > it is entirely possible that the program could have eaten up 99%+ of the > > processor's time. That would have pretty much the same result as a crash, > > unless someone was there to re-nice or kill your runaway program. > > Perhaps the sysadmin should take a look at putting some quotas on things. > > -Irv > > Then tell me, could the same effect be achieved by an endless while loop ? Of course. The loop would be more effective if written in C, however. Euphoria isn't fast enough to use up _all_ the CPU cycles. > If so then I can use neither recursion nor while loops in CGI scripts out > of fear that a random bug would cause it to crash when somebody tried it > in the middle of the night. > This would be somewhat restrictive, which would defeat the object of using > Euphoria in the first place. This has nothing to do with recursion, loops, or choice of language. Ask your sysadmins to look up ulimit in their bash manual. It allows limits to be set on how much of a system's reources can be allocated to a particular process. Obviously, if the machine is doing other important things, they shouldn't allow any one user or program to commandeer _all_ available resources. Regards, Irv