Languages

Menu
Sites
Language
Tizen 2.2 porting Xorg crashes on power up and display does not come up

Hi,

I am trying to port tizen 2.2 onto armv7l based chipset supporting linux fb.

While powering up I am seeing Xorg crash as:

Jan  1 09:01:21 localhost daemon.info kernel: [   82.111429] enlightenment_start[1298]: ESTART: 14.11277 [2.13288] - DELAYED MODULE LOAD: conf_applications
Jan  1 09:01:21 localhost daemon.info kernel: [   82.112955] enlightenment_start[1298]: ESTART: 14.11335 [0.00058] - SLEEP
Jan  1 09:01:22 localhost user.debug kernel: [   83.369449] Xorg: unhandled page fault (11) at 0x00000004, code 0x017
Jan  1 09:01:22 localhost user.alert kernel: [   83.369510] pgd = de9f4000
Jan  1 09:01:22 localhost user.alert kernel: [   83.369510] [00000004] *pgd=a5d58831, *pte=00000000, *ppte=00000000
Jan  1 09:01:22 localhost user.warn kernel: [   83.369540] 
Jan  1 09:01:22 localhost user.warn kernel: [   83.369571] Pid: 782, comm:                 Xorg
Jan  1 09:01:22 localhost user.warn kernel: [   83.369571] CPU: 0    Tainted: G        W    (3.0.8 #5)
Jan  1 09:01:22 localhost user.warn kernel: [   83.369601] PC is at 0xc1978
Jan  1 09:01:22 localhost user.warn kernel: [   83.369601] LR is at 0x20
Jan  1 09:01:22 localhost user.warn kernel: [   83.369601] pc : [<000c1978>]    lr : [<00000020>]    psr: 20000030
Jan  1 09:01:22 localhost user.warn kernel: [   83.369632] sp : be9f7718  ip : 40000002  fp : 00181a88
Jan  1 09:01:22 localhost user.warn kernel: [   83.369632] r10: 00000100  r9 : be9f777c  r8 : 00000000
Jan  1 09:01:22 localhost user.warn kernel: [   83.369632] r7 : 00000000  r6 : 001940f0  r5 : 00158bc4  r4 : 002b8b40
Jan  1 09:01:22 localhost user.warn kernel: [   83.369662] r3 : 0016b4e0  r2 : 00000000  r1 : 00000000  r0 : 00000002
Jan  1 09:01:22 localhost user.warn kernel: [   83.369662] Flags: nzCv  IRQs on  FIQs on  Mode USER_32  ISA Thumb  Segment user
Jan  1 09:01:22 localhost user.warn kernel: [   83.369693] Control: 10c5787d  Table: a65f406a  DAC: 00000015
 
While debugging the core dump:
(gdb) bt
#0  CreatePicture (pid=0, pDrawable=0x194250, pFormat=0x0, vmask=256, vlist=0xbea7e790, client=0x16e860, error=0xbea7e78c) at picture.c:776
#1  0x00096908 in compNewPixmap (pWin=<optimized out>, x=0, y=0, w=452, h=640) at compalloc.c:580
#2  0x00097322 in compAllocPixmap (pWin=0x288d80) at compalloc.c:617
#3  0x00096098 in compCheckRedirect (pWin=0x288d80) at compwindow.c:165
#4  0x000962f0 in compRealizeWindow (pWin=0x288d80) at compwindow.c:265
#5  0x0005107a in RealizeTree (pWin=0x288d80) at window.c:2497
#6  0x00052eea in MapWindow (pWin=0x288d80, client=0x287120) at window.c:2589
#7  0x00030602 in ProcMapWindow (client=0x287120) at dispatch.c:794
#8  0x00033e82 in Dispatch () at dispatch.c:428
#9  0x000287a8 in main (argc=16, argv=0xbea7eb04, envp=<optimized out>) at main.c:295
 
So actually pFormat is null and from CreatePicture source this null reference results in the segfault.
I see that the client is enlightenment_start from the structure of client ptr.
 
Could somebody provide pointers as to what could be going wrong?
 
Thanks and Regards,
Satirtha Nandy

 

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

3 Replies
Satirtha Nandy
Hi, After further debugging here are the findings: (gdb) info stack #0 CreatePicture (pid=0, pDrawable=0x194248, pFormat=0x0, vmask=256, vlist=0xbef5c790, client=0x16e840, error=0xbef5c78c) at picture.c:776 #1 0x00096908 in compNewPixmap (pWin=, x=0, y=0, w=452, h=640) at compalloc.c:580 #2 0x00097322 in compAllocPixmap (pWin=0x2d9750) at compalloc.c:617 #3 0x00096098 in compCheckRedirect (pWin=0x2d9750) at compwindow.c:165 #4 0x000962f0 in compRealizeWindow (pWin=0x2d9750) at compwindow.c:265 #5 0x0005107a in RealizeTree (pWin=0x2d9750) at window.c:2497 #6 0x00052eea in MapWindow (pWin=0x2d9750, client=0x297880) at window.c:2589 #7 0x00030602 in ProcMapWindow (client=0x297880) at dispatch.c:794 #8 0x00033e82 in Dispatch () at dispatch.c:428 #9 0x000287a8 in main (argc=16, argv=0xbef5cb04, envp=) at main.c:295 So in picture.c:776: pPicture->format = pFormat->format | (pDrawable->bitsPerPixel << 24); Since pFormat=0x0 xorg crashes and causes segfault. (gdb) f 7 #7 0x00030602 in ProcMapWindow (client=0x297880) at dispatch.c:794 794 in dispatch.c (gdb) p *client $39 = {index = 1, clientAsMask = 2097152, requestBuffer = 0x2d07d8, osPrivate = 0x28db50, swapped = 0, pSwapReplyFunc = 0x4c395 , errorValue = 2097287, sequence = 3373, closeDownMode = 0, clientGone = 0, noClientException = 0, ignoreCount = 0, saveSet = 0x2d53c8, numSaved = 1, requestVector = 0x15bd9c , req_len = 2, big_requests = 1, priority = 0, clientState = ClientStateRunning, devPrivates = 0x2978fc, xkbClientFlags = 32769, mapNotifyMask = 7, newKeyboardNotifyMask = 5, vMajor = 1, vMinor = 0, minKC = 8 '\b', maxKC = 255 '\377', replyBytesRemaining = 0, smart_priority = 20, smart_start_tick = 20, smart_stop_tick = 20, smart_check_tick = 20, clientPtr = 0x19b6b0, clientIds = 0x28db98, majorOp = 8, minorOp = 0} (gdb) p *client->clientIds $40 = {pid = 1245, cmdname = 0x29cb88 "/usr/bin/enlightenment", cmdargs = 0x2a31d0 "-profile samsung"} So from the above it is quite clear the e17 is the client for which x crashes. CreatePicture is called from compNewPixmap with pSrcFormat=0x0, the value of which is retrieved from PictFormatPtr pSrcFormat = PictureWindowFormat(pParent); where pParent = pWin->parent (gdb) p *pWin->parent $41 = {drawable = {type = 0 '\000', class = 1 '\001', depth = 24 '\030', bitsPerPixel = 32 ' ', id = 87, x = 0, y = 0, width = 452, height = 640, pScreen = 0x181040, serialNumber = 83}, devPrivates = 0x1942cc, parent = 0x0, nextSib = 0x0, prevSib = 0x0, firstChild = 0x28c5f0, lastChild = 0x293f08, clipList = {extents = {x1 = 0, y1 = 0, x2 = 0, y2 = 0}, data = 0x15f7f0 }, borderClip = {extents = {x1 = 0, y1 = 0, x2 = 452, y2 = 640}, data = 0x0}, valdata = 0x0, winSize = {extents = {x1 = 0, y1 = 0, x2 = 452, y2 = 640}, data = 0x0}, borderSize = { extents = {x1 = 0, y1 = 0, x2 = 452, y2 = 640}, data = 0x0}, origin = {x = 0, y = 0}, borderWidth = 0, deliverableEvents = 51, eventMask = 0, background = {pixmap = 0x0, pixel = 0}, border = {pixmap = 0x0, pixel = 0}, backStorage = 0x0, optional = 0x1942f0, backgroundState = 2, borderIsPixel = 1, cursorIsNone = 0, backingStore = 0, saveUnder = 0, DIXsaveUnder = 0, bitGravity = 0, winGravity = 1, overrideRedirect = 0, visibility = 3, mapped = 1, realized = 1, viewable = 1, dontPropagate = 0, forcedBS = 0, redirectDraw = 0, forcedBG = 0, damagedDescendants = 0, inhibitBGPaint = 1} PictureWindowFormat is defined as: PictFormatPtr PictureWindowFormat(WindowPtr pWindow) { ScreenPtr pScreen = pWindow->drawable.pScreen; return PictureMatchVisual(pScreen, pWindow->drawable.depth, WindowGetVisual(pWindow)); } (gdb) p (*pWin->parent->drawable.pScreen)->visuals[0] $29 = {vid = 33, class = 4, bitsPerRGBValue = 8, ColormapEntries = 256, nplanes = 24, redMask = 4278190080, greenMask = 16711680, blueMask = 65280, offsetRed = 24, offsetGreen = 16, offsetBlue = 8} (gdb) p (*pWin->parent->drawable.pScreen)->visuals[1] $30 = {vid = 85, class = 4, bitsPerRGBValue = 8, ColormapEntries = 256, nplanes = 32, redMask = 16711680, greenMask = 65280, blueMask = 255, offsetRed = 16, offsetGreen = 8, offsetBlue = 0} (gdb) p *pWin->parent->optional $27 = {cursor = 0x299328, visual = 33, colormap = 32, dontPropagateMask = 0, otherEventMasks = 6160435, otherClients = 0x2c6a28, passiveGrabs = 0x2b8eb8, userProps = 0x2c0758, backingBitPlanes = 4294967295, backingPixel = 0, boundingShape = 0x0, clipShape = 0x0, inputShape = 0x0, inputMasks = 0x28ac50, deviceCursors = 0x0} So from the above WindowGetVisual(pWindow) returns visuals[0] as visuals[0].vid == *pWin->parent->optional.visual == 33 Then PictureMatchVisual is called: PictFormatPtr PictureMatchVisual(ScreenPtr pScreen, int depth, VisualPtr pVisual) In this function pVisual->class = 4 which is TrueColor hence this cannot return 0. So before that if (!ps) return 0; is executed and this is returning 0 making format as null. ps is calculated in PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); which can return null if dixPrivateKeyRegistered fails. Why can dixPrivateKeyRegistered(PictureScreenPrivateKey) return false? When I print it, I see: (gdb) p PictureScreenPrivateKeyRec $31 = {offset = 68, size = 0, initialized = 1, allocated = 0, type = PRIVATE_SCREEN, next = 0x16b8ec } Hence it is initialized. Also it compares with pScreen->devPrivates, which is also valid: (gdb) p (*pWin->parent->drawable.pScreen)->devPrivates $34 = (PrivateRec *) 0x192138 I am not able to understand why GetPictureScreenIfSet fails and returns NULL to cause this problem? Can somebody kindly help me?
Roopali Galgali

Hi,

Which arm-based development board are you working on?

Regards,
Roopali

 

amy xuhf0807

hi Satirtha Nandy:

      I meet the same issue on tizen 2.2 arm platform .How did you solve this problem?

thank you .