[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14647671#comment-14647671 ] Jonathan Ellis commented on CASSANDRA-8325: --- Basically we're waiting for someone who wants to run it badly enough to do the work. Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Fix For: 2.1.x Attachments: hs_err_pid1856.log, system.log, unsafeCopy1.txt, untested_8325.patch See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14647250#comment-14647250 ] Jeffrey Gelens commented on CASSANDRA-8325: --- Is there any activity on this bug or should I just give up on using Cassandra on FreeBSD? Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Fix For: 2.1.x Attachments: hs_err_pid1856.log, system.log, unsafeCopy1.txt, untested_8325.patch See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14522753#comment-14522753 ] graham sanderson commented on CASSANDRA-8325: - My suggestion would be to see if you can perf test this yourself on Linux. Benedict is right that it might pollute the instruction cache, but then it might not (it really depends on the mix of calls).. I think the point is that someone who needs FreeBSD is probably going to have to do the leg work here; or just run with my patch which may be sub-optimal. Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Fix For: 2.1.x Attachments: hs_err_pid1856.log, system.log, unsafeCopy1.txt, untested_8325.patch See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14517226#comment-14517226 ] Malcolm commented on CASSANDRA-8325: Hello, is there anything that can be done to get movement on this ticket? Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Fix For: 2.1.5 Attachments: hs_err_pid1856.log, system.log, unsafeCopy1.txt, untested_8325.patch See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14517270#comment-14517270 ] Benedict commented on CASSANDRA-8325: - I'm afraid at the moment this ticket is going to see very little TLC. We're coming up to 3.0 release, and after that are collectively switching mode to improve the aggregate QA on the project, to support our new development and release processes. If you want to propose a patch and corroborate there are no resultant performance regressions for Linux or Windows, I'd be happy to review the work and QA you provide, and we could perhaps arrange for access to our performance test clusters for corroborating Linux performance does not regress, at least. Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Fix For: 2.1.5 Attachments: hs_err_pid1856.log, system.log, unsafeCopy1.txt, untested_8325.patch See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14265911#comment-14265911 ] Benedict commented on CASSANDRA-8325: - [~graham sanderson] thanks for the New Year cheer and putting together another great patch. My slight concern with this approach is that it pollutes the instruction cache, so we do need to run some performance tests. These codepaths _are_ pretty sensitive to these effects. Ultimately, I think a follow up ticket might be sensible that performs all of this work natively, since we should not need such code duplication. Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log, unsafeCopy1.txt, untested_8325.patch See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14265852#comment-14265852 ] Sylvain Lebresne commented on CASSANDRA-8325: - For the sake of clarification, being from DataStax doesn't entitled anyone to make calls regarding Apache Cassandra (having a good track record of contributions, which usually means you're a committer, is probably what entitled you to make calls, though decisions are ideally agreed upon collectively). Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log, unsafeCopy1.txt, untested_8325.patch See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14265799#comment-14265799 ] graham sanderson commented on CASSANDRA-8325: - Well that is good news I guess; I think we need someone from DataStax to make a call on whether this should be refactored, and what perf tests need to be redone if this is going to be fixed on all platforms. Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log, unsafeCopy1.txt, untested_8325.patch See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14264819#comment-14264819 ] Leonid Shalupov commented on CASSANDRA-8325: untested_8325.patch works for me Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log, unsafeCopy1.txt, untested_8325.patch See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14262670#comment-14262670 ] graham sanderson commented on CASSANDRA-8325: - Note that patch supersedes the old one (unsafeCopy1.txt) Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log, unsafeCopy1.txt, untested_8325.patch See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14261151#comment-14261151 ] graham sanderson commented on CASSANDRA-8325: - My first patch was kind of ugly (shortest path to probable correctness); whilst I could do the same thing for the comparators, at that point the code will cease to be very elegant, and probably in need of some refactoring to make it more approachable. [~benedict] do you want to take this issue. I was really only taking a look out of curiosity (hadn't seen it in our playings with 2.1.x), but it just seemed odd that there should be an issue with Sun.misc.Unsafe on FreeBSD. We don't use FreeBSD or plan to, but as mentioned above, this is actually incorrect code although it happens to work on most other things. It seems like you took great pains to get the {{@Inline}} mix right, and you have much more context than me with what you were thinking (again as per {{MIN_COPY_THRESHOLD}} and its only partial use - which may not have been intended). Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log, unsafeCopy1.txt See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14261161#comment-14261161 ] Benedict commented on CASSANDRA-8325: - I agree this should be addressed, but while it's reasonably trivial to knock out a patch that makes FreeBSD work, it's not so trivial to make it work neatly without penalty on the other systems we target. Since it's not a supported system and I have a lot of other pressing work to do, I can't really spare the time right now. I'll certainly take a look if nobody else has once some time frees up, however. As to MIN_COPY_THRESHOLD, the behaviour was largely adopted from the JDK, and this doesn't apply the limit to offheap-to-offheap copies. Whether or not this is a good or bad distinction, I haven't investigated. Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log, unsafeCopy1.txt See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14260187#comment-14260187 ] Leonid Shalupov commented on CASSANDRA-8325: unsafeCopy1.txt patch fails in Unsafe.getLong with slightly different stack trace. BTW, it's reproducible with just ant clean test-all on FreeBSD {quote} Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j sun.misc.Unsafe.getLong(Ljava/lang/Object;J)J+0 j org.apache.cassandra.utils.FastByteOperations$UnsafeOperations.compareTo(Ljava/lang/Object;JILjava/lang/Object;JI)I+50 j org.apache.cassandra.utils.FastByteOperations$UnsafeOperations.compareTo(Ljava/lang/Object;JILjava/nio/ByteBuffer;)I+84 j org.apache.cassandra.utils.FastByteOperations$UnsafeOperations.compareTo(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I+57 j org.apache.cassandra.utils.FastByteOperations$UnsafeOperations.compare(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I+2 j org.apache.cassandra.utils.FastByteOperations.compareUnsigned(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I+5 j org.apache.cassandra.utils.ByteBufferUtil.compareUnsigned(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I+2 j org.apache.cassandra.db.DecoratedKey.compareTo(Lorg/apache/cassandra/db/RowPosition;)I+52 J 1215 C1 org.apache.cassandra.db.DecoratedKey.compareTo(Ljava/lang/Object;)I (9 bytes) @ 0x000804262b8c [0x000804262940+0x24c] J 1214 C1 java.util.concurrent.ConcurrentSkipListMap.cpr(Ljava/util/Comparator;Ljava/lang/Object;Ljava/lang/Object;)I (26 bytes) @ 0x00080426258c [0x000804262260+0x32c] j java.util.concurrent.ConcurrentSkipListMap.doGet(Ljava/lang/Object;)Ljava/lang/Object;+103 j java.util.concurrent.ConcurrentSkipListMap.get(Ljava/lang/Object;)Ljava/lang/Object;+2 j org.apache.cassandra.db.Memtable.getColumnFamily(Lorg/apache/cassandra/db/DecoratedKey;)Lorg/apache/cassandra/db/ColumnFamily;+5 j org.apache.cassandra.db.CollationController.collectAllData(Z)Lorg/apache/cassandra/db/ColumnFamily;+133 j org.apache.cassandra.db.CollationController.getTopLevelColumns(Z)Lorg/apache/cassandra/db/ColumnFamily;+39 j org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(Lorg/apache/cassandra/db/filter/QueryFilter;I)Lorg/apache/cassandra/db/ColumnFamily;+40 j org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(Lorg/apache/cassandra/db/filter/QueryFilter;)Lorg/apache/cassandra/db/ColumnFamily;+141 j org.apache.cassandra.schema.LegacySchemaTables.readSchemaPartitionForKeyspace(Ljava/lang/String;Lorg/apache/cassandra/db/DecoratedKey;)Lorg/apache/cassandra/db/Row;+19 j org.apache.cassandra.schema.LegacySchemaTables.readSchemaPartitionForKeyspace(Ljava/lang/String;Ljava/lang/String;)Lorg/apache/cassandra/db/Row;+15 j org.apache.cassandra.schema.LegacySchemaTables.readSchemaForKeyspaces(Ljava/lang/String;Ljava/util/Set;)Ljava/util/Map;+38 j org.apache.cassandra.schema.LegacySchemaTables.mergeSchema(Ljava/util/Collection;Z)V+146 ... {quote} Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log, unsafeCopy1.txt See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14260192#comment-14260192 ] Benedict commented on CASSANDRA-8325: - That would imply Graham's patch was successful, then, since this is the comparator codepath he left unmodified. We will need to roll out a full patch and perform some analysis to see what performance impact this change has. It's possible we can deliver two specialized methods instead, since I think we only currently perform native-to-heap and heap-to-heap. Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log, unsafeCopy1.txt See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14260206#comment-14260206 ] Leonid Shalupov commented on CASSANDRA-8325: I'm ready to try other patches :) Since I've set up the environment it would not take much time. Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log, unsafeCopy1.txt See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14226992#comment-14226992 ] Benedict commented on CASSANDRA-8325: - You might be right. The javadoc does make it quite explicit that this should not be permitted, however the hotspot code in library_call.cpp (inline_unsafe_access and classify_unsafe_addr) _seems_ to indicate it should be valid and behave the same, but it's hard to say for sure without getting the project working better to explore the code more fully. However given that it is commented as not valid usafe, it does seem sensible to change it. But this means a potential performance penalty in one of the most heavily used codepaths. Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14227049#comment-14227049 ] graham sanderson commented on CASSANDRA-8325: - Yeah the code in library_call.cpp is quite hard to introspect, however my sense is this probably comes down to a mixture of the case where a null (0) 32 bit compressedOop pointer is not equivalent to a null 64 bit address (i.e. the case where the heap does not fit in the 32 gig of address space) possibly coupled with whether the hotspot compiler could prove at compile time whether the value was statically null. It seems like a slightly strange distinction to make given that you are using a 64 bit offset anyway (and that other methods do using them interchangeably) but that doesn't change the fact that they made the distinction and apparently it matters at least in some implementations. The question I was trying to get a sense of, is whether this explicitly disallows the sorts of pointer arithmetic C* is trying to achieve, or whether C* is just doing it wrong. Maybe that is actually quite simple and there are clearly distinctions between baseless pointers and static or otherwise field level offsets, but someone would have to have to dive in (probably with the ability to test) to make sure. Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14227257#comment-14227257 ] graham sanderson commented on CASSANDRA-8325: - Note also Benedict that I noticed in passing that MIN_COPY_THRESHOLD is only checked in some code paths - was this deliberate? Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log, unsafeCopy1.txt See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14224318#comment-14224318 ] Leonid Shalupov commented on CASSANDRA-8325: Tried with loop and without it. unsafe.getByte(l) always ok, returns value consistent with putByte unsafe.getByte(null, l) always fails with {code} # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00080243d1f0, pid=39405, tid=34384930816 # # JRE version: OpenJDK Runtime Environment (7.0-b14) (build 1.7.0_71-b14) # Java VM: OpenJDK 64-Bit Server VM (24.71-b01 mixed mode bsd-amd64 compressed oops) # Problematic frame: # V [libjvm.so+0x83d1f0] JVM_handle_bsd_signal+0x113470 # # Core dump written. Default location: /cores/core or core.39405 # # An error report file with more information is saved as: # /usr/home/upsource/hs_err_pid39405.log # # If you would like to submit a bug report, please visit: # http://bugreport.sun.com/bugreport/crash.jsp # {code} Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14224734#comment-14224734 ] graham sanderson commented on CASSANDRA-8325: - Well that was a good guess ;-) So {{unsafe.getByte(null, address)}} and {{unsafe.getByte(address)}} are not documented to be the same, but do seem to be on most platforms However from getInt() docs: {code} * This method refers to a variable by means of two parameters, and so * it provides (in effect) a emdouble-register/em addressing mode * for Java variables. When the object reference is null, this method * uses its offset as an absolute address. This is similar in operation * to methods such as {@link #getInt(long)}, which provide (in effect) a * emsingle-register/em addressing mode for non-Java variables. * However, because Java variables may have a different layout in memory * from non-Java variables, programmers should not assume that these * two addressing modes are ever equivalent. Also, programmers should * remember that offsets from the double-register addressing mode cannot * be portably confused with longs used in the single-register addressing * mode. {code} The why? Well you could look on FreeBSD OpenJDK mailing lists, or dig up the source - changes to {{hotspot/src/share/vm/opto/library_call.cpp}} may help. However this may not be a JVM bug, it might just be a consequence of address space layout on FreeBSD. Things like -XX:+UseCompressedOps and heap size = or = 32gig may have an effect. Anyway, you might consider this a C* bug... sort of fuzzy there. If you're building C* yourself, I'd start by changing (though it isn't necessarily the only effected method) In FastByteOperations.UnsafeOperations, I'd change {code} public static void copy(Object src, long srcOffset, byte[] trg, int trgPosition, int length) { if (length = MIN_COPY_THRESHOLD) { for (int i = 0 ; i length ; i++) trg[trgPosition + i] = theUnsafe.getByte(src, srcOffset + i); } else { copy(src, srcOffset, trg, BYTE_ARRAY_BASE_OFFSET + trgPosition, length); } } {code} to {code} public static void copy(Object src, long srcOffset, byte[] trg, int trgPosition, int length) { if (length = MIN_COPY_THRESHOLD) { if (src == null) { for (int i = 0 ; i length ; i++) trg[trgPosition + i] = theUnsafe.getByte(srcOffset + i); } else { for (int i = 0 ; i length ; i++) trg[trgPosition + i] = theUnsafe.getByte(src, srcOffset + i); } } else { copy(src, srcOffset, trg, BYTE_ARRAY_BASE_OFFSET + trgPosition, length); } } {code} Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14224892#comment-14224892 ] Leonid Shalupov commented on CASSANDRA-8325: I think it's more of are documented NOT to be the same Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14225120#comment-14225120 ] graham sanderson commented on CASSANDRA-8325: - True - it would seem that probably most of {{FastByteOperations}} may be making invalid assumptions, and indeed appears to be new in 2.1 (I thought this might be avoided by memtable_allocation_type: heap_buffers, but it isn't) So yes... I guess this could be classed as a bug, maybe ~benedict has some ideas Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14225137#comment-14225137 ] graham sanderson commented on CASSANDRA-8325: - Posting full javadoc (which is on getInt but applies below). Note this is reasonable ammunition to get the bug fixed, however reproducing it on something other than FreeBSD would probably help move things along, which begs the question what is it about FreeBSD OpenJDK that is the issue. Things that pop into my head are - Heap either less than or greater than 4 gig in size - within this also if heap is fully located within fist 4 gig of virtual address space - Heap either less than or greater than 32 gig in size - within this also if heap is fully located within fist 32 gig of virtual address space - And whether you are using compressed oops (-XX:+/-UsedCompressedOops) {code} /** * Fetches a value from a given Java variable. * More specifically, fetches a field or array element within the given * object codeo/code at the given offset, or (if codeo/code is * null) from the memory address whose numerical value is the given * offset. * p * The results are undefined unless one of the following cases is true: * ul * liThe offset was obtained from {@link #objectFieldOffset} on * the {@link java.lang.reflect.Field} of some Java field and the object * referred to by codeo/code is of a class compatible with that * field's class. * * liThe offset and object reference codeo/code (either null or * non-null) were both obtained via {@link #staticFieldOffset} * and {@link #staticFieldBase} (respectively) from the * reflective {@link Field} representation of some Java field. * * liThe object referred to by codeo/code is an array, and the offset * is an integer of the form codeB+N*S/code, where codeN/code is * a valid index into the array, and codeB/code and codeS/code are * the values obtained by {@link #arrayBaseOffset} and {@link * #arrayIndexScale} (respectively) from the array's class. The value * referred to is the codeN/codeemth/em element of the array. * * /ul * p * If one of the above cases is true, the call references a specific Java * variable (field or array element). However, the results are undefined * if that variable is not in fact of the type returned by this method. * p * This method refers to a variable by means of two parameters, and so * it provides (in effect) a emdouble-register/em addressing mode * for Java variables. When the object reference is null, this method * uses its offset as an absolute address. This is similar in operation * to methods such as {@link #getInt(long)}, which provide (in effect) a * emsingle-register/em addressing mode for non-Java variables. * However, because Java variables may have a different layout in memory * from non-Java variables, programmers should not assume that these * two addressing modes are ever equivalent. Also, programmers should * remember that offsets from the double-register addressing mode cannot * be portably confused with longs used in the single-register addressing * mode. * * @param o Java heap object in which the variable resides, if any, else *null * @param offset indication of where the variable resides in a Java heap *object, if any, else a memory address locating the variable *statically * @return the value fetched from the indicated Java variable * @throws RuntimeException No defined exceptions are thrown, not even * {@link NullPointerException} */ {code} Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14225147#comment-14225147 ] graham sanderson commented on CASSANDRA-8325: - The only other thing to note is that other methods (e.g. copyMemory) in Unsafe use (null, longValue) and (longValue) interchangeably which adds to the confusion Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14225151#comment-14225151 ] graham sanderson commented on CASSANDRA-8325: - And finally, the C* code base seems to use the two interchangeably in some cases which is might make it non trivial to disentangle Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14219184#comment-14219184 ] Leonid Shalupov commented on CASSANDRA-8325: {code} public class A { public static void main(String[] args) throws Exception { java.lang.reflect.Field f = sun.misc.Unsafe.class.getDeclaredField(theUnsafe); f.setAccessible(true); sun.misc.Unsafe unsafe = (sun.misc.Unsafe) f.get(null); long l = unsafe.allocateMemory(900L*1024*1024); System.err.println(l); } } {code} $ javac A.java $ java A 36679188480 Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14219824#comment-14219824 ] graham sanderson commented on CASSANDRA-8325: - Just for sanity checking's sake - otherwise my previous comments about {{peer}} still stand, can you check: {code} System.err.println(byteA + theUnsafe.getByte(null, l)); // that is your long l System.err.println(byteB + theUnsafe.getByte(l)); // that is your long l {code} To make sure neither fail. Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14219829#comment-14219829 ] graham sanderson commented on CASSANDRA-8325: - You might also want to try putting them (without the println in a long tight loop to get them out of the interpreter also) Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14218918#comment-14218918 ] graham sanderson commented on CASSANDRA-8325: - I don't have FreeBSD, but posting my comment from user thread {bq} Only thing I can see from looking at the exception, is that it looks like maybe the “peer” value in the RefCountedMemory object is probably 0 Given that Unsafe.allocateMemory should not return 0 even on allocation failure (it should throw OOM, though you should add a log statement to the Memory class to check that) - I’d suggest logging to see if anyone is calling SSTableReader.releaseSummary, which could set the peer to 0 {bq} Note this particular use of sun.misc.Unsafe is new in 2.1, however I thought there were others in 2.0. It is possible your JVM doesn't support {{public native long Unsafe.allocateMemory(long l);}} and returns 0, though in that case you pretty much just need to switch back to the on heap memtable allocator. In either case, if you cannot recompile Cassandra for new logging, you can certainly write a simple Jave program which calls {{public native long allocateMemory(long l);}} Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14216287#comment-14216287 ] Leonid Shalupov commented on CASSANDRA-8325: - It always crashes, no random occurrences - 2.0.x was ok (do not remember exact minor version) - I'll try to run it under linux compat Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14216685#comment-14216685 ] Michael Shuler commented on CASSANDRA-8325: --- Great, thanks for the followup! If the Unsafe.getByte() is doing the wrong thing (by accessing an incorrect address or such), or can be updated in such a way as to be more platform independent, if it's more of a JVM issue, this would be a great improvement. I'm not sure what the actual problem is, but I'm game to help get 2.1 working on FreeBSD :) Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14214527#comment-14214527 ] Leonid Shalupov commented on CASSANDRA-8325: Related thread in FreeBSD mailing list: http://lists.freebsd.org/pipermail/freebsd-stable/2014-October/080834.html {quote} Looks like it might be cassandra bug, as it's calling sun.misc.Unsafe.getByte() which can crash the JVM with bad addresses. {quote} Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14214543#comment-14214543 ] Leonid Shalupov commented on CASSANDRA-8325: STR: 1. Get FreeBSD 10.1, install openjdk via pkg install openjdk 7 2. Download and unpack apache-cassandra-2.1.2-bin.tar.gz 3. Run ./cassandra in apache-cassandra-2.1.2/bin 4. In couple of seconds Cassandra will crash Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14215298#comment-14215298 ] Michael Shuler commented on CASSANDRA-8325: --- There are a multitude of places that Unsafe is used. While Cassandra on FreeBSD is interesting to me, personally, it's not a supported (quoted intentionally, because it should just work on Unix-like systems) OS. Are you able to trigger this in a repeatable manner just starting Cassandra as above, or was this a random occurrence? Does the same happen on another JDK (does Oracle release one?) Thanks for the bug report! Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14215300#comment-14215300 ] Michael Shuler commented on CASSANDRA-8325: --- Answered my own question - runs under linux compat - https://www.freebsd.org/java/install.html Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
[ https://issues.apache.org/jira/browse/CASSANDRA-8325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14215310#comment-14215310 ] Michael Shuler commented on CASSANDRA-8325: --- From the mailing list post, it looks like openjdk8 was also attempted. Cassandra 2.1.x fails to start on FreeBSD (JVM crash) - Key: CASSANDRA-8325 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325 Project: Cassandra Issue Type: Bug Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit Server VM Reporter: Leonid Shalupov Attachments: hs_err_pid1856.log, system.log See attached error file after JVM crash {quote} FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 {quote} {quote} % java -version openjdk version 1.7.0_71 OpenJDK Runtime Environment (build 1.7.0_71-b14) OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)