ExceptionInInitializerError w/1.5.3 + 0.98 on amd64

View: New views
5 Messages — Rating Filter:   Alert me  

ExceptionInInitializerError w/1.5.3 + 0.98 on amd64

by Kurt Miller-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On OpenBSD -current i386 works great, but amd64 can't run anything at
the moment due to a problem initializing:

Exception occurred while printing exception
(java/lang/NoClassDefFoundError)...
Original exception was java/lang/ExceptionInInitializerError

Even the simplest HelloWorld fails to run on amd64. It appears to
a recent amd64 bug since 1.5.1 + 0.98 works great on amd64.

The call to executeStaticMethod() in getSystemClassLoader() raises
an exception:

Breakpoint 4, getSystemClassLoader ()
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1571
1571                Object *system_loader =
*(Object**)executeStaticMethod(class_loader, mb);
(gdb) bt
#0  getSystemClassLoader ()
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1571
#1  0x00000000004040f7 in main (argc=2, argv=0x7f7ffffebfb8)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/jam.c:363

Compiling with traceall I think something is going wrong in Runtime.<init>:

...
Preparing java/lang/System.loadLibrary(Ljava/lang/String;)V
0 : pc 0 opcode 184
1 : pc 3 opcode 42
2 : pc 4 opcode 184
3 : pc 7 opcode 182
4 : pc 10 opcode 177
Info 8 @ pc 11 opcode 177
Block start 0 end 4 length 5 last opcode quickened 0
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x20eb404f8>
Thread 0x842ae0 lock on obj 0x20eb404f8...
Thread 0x842ae0 unlock on obj 0x20eb404f8...
Thread 0x842ae0 lock on obj 0x20eb404f8...
Thread 0x842ae0 unlock on obj 0x20eb404f8...
Preparing java/lang/Runtime.<clinit>()V
0 : pc 0 opcode 187
1 : pc 3 opcode 89
2 : pc 4 opcode 183
3 : pc 7 opcode 179
4 : pc 10 opcode 177
Thread 0x842ae0 lock on obj 0x20eb404f8...
Thread 0x842ae0 unlock on obj 0x20eb404f8...
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated java/lang/Runtime object @0x20eb40600>
Thread 0x842ae0 lock on obj 0x20eb404f8...
Thread 0x842ae0 unlock on obj 0x20eb404f8...
Preparing java/lang/Runtime.<init>()V
0 : pc 0 opcode 42
1 : pc 1 opcode 183
2 : pc 4 opcode 178
3 : pc 7 opcode 198
4 : pc 10 opcode 187
5 : pc 13 opcode 89
6 : pc 14 opcode 18
7 : pc 16 opcode 183
8 : pc 19 opcode 191
9 : pc 20 opcode 18
10 : pc 22 opcode 18
11 : pc 24 opcode 184
12 : pc 27 opcode 76
13 : pc 28 opcode 18
14 : pc 30 opcode 18
15 : pc 32 opcode 184
16 : pc 35 opcode 77
17 : pc 36 opcode 18
18 : pc 38 opcode 18
19 : pc 40 opcode 184
20 : pc 43 opcode 78
21 : pc 44 opcode 18
22 : pc 46 opcode 18
23 : pc 48 opcode 184
24 : pc 51 opcode 58
25 : pc 53 opcode 187
26 : pc 56 opcode 89
27 : pc 57 opcode 43
28 : pc 58 opcode 45
29 : pc 59 opcode 183
30 : pc 62 opcode 58
31 : pc 64 opcode 187
32 : pc 67 opcode 89
33 : pc 68 opcode 44
34 : pc 69 opcode 45
35 : pc 70 opcode 183
36 : pc 73 opcode 58
37 : pc 75 opcode 42
38 : pc 76 opcode 25
39 : pc 78 opcode 182
40 : pc 81 opcode 25
41 : pc 83 opcode 182
42 : pc 86 opcode 96
43 : pc 87 opcode 189
44 : pc 90 opcode 181
45 : pc 93 opcode 3
46 : pc 94 opcode 54
47 : pc 96 opcode 167
48 : pc 99 opcode 25
49 : pc 101 opcode 182
50 : pc 104 opcode 58
51 : pc 106 opcode 25
52 : pc 108 opcode 25
53 : pc 110 opcode 182
54 : pc 113 opcode 154
55 : pc 116 opcode 187
56 : pc 119 opcode 89
57 : pc 120 opcode 25
58 : pc 122 opcode 184
59 : pc 125 opcode 183
60 : pc 128 opcode 25
61 : pc 130 opcode 182
62 : pc 133 opcode 182
63 : pc 136 opcode 58
64 : pc 138 opcode 42
Thread 0x842ae0 lock on obj 0x20eb404f8...
Thread 0x842ae0 unlock on obj 0x20eb404f8...
65 : pc 142 opcode 21
66 : pc 144 opcode 25
67 : pc 146 opcode 83
68 : pc 147 opcode 132
69 : pc 150 opcode 25
70 : pc 152 opcode 182
71 : pc 155 opcode 154
72 : pc 158 opcode 167
73 : pc 161 opcode 25
74 : pc 163 opcode 182
75 : pc 166 opcode 58
76 : pc 168 opcode 25
77 : pc 170 opcode 25
78 : pc 172 opcode 182
79 : pc 175 opcode 154
80 : pc 178 opcode 187
81 : pc 181 opcode 89
82 : pc 182 opcode 25
83 : pc 184 opcode 184
84 : pc 187 opcode 183
85 : pc 190 opcode 25
86 : pc 192 opcode 182
87 : pc 195 opcode 182
88 : pc 198 opcode 58
89 : pc 200 opcode 42
90 : pc 204 opcode 21
91 : pc 206 opcode 25
92 : pc 208 opcode 83
93 : pc 209 opcode 132
94 : pc 212 opcode 25
95 : pc 214 opcode 182
96 : pc 217 opcode 154
97 : pc 220 opcode 177
IF old dest 20 new dest 9
Info 1 @ pc 10 opcode 153
Block start 0 end 3 length 4 last opcode quickened 0
Info c @ pc 20 opcode 191
Block start 4 end 8 length 5 last opcode quickened 0
GOTO old dest 150 new dest 69
Info c @ pc 99 opcode 167
Block start 9 end 47 length 39 last opcode quickened 0
IF old dest 138 new dest 64
Info 1 @ pc 116 opcode 154
Block start 48 end 54 length 7 last opcode quickened 0
Info 4 @ pc 138 opcode 54
Block start 55 end 63 length 9 last opcode quickened 0
Info 4 @ pc 150 opcode 132
Block start 64 end 68 length 5 last opcode quickened 0
IF old dest 99 new dest 48
Info 1 @ pc 158 opcode 154
Block start 69 end 71 length 3 last opcode quickened 0
GOTO old dest 212 new dest 94
Info c @ pc 161 opcode 167
Block start 72 end 72 length 1 last opcode quickened 0
IF old dest 200 new dest 89
Info 1 @ pc 178 opcode 154
Block start 73 end 79 length 7 last opcode quickened 0
Info 4 @ pc 200 opcode 54
Block start 80 end 88 length 9 last opcode quickened 0
Info 4 @ pc 212 opcode 132
Block start 89 end 93 length 5 last opcode quickened 0
IF old dest 161 new dest 73
Info 1 @ pc 220 opcode 154
Block start 94 end 96 length 3 last opcode quickened 0
Info 8 @ pc 221 opcode 177
Block start 97 end 97 length 1 last opcode quickened 0
Thread 0x842ae0 lock on obj 0x20eb404f8...
Thread 0x842ae0 unlock on obj 0x20eb404f8...
Adding block (start 0x20cf89000) to profile
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated [C array object @0x20eb40630>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated java/lang/String object @0x20eb40690>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated [C array object @0x20eb406c0>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated java/lang/String object @0x20eb406e0>
Thread 0x842ae0 lock on obj 0x20eb3dc80...
Thread 0x842ae0 unlock on obj 0x20eb3dc80...
Preparing
gnu/classpath/SystemProperties.getProperty(Ljava/lang/String;Ljava/lan
g/String;)Ljava/lang/String;
0 : pc 0 opcode 178
1 : pc 3 opcode 42
2 : pc 4 opcode 43
3 : pc 5 opcode 182
4 : pc 8 opcode 176
Info 8 @ pc 9 opcode 172
Block start 0 end 4 length 5 last opcode quickened 0
Thread 0x842ae0 lock on obj 0x20eb3dc80...
Thread 0x842ae0 unlock on obj 0x20eb3dc80...
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated java/lang/NullPointerException object @0x20eb40710>
Preparing java/lang/NullPointerException.<init>(Ljava/lang/String;)V
...

The full traceall log is available at:

http://www.intricatesoftware.com/OpenBSD/misc/trace.log

I'm stuck at this point. I need some help on how to find the root
cause.

Thanks,
-Kurt


------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Jamvm-general mailing list
Jamvm-general@...
https://lists.sourceforge.net/lists/listinfo/jamvm-general

Re: ExceptionInInitializerError w/1.5.3 + 0.98 on amd64

by Robert Lougher :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Kurt,

2009/6/23 Kurt Miller <kurt@...>:

> On OpenBSD -current i386 works great, but amd64 can't run anything at
> the moment due to a problem initializing:
>
> Exception occurred while printing exception
> (java/lang/NoClassDefFoundError)...
> Original exception was java/lang/ExceptionInInitializerError
>
> Even the simplest HelloWorld fails to run on amd64. It appears to
> a recent amd64 bug since 1.5.1 + 0.98 works great on amd64.
>

Looks like something's gone wrong in the initialisation of Classpath.
A class static initialiser (<clinit>) has thrown an exception, which
has lead to the class being marked as "bad".

> I'm stuck at this point. I need some help on how to find the root
> cause.
>

Usual suspects is failure to load Classpath's native libraries (e.g.
libjava.so, etc.).  As a matter of interest try -Xnoinlining.  This
will rule out any problems with the inlining code due to
race-conditions on OpenBSD's different threading code (I've a
suspicion there's one lurking somewhere).

Thanks,
Rob.

> Thanks,
> -Kurt
>
>
> ------------------------------------------------------------------------------
> Are you an open source citizen? Join us for the Open Source Bridge conference!
> Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
> Need another reason to go? 24-hour hacker lounge. Register today!
> http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
> _______________________________________________
> Jamvm-general mailing list
> Jamvm-general@...
> https://lists.sourceforge.net/lists/listinfo/jamvm-general
>

------------------------------------------------------------------------------
_______________________________________________
Jamvm-general mailing list
Jamvm-general@...
https://lists.sourceforge.net/lists/listinfo/jamvm-general

Re: ExceptionInInitializerError w/1.5.3 + 0.98 on amd64

by Kurt Miller-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Rob,

Thanks for the help.

Robert Lougher wrote:

> 2009/6/23 Kurt Miller <kurt@...>:
>> On OpenBSD -current i386 works great, but amd64 can't run anything at
>> the moment due to a problem initializing:
>>
>> Exception occurred while printing exception
>> (java/lang/NoClassDefFoundError)...
>> Original exception was java/lang/ExceptionInInitializerError
>>
>> Even the simplest HelloWorld fails to run on amd64. It appears to
>> a recent amd64 bug since 1.5.1 + 0.98 works great on amd64.
>>
>
> Looks like something's gone wrong in the initialisation of Classpath.
> A class static initialiser (<clinit>) has thrown an exception, which
> has lead to the class being marked as "bad".
>
>> I'm stuck at this point. I need some help on how to find the root
>> cause.
>>
>
> Usual suspects is failure to load Classpath's native libraries (e.g.
> libjava.so, etc.).

At this point in the initialization no dlopen's have been called on
classpath's native libraries yet.

>  As a matter of interest try -Xnoinlining.  This
> will rule out any problems with the inlining code due to
> race-conditions on OpenBSD's different threading code (I've a
> suspicion there's one lurking somewhere).

-Xnoinlining didn't fix the problem. I still get the same failure.

The following debug info shows the class static initializer that
is throwing the exception is java/lang/Runtime.

Breakpoint 12, initClass (class=0x21010c4f8)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1289
1289           state = CLASS_BAD;
(gdb) bt
#0  initClass (class=0x21010c4f8)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1289
#1  0x000000000041f925 in resolveMethod (class=0x21010b288, cp_index=225)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/resolve.c:202
#2  0x000000000042c113 in executeJava ()
    at
/usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:1480
#3  0x0000000000410ccf in executeMethodVaList (ob=0x0, class=0x21010ba48,
    mb=0x20bfa8000, jargs=0x7f7ffffd4820)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:101
#4  0x00000000004107d6 in executeMethodArgs (ob=0x0, class=0x21010ba48,
    mb=0x20bfa8000)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:73
#5  0x000000000040c98f in initClass (class=0x21010ba48)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1267
#6  0x000000000041fe18 in resolveField (class=0x21010b920, cp_index=14)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/resolve.c:319
#7  0x000000000042b772 in executeJava ()
    at
/usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:1321
---Type <return> to continue, or q <return> to quit---
#8  0x0000000000410ccf in executeMethodVaList (ob=0x0, class=0x21010b920,
    mb=0x206d16c00, jargs=0x7f7ffffd4c50)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:101
#9  0x00000000004107d6 in executeMethodArgs (ob=0x0, class=0x21010b920,
    mb=0x206d16c00)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:73
#10 0x000000000040c98f in initClass (class=0x21010b920)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1267
#11 0x000000000041fe18 in resolveField (class=0x21010ac58, cp_index=35)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/resolve.c:319
#12 0x000000000042b772 in executeJava ()
    at
/usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:1321
#13 0x0000000000410ccf in executeMethodVaList (ob=0x0, class=0x21010b288,
    mb=0x20a24f1a0, jargs=0x7f7ffffd5080)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:101
#14 0x00000000004107d6 in executeMethodArgs (ob=0x0, class=0x21010b288,
    mb=0x20a24f1a0)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:73
#15 0x000000000040c98f in initClass (class=0x21010b288)
---Type <return> to continue, or q <return> to quit---
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1267
#16 0x000000000041f925 in resolveMethod (class=0x21010b120, cp_index=10)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/resolve.c:202
#17 0x000000000042c113 in executeJava ()
    at
/usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:1480
#18 0x0000000000410ccf in executeMethodVaList (ob=0x0, class=0x21010b120,
    mb=0x20baf9400, jargs=0x7f7ffffd54c0)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:101
#19 0x00000000004107d6 in executeMethodArgs (ob=0x0, class=0x21010b120,
    mb=0x20baf9400)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:73
#20 0x000000000040c98f in initClass (class=0x21010b120)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1267
#21 0x000000000041f925 in resolveMethod (class=0x21010ad60, cp_index=66)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/resolve.c:202
#22 0x000000000042c113 in executeJava ()
    at
/usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:1480
#23 0x0000000000410ccf in executeMethodVaList (ob=0x0, class=0x210109c80,
---Type <return> to continue, or q <return> to quit---
    mb=0x200c7c000, jargs=0x7f7ffffd5900)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:101
#24 0x00000000004107d6 in executeMethodArgs (ob=0x0, class=0x210109c80,
    mb=0x200c7c000)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:73
#25 0x000000000040c98f in initClass (class=0x210109c80)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1267
#26 0x000000000041f925 in resolveMethod (class=0x2101098a0, cp_index=301)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/resolve.c:202
#27 0x000000000042c113 in executeJava ()
    at
/usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:1480
#28 0x0000000000410ccf in executeMethodVaList (ob=0x0, class=0x210109ab0,
    mb=0x200c7fe00, jargs=0x7f7ffffd5d40)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:101
#29 0x00000000004107d6 in executeMethodArgs (ob=0x0, class=0x210109ab0,
    mb=0x200c7fe00)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:73
#30 0x000000000040c98f in initClass (class=0x210109ab0)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1267
---Type <return> to continue, or q <return> to quit---
#31 0x000000000041fe18 in resolveField (class=0x2101098a0, cp_index=26)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/resolve.c:319
#32 0x000000000042b772 in executeJava ()
    at
/usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:1321
#33 0x0000000000410ccf in executeMethodVaList (ob=0x0, class=0x2101098a0,
    mb=0x207535bb0, jargs=0x7f7ffffd6170)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:101
#34 0x00000000004107d6 in executeMethodArgs (ob=0x0, class=0x2101098a0,
    mb=0x207535bb0)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:73
#35 0x000000000040d6a4 in getSystemClassLoader ()
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1571
#36 0x00000000004042dd in main (argc=2, argv=0x7f7ffffd63d0)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/jam.c:363
(gdb) frame 0
#0  initClass (class=0x21010c4f8)
    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1289
1289           state = CLASS_BAD;
(gdb) p cb->name
$78 = 0x20bafa3e0 "java/lang/Runtime"

Further debugging yields the cause is due to a NPE at line
2185 in src/interp/engine/interp.c. I changed NULL_POINTER_CHECK
to segfault since it is the first NPE to occur:

Program received signal SIGSEGV, Segmentation fault.
[Switching to process 10136, thread 0x20405a800]
0x000000000042d190 in executeJava ()
    at
/usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:2185
2185        DEF_OPC_210(OPC_INVOKEVIRTUAL_QUICK, {


2185        DEF_OPC_210(OPC_INVOKEVIRTUAL_QUICK, {
2186            Class *new_class;
2187
2188            arg1 = ostack - INV_QUICK_ARGS(pc);
2189            NULL_POINTER_CHECK(*arg1);
(gdb) p *arg1
$7 = 0
(gdb) p ostack
$8 = (uintptr_t *) 0x205a99738
(gdb) p pc->operand.uu.u1
$9 = 3
(gdb) p *pc
$10 = {handler = 0x42d165, operand = {u = 8592228355, i = 2293763, ii = {
      i1 = 3, i2 = 35}, uu = {u1 = 3, u2 = 35}, uui = {u1 = 3, u2 = 35 '#',
      i = 0 '\0'}, pntr = 0x200230003}}


At a loss at why *arg1 is NULL. Any ideas on what to pursue next?

Regards,
-Kurt

------------------------------------------------------------------------------
_______________________________________________
Jamvm-general mailing list
Jamvm-general@...
https://lists.sourceforge.net/lists/listinfo/jamvm-general

Re: ExceptionInInitializerError w/1.5.3 + 0.98 on amd64

by Robert Lougher :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Kurt,

I've set up an OpenBSD amd64 install and I've tracked down the
problem.  To fix it properly, I need to look at extending my
endianness checks (which are failing on OpenBSD).  However, to get it
working patch src/interp/engine/interp.h as follows:

--- interp.h-old 2009-07-07 01:19:16.000000000 +0100
+++ interp.h 2009-07-07 01:19:31.000000000 +0100
@@ -37,11 +37,7 @@
 #include <sys/param.h>
 #endif

-#if (defined(BYTE_ORDER) && (BYTE_ORDER == BIG_ENDIAN)) || defined(_BIG_ENDIAN)
-#define FLOAT_CONST(val) (uintptr_t)val << (sizeof(uintptr_t) * 8 - 32)
-#else
 #define FLOAT_CONST(val) val
-#endif

 #define FLOAT_1_BITS FLOAT_CONST(0x3f800000)
 #define FLOAT_2_BITS FLOAT_CONST(0x40000000)

Rob.

2009/6/30 Kurt Miller <kurt@...>:

> Hi Rob,
>
> Thanks for the help.
>
> Robert Lougher wrote:
>> 2009/6/23 Kurt Miller <kurt@...>:
>>> On OpenBSD -current i386 works great, but amd64 can't run anything at
>>> the moment due to a problem initializing:
>>>
>>> Exception occurred while printing exception
>>> (java/lang/NoClassDefFoundError)...
>>> Original exception was java/lang/ExceptionInInitializerError
>>>
>>> Even the simplest HelloWorld fails to run on amd64. It appears to
>>> a recent amd64 bug since 1.5.1 + 0.98 works great on amd64.
>>>
>>
>> Looks like something's gone wrong in the initialisation of Classpath.
>> A class static initialiser (<clinit>) has thrown an exception, which
>> has lead to the class being marked as "bad".
>>
>>> I'm stuck at this point. I need some help on how to find the root
>>> cause.
>>>
>>
>> Usual suspects is failure to load Classpath's native libraries (e.g.
>> libjava.so, etc.).
>
> At this point in the initialization no dlopen's have been called on
> classpath's native libraries yet.
>
>>  As a matter of interest try -Xnoinlining.  This
>> will rule out any problems with the inlining code due to
>> race-conditions on OpenBSD's different threading code (I've a
>> suspicion there's one lurking somewhere).
>
> -Xnoinlining didn't fix the problem. I still get the same failure.
>
> The following debug info shows the class static initializer that
> is throwing the exception is java/lang/Runtime.
>
> Breakpoint 12, initClass (class=0x21010c4f8)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1289
> 1289           state = CLASS_BAD;
> (gdb) bt
> #0  initClass (class=0x21010c4f8)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1289
> #1  0x000000000041f925 in resolveMethod (class=0x21010b288, cp_index=225)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/resolve.c:202
> #2  0x000000000042c113 in executeJava ()
>    at
> /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:1480
> #3  0x0000000000410ccf in executeMethodVaList (ob=0x0, class=0x21010ba48,
>    mb=0x20bfa8000, jargs=0x7f7ffffd4820)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:101
> #4  0x00000000004107d6 in executeMethodArgs (ob=0x0, class=0x21010ba48,
>    mb=0x20bfa8000)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:73
> #5  0x000000000040c98f in initClass (class=0x21010ba48)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1267
> #6  0x000000000041fe18 in resolveField (class=0x21010b920, cp_index=14)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/resolve.c:319
> #7  0x000000000042b772 in executeJava ()
>    at
> /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:1321
> ---Type <return> to continue, or q <return> to quit---
> #8  0x0000000000410ccf in executeMethodVaList (ob=0x0, class=0x21010b920,
>    mb=0x206d16c00, jargs=0x7f7ffffd4c50)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:101
> #9  0x00000000004107d6 in executeMethodArgs (ob=0x0, class=0x21010b920,
>    mb=0x206d16c00)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:73
> #10 0x000000000040c98f in initClass (class=0x21010b920)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1267
> #11 0x000000000041fe18 in resolveField (class=0x21010ac58, cp_index=35)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/resolve.c:319
> #12 0x000000000042b772 in executeJava ()
>    at
> /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:1321
> #13 0x0000000000410ccf in executeMethodVaList (ob=0x0, class=0x21010b288,
>    mb=0x20a24f1a0, jargs=0x7f7ffffd5080)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:101
> #14 0x00000000004107d6 in executeMethodArgs (ob=0x0, class=0x21010b288,
>    mb=0x20a24f1a0)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:73
> #15 0x000000000040c98f in initClass (class=0x21010b288)
> ---Type <return> to continue, or q <return> to quit---
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1267
> #16 0x000000000041f925 in resolveMethod (class=0x21010b120, cp_index=10)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/resolve.c:202
> #17 0x000000000042c113 in executeJava ()
>    at
> /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:1480
> #18 0x0000000000410ccf in executeMethodVaList (ob=0x0, class=0x21010b120,
>    mb=0x20baf9400, jargs=0x7f7ffffd54c0)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:101
> #19 0x00000000004107d6 in executeMethodArgs (ob=0x0, class=0x21010b120,
>    mb=0x20baf9400)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:73
> #20 0x000000000040c98f in initClass (class=0x21010b120)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1267
> #21 0x000000000041f925 in resolveMethod (class=0x21010ad60, cp_index=66)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/resolve.c:202
> #22 0x000000000042c113 in executeJava ()
>    at
> /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:1480
> #23 0x0000000000410ccf in executeMethodVaList (ob=0x0, class=0x210109c80,
> ---Type <return> to continue, or q <return> to quit---
>    mb=0x200c7c000, jargs=0x7f7ffffd5900)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:101
> #24 0x00000000004107d6 in executeMethodArgs (ob=0x0, class=0x210109c80,
>    mb=0x200c7c000)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:73
> #25 0x000000000040c98f in initClass (class=0x210109c80)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1267
> #26 0x000000000041f925 in resolveMethod (class=0x2101098a0, cp_index=301)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/resolve.c:202
> #27 0x000000000042c113 in executeJava ()
>    at
> /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:1480
> #28 0x0000000000410ccf in executeMethodVaList (ob=0x0, class=0x210109ab0,
>    mb=0x200c7fe00, jargs=0x7f7ffffd5d40)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:101
> #29 0x00000000004107d6 in executeMethodArgs (ob=0x0, class=0x210109ab0,
>    mb=0x200c7fe00)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:73
> #30 0x000000000040c98f in initClass (class=0x210109ab0)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1267
> ---Type <return> to continue, or q <return> to quit---
> #31 0x000000000041fe18 in resolveField (class=0x2101098a0, cp_index=26)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/resolve.c:319
> #32 0x000000000042b772 in executeJava ()
>    at
> /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:1321
> #33 0x0000000000410ccf in executeMethodVaList (ob=0x0, class=0x2101098a0,
>    mb=0x207535bb0, jargs=0x7f7ffffd6170)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:101
> #34 0x00000000004107d6 in executeMethodArgs (ob=0x0, class=0x2101098a0,
>    mb=0x207535bb0)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:73
> #35 0x000000000040d6a4 in getSystemClassLoader ()
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1571
> #36 0x00000000004042dd in main (argc=2, argv=0x7f7ffffd63d0)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/jam.c:363
> (gdb) frame 0
> #0  initClass (class=0x21010c4f8)
>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1289
> 1289           state = CLASS_BAD;
> (gdb) p cb->name
> $78 = 0x20bafa3e0 "java/lang/Runtime"
>
> Further debugging yields the cause is due to a NPE at line
> 2185 in src/interp/engine/interp.c. I changed NULL_POINTER_CHECK
> to segfault since it is the first NPE to occur:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to process 10136, thread 0x20405a800]
> 0x000000000042d190 in executeJava ()
>    at
> /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:2185
> 2185        DEF_OPC_210(OPC_INVOKEVIRTUAL_QUICK, {
>
>
> 2185        DEF_OPC_210(OPC_INVOKEVIRTUAL_QUICK, {
> 2186            Class *new_class;
> 2187
> 2188            arg1 = ostack - INV_QUICK_ARGS(pc);
> 2189            NULL_POINTER_CHECK(*arg1);
> (gdb) p *arg1
> $7 = 0
> (gdb) p ostack
> $8 = (uintptr_t *) 0x205a99738
> (gdb) p pc->operand.uu.u1
> $9 = 3
> (gdb) p *pc
> $10 = {handler = 0x42d165, operand = {u = 8592228355, i = 2293763, ii = {
>      i1 = 3, i2 = 35}, uu = {u1 = 3, u2 = 35}, uui = {u1 = 3, u2 = 35 '#',
>      i = 0 '\0'}, pntr = 0x200230003}}
>
>
> At a loss at why *arg1 is NULL. Any ideas on what to pursue next?
>
> Regards,
> -Kurt
>

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/blackberry
_______________________________________________
Jamvm-general mailing list
Jamvm-general@...
https://lists.sourceforge.net/lists/listinfo/jamvm-general

Re: ExceptionInInitializerError w/1.5.3 + 0.98 on amd64

by Kurt Miller-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Rob,

First off, thank you for going the extra mile and doing an OpenBSD
install to investigate this. It is much appreciated.

Ahh, yes your diff does correct it. The problem is _BIG_ENDIAN is
always defined in endian.h on the BSD's. The following works for
the BSD's and should work for others as well:

-#if (defined(BYTE_ORDER) && (BYTE_ORDER == BIG_ENDIAN)) ||
defined(_BIG_ENDIAN)
+#if (defined(BYTE_ORDER) && (BYTE_ORDER == BIG_ENDIAN)) ||
(!defined(BYTE_ORDER) && defined(_BIG_ENDIAN))

Thanks again for the help.

Regards,
-Kurt

Robert Lougher wrote:

> Hi Kurt,
>
> I've set up an OpenBSD amd64 install and I've tracked down the
> problem.  To fix it properly, I need to look at extending my
> endianness checks (which are failing on OpenBSD).  However, to get it
> working patch src/interp/engine/interp.h as follows:
>
> --- interp.h-old 2009-07-07 01:19:16.000000000 +0100
> +++ interp.h 2009-07-07 01:19:31.000000000 +0100
> @@ -37,11 +37,7 @@
>  #include <sys/param.h>
>  #endif
>
> -#if (defined(BYTE_ORDER) && (BYTE_ORDER == BIG_ENDIAN)) || defined(_BIG_ENDIAN)
> -#define FLOAT_CONST(val) (uintptr_t)val << (sizeof(uintptr_t) * 8 - 32)
> -#else
>  #define FLOAT_CONST(val) val
> -#endif
>
>  #define FLOAT_1_BITS FLOAT_CONST(0x3f800000)
>  #define FLOAT_2_BITS FLOAT_CONST(0x40000000)
>
> Rob.
>
> 2009/6/30 Kurt Miller <kurt@...>:
>> Hi Rob,
>>
>> Thanks for the help.
>>
>> Robert Lougher wrote:
>>> 2009/6/23 Kurt Miller <kurt@...>:
>>>> On OpenBSD -current i386 works great, but amd64 can't run anything at
>>>> the moment due to a problem initializing:
>>>>
>>>> Exception occurred while printing exception
>>>> (java/lang/NoClassDefFoundError)...
>>>> Original exception was java/lang/ExceptionInInitializerError
>>>>
>>>> Even the simplest HelloWorld fails to run on amd64. It appears to
>>>> a recent amd64 bug since 1.5.1 + 0.98 works great on amd64.
>>>>
>>> Looks like something's gone wrong in the initialisation of Classpath.
>>> A class static initialiser (<clinit>) has thrown an exception, which
>>> has lead to the class being marked as "bad".
>>>
>>>> I'm stuck at this point. I need some help on how to find the root
>>>> cause.
>>>>
>>> Usual suspects is failure to load Classpath's native libraries (e.g.
>>> libjava.so, etc.).
>> At this point in the initialization no dlopen's have been called on
>> classpath's native libraries yet.
>>
>>>  As a matter of interest try -Xnoinlining.  This
>>> will rule out any problems with the inlining code due to
>>> race-conditions on OpenBSD's different threading code (I've a
>>> suspicion there's one lurking somewhere).
>> -Xnoinlining didn't fix the problem. I still get the same failure.
>>
>> The following debug info shows the class static initializer that
>> is throwing the exception is java/lang/Runtime.
>>
>> Breakpoint 12, initClass (class=0x21010c4f8)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1289
>> 1289           state = CLASS_BAD;
>> (gdb) bt
>> #0  initClass (class=0x21010c4f8)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1289
>> #1  0x000000000041f925 in resolveMethod (class=0x21010b288, cp_index=225)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/resolve.c:202
>> #2  0x000000000042c113 in executeJava ()
>>    at
>> /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:1480
>> #3  0x0000000000410ccf in executeMethodVaList (ob=0x0, class=0x21010ba48,
>>    mb=0x20bfa8000, jargs=0x7f7ffffd4820)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:101
>> #4  0x00000000004107d6 in executeMethodArgs (ob=0x0, class=0x21010ba48,
>>    mb=0x20bfa8000)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:73
>> #5  0x000000000040c98f in initClass (class=0x21010ba48)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1267
>> #6  0x000000000041fe18 in resolveField (class=0x21010b920, cp_index=14)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/resolve.c:319
>> #7  0x000000000042b772 in executeJava ()
>>    at
>> /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:1321
>> ---Type <return> to continue, or q <return> to quit---
>> #8  0x0000000000410ccf in executeMethodVaList (ob=0x0, class=0x21010b920,
>>    mb=0x206d16c00, jargs=0x7f7ffffd4c50)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:101
>> #9  0x00000000004107d6 in executeMethodArgs (ob=0x0, class=0x21010b920,
>>    mb=0x206d16c00)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:73
>> #10 0x000000000040c98f in initClass (class=0x21010b920)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1267
>> #11 0x000000000041fe18 in resolveField (class=0x21010ac58, cp_index=35)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/resolve.c:319
>> #12 0x000000000042b772 in executeJava ()
>>    at
>> /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:1321
>> #13 0x0000000000410ccf in executeMethodVaList (ob=0x0, class=0x21010b288,
>>    mb=0x20a24f1a0, jargs=0x7f7ffffd5080)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:101
>> #14 0x00000000004107d6 in executeMethodArgs (ob=0x0, class=0x21010b288,
>>    mb=0x20a24f1a0)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:73
>> #15 0x000000000040c98f in initClass (class=0x21010b288)
>> ---Type <return> to continue, or q <return> to quit---
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1267
>> #16 0x000000000041f925 in resolveMethod (class=0x21010b120, cp_index=10)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/resolve.c:202
>> #17 0x000000000042c113 in executeJava ()
>>    at
>> /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:1480
>> #18 0x0000000000410ccf in executeMethodVaList (ob=0x0, class=0x21010b120,
>>    mb=0x20baf9400, jargs=0x7f7ffffd54c0)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:101
>> #19 0x00000000004107d6 in executeMethodArgs (ob=0x0, class=0x21010b120,
>>    mb=0x20baf9400)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:73
>> #20 0x000000000040c98f in initClass (class=0x21010b120)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1267
>> #21 0x000000000041f925 in resolveMethod (class=0x21010ad60, cp_index=66)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/resolve.c:202
>> #22 0x000000000042c113 in executeJava ()
>>    at
>> /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:1480
>> #23 0x0000000000410ccf in executeMethodVaList (ob=0x0, class=0x210109c80,
>> ---Type <return> to continue, or q <return> to quit---
>>    mb=0x200c7c000, jargs=0x7f7ffffd5900)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:101
>> #24 0x00000000004107d6 in executeMethodArgs (ob=0x0, class=0x210109c80,
>>    mb=0x200c7c000)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:73
>> #25 0x000000000040c98f in initClass (class=0x210109c80)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1267
>> #26 0x000000000041f925 in resolveMethod (class=0x2101098a0, cp_index=301)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/resolve.c:202
>> #27 0x000000000042c113 in executeJava ()
>>    at
>> /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:1480
>> #28 0x0000000000410ccf in executeMethodVaList (ob=0x0, class=0x210109ab0,
>>    mb=0x200c7fe00, jargs=0x7f7ffffd5d40)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:101
>> #29 0x00000000004107d6 in executeMethodArgs (ob=0x0, class=0x210109ab0,
>>    mb=0x200c7fe00)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:73
>> #30 0x000000000040c98f in initClass (class=0x210109ab0)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1267
>> ---Type <return> to continue, or q <return> to quit---
>> #31 0x000000000041fe18 in resolveField (class=0x2101098a0, cp_index=26)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/resolve.c:319
>> #32 0x000000000042b772 in executeJava ()
>>    at
>> /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:1321
>> #33 0x0000000000410ccf in executeMethodVaList (ob=0x0, class=0x2101098a0,
>>    mb=0x207535bb0, jargs=0x7f7ffffd6170)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:101
>> #34 0x00000000004107d6 in executeMethodArgs (ob=0x0, class=0x2101098a0,
>>    mb=0x207535bb0)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/execute.c:73
>> #35 0x000000000040d6a4 in getSystemClassLoader ()
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1571
>> #36 0x00000000004042dd in main (argc=2, argv=0x7f7ffffd63d0)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/jam.c:363
>> (gdb) frame 0
>> #0  initClass (class=0x21010c4f8)
>>    at /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/class.c:1289
>> 1289           state = CLASS_BAD;
>> (gdb) p cb->name
>> $78 = 0x20bafa3e0 "java/lang/Runtime"
>>
>> Further debugging yields the cause is due to a NPE at line
>> 2185 in src/interp/engine/interp.c. I changed NULL_POINTER_CHECK
>> to segfault since it is the first NPE to occur:
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> [Switching to process 10136, thread 0x20405a800]
>> 0x000000000042d190 in executeJava ()
>>    at
>> /usr/obj/amd64/ports/jamvm-1.5.3/jamvm-1.5.3/src/interp/engine/interp.c:2185
>> 2185        DEF_OPC_210(OPC_INVOKEVIRTUAL_QUICK, {
>>
>>
>> 2185        DEF_OPC_210(OPC_INVOKEVIRTUAL_QUICK, {
>> 2186            Class *new_class;
>> 2187
>> 2188            arg1 = ostack - INV_QUICK_ARGS(pc);
>> 2189            NULL_POINTER_CHECK(*arg1);
>> (gdb) p *arg1
>> $7 = 0
>> (gdb) p ostack
>> $8 = (uintptr_t *) 0x205a99738
>> (gdb) p pc->operand.uu.u1
>> $9 = 3
>> (gdb) p *pc
>> $10 = {handler = 0x42d165, operand = {u = 8592228355, i = 2293763, ii = {
>>      i1 = 3, i2 = 35}, uu = {u1 = 3, u2 = 35}, uui = {u1 = 3, u2 = 35 '#',
>>      i = 0 '\0'}, pntr = 0x200230003}}
>>
>>
>> At a loss at why *arg1 is NULL. Any ideas on what to pursue next?
>>
>> Regards,
>> -Kurt
>>


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/blackberry
_______________________________________________
Jamvm-general mailing list
Jamvm-general@...
https://lists.sourceforge.net/lists/listinfo/jamvm-general