You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Christian Peter <ch...@googlemail.com> on 2010/03/29 18:32:06 UTC

Harmony H2 errors

Hi list,

I regularly read the Harmony development archives, and there was a post
about Dacapo benchmarks with the H2 database. I also tested some of my
applications against Harmony, and I have problems with H2. I narrowed it
down to a small testcase. RI works fine, Harmony doesn't work (on Fedora
12, all Updates). This is on 32 bit, 64 bit seems to be Ok.

Just use the attached file and the jar file found in
http://www.h2database.com/h2-2010-03-21.zip and let it run.

Regards

Christian Peter

Re: Harmony H2 errors

Posted by Deven You <de...@gmail.com>.
Hi Christian,
If it can reproduced by a simple test? I think if a simple test can be
present, you can raise a jira and it will largely simplify the investigation
and fixing task. Since I only have windows xp and ubuntun platform, also
wonder if it will also occur on these platform?

2010/4/23 Christian Peter <ch...@googlemail.com>

> Hi,
>
> since I didn't hear anything about this issue, is there anything I can do
> to
> get this issue fixed? I don't want it to be lost. Will someone add a JIRA
> Issue or should I?
>
> This Harmony JIT bug could also affect other software, not only H2.
>
> Thanks,
>
> Regards
>
> Christian
>
>
> 2010/4/2 Christian Peter <ch...@googlemail.com>
>
> > 2010/4/1 Tim Ellison <t....@gmail.com>
> >
> > Hi Christian,
> >>
> >> I see a problem too.  I get a ClassCastException when running on Windows
> >> 32-bit DRLVM.  I can't reproduce the problem when using -Xint or when
> >> using the IBM VME, so it looks like it might be a Harmony JIT bug.
> >>
> >>
> >>    protected int compareSecure(Value o, CompareMode mode) {
> >> >       ValueByte v = (ValueByte) o;
> >>        return MathUtils.compareInt(value, v.value);
> >>    }
> >>
> >> Is that the same problem you saw?
> >>
> >> Regards,
> >> Tim
> >>
> >>
> > Hi Tim,
> >
> > I see a different exception:
> >
> > org.h2.jdbc.JdbcSQLException: General error:
> > "java.lang.ArrayIndexOutOfBoundsException"; SQL statement:
> > insert into account(name) values(?) [50000-132]
> >         at
> > org.h2.message.DbException.getJdbcSQLException(DbException.java:316)
> >         at org.h2.message.DbException.get(DbException.java:156)
> >         at org.h2.message.DbException.convert(DbException.java:284)
> >         at org.h2.table.RegularTable.addRow(RegularTable.java:130)
> >         at org.h2.command.dml.Insert.insertRows(Insert.java:120)
> >         at org.h2.command.dml.Insert.update(Insert.java:82)
> >         at
> org.h2.command.CommandContainer.update(CommandContainer.java:70)
> >         at org.h2.command.Command.executeUpdate(Command.java:198)
> >         at
> > org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:179)
> >         at org.h2.samples.Simple.main(Simple.java:49)
> > Caused by: java.lang.ArrayIndexOutOfBoundsException
> >         at org.h2.store.Data.readVarLong(Data.java:1001)
> >         at org.h2.index.PageBtreeIndex.readRow(PageBtreeIndex.java:325)
> >         at org.h2.index.PageBtree.getRow(PageBtree.java:168)
> >         at org.h2.index.PageBtree.find(PageBtree.java)
> >         at org.h2.index.PageBtreeNode.addRowTry(PageBtreeNode.java:198)
> >         at org.h2.index.PageBtreeIndex.addRow(PageBtreeIndex.java:88)
> >         at org.h2.index.PageBtreeIndex.add(PageBtreeIndex.java:79)
> >         at org.h2.table.RegularTable.addRow(RegularTable.java:112)
> >         at org.h2.command.dml.Insert.insertRows(Insert.java:120)
> >
> > This is here:
> >
> > public long readVarLong() {
> >         long x = data[pos++];
> >         if (x >= 0) {
> >             return x;
> >         }
> >         x &= 0x7f;
> >         for (int s = 7;; s += 7) {
> > >            long b = data[pos++];
> >             x |= (b & 0x7f) << s;
> >             if (b >= 0) {
> >                 return x;
> >             }
> >         }
> >     }
> >
> > And I also don't see it with -Xint. I tested both 1.5 and 1.6 builds.
> >
> > Regards
> >
> > Christian
> >
> >
>

Re: Harmony H2 errors

Posted by Christian Peter <ch...@googlemail.com>.
Hi,

since I didn't hear anything about this issue, is there anything I can do to
get this issue fixed? I don't want it to be lost. Will someone add a JIRA
Issue or should I?

This Harmony JIT bug could also affect other software, not only H2.

Thanks,

Regards

Christian


2010/4/2 Christian Peter <ch...@googlemail.com>

> 2010/4/1 Tim Ellison <t....@gmail.com>
>
> Hi Christian,
>>
>> I see a problem too.  I get a ClassCastException when running on Windows
>> 32-bit DRLVM.  I can't reproduce the problem when using -Xint or when
>> using the IBM VME, so it looks like it might be a Harmony JIT bug.
>>
>>
>>    protected int compareSecure(Value o, CompareMode mode) {
>> >       ValueByte v = (ValueByte) o;
>>        return MathUtils.compareInt(value, v.value);
>>    }
>>
>> Is that the same problem you saw?
>>
>> Regards,
>> Tim
>>
>>
> Hi Tim,
>
> I see a different exception:
>
> org.h2.jdbc.JdbcSQLException: General error:
> "java.lang.ArrayIndexOutOfBoundsException"; SQL statement:
> insert into account(name) values(?) [50000-132]
>         at
> org.h2.message.DbException.getJdbcSQLException(DbException.java:316)
>         at org.h2.message.DbException.get(DbException.java:156)
>         at org.h2.message.DbException.convert(DbException.java:284)
>         at org.h2.table.RegularTable.addRow(RegularTable.java:130)
>         at org.h2.command.dml.Insert.insertRows(Insert.java:120)
>         at org.h2.command.dml.Insert.update(Insert.java:82)
>         at org.h2.command.CommandContainer.update(CommandContainer.java:70)
>         at org.h2.command.Command.executeUpdate(Command.java:198)
>         at
> org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:179)
>         at org.h2.samples.Simple.main(Simple.java:49)
> Caused by: java.lang.ArrayIndexOutOfBoundsException
>         at org.h2.store.Data.readVarLong(Data.java:1001)
>         at org.h2.index.PageBtreeIndex.readRow(PageBtreeIndex.java:325)
>         at org.h2.index.PageBtree.getRow(PageBtree.java:168)
>         at org.h2.index.PageBtree.find(PageBtree.java)
>         at org.h2.index.PageBtreeNode.addRowTry(PageBtreeNode.java:198)
>         at org.h2.index.PageBtreeIndex.addRow(PageBtreeIndex.java:88)
>         at org.h2.index.PageBtreeIndex.add(PageBtreeIndex.java:79)
>         at org.h2.table.RegularTable.addRow(RegularTable.java:112)
>         at org.h2.command.dml.Insert.insertRows(Insert.java:120)
>
> This is here:
>
> public long readVarLong() {
>         long x = data[pos++];
>         if (x >= 0) {
>             return x;
>         }
>         x &= 0x7f;
>         for (int s = 7;; s += 7) {
> >            long b = data[pos++];
>             x |= (b & 0x7f) << s;
>             if (b >= 0) {
>                 return x;
>             }
>         }
>     }
>
> And I also don't see it with -Xint. I tested both 1.5 and 1.6 builds.
>
> Regards
>
> Christian
>
>

Re: Harmony H2 errors

Posted by Christian Peter <ch...@googlemail.com>.
2010/4/1 Tim Ellison <t....@gmail.com>

> Hi Christian,
>
> I see a problem too.  I get a ClassCastException when running on Windows
> 32-bit DRLVM.  I can't reproduce the problem when using -Xint or when
> using the IBM VME, so it looks like it might be a Harmony JIT bug.
>
>
>    protected int compareSecure(Value o, CompareMode mode) {
> >       ValueByte v = (ValueByte) o;
>        return MathUtils.compareInt(value, v.value);
>    }
>
> Is that the same problem you saw?
>
> Regards,
> Tim
>
>
Hi Tim,

I see a different exception:

org.h2.jdbc.JdbcSQLException: General error:
"java.lang.ArrayIndexOutOfBoundsException"; SQL statement:
insert into account(name) values(?) [50000-132]
        at
org.h2.message.DbException.getJdbcSQLException(DbException.java:316)
        at org.h2.message.DbException.get(DbException.java:156)
        at org.h2.message.DbException.convert(DbException.java:284)
        at org.h2.table.RegularTable.addRow(RegularTable.java:130)
        at org.h2.command.dml.Insert.insertRows(Insert.java:120)
        at org.h2.command.dml.Insert.update(Insert.java:82)
        at org.h2.command.CommandContainer.update(CommandContainer.java:70)
        at org.h2.command.Command.executeUpdate(Command.java:198)
        at
org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:179)
        at org.h2.samples.Simple.main(Simple.java:49)
Caused by: java.lang.ArrayIndexOutOfBoundsException
        at org.h2.store.Data.readVarLong(Data.java:1001)
        at org.h2.index.PageBtreeIndex.readRow(PageBtreeIndex.java:325)
        at org.h2.index.PageBtree.getRow(PageBtree.java:168)
        at org.h2.index.PageBtree.find(PageBtree.java)
        at org.h2.index.PageBtreeNode.addRowTry(PageBtreeNode.java:198)
        at org.h2.index.PageBtreeIndex.addRow(PageBtreeIndex.java:88)
        at org.h2.index.PageBtreeIndex.add(PageBtreeIndex.java:79)
        at org.h2.table.RegularTable.addRow(RegularTable.java:112)
        at org.h2.command.dml.Insert.insertRows(Insert.java:120)

This is here:

public long readVarLong() {
        long x = data[pos++];
        if (x >= 0) {
            return x;
        }
        x &= 0x7f;
        for (int s = 7;; s += 7) {
>            long b = data[pos++];
            x |= (b & 0x7f) << s;
            if (b >= 0) {
                return x;
            }
        }
    }

And I also don't see it with -Xint. I tested both 1.5 and 1.6 builds.

Regards

Christian

Re: Harmony H2 errors

Posted by Tim Ellison <t....@gmail.com>.
On 29/Mar/2010 17:32, Christian Peter wrote:
> I regularly read the Harmony development archives, and there was a post
> about Dacapo benchmarks with the H2 database. I also tested some of my
> applications against Harmony, and I have problems with H2. I narrowed it
> down to a small testcase. RI works fine, Harmony doesn't work (on Fedora
> 12, all Updates). This is on 32 bit, 64 bit seems to be Ok.
> 
> Just use the attached file and the jar file found in
> http://www.h2database.com/h2-2010-03-21.zip and let it run.

Hi Christian,

I see a problem too.  I get a ClassCastException when running on Windows
32-bit DRLVM.  I can't reproduce the problem when using -Xint or when
using the IBM VME, so it looks like it might be a Harmony JIT bug.


    protected int compareSecure(Value o, CompareMode mode) {
>       ValueByte v = (ValueByte) o;
        return MathUtils.compareInt(value, v.value);
    }

Is that the same problem you saw?

Regards,
Tim