Bug 22253 - KMS Nouveau - wfb crash
Summary: KMS Nouveau - wfb crash
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-12 04:49 UTC by David Heidelberg (okias)
Modified: 2009-06-24 14:17 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Xorg.log (15.62 KB, application/octet-stream)
2009-06-12 04:50 UTC, David Heidelberg (okias)
no flags Details
Xorg.log from lastest Xorg with debug (17.33 KB, application/octet-stream)
2009-06-23 14:05 UTC, David Heidelberg (okias)
no flags Details
fix stupid thinko + extra safety (939 bytes, patch)
2009-06-24 14:08 UTC, Ben Skeggs
no flags Details | Splinter Review

Description David Heidelberg (okias) 2009-06-12 04:49:34 UTC
If is runned Xorg server with EXAPixmaps, then is activated too wfb, which cause X hang, when I try (for example) run Konsole. DMESG is clear, appearing Xorg.

HW: 9600M GT
Comment 1 David Heidelberg (okias) 2009-06-12 04:50:11 UTC
Created attachment 26713 [details]
Xorg.log
Comment 2 David Heidelberg (okias) 2009-06-23 14:05:45 UTC
Created attachment 27058 [details]
Xorg.log from lastest Xorg with debug
Comment 3 Maarten Maathuis 2009-06-23 18:44:47 UTC
gdb is your friend, because this log isn't saying much.
Comment 4 David Heidelberg (okias) 2009-06-24 04:01:37 UTC
Question is how, x.org wiki didn't help, cause everytime when I try assign gdb to X process, Xorg stop, until gdb ends... nothing worked for me. #nouveau, okias
Comment 5 Maarten Maathuis 2009-06-24 04:25:51 UTC
After attaching you need to "continue", this can only be done if you are running gdb over ssh.
Comment 6 David Heidelberg (okias) 2009-06-24 05:00:14 UTC
That's already this case... even with ssh it stop work, until I quit gdb :-(
Comment 7 Maarten Maathuis 2009-06-24 05:12:29 UTC
So if you break it again (ctrl-c), and backtrace, where is it stuck?
Comment 8 David Heidelberg (okias) 2009-06-24 05:23:47 UTC
1) I start X server, log in.
2) do gdb /usr/bin/X [pid]
3) server freeze
4) do in gdb: quit and 'y'
5) server is back unfroozen
Comment 9 Maarten Maathuis 2009-06-24 06:03:58 UTC
After step 3, enter:

continue
Comment 10 Ben Skeggs 2009-06-24 06:13:14 UTC
On Wed, 2009-06-24 at 05:23 -0700, bugzilla-daemon@freedesktop.org
wrote:
> http://bugs.freedesktop.org/show_bug.cgi?id=22253
> 
> 
> 
> 
> 
> --- Comment #8 from okias <d.okias@gmail.com>  2009-06-24 05:23:47 PST ---
> 1) I start X server, log in.
> 2) do gdb /usr/bin/X [pid]
> 3) server freeze
> 4) do in gdb: quit and 'y'
4.5) 'c' or 'continue' in gdb..
> 5) server is back unfroozen
> 
> 
Comment 11 David Heidelberg (okias) 2009-06-24 07:37:13 UTC
Thanks a lot! :-)

Here is output:

(gdb) continue
Continuing.

Program received signal SIGSEGV, Segmentation fault.
nouveau_wfb_setup_wrap (pRead=0x7f1a7ca535d8, pWrite=0x7f1a7ca535d0, pDraw=<value optimized out>) at nouveau_wfb.c:153
153     nouveau_wfb.c: No such file or directory.
        in nouveau_wfb.c
(gdb) quit
Comment 12 David Heidelberg (okias) 2009-06-24 07:38:54 UTC
Moment, I forgot backtrace :-D sorry
Comment 13 Maarten Maathuis 2009-06-24 07:41:59 UTC
nouveau_wfb_finish_wrap is broken

It ignores index:

struct wfb_pixmap *wfb = &wfb_pixmap[0];

Later it loops over all 6, but still uses 0.

Eventually you pollute all 6 of your wfb entries and boom.

I'll let Ben fix it :-)
Comment 14 David Heidelberg (okias) 2009-06-24 07:46:20 UTC
Here is complete bt :-)

(gdb) continue
Continuing.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f96211626f0 (LWP 7427)]
nouveau_wfb_setup_wrap (pRead=0x7f961bc715d8, pWrite=0x7f961bc715d0,
    pDraw=<value optimized out>) at nouveau_wfb.c:153
153     nouveau_wfb.c: No such file or directory.
        in nouveau_wfb.c
(gdb)  continue
Continuing.

Program received signal SIGABRT, Aborted.
0x00007f961e5f1285 in raise () from /lib/libc.so.6
(gdb) bt
#0  0x00007f961e5f1285 in raise () from /lib/libc.so.6
#1  0x00007f961e5f2642 in abort () from /lib/libc.so.6
#2  0x000000000046540f in ddxGiveUp () at xf86Init.c:1396
#3  0x00000000004654c9 in AbortDDX () at xf86Init.c:1441
#4  0x0000000000455fb3 in AbortServer () at log.c:404
#5  0x000000000045658c in FatalError (
    f=0x55a608 "Caught signal %d (%s). Server aborting\n") at log.c:529
#6  0x000000000045998b in OsSigHandler (signo=11, sip=0x7f961d4fa1b0,
    unused=<value optimized out>) at osinit.c:152
#7  <signal handler called>
#8  nouveau_wfb_setup_wrap (pRead=0x7f961bc715d8, pWrite=0x7f961bc715d0,
    pDraw=<value optimized out>) at nouveau_wfb.c:153
#9  0x00007f961ba63131 in wfbFill (pDrawable=0x1ce20d0, pGC=0x1ce1f70, x=26,
    y=26, width=192, height=17) at fbfill.c:116
#10 0x00007f961ba63497 in wfbPolyFillRect (pDrawable=0x1ce20d0, pGC=0x1ce1f70,
    nrect=<value optimized out>, prect=0x1d0c954) at fbfillrect.c:77
#11 0x00007f961b625040 in ExaCheckPolyFillRect (pDrawable=0x1ce20d0,
    pGC=0x1ce1f70, nrect=1, prect=0x1d0c954) at exa_unaccel.c:249
#12 0x00007f961b61d74d in exaPolyFillRect (pDrawable=0x1ce20d0, pGC=0x1ce1f70,
    nrect=1, prect=0x1d0c954) at exa_accel.c:816
#13 0x00000000004b8604 in damagePolyFillRect (pDrawable=0x1ce20d0,
---Type <return> to continue, or q <return> to quit---
    pGC=0x1ce1f70, nRects=1, pRects=0x1d0c954) at damage.c:1404
#14 0x0000000000444330 in ProcPolyFillRectangle (client=0x1c4f830)
    at dispatch.c:1925
#15 0x00000000004462c4 in Dispatch () at dispatch.c:426
#16 0x0000000000425ed2 in main (argc=10, argv=0x7fff970d9f98,
    envp=<value optimized out>) at main.c:283
(gdb) quit
The program is running.  Quit anyway (and detach it)? (y or n) y
Detaching from program: /usr/bin/X, process 7427
Comment 15 David Heidelberg (okias) 2009-06-24 13:10:00 UTC
Thanks for help! I posted my first nouveau patch/bugfix to mailing list ;-)
Comment 16 Ben Skeggs 2009-06-24 14:08:42 UTC
Created attachment 27095 [details] [review]
fix stupid thinko + extra safety
Comment 17 David Heidelberg (okias) 2009-06-24 14:17:37 UTC
fixed. thanks :-)


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.