Q: Why do the glxgears stop after a while - X

This is a discussion on Q: Why do the glxgears stop after a while - X ; Hi world, I'm encountering a strange problem on various hardware and software plattforms: I start glxgears (or several instances of glxgears on multiprocessor systems) and after a while (that is after 30 minutes up to 3 hours) I have a ...

+ Reply to Thread
Results 1 to 11 of 11

Thread: Q: Why do the glxgears stop after a while

  1. Q: Why do the glxgears stop after a while

    Hi world,

    I'm encountering a strange problem on various hardware and software
    plattforms:

    I start glxgears (or several instances of glxgears on multiprocessor
    systems) and after a while (that is after 30 minutes up to 3 hours) I
    have a "frozen" image of the gears, so they are stopped and no more
    rotating. A look at the output of "top" shows that all instances are
    still consuming lots of CPU power, but there is no visible output
    (except the frame rate reports every 5 seconds) any more.

    I've seen this behaviour on several hardware plattforms:
    - Dual Opteron workstation with different nVidia AGP cards
    - Dual Xeon workstation with nVidia FX1300 PCI-E card
    - Intel based PC with nVidia AGP card
    - Intel based PC with Matrox G450 AGP card

    Also the underying distribution seems not to matter. I see the
    problem on:

    - SuSE 9.0 for AMD64 (means kernel 2.4.21)
    - SuSE 9.1 for AMD64 (means kernel 2.6.x)
    - SuSE 9.1 for i386 (means kernel 2.6.x)
    - Red Hat EL 3 Upd.3 (means kernel 2.4.21)
    - Red Hat EL 4 beta (means kernel 2.6.x)

    The only dependency I found out so far is, that the problem only
    occurs when direct rendering is enabled. When I use MESA 3D graphics
    (at a lousy speed of course) the main CPU load comes from the
    process running X, when I enable direct rendering (both nVidia
    drivers or Matrox drivers) then the CPU load comes from the instances
    of glxgears.

    The source of glxgears is simple enough to understand that this is
    an infinite loop that should make the wheels turn forever (or at
    least until the next power outage or kill signal :-) but the graphics
    window seems to stop responding after a while.

    Anybody seen this behaviour as well and what is the explanation
    for this?

    Regards
    Rainer
    --
    * The message above is a PERSONAL opinion, based on the author's *
    * experience and knowledge. So it's NOT necessarily shared by my *
    * employer or anyone else. All rights of being wrong reserved :-) *

  2. Re: Q: Why do the glxgears stop after a while

    Rainer Koenig wrote:
    > Hi world,
    >
    > I'm encountering a strange problem on various hardware and software
    > plattforms:
    >
    > I start glxgears (or several instances of glxgears on multiprocessor
    > systems) and after a while (that is after 30 minutes up to 3 hours) I
    > have a "frozen" image of the gears, so they are stopped and no more
    > rotating. A look at the output of "top" shows that all instances are
    > still consuming lots of CPU power, but there is no visible output
    > (except the frame rate reports every 5 seconds) any more.
    >
    > I've seen this behaviour on several hardware plattforms:
    > - Dual Opteron workstation with different nVidia AGP cards
    > - Dual Xeon workstation with nVidia FX1300 PCI-E card
    > - Intel based PC with nVidia AGP card
    > - Intel based PC with Matrox G450 AGP card
    >
    > Also the underying distribution seems not to matter. I see the
    > problem on:
    >
    > - SuSE 9.0 for AMD64 (means kernel 2.4.21)
    > - SuSE 9.1 for AMD64 (means kernel 2.6.x)
    > - SuSE 9.1 for i386 (means kernel 2.6.x)
    > - Red Hat EL 3 Upd.3 (means kernel 2.4.21)
    > - Red Hat EL 4 beta (means kernel 2.6.x)
    >
    > The only dependency I found out so far is, that the problem only
    > occurs when direct rendering is enabled. When I use MESA 3D graphics
    > (at a lousy speed of course) the main CPU load comes from the
    > process running X, when I enable direct rendering (both nVidia
    > drivers or Matrox drivers) then the CPU load comes from the instances
    > of glxgears.
    >
    > The source of glxgears is simple enough to understand that this is
    > an infinite loop that should make the wheels turn forever (or at
    > least until the next power outage or kill signal :-) but the graphics
    > window seems to stop responding after a while.
    >
    > Anybody seen this behaviour as well and what is the explanation
    > for this?
    >


    Hi,

    have you installed the nvidia drivers from www.nvidia.com ?
    Have you installed the latest version? (cat /proc/driver/nvidia/version).
    The latest driver version available is 1.0-6111. Did you read the
    nvidia README concerning you XF86Config tuning (lots of useful hints there)?

    Regards,

    Toni


    --
    for mail, mirror: ed.lausivksa@elielb

  3. Re: Q: Why do the glxgears stop after a while

    Antonio Bleile writes:

    > have you installed the nvidia drivers from www.nvidia.com ?
    > Have you installed the latest version? (cat /proc/driver/nvidia/version).
    > The latest driver version available is 1.0-6111. Did you read the
    > nvidia README concerning you XF86Config tuning (lots of useful hints there)?


    Sure. But as I mentioned, this problem is not depending on nVidia drivers
    since I also can reproduce it with a Matrox G450 card. But anyway, I get
    it on all nVidia drivers I tried (even the ones only released for OEMs).

    Regards
    Rainer
    --
    * The message above is a PERSONAL opinion, based on the author's *
    * experience and knowledge. So it's NOT necessarily shared by my *
    * employer or anyone else. All rights of being wrong reserved :-) *

  4. Re: Q: Why do the glxgears stop after a while

    Rainer Koenig schrieb:
    > Hi world,
    >
    > I'm encountering a strange problem on various hardware and software
    > plattforms:
    >


    If you look at the glxgears source you can see that it uses and
    32 bit floating point variable to hold the angle. For every frame the
    angle is incremented by 2.0. For a big enough floating point number
    adding 2.0 is a noop, since they have finite precision.

    I'll make a patch to it tonight and send it to the mesa3d-dev list.
    Keeping angle between 0 and 360 degrees should solve the problem.

    Philipp

  5. Re: Q: Why do the glxgears stop after a while

    Philipp Klaus Krause wrote:
    > Rainer Koenig schrieb:
    >
    >> Hi world,
    >>
    >> I'm encountering a strange problem on various hardware and software
    >> plattforms:
    >>

    >
    > If you look at the glxgears source you can see that it uses and
    > 32 bit floating point variable to hold the angle. For every frame the
    > angle is incremented by 2.0. For a big enough floating point number
    > adding 2.0 is a noop, since they have finite precision.
    >
    > I'll make a patch to it tonight and send it to the mesa3d-dev list.
    > Keeping angle between 0 and 360 degrees should solve the problem.


    hihihi :-) Sure this is not a driver bug lol...

    --
    for mail, mirror: ed.lausivksa@elielb

  6. Re: Q: Why do the glxgears stop after a while

    Rainer Koenig schrieb:
    > Hi world,
    >
    > I'm encountering a strange problem on various hardware and software
    > plattforms:
    >


    There's a floating-point number in the glxgears source representing the
    anglefor turning the gears. Each frame 2.0 is added to it. Adding
    2.0 to a big enough floating point variable is a noop due to limited
    precision. Thus the geras stop turning.
    To me it seems this is a bug. I'll send a patch to the author.

    Philipp


  7. Re: Q: Why do the glxgears stop after a while

    Sorry for sending it twice. I didn't see my first post appear
    on the group.

  8. Re: Q: Why do the glxgears stop after a while

    Philipp Klaus Krause writes:

    > There's a floating-point number in the glxgears source representing the
    > anglefor turning the gears. Each frame 2.0 is added to it. Adding
    > 2.0 to a big enough floating point variable is a noop due to limited
    > precision. Thus the geras stop turning.
    > To me it seems this is a bug. I'll send a patch to the author.


    Thanks a lot. That really explains the thing, even until now I thought
    that an "overflow" would just have ment that the variable is "reset" to
    another value. But looks like for floats this is not what I have
    expected. That shows me that I really need to brush up my programming
    skills. :-)

    Regards
    Rainer
    --
    * The message above is a PERSONAL opinion, based on the author's *
    * experience and knowledge. So it's NOT necessarily shared by my *
    * employer or anyone else. All rights of being wrong reserved :-) *

  9. Re: Q: Why do the glxgears stop after a while

    On Wed, 20 Oct 2004 07:21:12 +0200, Rainer Koenig wrote:

    > Philipp Klaus Krause writes:
    >
    >> There's a floating-point number in the glxgears source representing the
    >> anglefor turning the gears. Each frame 2.0 is added to it. Adding
    >> 2.0 to a big enough floating point variable is a noop due to limited
    >> precision. Thus the geras stop turning.
    >> To me it seems this is a bug. I'll send a patch to the author.

    >
    > Thanks a lot. That really explains the thing, even until now I thought
    > that an "overflow" would just have ment that the variable is "reset" to
    > another value. But looks like for floats this is not what I have
    > expected. That shows me that I really need to brush up my programming
    > skills. :-)
    >
    > Regards
    > Rainer


    As I understand, it's not really overflow, it's just a matter of exceeding
    the precision. Basically, a float has about 7 digits of precision (and a
    double about 14, but the idea is the same). To 7 digits of precision, the
    following is true

    12345678 + 2 = 12345678

    the amount being added is smaller than the least significant digit, so it
    contributes nothing.


  10. Re: Q: Why do the glxgears stop after a while

    >>>>> "Rainer" == Rainer Koenig writes:

    Rainer> But looks like for floats this is not what
    Rainer> I have expected. That shows me that I really need to brush up my
    Rainer> programming skills. :-)

    Check "What Every Computer Scientist Should Know About Floating-Point
    Arithmetic" by David Goldberg, in ACM Computing Survers, March 1991. It is
    on web at http://docs.sun.com/db/doc/800-7895

    --
    Arto V. Viitanen av@cs.uta.fi
    University of Tampere, Department of Computer Sciences
    Tampere, Finland http://www.cs.uta.fi/~av/

  11. Re: Q: Why do the glxgears stop after a while

    Arto Viitanen writes:

    > Check "What Every Computer Scientist Should Know About Floating-Point
    > Arithmetic" by David Goldberg, in ACM Computing Survers, March 1991. It is
    > on web at http://docs.sun.com/db/doc/800-7895


    Thanks a lot for this really interesting link. If I only had time to
    read all those things... :-)

    Regards
    Rainer
    --
    * The message above is a PERSONAL opinion, based on the author's *
    * experience and knowledge. So it's NOT necessarily shared by my *
    * employer or anyone else. All rights of being wrong reserved :-) *

+ Reply to Thread