AnsweredAssumed Answered

X-Server segmentationfault with vivante driver

Question asked by Wolfgang Netbal on Mar 24, 2017
Latest reply on Mar 29, 2017 by Wolfgang Netbal

When I try to activate the vivante driver for X server on my 3.10.53 BSP

the X server crashes with a segmentation fault.

 

Using the framebuffer driver works well.

 

Backtrace in gdb shows the following callstack

(gdb) bt
#0  0xb69204dc in gcoOS_GetBaseAddress (Os=Os@entry=0x0, BaseAddress=0xbefff99c, BaseAddress@entry=0xbefff994) at gc_hal_user_os.c:1673
#1  0xb6871aa4 in gcoHAL_MapUserMemory (Logical=0xb5f8b000, Physical=974127104, Size=8359936, Info=0x1e6240, GPUAddress=0x1e6250) at gc_hal_user.c:885
#2  0xb67d6a38 in ?? () from /usr/lib/xorg/modules/drivers/vivante_drv.so
#3  0xb67d6a38 in ?? () from /usr/lib/xorg/modules/drivers/vivante_drv.so
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

 

Did anyone of you have an idea how to fix this ?

 

My xorg.conf looks like this

 

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
EndSection

 

In the xorg.log I see the following line

 

[4119580.494] (II) VIVANTE(0): hardware: DISP3 BG (video memory: 8164kB)
[4119580.548] (WW) VIVANTE(0): FBIOPAN_DISPLAY: Invalid argument
[4119580.562] (II) VIVANTE(0): test Initializing EXA
[4119580.562] (II) VIVANTE(0): (driver build from: -dirty)
[4119580.567] (EE)
[4119580.567] (EE) Backtrace:
[4119580.567] (EE)
[4119580.567] (EE) Segmentation fault at address 0xc
[4119580.567] (EE)
Fatal server error:
[4119580.568] (EE) Caught signal 11 (Segmentation fault). Server aborting
[4119580.568] (EE)
[4119580.568] (EE)

 

 

Using GDB to find the reason for this gave me the follwoing output

 

gdb --args X -dpms -logfile /var/log//xorg_gdb.log -noreset -logverbose 20
GNU gdb (GDB) 7.6.2
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-poky-linux-gnueabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/Xorg...Reading symbols from /usr/bin/.debug/Xorg...done.
done.
(gdb) run
Starting program: /usr/bin/X -dpms -logfile /mnt/drive-C/sysmsg/xorg_gdb.log -noreset -logverbose 20
warning: File "/lib/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
    add-auto-load-safe-path /lib/libthread_db-1.0.so
line to your configuration file "/home/root/.gdbinit".
To completely disable this security protection add
    set auto-load safe-path /
line to your configuration file "/home/root/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
    info "(gdb)Auto-loading safe path"
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/sigmatek-arm:0
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6

X.Org X Server 1.16.1
Release Date: 2014-09-21
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.4.0-66-generic x86_64
Current Operating System: Linux sigmatek-arm 3.10.53 #15 SMP PREEMPT Wed Mar 22 13:16:06 CET 2017 armv7l
Kernel command line: console=ttymxc1,115200 video=mxcfb0sigvid=1024x768 sigvid=1024x768 CPUname=`ETT 1533-C` FirstUsbDrive=E root=/dev/mmcblk0p2 rw rootfstype=ext3 rootflags=data=journal rootwait
Build Date: 20 March 2017  05:19:36PM

Current version of pixman: 0.32.4
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "/mnt/drive-C/sysmsg/xorg_gdb.log", Time: Thu Mar 23 12:40:54 2017
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
[tcsetpgrp failed in terminal_inferior: Operation not permitted]

Program received signal SIGSEGV, Segmentation fault.
0xb69204dc in gcoOS_GetBaseAddress (Os=Os@entry=0x0, BaseAddress=0xbefff99c, BaseAddress@entry=0xbefff994) at gc_hal_user_os.c:1673
1673    gc_hal_user_os.c: No such file or directory.
(gdb) bt
#0  0xb69204dc in gcoOS_GetBaseAddress (Os=Os@entry=0x0, BaseAddress=0xbefff99c, BaseAddress@entry=0xbefff994) at gc_hal_user_os.c:1673
#1  0xb6871aa4 in gcoHAL_MapUserMemory (Logical=0xb5f8b000, Physical=974127104, Size=8359936, Info=0x1e6240, GPUAddress=0x1e6250) at gc_hal_user.c:885
#2  0xb67d6a38 in ?? () from /usr/lib/xorg/modules/drivers/vivante_drv.so
#3  0xb67d6a38 in ?? () from /usr/lib/xorg/modules/drivers/vivante_drv.so
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) quit

 

Kind regards

Wolfgang

Original Attachment has been moved to: xorg_gdb.log.zip

Original Attachment has been moved to: xorg.log.zip

Outcomes