AnsweredAssumed Answered

X11 segfault in vivante driver kernel L3.10.17_1.0.2

Question asked by Henri Roosen on Dec 17, 2014
Latest reply on Feb 17, 2015 by Johann Obermayr
Branched to a new discussion

We are facing a segfault when using X11 on i.MX6 in 16 bit depth. Please find below the xorg.conf. When changing DefaultDepth to 24, the segfault is not seen.

 

Please find below the stacktrace. The main problem is that gcoSURF_Lock() returns an invalid address. That address is where some library has it's read-only mapping. The memcpy uses that address and the segfault happens.

 

gcoSURF_Lock() is implemented in libGAL.so and there is no source code, so I cannot trace this any further. This is a critical failure in our system, so please help.

 

Any help is appreciated!

Thanks, Henri

 

--------------------------------------------------------------------------

xorg.conf:

--------------------------------------------------------------------------

Section "ServerLayout"

        Identifier     "X.org Configured"

        Screen      0  "Screen0" 0 0

EndSection

 

Section "Device"

    Identifier  "i.MX Accelerated Framebuffer Device"

    Driver      "vivante"

    Option      "fbdev"     "/dev/fb0"

    Option      "vivante_fbdev" "/dev/fb0"

    Option      "HWcursor"  "false"

EndSection

 

Section "ServerFlags"

    Option "BlankTime"  "0"

    Option "StandbyTime"  "0"

    Option "SuspendTime"  "0"

    Option "OffTime"  "0"

EndSection

 

Section "Screen"

        Identifier "Screen0"

        Device     "i.MX Accelerated Framebuffer Device"

        Monitor    "Monitor0"

        DefaultDepth 16

        SubSection "Display"

                Viewport   0 0

                Depth     16

        EndSubSection

        SubSection "Display"

                Viewport   0 0

                Depth     24

        EndSubSection

EndSection

 

--------------------------------------------------------------------------

stacktrace:

--------------------------------------------------------------------------

#0  memcpy () at ../ports/sysdeps/arm/memcpy.S:101

#1  0xb6ad4aa8 in DoneByVSurf (pDst=0x2f4f78, x=1966072, y=3100304, w=800, h=480, src=<optimized out>, src_pitch=1600) at vivante_exa/vivante_exa.c:285

#2  0xb6852e8c in exaHWCopyNtoN (pSrcDrawable=0x1e23d0, pDstDrawable=<optimized out>, pGC=<optimized out>, pbox=<optimized out>, nbox=<optimized out>, nbox@entry=1, dx=dx@entry=0, dy=dy@entry=0, reverse=reverse@entry=0, upsidedown=upsidedown@entry=0) at /home/user/yocto-kernel-3.10/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/xserver-xorg/2_1.14.0-r8.1/xorg-server-1.14.0/exa/exa_accel.c:532

#3  0xb6852f74 in exaCopyNtoN (pSrcDrawable=0x0, pDstDrawable=0x1dfff8, pGC=0x0, pbox=0x1e23d0, nbox=1, dx=0, dy=0, reverse=0, upsidedown=0, bitplane=0, closure=0x0) at /home/user/yocto-kernel-3.10/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/xserver-xorg/2_1.14.0-r8.1/xorg-server-1.14.0/exa/exa_accel.c:582

#4  0x0014cdf4 in miCopyRegion (pSrcDrawable=pSrcDrawable@entry=0x1e23d0, pDstDrawable=pDstDrawable@entry=0x1dfff8, pGC=0x0, pGC@entry=0x1dfc30, pDstRegion=pDstRegion@entry=0xbefffaac, dx=dx@entry=0, dy=0, dy@entry=1, copyProc=0xb6852ecc <exaCopyNtoN>, copyProc@entry=0x0, bitPlane=bitPlane@entry=0, closure=0x0, closure@entry=0xb6852ecc <exaCopyNtoN>) at /home/user/yocto-kernel-3.10/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/xserver-xorg/2_1.14.0-r8.1/xorg-server-1.14.0/mi/micopy.c:121

#5  0x0014d40c in miDoCopy (pSrcDrawable=0x1e23d0, pDstDrawable=0x1dfff8, pGC=0x1dfc30, xIn=0, yIn=yIn@entry=0, widthSrc=widthSrc@entry=800, heightSrc=heightSrc@entry=480, xOut=xOut@entry=0, yOut=yOut@entry=0, copyProc=0xb6852ecc <exaCopyNtoN>, bitPlane=0, closure=0x0) at /home/user/yocto-kernel-3.10/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/xserver-xorg/2_1.14.0-r8.1/xorg-server-1.14.0/mi/micopy.c:297

#6  0xb68512c4 in exaCopyArea (dsty=0, dstx=0, height=480, width=800, srcy=0, srcx=<optimized out>, pGC=<optimized out>, pDstDrawable=<optimized out>, pSrcDrawable=<optimized out>) at /home/user/yocto-kernel-3.10/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/xserver-xorg/2_1.14.0-r8.1/xorg-server-1.14.0/exa/exa_accel.c:608

#7  exaCopyArea (pSrcDrawable=0x1e23d0, pDstDrawable=0x1dfff8, pGC=0x1dfff8, srcx=0, srcy=0, width=800, height=480, dstx=0, dsty=0) at /home/user/yocto-kernel-3.10/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/xserver-xorg/2_1.14.0-r8.1/xorg-server-1.14.0/exa/exa_accel.c:598

#8  0x000fdcd8 in damageCopyArea (pSrc=0x1e23d0, pDst=0x1dfff8, pGC=0x1dfc30, srcx=0, srcy=0, width=800, height=480, dstx=0, dsty=0) at /home/user/yocto-kernel-3.10/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/xserver-xorg/2_1.14.0-r8.1/xorg-server-1.14.0/miext/damage/damage.c:825

#9  0x00032a50 in ProcCopyArea (client=0x1dfd60) at /home/user/yocto-kernel-3.10/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/xserver-xorg/2_1.14.0-r8.1/xorg-server-1.14.0/dix/dispatch.c:1626

#10 0x00036810 in Dispatch () at /home/user/yocto-kernel-3.10/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/xserver-xorg/2_1.14.0-r8.1/xorg-server-1.14.0/dix/dispatch.c:432

#11 0x000261d8 in main (argc=1, argv=0x261d8 <main+1020>, envp=<optimized out>) at /home/user/yocto-kernel-3.10/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/xserver-xorg/2_1.14.0-r8.1/xorg-server-1.14.0/dix/main.c:295

Outcomes