2

i was working on a website with FF4 and while resizing an element with Firebug, FF4 just crashed my nVidia Display Driver. Fortunately Windows 7 was able to help me by recovering from this serious error and i was able to completely recover my work again.

So my question is, should those browser developers get into low level hardware intricacies, something that was reserved only for game developers and complex graphic software?

mahen23
  • 1,120
  • 1
  • 9
  • 23
  • 4
    Why are you blaming a program that your driver crashed? –  Apr 02 '11 at 07:52
  • I have a nVidia GT220 and Windows7 Ultimate with full Aero enabled, so yeah, the only culprit is FF4 since no other programs were running at the time – mahen23 Apr 02 '11 at 08:11
  • You're suggesting only GameDevs/"OS dudes"/"hardware guys"/etc are "allowed" to do this? Do you have any proof that FF4's source goes as "low-level" as you say? – Mateen Ulhaq Apr 02 '11 at 08:51
  • @mahen23 I doubt the only thing running on your computer was FF4, but I suppose that's beside the question you're asking. – Mateen Ulhaq Apr 02 '11 at 08:53
  • 3
    @mahen23 - I think you missed the point. An application cannot make a driver crash, a bug in the driver caused the driver to crash, the app just found the bug. There is nothing an app should be able to do to make an OS or driver crash if it's written correctly. Instead, if the app is doing something wrong, the OS should abend the app. – Erik Funkenbusch Apr 02 '11 at 09:51
  • @mystere Man, let me tell you that i play games such as AOE2, Empire Earth, AOE3, COD4, Crysis2, Ghost Recon, Jedi Academy and run graphic applications such as Photoshop CS5, Gimp and FRAPS on a DAILY basis, non of them crashed my nVidia Driver, but just when was resizing an element with FF4, it crashes, COINCIDENCE? – mahen23 Apr 02 '11 at 09:58
  • @mahen23 - I couldn't care less what you do, what games you play, what apps you use. It should not be possible for an application to crash the OS, or a driver. If an app causes a crash, it's not the app that's doing anything wrong. It's a bug in the OS or driver that was uncovered by the app. If you walk across a bridge and the bridge collapsed, you wouldn't blame yourself for causing it to collapse. You'd blame a fault in the bridge, because merely walking across a bridge should not cause it to collapse. – Erik Funkenbusch Apr 02 '11 at 10:10
  • @mystere man you are giving a biassed observation. Are you a mozilla evangelist? – mahen23 Apr 02 '11 at 10:14
  • 2
    @mahen23 - So you think it should be possible for an application to crash the OS or a driver? That's a biased observation. I don't even use Mozilla or Firefox. I'm an IE guy. A driver crash is *always* a flaw in the driver, or the OS itself. It cannot be a flaw in an application. Crashes in kernel mode (Where drivers run) are security vulnerabilities. If you can make a driver crash reliably, you can use it to elevate your privileges and bypass security. That's why it's not allowed. If an app causes a driver to crash, its because the driver has a bug. – Erik Funkenbusch Apr 02 '11 at 10:33
  • basically, you are telling me, that i run a bunch of highly graphic application and none of them have been able to crash my Driver but if FF4 crash my Driver, then i blame it on nVidia or the OS and not FF4. Have you read Oldnewthing? http://blogs.msdn.com/b/oldnewthing/archive/2003/12/23/45481.aspx – mahen23 Apr 02 '11 at 10:44
  • my whole point is when developers like mozilla come do play with GPU, its like letting 5 year old childrens into a Datacenter. This is not their domain. – mahen23 Apr 02 '11 at 10:45
  • @mahen Did *you* read that Old New Thing article yourself!? It's about the perils of relying on undocumented implementation details. It has nothing to do with user mode vs. kernel mode, which would have been more relevant. – MarkJ Apr 02 '11 at 12:51
  • @Mystere man - I think you are wrong in your assertion that an application cannot make the kernel modules crash. An easy way would be to allocate some memory and then free it prematurely or pass invalid data in buffers. – apoorv020 Apr 02 '11 at 17:42
  • @apoorv020 - No, the module should sanitize its input. If you pass it invalid data, it should reject it, not crash. – Erik Funkenbusch Apr 02 '11 at 20:08
  • @Mystere Man - Some modules are probably time-critical enough to allow only trivial error checking. – apoorv020 Apr 02 '11 at 21:33
  • @apoorv020, @Mystere has it right. No application should be able to crash the system by making a bad driver call. This is the whole point of kernel mode/protected memory operating systems. What you are suggesting used to be true in the bad old days of Windows, MS-DOS and CPM. A driver is always supposed to detect when an applications makes an incorrect call for services, and signal the operating system to shut down the application. On a multi-user operating system you just can't let a rogue application bring down the whole system. – Charles E. Grant Apr 02 '11 at 21:49
  • @mhen23, just to underline @MarkJ's point: that article on the Old New Thing is talking about the use of undocumented data structures causing applications crashes, not kernel exceptions/panics. There is a huge difference between a kernel exception and your garden variety application crash. An application can crash because of a bug in the application, the OS, or a driver. A kernel exception can only be caused by a bug in the OS, a bug in the driver, or a hardware fault. – Charles E. Grant Apr 02 '11 at 21:57

3 Answers3

4

First of all, when a driver crashes, that's a security risk, and so drivers should never, ever, crash. Others have pointed this out. It's an OS or driver bug you ran across, not a firefox one.

Now, to the other question: why does only firefox trigger this bug? There's a multipast answer to that:

  • Most apps use the old 2d graphics api's, which have been tested thoroughly during the driver development. This includes gimp and photoshop, which don't actually use accelerated graphics, but are normal windows apps no different from e.g. microsoft office.
  • Most games share one of a handful of separately developed game engines, because writing a game directly on top of the low-level driver is too much work. Game engines are tested endlessly to ensure they don't trigger any bug in the graphics hardware. Ghost recon's engine was actually developed in close cooperation with nvidia.
  • Firefox 4, like IE9, uses the Microsoft Direct2D api to support accelerated graphics. This api is new and uses the existing graphics drivers in ways they didn't foresee. That's why you trigger driver bugs with firefox 4 and not with any of your other software.

Finally, is it a good thing these browsers are using accelerated graphics? Sure, it's a very good thing. It means we're all getting faster web browsing. Once the driver bugs get shaken out by these new api's, we'll all have a better experience for it.

Joeri Sebrechts
  • 12,922
  • 3
  • 29
  • 39
1

I think that more and more, browsers are becoming first-class citizens in today's systems. Chrome OS is the promise of a future where the browser will replace the OS as the user's primary interface. Among software standards, HTML seems to be the most widely implemented as well as one of the most flexible and powerful. So, with an eye toward the future, I would say that the changes in the rendering engines of the browsers are very useful and required.

Of course, one might argue that Chrome OS does not represent the future after all. Or even if it does, on traditional OSes like Windows and Linux, using these new technologies is a significant effort and introduces complications. But I think that given the amount of use the browser sees these days, such arguments are not very valid in terms of cost-value.

apoorv020
  • 666
  • 5
  • 11
  • Reason for downvote, please? – apoorv020 Apr 02 '11 at 07:57
  • @apoorv020 I haven't downvoted (yet :P), but your question seems to digress from the original question a bit. We're not talking about Chrome **OS**. – Mateen Ulhaq Apr 02 '11 at 08:48
  • 1
    @muntoo : I used Chrome OS as an example to show the importance of browsers in today's world. – apoorv020 Apr 02 '11 at 08:56
  • @apoorv020 Importance doesn't mean *they* get to do whatever they want. – Mateen Ulhaq Apr 02 '11 at 08:59
  • @muntoo - It does mean that it's important to improve user experience, and that includes improving rendering speeds for Videos, HTML5 games etc. – apoorv020 Apr 02 '11 at 09:09
  • I haven't downvoted either, but you are engaging in the theory that the browser was running in kernel mode & caused the driver to crash - very unlikely to be true. – MarkJ Apr 02 '11 at 12:47
0

First of all, you working with Firefox at the moment of the crash does not mean that Firefox was the reason for the crash.

You might have run into some delicate Aero issue which just happened to be triggered at that time. A typical example is that something else a while back caused some data structure to be corrupted - then later that structure is needed, the data is incorrect and cause an illegal memory access, which then brings things down.

A car analogy might be that the engine breaking down when you turned on the left blinking light, does not necessarily mean that the blinking light is to blame. The oil might have gone too low...