Bug 30047 - radeon [XPRESS 200M] OpenOffice crashes X server when previewing too long footnotes
Summary: radeon [XPRESS 200M] OpenOffice crashes X server when previewing too long foo...
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: 7.5 (2009.10)
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: xf86-video-ati maintainers
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-06 10:20 UTC by Cyril Brosch
Modified: 2011-10-25 09:19 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
sample document which can cause OOo to crash (last footnote) (9.76 KB, application/vnd.oasis.opendocument.text)
2010-09-06 10:20 UTC, Cyril Brosch
no flags Details
debug output of X server (8.77 KB, text/plain)
2010-09-06 10:23 UTC, Cyril Brosch
no flags Details
Attempt to make radeon_dri2_create_buffer() more robust (1.72 KB, patch)
2010-09-07 00:37 UTC, Michel Dänzer
no flags Details | Splinter Review
not working Xorg.conf (5.15 KB, application/octet-stream)
2010-09-09 02:36 UTC, Cyril Brosch
no flags Details
Backtrace (2.84 KB, text/plain)
2011-10-22 09:55 UTC, auxsvr
no flags Details
Attempt to make radeon_dri2_create_buffer() more robust (1.95 KB, patch)
2011-10-24 03:13 UTC, Michel Dänzer
no flags Details | Splinter Review
Attempt to make radeon_dri2_create_buffer() more robust (2.76 KB, patch)
2011-10-24 03:57 UTC, Michel Dänzer
no flags Details | Splinter Review

Description Cyril Brosch 2010-09-06 10:20:38 UTC
Created attachment 38480 [details]
sample document which can cause OOo to crash (last footnote)

When hovering over a reference to a footnote, a preview appears. However, when
the footnote is long (> 4 lines), the preview is distorted (something I can
live with), and when it is very long (7 lines or more) OpenOffice crashes,
taking with it the whole X server. This happens also with a clean user
directory, so no corrupted personal settings.
I just found a Ubuntu bug report: https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/606602. Compiz
actually reports "text length exceeded". It seems to be the same issue: OOo doesn't line-break in footnote previews - if the preview is
much too long for one line, OOo does _something_ which 
-in Gome with Compiz (there's no information about the graphics) crashes
Compiz,
-in XFCE with Compiz and proprietary Nvidia driver leaves just an empty
tooltip,
-in KDE SC with KWin and free radeon driver crashes X.

It's very annoying, because in my scientific writings I have a lot of long
footnotes and every now and then OOo crashes. It took me weeks to find out the
reason.

OpenSuse 11.3, KDE SC 4.5.0, Kernel 2.6.34-12, ATI Radeon XPRESS 200M with
radeon driver

For comparison I tested OO.org on my other machine with an NVidia card: On
Windows everything is shown correctly, on XFCE longer previews (from 4 lines
on) are displayed as withe fields, but no crash.

I've reported this to Novell Bugzilla, but for the lack of ATI Xpress hardware they can't debug it there.

I attach an example file and the debug output.
Comment 1 Cyril Brosch 2010-09-06 10:23:05 UTC
Created attachment 38481 [details]
debug output of X server
Comment 2 Michel Dänzer 2010-09-07 00:37:04 UTC
Created attachment 38504 [details] [review]
Attempt to make radeon_dri2_create_buffer() more robust

Does this X radeon driver patch fix the problem?
Comment 3 Cyril Brosch 2010-09-07 00:44:14 UTC
Thanks for the patch, I'll tell you as soon as I learn how to apply it, I've never done something like this before, but I'll try. :-)
Comment 4 Cyril Brosch 2010-09-07 11:30:11 UTC
Now I'm totally confused: hwinfo tells me I have radeon, but the package installed is radeonhd?
Anyhow, neither in the source of radeon nor in the source of radeonhd I can find a file "radeon_dri2.c" where I should apply the patch.
Will it be sufficient to compile just the driver (if I find the appropriate source) , or do I have to compile the whole X stuff (sorry, the only thing I compiled until now were plasmoids)?
Comment 5 Alex Deucher 2010-09-07 11:45:04 UTC
(In reply to comment #4)
> Now I'm totally confused: hwinfo tells me I have radeon, but the package
> installed is radeonhd?

radeonhd is a separate driver.  It's not applicable to your chip.  I'm not sure how suse packages the radeon (xf86-video-ati) driver.  It may be part of a larger xorg driver package.

> Anyhow, neither in the source of radeon nor in the source of radeonhd I can
> find a file "radeon_dri2.c" where I should apply the patch.
> Will it be sufficient to compile just the driver (if I find the appropriate
> source) , or do I have to compile the whole X stuff (sorry, the only thing I
> compiled until now were plasmoids)?

All you need to do is recompile the ddx driver.  The upstream source is here:
http://cgit.freedesktop.org/xorg/driver/xf86-video-ati/
and building info is here:
http://wiki.x.org/wiki/radeonBuildHowTo
Comment 6 Cyril Brosch 2010-09-09 02:35:05 UTC
Good: Thanks to your advice I could patch and compile the ati driver (6.13.1).

Bad: Xorg -configure doesn't generate a working Xorg.conf. When I test it, I get a black screen (usual ATI driver) or a black screen and an X crash (patched driver) with the error log (4 times) "no input driver/identifier attached. ignoring" (in the patched version there's a complaint about xterm, too).
But I don't see anything wrong in Xorg.conf, everything is there, see attachment.
Comment 7 Cyril Brosch 2010-09-09 02:36:07 UTC
Created attachment 38574 [details]
not working Xorg.conf
Comment 8 Michel Dänzer 2010-09-09 07:44:16 UTC
(In reply to comment #6)
> Bad: Xorg -configure doesn't generate a working Xorg.conf.

No need to generate a new xorg.conf for testing the patch, just make sure the X server loads the patched radeon_drv.so and try to reproduce the crash.
Comment 9 Cyril Brosch 2010-09-13 11:57:53 UTC
OK, thanks to your hints I patched, compiled, and installed the new driver, but the crash behaviour is the same.
Comment 10 Michel Dänzer 2010-09-14 04:08:45 UTC
(In reply to comment #9)
> OK, thanks to your hints I patched, compiled, and installed the new driver, but
> the crash behaviour is the same.

Bummer. Please attach a new GDB backtrace with the patch applied.
Comment 11 Cyril Brosch 2010-09-16 06:16:10 UTC
Uff, I really try, but I can't get this stuff to work. I can't remember that I did something special last time, but somehow I got the debug output. Now I get only this one:

Backtrace:
[   135.694] 0: X (xorg_backtrace+0x37) [0x80986d7]
[   135.694] 1: X (0x8048000+0x4e3fa) [0x80963fa]
[   135.694] 2: (vdso) (__kernel_rt_sigreturn+0x0) [0xffffe410]
[   135.694] 3: /usr/lib/xorg/modules/extensions/libdri2.so (0xb734f000+0x303c) [0xb735203c]
[   135.694] 4: /usr/lib/xorg/modules/extensions/libdri2.so (0xb734f000+0x363c) [0xb735263c]
[   135.694] 5: X (0x8048000+0x48177) [0x8090177]
[   135.694] 6: X (0x8048000+0x1eb85) [0x8066b85]
[   135.694] 7: /lib/libc.so.6 (__libc_start_main+0xfe) [0xb7465c0e]
[   135.695] 8: X (0x8048000+0x1e771) [0x8066771]
[   135.695] Segmentation fault at address (nil)
[   135.695] 
Fatal server error:
[   135.695] Caught signal 11 (Segmentation fault). Server aborting
[   135.695] 
[   135.695] 
Please consult the The X.Org Foundation support at http://wiki.x.org for help. 

The debug script in the Xorg wiki doesn't work for me (as /usr/X11R6/ is empty, I changed the path to /var/lib/X11/), the X server doesn't start at all with this. I'm sorry, at the moment this surpasses my limited skills.
Comment 12 auxsvr 2011-10-22 09:51:54 UTC
I'm seeing this with a radeon 9600xt card on opensuse 11.4. Could you update the patch for video-ati-6.14.2 ?

The (old) backtrace is attached.
Comment 13 auxsvr 2011-10-22 09:55:40 UTC
Created attachment 52634 [details]
Backtrace

I can reproduce this crash reliably with kwin compositing with the attached OO.org document and when I expand the mimetype menu of the kparts-plugin.
Comment 14 Michel Dänzer 2011-10-24 03:13:50 UTC
Created attachment 52681 [details] [review]
Attempt to make radeon_dri2_create_buffer() more robust

Patch against current Git.
Comment 15 Michel Dänzer 2011-10-24 03:57:22 UTC
Created attachment 52683 [details] [review]
Attempt to make radeon_dri2_create_buffer() more robust

Updated patch which avoids leaking resources in error paths. Only lightly tested (glxgears works :) for regressions.
Comment 16 auxsvr 2011-10-24 13:25:14 UTC
No crashes so far. However,
1. from zeile 5 downwards the tooltip becomes corrupted,
2. the mimetype menu in kparts-plugin does not display the menu that would fill the screen, which triggered the crash previously.

Thanks.
Comment 17 Michel Dänzer 2011-10-25 08:57:36 UTC
(In reply to comment #16)
> No crashes so far.

Great, thanks for testing the fix. I've pushed it to xf86-video-ati Git.


> 1. from zeile 5 downwards the tooltip becomes corrupted,
> 2. the mimetype menu in kparts-plugin does not display the menu that would fill
> the screen, which triggered the crash previously.

I suspect one of two things is happening here:

1. These pixmaps exceed the maximum width/height supported by the 3D engine. That would really need to be handled by the compositing manager earlier on.

2. The X driver fails to allocate GPU accessible memory for these pixmaps. Do you get 'Failed to alloc memory' lines in Xorg.0.log or the X server stderr output? What's the version of the kernel running when this happens?
Comment 18 auxsvr 2011-10-25 09:13:00 UTC
The tooltips exceed the width of the screen when this occurs. Also, no error message appears either in Xorg.log or dmesg. The kernel is 3.1rc9. So, should I report this to the kwin developers?
Comment 19 Michel Dänzer 2011-10-25 09:19:56 UTC
(In reply to comment #18)
> Also, no error message appears either in Xorg.log or dmesg. The kernel is
> 3.1rc9. So, should I report this to the kwin developers?

I think so.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.