2008-08-21 03:23:12     Urgent: Very Strange crash of Webkit on bf561 ~~~

Document created by Aaronwu Employee on Aug 7, 2013
Version 1Show Document
  • View in full screen mode

2008-08-21 03:23:12     Urgent: Very Strange crash of Webkit on bf561 ~~~

Leslie Li (CHINA)

Message: 60787   

 

Hi all,

 

I wrote a simple qt 4.4.0 webkit application(named browser_simple) for bf561 uclinux, it always crash on

 

webview->load();

 

so I followed into webkit source code, and I found this result:

 

the application is crashed in the file:

 

/qt-embedded-linux-opensource-src-4.4.0/src/3rdparty/webkit/WebCore/dom/DOMImplementation.cpp:

 

line 361: if (type == "text/html")

              return new HTMLDocument(this, frame);

 

then, I traced into file

 

/qt-embedded-linux-opensource-src-4.4.0/src/3rdparty/webkit/WebCore/html/HTMLDocument.cpp:

 

line 81:

 

HTMLDocument::HTMLDocument(DOMImplementation* implementation, Frame* frame)

 

    : Document(implementation, frame)

{

        printf("1111\n"); //leslie

    clearXMLVersion();

}

 

but before application crash, I never got "1111" output, the application just crashed! I thought it maybe a stack overflow, so I increased the stack size of browser_simple and libQtWebkit.so.4.4.0 via:

 

add "-Wl,--defsym,__stacksize=262144" into Makefiles, so their stack size is:

 

>bfin-linux-uclibc-readelf -l libQtWebKit.so.4.4.0

 

 

Elf file type is DYN (Shared object file)

 

Entry point 0xd7c68

 

There are 4 program headers, starting at offset 52

 

 

Program Headers:

 

  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align

 

  LOAD           0x000000 0x00000000 0x00000000 0x554724 0x554724 R E 0x1000

 

  LOAD           0x554724 0x00558724 0x00558724 0x97334 0x9f6f4 RW  0x1000

 

  DYNAMIC        0x5b3460 0x005b7460 0x005b7460 0x00120 0x00120 RW  0x4

 

  GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x40000 RWE 0x8

 

 

Section to Segment mapping:

 

  Segment Sections...

 

   00     .hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .rofixup .eh_frame

 

   01     .ctors .dtors .jcr .data.rel.ro .dynamic .data .got .bss

 

   02     .dynamic

 

   03     .hash .dynsym .dynstr .gnu.version .gnu.version_r

 

 

but nothing happened, I still can't get "1111" output before application crash.

 

will it because of out of memory so new HTMLDocument(this, frame) is failed?

 

I'm quite stalled here, any idea will be very appreciate.

 

Best regards,

 

Leslie

TranslateQuoteReplyEditDelete

 

 

2008-08-21 03:32:36     Re: Urgent: Very Strange crash of Webkit on bf561 ~~~

Leslie Li (CHINA)

Message: 60789   

 

Here is the crash message:

 

root:/lib> ./browser_simple -qws

[9;0]Data access misaligned address violation

- Attempted misaligned data memory or data cache access.

Defered Exception context

CURRENT PROCESS:

COMM=browser_simple PID=78

TEXT = 0x03340000-0x03342c14        DATA = 0x0338ac14-0x0338aff4

BSS = 0x0338aff4-0x033c0000  USER-STACK = 0x033ffea0

 

return address: [0x02aa757c]; contents of:

0x02aa7550:  304d  5039  55c5  320f  5e0c  9142  0c42  183b

0x02aa7560:  0c7a  1fed  ae7b  a053  a058  0803  17e9  c682

0x02aa7570:  8dfb  0c06  ac92  9159  1813  0000 [9109] 9110

0x02aa7580:  0801  13de  6c22  6c21  6002  2007  9111  9108

 

SEQUENCER STATUS:        Not tainted

SEQSTAT: 00002024  IPEND: 0030  SYSCFG: 0006

  HWERRCAUSE: 0x0

  EXCAUSE   : 0x24

RETE: <0x00000000> /* Maybe null pointer? */

RETN: <0x0082c000> /* unknown address */

RETX: <0x02aa757c> [ /lib/libQtWebKit.so.4.4.0 + 0x2a757c ]

RETS: <0x02aa7522> [ /lib/libQtWebKit.so.4.4.0 + 0x2a7522 ]

PC  : <0x02aa757c> [ /lib/libQtWebKit.so.4.4.0 + 0x2a757c ]

DCPLB_FAULT_ADDR: <0x01799a14> [ browser_simple + 0x1a14 ]

ICPLB_FAULT_ADDR: <0x02aa757c> [ /lib/libQtWebKit.so.4.4.0 + 0x2a757c ]

 

PROCESSOR STATE:

R0 : 00000004    R1 : 80000000    R2 : d4e40000    R3 : 00000004

R4 : 0138dff8    R5 : 000007ff    R6 : 00000002    R7 : 0000054b

P0 : 017b13b4    P1 : 017bbfd6    P2 : 01799a14    P3 : 033fde54

P4 : 017afe88    P5 : 00000000    FP : 033fde1c    SP : 0082bf24

LB0: 01721a23    LT0: 01721a10    LC0: fffffffc

LB1: 02cc279b    LT1: 02cc279a    LC1: 00000000

B0 : 017bbfe0    L0 : 00000000    M0 : 033ff8d8    I0 : 033fdf34

B1 : ffffff9f    L1 : 00000000    M1 : 00000002    I1 : 00000000

B2 : 017bbfe2    L2 : 00000000    M2 : 00000000    I2 : ffffffbf

B3 : 01788ab4    L3 : 00000000    M3 : 00000000    I3 : 033fde48

A0.w: 00000000   A0.x: 00000000   A1.w: 00000000   A1.x: 00000000

USP : 033fde00  ASTAT: 02003004

 

Hardware Trace:

   0 Target : <0x000048b4> { _trap_c + 0x0 }

     Source : <0xffa00774> { _exception_to_level5 + 0xb4 }

   1 Target : <0xffa006c0> { _exception_to_level5 + 0x0 }

     Source : <0xffa0061c> { _ex_trap_c + 0x5c }

   2 Target : <0xffa005c0> { _ex_trap_c + 0x0 }

     Source : <0xffa00814> { _trap + 0x28 }

   3 Target : <0xffa007ec> { _trap + 0x0 }

     Source : <0x02aa757a> [ /lib/libQtWebKit.so.4.4.0 + 0x2a757a ]

   4 Target : <0x02aa7560> [ /lib/libQtWebKit.so.4.4.0 + 0x2a7560 ]

     Source : <0x02aa753a> [ /lib/libQtWebKit.so.4.4.0 + 0x2a753a ]

   5 Target : <0x02aa7522> [ /lib/libQtWebKit.so.4.4.0 + 0x2a7522 ]

     Source : <0x02ac3396> [ /lib/libQtWebKit.so.4.4.0 + 0x2c3396 ]

   6 Target : <0x02ac336c> [ /lib/libQtWebKit.so.4.4.0 + 0x2c336c ]

     Source : <0x02ac335a> [ /lib/libQtWebKit.so.4.4.0 + 0x2c335a ]

   7 Target : <0x02ac3332> [ /lib/libQtWebKit.so.4.4.0 + 0x2c3332 ]

     Source : <0x02ac3352> [ /lib/libQtWebKit.so.4.4.0 + 0x2c3352 ]

   8 Target : <0x02ac3318> [ /lib/libQtWebKit.so.4.4.0 + 0x2c3318 ]

     Source : <0x02aa751e> [ /lib/libQtWebKit.so.4.4.0 + 0x2a751e ]

   9 Target : <0x02aa7500> [ /lib/libQtWebKit.so.4.4.0 + 0x2a7500 ]

     Source : <0x02aa70ee> [ /lib/libQtWebKit.so.4.4.0 + 0x2a70ee ]

  10 Target : <0x02aa70d0> [ /lib/libQtWebKit.so.4.4.0 + 0x2a70d0 ]

     Source : <0x02cc4a14> [ /lib/libQtWebKit.so.4.4.0 + 0x4c4a14 ]

  11 Target : <0x02cc4a00> [ /lib/libQtWebKit.so.4.4.0 + 0x4c4a00 ]

     Source : <0x029667c0> [ /lib/libQtWebKit.so.4.4.0 + 0x1667c0 ]

  12 Target : <0x029667b8> [ /lib/libQtWebKit.so.4.4.0 + 0x1667b8 ]

     Source : <0x0296e7c8> [ /lib/libQtWebKit.so.4.4.0 + 0x16e7c8 ]

  13 Target : <0x0296e7b0> [ /lib/libQtWebKit.so.4.4.0 + 0x16e7b0 ]

     Source : <0x0296e7a8> [ /lib/libQtWebKit.so.4.4.0 + 0x16e7a8 ]

  14 Target : <0x0296e77a> [ /lib/libQtWebKit.so.4.4.0 + 0x16e77a ]

     Source : <0x0296e76c> [ /lib/libQtWebKit.so.4.4.0 + 0x16e76c ]

  15 Target : <0x0296e768> [ /lib/libQtWebKit.so.4.4.0 + 0x16e768 ]

     Source : <0x0296e81a> [ /lib/libQtWebKit.so.4.4.0 + 0x16e81a ]

Stack from 0082bf04:

        00000000 ffa00778 0019456c 0019456c 00194568 04000021 00000000 0170caac

        02aa757c 00000030 00002024 00000000 0082c000 02aa757c 02aa757c 02aa7522

        00000004 02003004 02cc279b 01721a23 02cc279a 01721a10 00000000 fffffffc

        00000000 00000000 00000000 00000000 01788ab4 017bbfe2 ffffff9f 017bbfe0

        00000000 00000000 00000000 00000000 00000000 00000000 00000002 033ff8d8

        033fde48 ffffffbf 00000000 033fdf34 033fde00 033fde1c 00000000 017afe88

 

Call Trace:

 

[9;15]Bus error

 

TranslateQuoteReplyEditDelete

 

 

2008-08-21 08:46:49     Re: Urgent: Very Strange crash of Webkit on bf561 ~~~

Robin Getz (UNITED STATES)

Message: 60827   

 

Leslie:

 

Have a look at:

 

https://docs.blackfin.uclinux.org/doku.php?id=debuging_applications#unaligned_data_access

 

By following that - you should be able to tell where the problem in in your application.

QuoteReplyEditDelete

 

 

2008-08-25 00:51:35     Re: Urgent: Very Strange crash of Webkit on bf561 ~~~

Leslie Li (CHINA)

Message: 60967   

 

I've checked that link, but still have no idear how to solve this.

 

actually, my application only have these three lines:

 

webview = new QWebView;

 

webview->load(QUrl("file:///test.html"));

 

webview->show();

 

when I comment the second line, the application runs fine, if I want load a html file, it crash in the webkit source code from Qt embedded 4.4.0.

 

will these codes cause unalign problem? I'm not quite sure with this.

 

 

TranslateQuoteReplyEditDelete

 

 

2008-08-25 05:42:36     Re: Urgent: Very Strange crash of Webkit on bf561 ~~~

Yi Li (CHINA)

Message: 61008   

 

If reading the doc, you will see the cause is located around:

 

  3 Target : <0xffa007ec> { _trap + 0x0 }

     Source : <0x02aa757a> [ /lib/libQtWebKit.so.4.4.0 + 0x2a757a ]

 

So please look at libQtWebKit.so.4.4.0. BTW, the root cause MAY be stack overflow, MAY be bug in the library, you may need to investigate and debug.

QuoteReplyEditDelete

 

 

2008-08-25 22:36:20     Re: Urgent: Very Strange crash of Webkit on bf561 ~~~

Leslie Li (CHINA)

Message: 61047   

 

thanks guys, I'll try to trace that.

 

BTW, the action I did on increasing stack, as mentioned above, is it correct? or some way else to solve stack overflow?

 

 

 

 

TranslateQuoteReplyEditDelete

 

 

2008-08-26 09:40:06     Re: Urgent: Very Strange crash of Webkit on bf561 ~~~

Mike Frysinger (UNITED STATES)

Message: 61104   

 

stacks are controlled by the application, not the library

 

you can read more in the documentation:

http://docs.blackfin.uclinux.org/doku.php?id=debuging_applications#fdpic_elf_binaries

Attachments

    Outcomes