BZ #61: pango failure on ARM

Status fields:

creation_ts:2008-04-08 11:34
component:vm
version:default branch
rep_platform:arm
op_sys:Linux
bug_status:RESOLVED
resolution:FIXED
reporter:huembi@objectxp.com
I installed all packages from debian sid. Cacao is the only one I compiled myself
because the available packages (0.98) does not support the ARM-11 processor.


The Error
----------------
debian:~# LD_LIBRARY_PATH=/usr/lib/classpath  /usr/local/cacao/bin/cacao HelloWorldAWT

(.:6391): Pango-CRITICAL **: pango_context_load_fontset: assertion
`pango_font_description_get_size (desc) != 0' failed
java.lang.InternalError: Pango: pango_context_load_fontset: assertion
`pango_font_description_get_size (desc) != 0' failed
  at gnu.java.awt.peer.gtk.GdkFontPeer.setFont(Native Method)
  at gnu.java.awt.peer.gtk.GdkFontPeer.<init>(GdkFontPeer.java:260)
  at gnu.java.awt.peer.gtk.GtkToolkit.getClasspathFontPeer(GtkToolkit.java:631)
  at java.awt.Font.getPeerFromToolkit(Font.java:329)
  at java.awt.Font.<init>(Font.java:381)
  at gnu.java.awt.peer.gtk.GtkWindowPeer.<init>(GtkWindowPeer.java:157)
  at gnu.java.awt.peer.gtk.GtkFramePeer.<init>(GtkFramePeer.java:157)
  at gnu.java.awt.peer.gtk.GtkToolkit.createFrame(GtkToolkit.java:509)
  at java.awt.Frame.addNotify(Frame.java:440)
  at java.awt.Window.show(Window.java:252)
  at HelloWorldAWT.main(HelloWorldAWT.java:25)

==> the window opens but no text is displayed.
==> other java jre's (but not cacao) display the text



System
-----------
Linux debian 2.6.22.6 #1 PREEMPT
Mon Oct 8 12:18:38 MDT 2007 armv6l GNU/Linux
Freescale evalboard i.MX31 ADS

some packages I have installed:
ii  libpango1.0-0                1.20.0-1
ii  classpath-common             2:0.97-1
ii  classpath-gtkpeer            2:0.97-1
ii  classpath-qtpeer             2:0.97-1
ii  gcj-4.3                      4.3.0-2
ii  gcc-4.3                      4.3.0-2

Comment #1 by huembi@objectxp.com on 2008-04-08 11:37:55

Created an attachment (id=35)
config.log

Comment #2 by huembi@objectxp.com on 2008-04-08 11:39:12

Created an attachment (id=36)
simple awt-class

Comment #3 by huembi@objectxp.com on 2008-04-08 11:39:55

Created an attachment (id=37)
config.log

Comment #4 by twisti@complang.tuwien.ac.at on 2008-04-08 11:42:06

What other JREs did you test?  And do they use the same GNU Classpath installation?

Comment #5 by huembi@objectxp.com on 2008-04-08 14:30:12

debian:~# gdb cacao
GNU gdb 6.7.1-debian
Copyright (C) 2007 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-linux-gnueabi"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) ha SIGILL nopr
Signal        Stop      Print   Pass to program Description
SIGILL        No        No      Yes             Illegal instruction
(gdb) run HelloWorldAWT
Starting program: /usr/local/cacao/bin/cacao HelloWorldAWT
[Thread debugging using libthread_db enabled]
[New Thread 0x4001f680 (LWP 1603)]
[New Thread 0x40c61490 (LWP 1606)]
[New Thread 0x40c81490 (LWP 1607)]
[New Thread 0x40ca1490 (LWP 1608)]
[New Thread 0x41904490 (LWP 1609)]

(.:1603): Pango-CRITICAL **: pango_context_load_fontset: assertion
`pango_font_description_get_size (desc) != 0' failed

Program received signal SIGPWR, Power fail/restart.
[Switching to Thread 0x41904490 (LWP 1609)]
0x40138cc0 in poll () from /lib/libc.so.6
(gdb) bt
#0  0x40138cc0 in poll () from /lib/libc.so.6
#1  0x4142a7b8 in ?? () from /usr/lib/libglib-2.0.so.0
(gdb) info thrads
Undefined info command: "thrads".  Try "help info".
(gdb) info threads
* 5 Thread 0x41904490 (LWP 1609)  0x40138cc0 in poll () from /lib/libc.so.6
  4 Thread 0x40ca1490 (LWP 1608)  0x400534fc in pthread_cond_wait@@GLIBC_2.4 () from
/lib/libpthread.so.0
  3 Thread 0x40c81490 (LWP 1607)  0x400534fc in pthread_cond_wait@@GLIBC_2.4 () from
/lib/libpthread.so.0
  2 Thread 0x40c61490 (LWP 1606)  0x40058244 in do_sigwait () from /lib/libpthread.so.0
  1 Thread 0x4001f680 (LWP 1603)  0x400547b8 in pthread_kill () from
/lib/libpthread.so.0
(gdb) thread 4
[Switching to thread 4 (Thread 0x40ca1490 (LWP 1608))]#0  0x400534fc in
pthread_cond_wait@@GLIBC_2.4 () from /lib/libpthread.so.0
(gdb) bt
#0  0x400534fc in pthread_cond_wait@@GLIBC_2.4 () from /lib/libpthread.so.0
#1  0x402cc8e4 in threads_wait_with_timeout (t=0x52a80, wakeupTime=0x40ca0ba8) at
thread-posix.c:1690
#2  0x402cc97c in threads_wait_with_timeout_relative (thread=0x52a80, millis=0, nanos=0)
at thread-posix.c:1727
#3  0x402ca1c0 in lock_record_wait (thread=0x52a80, lr=0x3bbf68, millis=0, nanos=0) at
lock.c:1295
#4  0x402ca364 in lock_monitor_wait (t=0x52a80, o=0x38b868, millis=0, nanos=0) at
lock.c:1380
#5  0x402ca6ac in lock_wait_for_object (o=0x38b868, millis=0, nanos=0) at lock.c:1577
#6  0x4026caf8 in recompile_thread () at recompile.c:172
#7  0x402cb980 in threads_startup_thread (arg=0xbef2da78) at thread-posix.c:1153
#8  0x401f0678 in GC_start_routine (arg=0x5afa0) at pthread_support.c:1214
#9  0x4004dea4 in start_thread () from /lib/libpthread.so.0
#10 0x40142858 in clone () from /lib/libc.so.6
Backtrace stopped: frame did not save the PC
(gdb) thread 3
[Switching to thread 3 (Thread 0x40c81490 (LWP 1607))]#0  0x400534fc in
pthread_cond_wait@@GLIBC_2.4 () from /lib/libpthread.so.0
(gdb) bt
#0  0x400534fc in pthread_cond_wait@@GLIBC_2.4 () from /lib/libpthread.so.0
#1  0x402cc8e4 in threads_wait_with_timeout (t=0x52bd0, wakeupTime=0x40c80bb0) at
thread-posix.c:1690
#2  0x402cc97c in threads_wait_with_timeout_relative (thread=0x52bd0, millis=0, nanos=0)
at thread-posix.c:1727
#3  0x402ca1c0 in lock_record_wait (thread=0x52bd0, lr=0x3a50a0, millis=0, nanos=0) at
lock.c:1295
#4  0x402ca364 in lock_monitor_wait (t=0x52bd0, o=0x307428, millis=0, nanos=0) at
lock.c:1380
#5  0x402ca6ac in lock_wait_for_object (o=0x307428, millis=0, nanos=0) at lock.c:1577
#6  0x40221a5c in finalizer_thread () at finalizer.c:95
#7  0x402cb980 in threads_startup_thread (arg=0xbef2da78) at thread-posix.c:1153
#8  0x401f0678 in GC_start_routine (arg=0x5afa0) at pthread_support.c:1214
#9  0x4004dea4 in start_thread () from /lib/libpthread.so.0
#10 0x40142858 in clone () from /lib/libc.so.6
Backtrace stopped: frame did not save the PC
(gdb) thread 2
[Switching to thread 2 (Thread 0x40c61490 (LWP 1606))]#0  0x40058244 in do_sigwait ()
from /lib/libpthread.so.0
(gdb) bt
#0  0x40058244 in do_sigwait () from /lib/libpthread.so.0
#1  0x400582d8 in sigwait () from /lib/libpthread.so.0
#2  0x4022b89c in signal_thread () at signal.c:430
#3  0x402cb980 in threads_startup_thread (arg=0xbef2da78) at thread-posix.c:1153
#4  0x401f0678 in GC_start_routine (arg=0x5afa0) at pthread_support.c:1214
#5  0x4004dea4 in start_thread () from /lib/libpthread.so.0
#6  0x40142858 in clone () from /lib/libc.so.6
Backtrace stopped: frame did not save the PC
(gdb) thread 1
[Switching to thread 1 (Thread 0x4001f680 (LWP 1603))]#0  0x400547b8 in pthread_kill ()
from /lib/libpthread.so.0
(gdb) bt
#0  0x400547b8 in pthread_kill () from /lib/libpthread.so.0
#1  0x401eee10 in GC_suspend_all () at pthread_stop_world.c:366
#2  0x401eef20 in GC_stop_world () at pthread_stop_world.c:410
#3  0x401f37b4 in GC_stopped_mark (stop_func=0x401f2708 <GC_never_stop_func>) at
alloc.c:496
#4  0x401f32a0 in GC_try_to_collect_inner (stop_func=0x401f2708 <GC_never_stop_func>) at
alloc.c:379
#5  0x401f4e88 in GC_collect_or_expand (needed_blocks=100, ignore_off_page=0) at
alloc.c:1015
#6  0x401fc18c in GC_alloc_large (lw=101419, k=0, flags=0) at malloc.c:64
#7  0x401fc848 in GC_generic_malloc (lb=405676, k=0) at malloc.c:208
#8  0x401fcbbc in GC_malloc_atomic (lb=405676) at malloc.c:274
#9  0x401e08f8 in heap_alloc (size=405676, references=0, finalizer=0x0, collect=1) at
boehm.c:155
#10 0x4021dbf0 in builtin_newarray (size=405664, arrayclass=0x546e0) at builtin.c:1026
#11 0x4021de20 in builtin_newarray_byte (size=405664) at builtin.c:1118
#12 0x40c28264 in ?? ()
(gdb)

Comment #6 by huembi@objectxp.com on 2008-04-08 14:35:47

I'm usign also jamvm 1.5.1
jamvm and cacao is working with classpath 0.97-1

Comment #7 by twisti@complang.tuwien.ac.at on 2008-04-08 16:30:17

The backtrace was a bit too early.  There is a SIGPWR, which is a signal thrown by
Boehm.  You need to disable the Boehm signals too:

(gdb) ha SIGPWR SIGXCPU nopr

Comment #8 by twisti@complang.tuwien.ac.at on 2008-04-08 16:30:55

And JamVM does not throw an InternalError?

Comment #9 by huembi@objectxp.com on 2008-04-08 17:04:39

Breakpoint 1, 0x41368070 in pango_font_description_get_size () from
/usr/lib/libpango-1.0.so.0
(gdb) c
Continuing.

(.:1728): Pango-CRITICAL **: pango_context_load_fontset: assertion
`pango_font_description_get_size (desc) != 0' failed
java.lang.InternalError: Pango: pango_context_load_fontset: assertion
`pango_font_description_get_size (desc) != 0' failed
   at gnu.java.awt.peer.gtk.GdkFontPeer.setFont(Native Method)
   at gnu.java.awt.peer.gtk.GdkFontPeer.<init>(GdkFontPeer.java:260)
   at gnu.java.awt.peer.gtk.GtkToolkit.getClasspathFontPeer(GtkToolkit.java:631)
   at java.awt.Font.getPeerFromToolkit(Font.java:329)
   at java.awt.Font.<init>(Font.java:381)
   at gnu.java.awt.peer.gtk.GtkWindowPeer.<init>(GtkWindowPeer.java:157)
   at gnu.java.awt.peer.gtk.GtkFramePeer.<init>(GtkFramePeer.java:157)
   at gnu.java.awt.peer.gtk.GtkToolkit.createFrame(GtkToolkit.java:509)
   at java.awt.Frame.addNotify(Frame.java:440)
   at java.awt.Window.show(Window.java:252)
   at HelloWorldAWT.main(HelloWorldAWT.java:25)

Breakpoint 1, 0x41368070 in pango_font_description_get_size () from
/usr/lib/libpango-1.0.so.0
(gdb) bt
#0  0x41368070 in pango_font_description_get_size () from /usr/lib/libpango-1.0.so.0
#1  0x41335504 in ?? () from /usr/lib/libpangoft2-1.0.so.0
Cannot access memory at address 0x0
(gdb) info frame
Stack level 0, frame at 0xbed89760:
 pc = 0x41368070 in pango_font_description_get_size; saved pc 0x41335504
 called by frame at 0x0
 Arglist at 0xbed89760, args:
 Locals at 0xbed89760,
(gdb) info locals
No symbol table info available.
(gdb)

Comment #10 by twisti@complang.tuwien.ac.at on 2008-06-02 15:02:00

This was a problem with floating point instructions.  Enabling soft-float fixed the
problem.

Attachment id=35

date:2008-04-08 11:37
desc:config.log
type:application/octet-stream
download:config.log

Attachment id=36

date:2008-04-08 11:39
desc:simple awt-class
type:text/x-java
download:HelloWorldAWT.java

Attachment id=37

date:2008-04-08 11:39
desc:config.log
type:application/octet-stream
download:config.log