cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedict (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-6628) Cassandra crashes on Solaris sparcv9 using java 64bit
Date Fri, 31 Jan 2014 20:00:09 GMT


Benedict commented on CASSANDRA-6628:

bq.  We can compare all endianness longs by comparing

What I was saying here is nonsense. But irrelevant since we only perform this once per comparison
anyway. So let's ignore this.

bq. so I suggest we modify this logic to run both ends, and include alignment

This is actually much harder than I initially realised. It can be done, but I'm not certain
it's worth the effort just now. Basically we want to get one of the streams into an aligned
position, and then for the other do aligned reads that are potentially offset from the first,
plus a couple of shift/ors to create the long we want to actually compare. This will only
benefit those architectures where unaligned access are explicitly prohibited. If you want
to submit a patch, Dmitry, I'll be happy to review it, but otherwise I'll leave the current
patch as is for now.

> Cassandra crashes on Solaris sparcv9 using java 64bit
> -----------------------------------------------------
>                 Key: CASSANDRA-6628
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: checked 1.2.x line and 2.0.x
>            Reporter: Dmitry Shohov
>            Assignee: Dmitry Shohov
>             Fix For: 2.0.5
>         Attachments: solaris_unsafe_fix.patch, tmp.patch
> When running cassandra 2.0.4 (and other versions) on Solaris and java 64 bit, JVM crashes.
Issue is described once in CASSANDRA-4646 but closed as invalid.
> The reason for this crash is some memory allignment related problems and incorrect sun.misc.Unsafe
usage. If you look into DirectByteBuffer in jdk, you will see that it checks os.arch before
using getLong methods.
> I have a patch, which check for the os.arch and if it is not one of the known, it reads
longs and ints byte by byte.
> Although patch fixes the problem in cassandra, it will still crash without similar fixes
in the lz4 library. I already provided the patch for Unsafe usage in lz4.

This message was sent by Atlassian JIRA

View raw message