Giter Club home page Giter Club logo

Comments (17)

khilangudka avatar khilangudka commented on July 21, 2024

We've been primarily running and testing with DumpRenderTree (in Tools/DumpRenderTree), as this is what the WebKit layout tests use. DumpRenderTree -p will give you an image rendering of the webpage. However, it shouldn't be difficult to get QtTestBrowser to run assuming it doesn't require a display. I can look into this tomorrow.

from cheribuild.

minight avatar minight commented on July 21, 2024

Thanks. I've tried using DumpRenderTree however i'm receiving a similar error:

root@qemu-cheri128-sean:/mnt/build/qtwebkit-128-build/bin # ./DumpRenderTree -p /mnt/jsc/test.html
DumpRenderTree: _rtld_thread_init is not available when statically linked.
This application failed to start because it could not find or load the Qt platform plugin "bsdfb"
in "".

Available platform plugins are: offscreen, offscreen.

Reinstalling the application may fix this problem.
Abort

this is using the same build information as above.

from cheribuild.

khilangudka avatar khilangudka commented on July 21, 2024

hmm that is strange, it should use the offscreen plugin by default. Please try passing -platform offscreen.

from cheribuild.

minight avatar minight commented on July 21, 2024

I'm now recieving the following cheri fault in the sqlite3 library:

root@qemu-cheri128-sean:/mnt/build/qtwebkit-128-build/bin # gdb DumpRenderTree
GNU gdb (GDB) 8.0.1
Copyright (C) 2017 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 "mips64-unknown-freebsd".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from DumpRenderTree...r  -platform offscreen -p /mnt/jsc/test.html

done.
(gdb) r  -platform offscreen -p /mnt/jsc/test.html
Starting program: /mnt/build/qtwebkit-128-build/bin/DumpRenderTree -platform offscreen -p /mnt/jsc/test.html
DumpRenderTree: _rtld_thread_init is not available when statically linked.
$ddc: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:0 t:-1
$c01: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:0 t:-1
$c02: v:1 s:0 p:0006817d b:00000001657c8600 l:0000000000000014 o:0 t:-1
$c03: v:1 s:0 p:0006817d b:00000001657a6560 l:00000000000000a0 o:0 t:-1
$c04: v:1 s:0 p:0007817d b:00000001657a2000 l:0000000000005000 o:4560 t:-1
$c05: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:12359b150 t:-1
$c06: v:1 s:0 p:0007817d b:0000007fffffd700 l:0000000000000010 o:0 t:-1
$c07: v:1 s:0 p:0007817d b:0000007fffffd790 l:0000000000000004 o:0 t:-1
$c08: v:1 s:0 p:0007817d b:0000007fffffd780 l:0000000000000010 o:0 t:-1
$c09: v:1 s:0 p:0007817d b:0000007fffffd770 l:0000000000000010 o:0 t:-1
$c10: v:1 s:0 p:0007817d b:0000007fffffd780 l:0000000000000004 o:0 t:-1
$c11: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff770 o:7fe7e0 t:-1
$c12: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:121454ad8 t:-1
$c13: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:0 t:-1
$c14: v:1 s:0 p:0007817d b:0000007fffffd760 l:0000000000000010 o:0 t:-1
$c15: v:1 s:0 p:0007817d b:0000007fffffd75c l:0000000000000004 o:0 t:-1
$c16: v:1 s:0 p:0007817d b:0000007fffffd678 l:00000000000000e0 o:0 t:-1
$c17: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:1214519b4 t:-1
$c18: v:1 s:0 p:0006817d b:00000001657c8620 l:0000000000000018 o:8 t:-1
$c19: v:1 s:0 p:0006817d b:00000001657c8600 l:0000000000000014 o:0 t:-1
$c20: v:1 s:0 p:0006817d b:00000001657a6560 l:00000000000000a0 o:0 t:-1
$c21: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:125b5b490 t:-1
$c22: v:1 s:0 p:0007817d b:00000001257ae650 l:00000000000002f0 o:290 t:-1
$c23: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:125b5b490 t:-1
$c24: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff770 o:7fe7e0 t:-1
$c25: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:0 t:-1
$c26: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:125b5b490 t:-1
$pcc: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:1214519b4 t:-1

Trapframe Register Dump:
$0: 0                  at: 0x2                v0: 0x4                v1: 0x1
a0: 0x80               a1: 0x5                a2: 0x4                a3: 0x1
a4: 0x20               a5: 0x4                a6: 0x4                a7: 0
t0: 0x20               t1: 0x8f5c28aa         t2: 0xffffffff00000000 t3: 0x10
s0: 0                  s1: 0x1                s2: 0                  s3: 0
s4: 0                  s5: 0                  s6: 0                  s7: 0
t8: 0x770              t9: 0x78               k0: 0                  k1: 0
gp: 0                  sp: 0x6                s8: 0                  ra: 0
status: 0x408084b3 mullo: 0xa0; mulhi: 0; badvaddr: 0x1657c8628
cause: 0x14; pc: 0x1214519b4
BadInstr: 0xfa920000 csc        c20,zero,0(c18)
$ddc: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:0 t:-1
$c01: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:0 t:-1
$c02: v:1 s:0 p:0006817d b:00000001657c8600 l:0000000000000014 o:0 t:-1
$c03: v:1 s:0 p:0006817d b:00000001657a6560 l:00000000000000a0 o:0 t:-1
$c04: v:1 s:0 p:0007817d b:00000001657a2000 l:0000000000005000 o:4560 t:-1
$c05: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:12359b150 t:-1
$c06: v:1 s:0 p:0007817d b:0000007fffffd700 l:0000000000000010 o:0 t:-1
$c07: v:1 s:0 p:0007817d b:0000007fffffd790 l:0000000000000004 o:0 t:-1
$c08: v:1 s:0 p:0007817d b:0000007fffffd780 l:0000000000000010 o:0 t:-1
$c09: v:1 s:0 p:0007817d b:0000007fffffd770 l:0000000000000010 o:0 t:-1
$c10: v:1 s:0 p:0007817d b:0000007fffffd780 l:0000000000000004 o:0 t:-1
$c11: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff770 o:7fe7e0 t:-1
$c12: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:121454ad8 t:-1
$c13: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:0 t:-1
$c14: v:1 s:0 p:0007817d b:0000007fffffd760 l:0000000000000010 o:0 t:-1
$c15: v:1 s:0 p:0007817d b:0000007fffffd75c l:0000000000000004 o:0 t:-1
$c16: v:1 s:0 p:0007817d b:0000007fffffd678 l:00000000000000e0 o:0 t:-1
$c17: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:1214519b4 t:-1
$c18: v:1 s:0 p:0006817d b:00000001657c8620 l:0000000000000018 o:8 t:-1
$c19: v:1 s:0 p:0006817d b:00000001657c8600 l:0000000000000014 o:0 t:-1
$c20: v:1 s:0 p:0006817d b:00000001657a6560 l:00000000000000a0 o:0 t:-1
$c21: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:125b5b490 t:-1
$c22: v:1 s:0 p:0007817d b:00000001257ae650 l:00000000000002f0 o:290 t:-1
$c23: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:125b5b490 t:-1
$c24: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff770 o:7fe7e0 t:-1
$c25: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:0 t:-1
$c26: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:125b5b490 t:-1
$pcc: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:1214519b4 t:-1
Jan 28 23:18:16 qemu-cheri128-sean kernel: ALIGNMENT_FIX_ERR: pid 1065 tid 100054 (DumpRenderTree), uid 0: pc 0x1214519b4 got a write fault (type 0x5) at 0x1657c8628
Jan 28 23:18:16 qemu-cheri128-sean kernel: Page table info for bad address 0x1657c8628: pde = 0x98000000dfa3a000, pte = 0x800000038427de

Program received signal SIGBUS, Bus error.
mutex_init (mutex=<optimized out>, mutex_attr=<optimized out>, calloc_cb=<optimized out>)
    at /usr/home/sean/cheri/cheribsd/lib/libthr/thread/thr_mutex.c:297
297     /usr/home/sean/cheri/cheribsd/lib/libthr/thread/thr_mutex.c: No such file or directory.
(gdb)
(gdb) bt
#0  mutex_init (mutex=<optimized out>, mutex_attr=<optimized out>, calloc_cb=<optimized out>)
    at /usr/home/sean/cheri/cheribsd/lib/libthr/thread/thr_mutex.c:297
#1  __pthread_mutex_init (mutex=<optimized out>, mutex_attr=<optimized out>)
    at /usr/home/sean/cheri/cheribsd/lib/libthr/thread/thr_mutex.c:392
#2  0x0000000124153b48 in pthreadMutexAlloc (iType=<optimized out>)
    at /home/sean/cheri/sqlite/src/mutex_unix.c:181
#3  0x00000001241537c0 in sqlite3MutexAlloc (id=128) at /home/sean/cheri/sqlite/src/mutex.c:104
#4  0x000000012410afc8 in sqlite3_initialize () at /home/sean/cheri/sqlite/src/main.c:188
#5  0x000000012359b188 in void std::__1::__call_once_proxy<std::__1::tuple<WebCore::SQLiteDatabase::SQLiteDatabase()::$_0&& cap> >(void* cap) ()
#6  0x00000001255c9198 in std::__1::__call_once(unsigned long volatile& cap, void* cap, void (* cap)(unsigned long volatile& cap)) (flag=<optimized out>, arg=<optimized out>, func=<optimized out>)
    at /usr/home/sean/cheri/cheribsd/contrib/cheri-libc++/src/mutex.cpp:236
#7  0x0000000123596f0c in WebCore::SQLiteDatabase::SQLiteDatabase() ()
Backtrace stopped: frame did not save the PC

the sqlite repository is at commit 769749dafbe4e76adb1ab338014a718ecb95885f

from cheribuild.

khilangudka avatar khilangudka commented on July 21, 2024

Please could you also paste the contents of test.html? I'll try and reproduce this crash

from cheribuild.

khilangudka avatar khilangudka commented on July 21, 2024

Also, we currently have a Clang/LLVM -O2 optimisation bug and CTSRD-CHERI/qtwebkit@2e01c3e contains a workaround to avoid this, so might be worth updating to at least this.

from cheribuild.

khilangudka avatar khilangudka commented on July 21, 2024

Ah I've also noticed you don't have our sqlite alignment fix CTSRD-CHERI/sqlite@02b0fa5 . Updating sqlite should eliminate that alignment error you are seeing.

from cheribuild.

minight avatar minight commented on July 21, 2024

Thanks, I'm currently recompiling.

For completeness, my testfile is:

<html>
   <body>
     <h1>header</h1>
  <script>
    document.write("hello");
   </script>
  </body>
 </html>

from cheribuild.

minight avatar minight commented on July 21, 2024

Sorry, I appear to be having the same issues after recompiling.

from cheribuild.

minight avatar minight commented on July 21, 2024

After recompiling sqlite on commit @ 02b0fa5e460be7effb536d4f535fc6a06b338f3b i appear to be having the same alignment error when executing any table related sql command

root@qemu-cheri128-sean:/mnt/build/sqlite-128-build # echo ".tables " | ./sqlite3
$ddc: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:0 t:-1
$c01: v:1 s:0 p:0006817d b:00000000408dca80 l:000000000001d4d0 o:13708 t:-1
$c02: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:0 t:-1
$c03: v:1 s:0 p:0006817d b:00000000408dca80 l:000000000001d4d0 o:13668 t:-1
$c04: v:1 s:0 p:0006817d b:0000000040890500 l:0000000000000470 o:228 t:-1
$c05: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff850 o:7f8cc0 t:-1
$c06: v:1 s:0 p:0007817d b:0000007fffff8020 l:0000000000000008 o:0 t:-1
$c07: v:1 s:0 p:0006817d b:00000000408dca80 l:000000000001d4d0 o:16000 t:-1
$c08: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff850 o:7f8d00 t:-1
$c09: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff850 o:7f8d10 t:-1
$c10: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff850 o:7f8d1c t:-1
$c11: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff850 o:7f80d0 t:-1
$c12: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:1c5e98 t:-1
$c13: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff850 o:7f8fd8 t:-1
$c14: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff850 o:7f8fd0 t:-1
$c15: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff850 o:7f8fc8 t:-1
$c16: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff850 o:7f8fc0 t:-1
$c17: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:1bc730 t:-1
$c18: v:1 s:0 p:0006817d b:000000004086cfc0 l:0000000000000090 o:10 t:-1
$c19: v:1 s:0 p:0006817d b:00000000408dca80 l:000000000001d4d0 o:13668 t:-1
$c20: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:0 t:-1
$c21: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:2e4880 t:-1
$c22: v:1 s:0 p:0006817d b:00000000408a0c00 l:0000000000000100 o:10 t:-1
$c23: v:1 s:0 p:0006817d b:00000000408dca80 l:000000000001d4d0 o:16220 t:-1
$c24: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff850 o:7f80d0 t:-1
$c25: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:0 t:-1
$c26: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:2e4880 t:-1
$pcc: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:1c5fdc t:-1
Trapframe Register Dump:
$0: 0                  at: 0x1                v0: 0                  v1: 0xff
a0: 0x1                a1: 0                  a2: 0                  a3: 0
a4: 0                  a5: 0x3b               a6: 0x40               a7: 0x100
t0: 0                  t1: 0x666c6f61         t2: 0x7265616c         t3: 0x74657874
s0: 0                  s1: 0                  s2: 0x318              s3: 0x5
s4: 0                  s5: 0                  s6: 0x5                s7: 0x28
t8: 0                  t9: 0x70               k0: 0                  k1: 0
gp: 0                  sp: 0xffffffffffffffc0 s8: 0                  ra: 0x1
status: 0x408084b3 mullo: 0; mulhi: 0; badvaddr: 0x408f01b8
cause: 0x14; pc: 0x1c5fdc
BadInstr: 0xfa93000d csc        c20,zero,208(c19)
$ddc: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:0 t:-1
$c01: v:1 s:0 p:0006817d b:00000000408dca80 l:000000000001d4d0 o:13708 t:-1
$c02: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:0 t:-1
$c03: v:1 s:0 p:0006817d b:00000000408dca80 l:000000000001d4d0 o:13668 t:-1
$c04: v:1 s:0 p:0006817d b:0000000040890500 l:0000000000000470 o:228 t:-1
$c05: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff850 o:7f8cc0 t:-1
$c06: v:1 s:0 p:0007817d b:0000007fffff8020 l:0000000000000008 o:0 t:-1
$c07: v:1 s:0 p:0006817d b:00000000408dca80 l:000000000001d4d0 o:16000 t:-1
$c08: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff850 o:7f8d00 t:-1
$c09: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff850 o:7f8d10 t:-1
$c10: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff850 o:7f8d1c t:-1
$c11: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff850 o:7f80d0 t:-1
$c12: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:1c5e98 t:-1
$c13: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff850 o:7f8fd8 t:-1
$c14: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff850 o:7f8fd0 t:-1
$c15: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff850 o:7f8fc8 t:-1
$c16: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff850 o:7f8fc0 t:-1
$c17: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:1bc730 t:-1
$c18: v:1 s:0 p:0006817d b:000000004086cfc0 l:0000000000000090 o:10 t:-1
$c19: v:1 s:0 p:0006817d b:00000000408dca80 l:000000000001d4d0 o:13668 t:-1
$c20: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:0 t:-1
$c21: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:2e4880 t:-1
$c22: v:1 s:0 p:0006817d b:00000000408a0c00 l:0000000000000100 o:10 t:-1
$c23: v:1 s:0 p:0006817d b:00000000408dca80 l:000000000001d4d0 o:16220 t:-1
$c24: v:1 s:0 p:0007817d b:0000007fff7ff000 l:00000000007ff850 o:7f80d0 t:-1
$c25: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:0 t:-1
$c26: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:2e4880 t:-1
$pcc: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:1c5fdc t:-1
Feb  5 21:33:24 qemu-cheri128-sean kernel: ALIGNMENT_FIX_ERR: pid 647 tid 100043 (sqlite3), uid 0: pc 0x1c5fdc got a write fault (type 0x5) at 0x408f01b8
Feb  5 21:33:24 qemu-cheri128-sean kernel: Page table info for bad address 0x408f01b8: pde = 0x980000000411e000, pte = 0x800000001cba5e

which appears to be coming from

Program received signal SIGBUS, Bus error.
0x00000000001c5fdc in sqlite3BtreeCursor ()
(gdb) bt
#0  0x00000000001c5fdc in sqlite3BtreeCursor ()
#1  0x00000000001bc730 in sqlite3VdbeExec ()

from cheribuild.

arichardson avatar arichardson commented on July 21, 2024

Looks like $c19 is only aligned to 8 bytes. I would have expected the last commit in SQlite to have fixed that. Is this also happening when running webkit?

from cheribuild.

minight avatar minight commented on July 21, 2024

Running DumpRenderTree with the following arguments appears to run, dumping the image output, albeit incredibly slow. (30 minutes per execution). Then proceeds to fault.

where blan.html is <html><body>hello</body></html>

root@qemu-cheri128-sean:~ # ~/DumpRenderTree -platform offscreen -p -v /mnt/jsc/blan.html
DumpRenderTree: _rtld_thread_init is not available when statically linked.
QFontDatabase: Cannot find font directory /usr/local/Qt-cheri/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/local/Qt-cheri/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/local/Qt-cheri/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/local/Qt-cheri/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/local/Qt-cheri/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/local/Qt-cheri/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/local/Qt-cheri/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/local/Qt-cheri/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/local/Qt-cheri/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/local/Qt-cheri/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/local/Qt-cheri/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/local/Qt-cheri/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/local/Qt-cheri/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/local/Qt-cheri/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/local/Qt-cheri/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/local/Qt-cheri/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/local/Qt-cheri/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/local/Qt-cheri/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/local/Qt-cheri/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
Source:

<html><head></head><body>hello
</body></html>
Content-Type: text/plain
layer at (0,0) size 1024x768
  RenderView at (0,0) size 1024x768
layer at (0,0) size 1024x768
  RenderBlock {HTML} at (0,0) size 1024x768
    RenderBody {BODY} at (8,8) size 1008x752
      RenderText {#text} at (0,1) size 0x16
        text run at (0,1) width 0: "hello"
#EOF
#EOF

ActualHash: 498e23c82ca78a4bcd7ba88e5243b6fc
Content-Type: image/png
Content-Length: 4962
PNG

 w>@HĞ ﬙x;8s+EXtchecksum498e23c82ca78a4bcd7ba88e5243b6fc%IDATx
          0
           0
            0
<snip>
                                                                                                                                                                                                        0 6        _çIENDB`#EOF
Trapframe Register Dump:
$0: 0                  at: 0x2404b7cd8        v0: 0x120000000        v1: 0
a0: 0x150              a1: 0x6474e550         a2: 0x1255e8a08        a3: 0x1c0
a4: 0x50               a5: 0x6                a6: 0                  a7: 0
t0: 0x20               t1: 0                  t2: 0                  t3: 0
s0: 0x6                s1: 0                  s2: 0x6474e550         s3: 0x1
s4: 0                  s5: 0                  s6: 0                  s7: 0
t8: 0                  t9: 0x78               k0: 0                  k1: 0
gp: 0                  sp: 0                  s8: 0                  ra: 0
status: 0x408084b3 mullo: 0x8; mulhi: 0; badvaddr: 0x1255f0300
cause: 0x48; pc: 0x1255f0300
BadInstr: 0xc8220000 clbu       at,zero,0(c2)
CHERI cause: ExcCode: 0x02 RegNum: $c02 (tag violation)
$ddc: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:0 t:-1
$c01: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:2404b7cd9 t:-1
$c02: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:2404b7cd8 t:-1
$c03: v:1 s:0 p:0007817d b:00000001261f5240 l:0000000000000001 o:0 t:-1
$c04: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:2404b7cd8 t:-1
$c05: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:30ca4 t:-1
$c06: v:1 s:0 p:0007817f b:0000000165c45fb0 l:0000000000000040 o:0 t:-1
$c07: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:1 t:-1
$c08: v:1 s:0 p:0006817d b:00000001657d3dc0 l:0000000000000130 o:e0 t:-1
$c09: v:1 s:0 p:0007817f b:0000000165c477c0 l:0000000000000010 o:0 t:-1
$c10: v:1 s:0 p:0007817f b:0000000165c477b0 l:0000000000000010 o:0 t:-1
$c11: v:1 s:0 p:0007817f b:0000000165848000 l:0000000000400000 o:3fded0 t:-1
$c12: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:1255f0290 t:-1
$c13: v:1 s:0 p:0007817f b:0000000165c477a0 l:0000000000000010 o:0 t:-1
$c14: v:1 s:0 p:0007817f b:0000000165c4779c l:0000000000000004 o:0 t:-1
$c15: v:1 s:0 p:0007817f b:0000000165c47798 l:0000000000000004 o:0 t:-1
$c16: v:1 s:0 p:0007817f b:0000000165c47780 l:0000000000000010 o:0 t:-1
$c17: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:1255f01d4 t:-1
$c18: v:1 s:0 p:0007817f b:0000000165c45fb0 l:0000000000000040 o:0 t:-1
$c19: v:1 s:0 p:0007817f b:0000000165c45f10 l:0000000000000010 o:0 t:-1
$c20: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:2404b7cd8 t:-1
$c21: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:30ca4 t:-1
$c22: v:1 s:0 p:0007817d b:00000001261f5240 l:0000000000000001 o:0 t:-1
$c23: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:125b5b490 t:-1
$c24: v:1 s:0 p:0007817f b:0000000165848000 l:0000000000400000 o:3fded0 t:-1
$c25: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:0 t:-1
$c26: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:125b5b490 t:-1
$pcc: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:1255f0300 t:-1
Feb  6 00:17:43 qemu-cheri128-sean kernel: USER_CHERI_EXCEPTION: pid 617 tid 100062 (DumpRenderTree), uid 0: CP2 fault (type 0x32)
Feb  6 00:17:43 qemu-cheri128-sean kernel: Process arguments: /root/DumpRenderTree -platform offscreen -p -v /mnt/jsc/blan.html
Signal 34 (core dumped)
root@qemu-cheri128-sean:~ # ls

Unfortunately, the corefile does not yield anything interesting

root@qemu-cheri128-sean:~ # gdb --core=DumpRenderTree.core
GNU gdb (GDB) 8.0.1
Copyright (C) 2017 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 "mips64-unknown-freebsd".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
[New LWP 100062]
[New LWP 100057]
Core was generated by `/root/DumpRenderTree -platform offscreen -p -v /mnt/jsc/blan.html'.
Program terminated with signal SIGPROT, CHERI protection violation.
#0  0x00000001255f0300 in ?? ()
[Current thread is 1 (LWP 100062)]
(gdb) bt
#0  0x00000001255f0300 in ?? ()

from cheribuild.

arichardson avatar arichardson commented on July 21, 2024

DumpRenderTree will be extremly slow if you don't have the mime.cache file on your system (it spends lots of time parsing a massive XML file that it doesn't actually use. If the mime.cache file is found it can just mmap() a pre-generated cache).
See https://github.com/CTSRD-CHERI/cheribuild/blob/master/test-scripts/run_qtwebkit_tests.py#L54 for how the test script sets up the environment and cheribuild.py qtwebkit should generate it in the build directory: https://github.com/CTSRD-CHERI/cheribuild/blob/master/pycheribuild/projects/cross/qt5.py#L404

I have also seen it crash if the fonts directory /usr/local/Qt-cheri/lib/fonts does not contain at least one .ttf file (the test script just copies the AHEM font and DroidSansFallback-reduced.ttf.

Does cheribuild.py qtwebkit --test --test-extra-args="--smoketest" --interact-after-tests work for you? (Note that you need to build the disk-image-minimal and cheribsd-mfs-root-kernel target first).

from cheribuild.

minight avatar minight commented on July 21, 2024

Running the qtwebkit smoketest now runs DumpRenderTree significantly faster and produces the output to the directed file when using the --stdout flag. This does perform as expected, however still crashes at the end with the following stack trace. The crash doesn't appear to affect the outcome of the test, and it appears to produce the correct output (looking at the dom tree).

(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /tmp/DumpRenderTreeSym -platform offscreen -v /tmp/helloworld.html -p --output /mnt/test1.png
DumpRenderTreeSym: _rtld_thread_init is not available when statically linked.
[New LWP 100066 of process 128]
^Cbt
Source:

<html><head></head><body><h1>Hello World!</h1>
</body></html>
Content-Type: text/plain
layer at (0,0) size 1024x768
  RenderView at (0,0) size 1024x768
layer at (0,0) size 1024x768
  RenderBlock {HTML} at (0,0) size 1024x768
    RenderBody {BODY} at (8,8) size 1008x739
      RenderBlock {H1} at (0,0) size 1008x32
        RenderText {#text} at (0,0) size 384x32
          text run at (0,0) width 384: "Hello World!"
#EOF
#EOF

ActualHash: ee78488101a73e59d106b1bb9a060dfd
Content-Type: image/png
Content-Length: 5077
PNG

IHDR    pHYs+EXtchecksumee78488101a73e59d106b1bb9a060dfdW       RIDATxK0EQ["@PX{8 "9  |ѾoT
                                                                                          qsN        |u]oG۶9q˶oﯾ|6W~_
                                                                       @IJXd/IENDB`#EOF
USER_CHERI_EXCEPTION: pid 128 tid 100066 (DumpRenderTreeSym), uid 0: CP2 fault (type 0x32)
Process arguments: /tmp/DumpRenderTreeSym -platform offscreen -v /tmp/helloworld.html -p --output /mnt/test1.png
Trapframe Register Dump:
$0: 0                  at: 0x2404b7cd8        v0: 0x120000000        v1: 0
a0: 0x150              a1: 0x6474e550         a2: 0x1255e8a08        a3: 0x1c0
a4: 0x1                a5: 0x6                a6: 0                  a7: 0
t0: 0x20               t1: 0                  t2: 0                  t3: 0
s0: 0x6                s1: 0                  s2: 0x6474e550         s3: 0x1
s4: 0                  s5: 0                  s6: 0                  s7: 0
t8: 0                  t9: 0x78               k0: 0                  k1: 0
gp: 0                  sp: 0                  s8: 0                  ra: 0
status: 0x408084b3 mullo: 0x8; mulhi: 0; badvaddr: 0x1255f0300
cause: 0x48; pc: 0x1255f0300
BadInstr: 0xc8220000 clbu       at,zero,0(c2)
CHERI cause: ExcCode: 0x02 RegNum: $c02 (tag violation)
$ddc: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:0 t:-1
$c01: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:2404b7cd9 t:-1
$c02: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:2404b7cd8 t:-1
$c03: v:1 s:0 p:0007817d b:00000001261f5240 l:0000000000000001 o:0 t:-1
$c04: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:2404b7cd8 t:-1
$c05: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:30ca4 t:-1
$c06: v:1 s:0 p:0007817f b:0000000165c39fb0 l:0000000000000040 o:0 t:-1
$c07: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:1 t:-1
$c08: v:1 s:0 p:0006817d b:00000001657d4400 l:0000000000000130 o:e0 t:-1
$c09: v:1 s:0 p:0007817f b:0000000165c3b7c0 l:0000000000000010 o:0 t:-1
$c10: v:1 s:0 p:0007817f b:0000000165c3b7b0 l:0000000000000010 o:0 t:-1
$c11: v:1 s:0 p:0007817f b:000000016583c000 l:0000000000400000 o:3fded0 t:-1
$c12: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:1255f0290 t:-1
$c13: v:1 s:0 p:0007817f b:0000000165c3b7a0 l:0000000000000010 o:0 t:-1
$c14: v:1 s:0 p:0007817f b:0000000165c3b79c l:0000000000000004 o:0 t:-1
$c15: v:1 s:0 p:0007817f b:0000000165c3b798 l:0000000000000004 o:0 t:-1
$c16: v:1 s:0 p:0007817f b:0000000165c3b780 l:0000000000000010 o:0 t:-1
$c17: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:1255f01d4 t:-1
$c18: v:1 s:0 p:0007817f b:0000000165c39fb0 l:0000000000000040 o:0 t:-1
$c19: v:1 s:0 p:0007817f b:0000000165c39f10 l:0000000000000010 o:0 t:-1
$c20: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:2404b7cd8 t:-1
$c21: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:30ca4 t:-1
$c22: v:1 s:0 p:0007817d b:00000001261f5240 l:0000000000000001 o:0 t:-1
$c23: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:125b5b490 t:-1
$c24: v:1 s:0 p:0007817f b:000000016583c000 l:0000000000400000 o:3fded0 t:-1
$c25: v:0 s:0 p:00000000 b:0000000000000000 l:ffffffffffffffff o:0 t:-1
$c26: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:125b5b490 t:-1
$pcc: v:1 s:0 p:00068117 b:0000000000000000 l:0000008000000000 o:1255f0300 t:-1

Thread 2 received signal SIGPROT, CHERI protection violation.
[Switching to LWP 100066 of process 128]
libunwind::LocalAddressSpace::get<unsigned char> (
    this=0x1261f5240 <libunwind::LocalAddressSpace::sThisAddressSpace> [rwRW,0x1261f5240-0x1261f5241], addr=9668623576)
    at /usr/home/sean/cheri/cheribsd/contrib/cheri-libunwind/src/AddressSpace.hpp:129
129     in /usr/home/sean/cheri/cheribsd/contrib/cheri-libunwind/src/AddressSpace.hpp
(gdb) bt
#0  libunwind::LocalAddressSpace::get<unsigned char> (
    this=0x1261f5240 <libunwind::LocalAddressSpace::sThisAddressSpace> [rwRW,0x1261f5240-0x1261f5241], addr=9668623576)
    at /usr/home/sean/cheri/cheribsd/contrib/cheri-libunwind/src/AddressSpace.hpp:129
#1  libunwind::LocalAddressSpace::get8 (
    this=0x1261f5240 <libunwind::LocalAddressSpace::sThisAddressSpace> [rwRW,0x1261f5240-0x1261f5241], addr=9668623576)
    at /usr/home/sean/cheri/cheribsd/contrib/cheri-libunwind/src/AddressSpace.hpp:133
#2  libunwind::EHHeaderParser<libunwind::LocalAddressSpace>::decodeEHHdr(libunwind::LocalAddressSpace& cap, __uintcap_t, __uintcap_t, libunwind::EHHeaderParser<libunwind::LocalAddressSpace>::EHHeaderInfo& cap) (addressSpace=...,

    ehHdrStart=9668623576, ehHdrEnd=199844, ehHdrInfo=...)
    at /usr/home/sean/cheri/cheribsd/contrib/cheri-libunwind/src/EHHeaderParser.hpp:60
#3  0x00000001255f01d4 in libunwind::LocalAddressSpace::findUnwindSections(__uintcap_t, libunwind::UnwindInfoSections& cap)::{lambda(dl_phdr_info* cap, unsigned long, void* cap)#1}::operator()(libunwind::UnwindInfoSections& cap,
 unsigned long, dl_phdr_info) const (this=<optimized out>,
    pinfo=0x12620abf0 <phdr_info> [rwRW,0x12620abf0-0x12620ac50],
    data=0x165c3afa0 [rwxRW,0x165c3afa0-0x165c3afd0])
    at /usr/home/sean/cheri/cheribsd/contrib/cheri-libunwind/src/AddressSpace.h---Type <return> to continue, or q <return> to quit---
pp:434
#4  0x00000001255f005c in libunwind::LocalAddressSpace::findUnwindSections(__uintcap_t, libunwind::UnwindInfoSections& cap)::{lambda(dl_phdr_info* cap, unsigned long, void* cap)#1}::__invoke(libunwind::UnwindInfoSections& cap, unsigned long, dl_phdr_info) (pinfo=0x2404b7cd8, data=0x30ca4)
    at /usr/home/sean/cheri/cheribsd/contrib/cheri-libunwind/src/AddressSpace.hpp:400
#5  0x00000001257364c4 in dl_iterate_phdr (callback=<optimized out>,
    data=<optimized out>)
    at /usr/home/sean/cheri/cheribsd/lib/libc/gen/dlfcn.c:243
#6  0x00000001255eaeb0 in libunwind::LocalAddressSpace::findUnwindSections(__uintcap_t, libunwind::UnwindInfoSections& cap) (this=0x2404b7cd9,
    targetAddr=0xd22e00000180000700000001255e8a08, info=...)
    at /usr/home/sean/cheri/cheribsd/contrib/cheri-libunwind/src/AddressSpace.hpp:399
#7  libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_mips_cheri>::setInfoBasedOnIPRegister (this=<optimized out>,
    isReturnAddress=<optimized out>)
    at /usr/home/sean/cheri/cheribsd/contrib/cheri-libunwind/src/UnwindCursor.hpp:1252
#8  0x00000001255e9098 in unw_init_local (
    cursor=0x165c3b570 [rwxRW,0x165c3b570-0x165c3ba40],
    context=0x165c3ba40 [rwxRW,0x165c3ba40-0x165c3be50])
---Type <return> to continue, or q <return> to quit---
    at /usr/home/sean/cheri/cheribsd/contrib/cheri-libunwind/src/libunwind.cpp:74
#9  0x00000001255e857c in unwind_phase2_forced (uc=0x2404b7cd8,
    cursor=0x2404b7cd8, exception_object=<optimized out>, stop=0x2404b7cd8,
    stop_parameter=0x30ca4)
    at /usr/home/sean/cheri/cheribsd/contrib/cheri-libunwind/src/UnwindLevel1.c:240
#10 0x00000001255e8a2c in _Unwind_ForcedUnwind (
    exception_object=<optimized out>, stop=<optimized out>,
    stop_parameter=<optimized out>)
    at /usr/home/sean/cheri/cheribsd/contrib/cheri-libunwind/src/UnwindLevel1.c:416
#11 0x000000012144c51c in thread_unwind ()
    at /usr/home/sean/cheri/cheribsd/lib/libthr/thread/thr_exit.c:224
#12 0x000000012144c478 in _pthread_exit_mask (status=0x0, mask=0x0)
    at /usr/home/sean/cheri/cheribsd/lib/libthr/thread/thr_exit.c:306
#13 0x000000012144c308 in _pthread_exit (
    status=0x1261f5240 <libunwind::LocalAddressSpace::sThisAddressSpace> [rwRW,0x1261f5240-0x1261f5241])
    at /usr/home/sean/cheri/cheribsd/lib/libthr/thread/thr_exit.c:258
#14 0x000000012145936c in thread_start (curthread=<optimized out>)
    at /usr/home/sean/cheri/cheribsd/lib/libthr/thread/thr_create.c:308
#15 0x0000000000000000 in ?? ()
---Type <return> to continue, or q <return> to quit---

from cheribuild.

arichardson avatar arichardson commented on July 21, 2024

Ah that looks like you are building against a CheriBSD sysroot that doesn't contain my latest libunwind fixes.

from cheribuild.

minight avatar minight commented on July 21, 2024

Thanks. I'll consider the qtwebkit issue resolved.

Is there a solution for running sqlite3 standalone? #45 (comment) ?

from cheribuild.

arichardson avatar arichardson commented on July 21, 2024

I will have a look at the changes that we made for the sqlite version bundled with CheriBSD and see if we forgot to apply some of those fixes.

from cheribuild.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.