Open office crashes and takes Xgl with it

Bug #63830 reported by Misha Koshelev
8
Affects Status Importance Assigned to Milestone
linux-restricted-modules-2.6.17 (Ubuntu)
Won't Fix
Undecided
Unassigned
linux-restricted-modules-2.6.24 (Ubuntu)
Invalid
Undecided
Unassigned
xserver-xgl (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I am using a Mobility Radeon 9000 with fglrx driver (the Edgy default version) and with Xgl and Beryl 0.1 (I also tried compiz-freedesktop and it had the same effect). To reproduce the bug, all I have to do is open a large Writer file (my file is about 30 pages long), Edit->Zoom... and select whole page, then just start dragging the scroll bar to scroll through the file for a while (30-45 secs max) until things freeze up, and about five seconds later Xgl dies and I am back at the log-in screen.

This is not the only way to make this bug occur (I can just be scrolling casually in openoffice), but this way is very consistent. Usually there's no crash log :( Any ideas?

Thanks
Misha

Tags: patch
Revision history for this message
Misha Koshelev (misha680) wrote :

Same thing if I just full screen in OpenOffice Writer and start scrolling around.

Misha

Revision history for this message
Misha Koshelev (misha680) wrote :

Ok, this bug does not exist if I am running Xgl on top of the open source radeon driver (although the driver is slower, but Xgl on radeon seems faster than Xgl + AIGLX), so it probably is not an openoffice bug but an Xgl + fglrx bug.

Revision history for this message
Misha Koshelev (misha680) wrote :

Ok, here's some more info. If I just run Xgl from a normal (non-Xgl) X session and then beryl-xgl and emerald and oowriter and do the same thing, I get this message when it crashes:

X IO Error
XIO: fatal IO error 104 (Connection reset by peer) on X server ":1.0"
      after 11249 requests (11245 known processed) with 0 events remaining.
The application 'emerald' lost its connection to the display :1.0;
most likely the X server was shut down or you killed/destroyed
the application.

Revision history for this message
Misha Koshelev (misha680) wrote :

---
gdb Xgl
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

(gdb) run :1 -fullscreen -ac -accel xv:pbuffer -accel glx:pbuffer
Starting program: /usr/bin/Xgl :1 -fullscreen -ac -accel xv:pbuffer -accel glx:pbuffer
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1212668240 (LWP 8065)]
Error while reading shared library symbols:
Cannot find new threads: generic error
Could not init font path element /usr/share/fonts/X11/TTF/, removing from list!
Could not init font path element /usr/share/fonts/X11/OTF, removing from list!
Could not init font path element /usr/share/fonts/X11/CID/, removing from list!
FreeFontPath: FPE "/usr/share/fonts/X11/misc/" refcount is 2, should be 1; fixing.
Could not init font path element /usr/share/fonts/X11/TTF/, removing from list!
Could not init font path element /usr/share/fonts/X11/OTF, removing from list!
Could not init font path element /usr/share/fonts/X11/CID/, removing from list!
    xkb_types { include "%" };
    xkb_compatibility { include "%" };
    xkb_symbols { include "%" };
    xkb_geometry { include "%" };
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Error: Missing KeyNames section in a Keymap file
> Description of Keymap not compiled
Errors from xkbcomp are not fatal to the X server
(EE) Error loading keymap /var/tmp/server-1.xkm

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1212668240 (LWP 8065)]
0xb73131d3 in __glim_R200TCLDrawArrays () from /usr/lib/dri/atiogl_a_dri.so
---

I guess this is a bug in fglrx????

Revision history for this message
Misha Koshelev (misha680) wrote :

Here is a core dump.

Revision history for this message
Misha Koshelev (misha680) wrote :

Ok, this is actually most definitely an xserver-xgl bug. I downgraded back to Dapper, where I was using the xserver-xgl_7.0.0-0ubuntu28_i386 before and everything worked fine (no problems with crashes ever). Now with the xserver-xgl-xgl7.0.0+cvs20060625 deb it is stable but openoffice scrolling also crashes Xgl. So it's not an fglrx issue as with xserver-xgl_7.0.0-0ubuntu28_i386 it worked fine (no if I could find that deb somewhere...)

Misha

Revision history for this message
Misha Koshelev (misha680) wrote :

Better backtrace:

#87347 0xb73471ce in __glim_R200TCLDrawArrays () from /usr/lib/dri/atiogl_a_dri.so
#87348 0xb7a11edd in xglxInitXorg () from /usr/lib/xorg/modules/xgl/libxglx.so
#87349 0xb7a7deb3 in __glXSendReplySwap () from /usr/lib/xorg/modules/xgl/libglxext.so#87350 0xb7a6146d in __glXRenderLarge () from /usr/lib/xorg/modules/xgl/libglxext.so
#87351 0xb7a64b97 in __glXsetEnterLeaveServerFuncs () from /usr/lib/xorg/modules/xgl/libglxext.so
#87352 0x080888d6 in Dispatch ()
#87353 0x08098d35 in main ()

That's where the problem is in XGl.

Misha

Revision history for this message
Misha Koshelev (misha680) wrote :

If in hw/xgl/glxext/xglglxext.c, in the function xglDrawArrays I make the following change (denoted by MISHA HACK in the comments) it no longer crashes although there are some redrawing problems:

static void
xglDrawArrays (GLenum mode,
               GLint first,
               GLsizei count)
{
    GLenum listMode;

    if (cctx->list)
    {
        glEndList ();
        xglStartList (XGL_LIST_OP_DRAW, GL_COMPILE);
        glDrawArrays (mode, first, count);
        glEndList ();

        listMode = cctx->listMode;
    }
    else
        listMode = GL_COMPILE_AND_EXECUTE;

    if (listMode == GL_COMPILE_AND_EXECUTE)
    {
        RegionRec region;
        BoxRec scissor, box;
        BoxPtr pBox;
        int nBox;

        XGL_GLX_DRAW_PROLOGUE (pBox, nBox, &scissor);

        while (nBox--)
        {
            XGL_GLX_DRAW_BOX (&box, pBox);

            pBox++;

            if (!cctx->framebuffer && cctx->attrib.scissorTest)
                XGL_GLX_INTERSECT_BOX (&box, &scissor);

            if (box.x1 < box.x2 && box.y1 < box.y2)
            {
                XGL_GLX_SET_SCISSOR_BOX (&box);

                /* !!! MISHA HACK START !!! */
                if (count < 1000)
                  glDrawArrays (mode, first, count);
                /* !!! MISHA HACK END !!! */

                XGL_GLX_DRAW_DAMAGE (&box, &region);
            }
        }
    }

    if (cctx->list)
        xglStartList (XGL_LIST_OP_CALLS, cctx->listMode);
}

I am in communication with David Reverman about the bug and hopefully he will suggest something a little cleaner (basically it seems
like there is aproblem with calls to glDrawArrays with a large count
in this function, but as I have no OpenGL experience I am not clear on what array is actually being used for this function, and thus cannot currently proceed further).

Misha

Revision history for this message
Misha Koshelev (misha680) wrote :

Ok, here is my Xgl patch. It does not really seem to have any adverse effects, but is a hack around what is probably a bug in the fglrx driver.

Misha

Revision history for this message
Misha Koshelev (misha680) wrote :

This is an fglrx bug, see, e.g.:

http://www.gamedev.net/community/forums/topic.asp?topic_id=269117&whichpage=1&

which is the exact same problem (glDrawArrays with > 4000 vertices crashes). Oh well. Nothing can do.

Misha

Revision history for this message
Misha Koshelev (misha680) wrote :

Ok, I already made a better patch. From now on I am only going to make posts in my HOWTO here:

http://www.ubuntuforums.org/showthread.php?p=1616908#post1616908

Misha

Revision history for this message
Textureglitch (textureglitch) wrote :

I can confirm this bug. I'm running a completely fresh install of Ubuntu Edgy Eft on a Toshiba laptop with an ATI Radeon Xpress 200M integrated graphics card.

This happens only in an XGL session, not in an ordinary Gnome session.
The first few times I tried to open an Openoffice document file, XGL crashed and sent me back to session login. When logging in again there was a huge crash report (some 18MB). The crash reports stopped coming when the computer started freezing until I do a hard reboot. The screen freezes with artifacts that clearly show an error with the graphics card.

Abiword crashes in the same manner.

There is one odd thing about this, however. I went to another computer and resaved the same document, but with the Web Layout view turned OFF so that I could see each page. It's about a 130 page document.

When I opened the document again in XGL, it did not crash and everything worked fine. I tried opening and closing it several times, rebooting, logging out and back into the session, I can't make it crash again.

Something about the Web Layout view seems to kill the graphics driver. Even in ordinary Gnome, OpenOffice always churns a lot when you open a long document in Web Layout. It might be a bug in both openoffice and the ATI drivers.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hi All,

This bug was opened a while ago and there hasn't been any recent activity. Just curious if this is still an issue in the latest Hardy Heron 8.04 Alpha release? The Hardy Heron Alpha series is currently under development and contains an updated version of the kernel. It would be helpful if you could test the latest Hardy Alpha release: http://www.ubuntu.com/testing . You should be able to then test the new kernel via the LiveCD. If you can, please verify if this bug still exists or not and report back your results. Also note that we'll keep this report open against the actively developed kernel but against 2.6.17 this will be closed. Thanks.

Changed in linux-restricted-modules-2.6.17:
status: New → Won't Fix
Changed in linux-restricted-modules-2.6.24:
status: New → Incomplete
Revision history for this message
Misha Koshelev (misha680) wrote :

As the person who opened it just wanted to comment that since Feisty open source ATI driver 3D support has been excellent (much faster) for my card and I haven't needed to use Xgl so I'm not sure if it's still an issue in Feisty/Gutsy/Hardy. Actually bought Nvidia on my new computer b/c of probs like this tho.

Misha

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Thanks for the feedback Misha. I'm just going to go ahead and close this bug against Hardy then. If anyone else is still experiencing issues, please feel free to reopen. Thanks.

Changed in linux-restricted-modules-2.6.24:
status: Incomplete → Invalid
Revision history for this message
Mike Dahlgren (dahlgren) wrote :

From the comments it appears that this bug has been resolved with later releases. Closing out, if you feel that this is in error, please re-open.

Changed in xserver-xgl:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.