🔒 Locked
linux - stable??? (my ass)
Advertisement
Original Post
I''m programming under linux, and it keeps crashing! I''m new to linux so it may be my fault.
For instance, one time I was writing a simple OpenGL program and somehow OpenGL died. I tried restarting X but it still wouldn''t work. I had to reboot. (I''m using Nvidia 1.251 drivers)
Another time I wrote a simple program using Allegro(+GL) and ODE and when I run it in the middle it just freezes. No response. This may be a problem with my code, but even in windows I could recover from such crashes. In linux, I have to hold the power button down to turn off the computer(my case has no reset button[wtf?]).
Is there something that I''m missing? Maybe some magic key-sequence to kill frozen programs or something like that? It''s really depressing that I have to hard-reboot every 5 minutes, especially on the OS that''s supposed to have up time for years.
I''d really like to fix these problems. Linux really looks promising and I don''t want to give up on it yet.
Thanks
(btw: I''m using Mandrake 8.1. Maybe this is the problem? should I switch to debian or slackware?)
One of the other professors had a similar problem. He used FreeBSD instead of Linux. Try that, my friend.
You have several virtual terminals available. X usually runs on 7.
Next time you find an application you're developing locks up X-Gnome, etc, try hitting "ctl+alt+F1" or any of the F1-F6 keys.
This will change the terminal to one of your other consoles (virtual consoles). From there you can login and kill your evil process.
Also, you could try to kill X. That key sequence is "ctl+alt+backspace". If you are using Init level 5, it will probably immediately respawn the Gnome login. If not, then you can restart X with "startx&".
Even if both of those are locked up, you could try to access it through telnet or SSH depending on your set up.
Now, I know you didn't say that Windows was better for crash recovery. That's just a big no-no =) If Windows crashes, you are pretty much forced to reboot since it runs everything. In Linux, you just need shell access. Now, I've seen a lock up or two on Linux, but I have to say, that is on the extremely rare side, compared to my old admin routine of rebooting NT4 on a bi-weekly basis as a form of maintenance.
G'luck with Linux, it's a great OS.
R.
PS FreeBSD is good too, but for most people, the argument of FreeBSD vs OpenBSD vs NetBSD vs Mandrake vs RedHat vs Suse, etc etc is simply impractical. Very few Linux users will find the differences important in their usage. Personally, if you're new to Linux, stick with Mandrake or Redhat. You can find limitless help with both of those distros on the net in message boards and posts.
Once you're more comfortable with Linux, you should take a look at the BSDs, Debian, or SuSe which all have great reputations for stability, but have a smaller user base and consequently, slightly less help publically available. But, anyone of them easily surpasses Windows in use and power once you learn the basics of *nix and it's philosophy.
R.
Edited by - Rube on November 29, 2001 2:36:59 PM
Next time you find an application you're developing locks up X-Gnome, etc, try hitting "ctl+alt+F1" or any of the F1-F6 keys.
This will change the terminal to one of your other consoles (virtual consoles). From there you can login and kill your evil process.
Also, you could try to kill X. That key sequence is "ctl+alt+backspace". If you are using Init level 5, it will probably immediately respawn the Gnome login. If not, then you can restart X with "startx&".
Even if both of those are locked up, you could try to access it through telnet or SSH depending on your set up.
Now, I know you didn't say that Windows was better for crash recovery. That's just a big no-no =) If Windows crashes, you are pretty much forced to reboot since it runs everything. In Linux, you just need shell access. Now, I've seen a lock up or two on Linux, but I have to say, that is on the extremely rare side, compared to my old admin routine of rebooting NT4 on a bi-weekly basis as a form of maintenance.
G'luck with Linux, it's a great OS.
R.
PS FreeBSD is good too, but for most people, the argument of FreeBSD vs OpenBSD vs NetBSD vs Mandrake vs RedHat vs Suse, etc etc is simply impractical. Very few Linux users will find the differences important in their usage. Personally, if you're new to Linux, stick with Mandrake or Redhat. You can find limitless help with both of those distros on the net in message boards and posts.
Once you're more comfortable with Linux, you should take a look at the BSDs, Debian, or SuSe which all have great reputations for stability, but have a smaller user base and consequently, slightly less help publically available. But, anyone of them easily surpasses Windows in use and power once you learn the basics of *nix and it's philosophy.
R.
Edited by - Rube on November 29, 2001 2:36:59 PM
Since it''s only fair to compare Linux against an NT-based Windows, I''ll assume that''s what you meant.
Windows does not run everything, nor are you foreced to reboot. The single shell does (explorer.exe), but if that or any other process crashes, Ctrl-Alt-Deltete brings up either a dialog which allows you to enter Task Manager, or (in Windows XP) Task Manager directly. In there, you can kill whatever processes you want, or start new ones. You could, for example, restart the shell, explorer.exe, if that crashes, or run the command processor (cmd.exe). In other words, you can do the same things in Windows, but it''s just different.
Back in the day, and when talking about Windows 9x, the arguments agains Windows'' stability were certainly true, but modern Windows incarnations are at least just as stable as Linux.
Note that this is not a Windows-is-better-than-Linux pissing contest, just a Windows-and-Linux-are-both-good argument.
Windows does not run everything, nor are you foreced to reboot. The single shell does (explorer.exe), but if that or any other process crashes, Ctrl-Alt-Deltete brings up either a dialog which allows you to enter Task Manager, or (in Windows XP) Task Manager directly. In there, you can kill whatever processes you want, or start new ones. You could, for example, restart the shell, explorer.exe, if that crashes, or run the command processor (cmd.exe). In other words, you can do the same things in Windows, but it''s just different.
Back in the day, and when talking about Windows 9x, the arguments agains Windows'' stability were certainly true, but modern Windows incarnations are at least just as stable as Linux.
Note that this is not a Windows-is-better-than-Linux pissing contest, just a Windows-and-Linux-are-both-good argument.
Personally, I use RedHat, which Mandrake is based upon.
I''d check, first of all, that you''ve definately got the latest drivers. Since you''ve obviously got an nvidia card, that shouldn''t be difficult.
Ctrl+Alt+Delete is usually disabled when in X. You could try Ctrl+Alt+Backspace, which, if X is still alive, will make it shut down. You may want to check your BIOS settings first - on my computer Ctrl+Alt+Backspace will power the computer down unless I disable it.
If the kernel is configured for it, there is a ''magic SysRq key'' facility. You can use the SysRq key in combos with other stuff to sync your disks, reboot and shutdown. I think there''s an option to put the keyboard back in a usable mode, from which you can use ''vga_reset'', say, to reset your graphics card.
If the kernel isn''t configured for it, you''ll have to build a new one.
Unfortunately, it may be that the graphics card itself is getting confused, rather than Linux. When your graphics card falls over, I can say from experience that you''ve no chance of success.
Just Plain Wrong
I''d check, first of all, that you''ve definately got the latest drivers. Since you''ve obviously got an nvidia card, that shouldn''t be difficult.
Ctrl+Alt+Delete is usually disabled when in X. You could try Ctrl+Alt+Backspace, which, if X is still alive, will make it shut down. You may want to check your BIOS settings first - on my computer Ctrl+Alt+Backspace will power the computer down unless I disable it.
If the kernel is configured for it, there is a ''magic SysRq key'' facility. You can use the SysRq key in combos with other stuff to sync your disks, reboot and shutdown. I think there''s an option to put the keyboard back in a usable mode, from which you can use ''vga_reset'', say, to reset your graphics card.
If the kernel isn''t configured for it, you''ll have to build a new one.
Unfortunately, it may be that the graphics card itself is getting confused, rather than Linux. When your graphics card falls over, I can say from experience that you''ve no chance of success.
Just Plain Wrong
I''m using the NVidia 1541 drivers (probably not a bad idea for you to update) with X 4.0.3 and haven''t had any problems (except for some funkiness when swithcing video modes in a vmware machine running in full screen - but emulators do strange things sometimes).
Make sure you''re using one of the 4.x series of X server. The nvidia drivers and 3.3.6 X Servers do not play nice together at all. Mandrake has a tendency to try to switch back to the 3.3.6 server if you use any of the command line X server configuration tools, instead of editing the XF86Config-4 file by hand.
(You can check this by going to /usr/bin/X11 and running an "ls -l | grep X"; the link "X" should point to XFree86 and not one of the XF86_(whatever) files).
Also, try getting rid of some of the "bells and whistles" stuff that Mandrake has a tendency to turn on by default. I''ve noticed some particularly worrisome behaviour from Aurora and the graphical lilo on some machines.
As far as Mandrake vs. other distributions, Mandrake isn''t bad, but they are a lot less conservative than a lot of the other distributions, so you''re likely to run into some more bugs with the distributed software versions, but the stuff that works will be a bit faster/more featureful out of the box.
I''ve only hard-crashed Linux once (actually the video card, was doing stuff I shouldn''t have been with it). Ctrl-Alt-Backspace will get you out of X without a reboot, but there might be a bit of a pause before it responds if you''re hammering the processor.
Make sure you''re using one of the 4.x series of X server. The nvidia drivers and 3.3.6 X Servers do not play nice together at all. Mandrake has a tendency to try to switch back to the 3.3.6 server if you use any of the command line X server configuration tools, instead of editing the XF86Config-4 file by hand.
(You can check this by going to /usr/bin/X11 and running an "ls -l | grep X"; the link "X" should point to XFree86 and not one of the XF86_(whatever) files).
Also, try getting rid of some of the "bells and whistles" stuff that Mandrake has a tendency to turn on by default. I''ve noticed some particularly worrisome behaviour from Aurora and the graphical lilo on some machines.
As far as Mandrake vs. other distributions, Mandrake isn''t bad, but they are a lot less conservative than a lot of the other distributions, so you''re likely to run into some more bugs with the distributed software versions, but the stuff that works will be a bit faster/more featureful out of the box.
I''ve only hard-crashed Linux once (actually the video card, was doing stuff I shouldn''t have been with it). Ctrl-Alt-Backspace will get you out of X without a reboot, but there might be a bit of a pause before it responds if you''re hammering the processor.
quote:
Original post by wolfman8k
For instance, one time I was writing a simple OpenGL program and somehow OpenGL died. I tried restarting X but it still wouldn''t work. I had to reboot. (I''m using Nvidia 1.251 drivers)
Try upgrading the drivers to newer version. Some Nvidia drivers are very buggy and I think they have a problem of memory leakage.
quote:
In general, if you cant switch to another terminal using ctrl+alt+Fx, then the linux box has crashed.
Are you kidding? Not being able to switch to another terminal does not mean the linux box has crashed; X traps user input and handles it itself. If X really freezes, the kernel and all other (non-X) apps should still run just fine, despite your inability to access them right there. Assuming our boy wolfman8k here has a permanent (he knows the IP address) connection to either the ''Net or a [W/L]AN, he should be able to just telnet in, log on as root, and restart X manually. For Linux game development (especially in fullscreen graphical apps), I find this a highly useful tool. It is never good to do a hard reboot on Linux when avoidable...
It's not Linux's fault, it's either your release of X or the video drivers you have running. Do you see glitches on the screen or maybe scratchy lines when it freezes? It would be helpful for you to explain.
X does lock all user input so you most likely won't be able to change vtty's. Do you have another computer in your home? Possibly a router/hub? If you can telnet in(or use ssh), you can login as root and 'kill -9 process_id'. The id you will be wanting to kill is the X server.
PS. By the way, Linux is stable, your drivers most likely aren't. And since your new to linux(always glad to have a new pneguin
), I should try to burn into your brain that Linux is only the kernel. Pretty much everything(apps,libraries) are all GNU. So it should actually be called the GNU Operating System. 
-Greg
Hopeful Purveyor of the Open Source Community
Edited by - Visionare on November 30, 2001 9:59:24 PM
X does lock all user input so you most likely won't be able to change vtty's. Do you have another computer in your home? Possibly a router/hub? If you can telnet in(or use ssh), you can login as root and 'kill -9 process_id'. The id you will be wanting to kill is the X server.
PS. By the way, Linux is stable, your drivers most likely aren't. And since your new to linux(always glad to have a new pneguin
-Greg
Hopeful Purveyor of the Open Source Community
Edited by - Visionare on November 30, 2001 9:59:24 PM
Magic Key Sequence:
Alt-SysRq-R
Alt-SysRq-S
Alt-SysRq-E
Alt-SysRq-I
Alt-SysRq-U
Alt-SysRq-B
Alt must be right alt, sysrq is sometimes labeled as print screen, U and B are optional as they unmount and reboot. You could try doing up to U, then doining init 3 to try and get back a usefull system sans rebooting.
As for linux crashing, it''s tough when developing graphics stuff. It''s very easy to cause your self to require a reboot.
As for linux passing the buck when it comes to crashing... I''ve very rarely seen the Windows OS crash. It''s always something else, like run32.dll, or gdi32.dll. Never once have I seen windowsOS.dll crash. So, I must say that windows itself has never crashed on me, but other parts have.
Alt-SysRq-R
Alt-SysRq-S
Alt-SysRq-E
Alt-SysRq-I
Alt-SysRq-U
Alt-SysRq-B
Alt must be right alt, sysrq is sometimes labeled as print screen, U and B are optional as they unmount and reboot. You could try doing up to U, then doining init 3 to try and get back a usefull system sans rebooting.
As for linux crashing, it''s tough when developing graphics stuff. It''s very easy to cause your self to require a reboot.
As for linux passing the buck when it comes to crashing... I''ve very rarely seen the Windows OS crash. It''s always something else, like run32.dll, or gdi32.dll. Never once have I seen windowsOS.dll crash. So, I must say that windows itself has never crashed on me, but other parts have.
Explorer.exe is just a shell program, not the GUI subsystem.
Unfortunately, while I''ve never seen WindowsOS.dll crash either -), I''ve seen plenty of gdi and kernel32 crashes that had no other recourse but a reboot. Much less so now with 2000, so time''s a changing.
I have yet to see any well configured Windows machine match a well configured Solaris or Linux install for uptime. I''ve personally seen uptimes of over a year on both.
But, Windows is a great desktop OS. Just not my first choice for a server.
R.
Unfortunately, while I''ve never seen WindowsOS.dll crash either -), I''ve seen plenty of gdi and kernel32 crashes that had no other recourse but a reboot. Much less so now with 2000, so time''s a changing.
I have yet to see any well configured Windows machine match a well configured Solaris or Linux install for uptime. I''ve personally seen uptimes of over a year on both.
But, Windows is a great desktop OS. Just not my first choice for a server.
R.
AP, he''s talking about when X has locked up.
[Resist Windows XP''s Invasive Production Activation Technology!]
[Resist Windows XP''s Invasive Production Activation Technology!]
I know this has been a while, but has anyone here thought about running a nested X server when doing graphics development? That way, if it crashes you can simply kill it (it doesn''t lock up the keyboard since it''s hosted by the actual X server).
Also wondering if anyone uses the framebuffer X server?
[ GDNet Start Here | GDNet FAQ | MS RTFM | STL | Google ]
Thanks to Kylotan for the idea!
Also wondering if anyone uses the framebuffer X server?
[ GDNet Start Here | GDNet FAQ | MS RTFM | STL | Google ]
Thanks to Kylotan for the idea!
quote:
I know this has been a while, but has anyone here thought about running a nested X server when doing graphics development? That way, if it crashes you can simply kill it (it doesn''t lock up the keyboard since it''s hosted by the actual X server).
All I do if X crashes and it took over the keyboard is go downstairs and SSH to my linux box and do a killall -9 X
quote:
I had linux crash on me ONCE. I ran a windows emulator as root and it crashed my computer... :-\
Yeah, in about one year of using Linux, it has only crashed on me one time. Strangely, I wasn''t even doing anything that should cause it to crash... I couldn''t even log in remotely to fix it. Most of the time when you think Linux crashed, it really hasn''t. If you can access it remotely, it''s trivial to kill a misbehaving process. Of course, for many, having remote access is the hard part
rm -rf /bin/laden
quote:
Original post by Rube
Unfortunately, while I''ve never seen WindowsOS.dll crash either -), I''ve seen plenty of gdi and kernel32 crashes that had no other recourse but a reboot.
Umm...the reason that you''ve never seen ''WindowsOS.dll'' crash is because IT DOESN''T exist.
The kernel (contained in ''kernel32.dll'') IS the operating system, and it crashes quite often (in my experience).
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement