Fork me on GitHub

hmm, trying to start LMDB as index store on a mac (intel) and openjdk 15 causes the process to crash... nrepl messages shows

WARNING: /usr/local/Cellar/openjdk/15.0.1/libexec/openjdk.jdk/Contents/Home/bin/java is loading libcrypto in an unsafe way

[nREPL] Connection closed unexpectedly (connection broken by remote peer)
anyone ran into this?


same seems to happen with rocksdb... thinking-face


Hi @U11SJ6Q0K am I right in thinking you are using OSX? It looks ~identical to and If that's the case, then you should be able to set env vars `CRUX_DISABLE_LIBCRYPTO=true CRUX_ENABLE_BYTEUTILS_SHA1=true` to workaround it (roughly as per the suggestion in the second link)


yeah, intel mac and openjdk 15


both rocks and lmdb failed with that, but I got xodus working


Cool, good to know. We'll add a pointer about this in the docs since it seems to have come up enough times now(!) :thumbsup:


can confirm that setting those env variables fixed it, so thanks again

👍 2
🙏 2
🙂 2

I for some reason didn't find that issue when googling, so a pointer in the docs might be in place

👌 2

I am seeing some very strange and random behaviour related to the usage of Or clauses and predicates. I get the same logic variables error mentioned in the documentation at random times from the same query. I can remove one of the nested ands in the or and insert it in a different order and some times the error goes away. All the nested ands use the same logic variables. Only the predicates used are different.

Steven Deobald16:08:39

@U09UV3WP6 Is it possible to construct a small repro query you can attach to an issue? Do you think you'd need to provide a sample data set to repro as well? @U050V1N74 is out today, but he'll be back tomorrow. Hopefully it's something he can help you with quickly.


I can try to reproduce. Unfortunately I cannot submit the code I am working on.

Steven Deobald16:08:51

No worries. Out of curiosity, if it's difficult to create a sanitized repro query, is it an option to submit the offending code to us in private? (We wouldn't attach it to a GitHub issue, obviously.)


Sure, I can do that. It is a quite compact example.

🙇 2
Steven Deobald19:08:01

Awesome. Thanks!


Your more than welcome. Should I ping @U050V1N74 ?


consider me pinged 🙂 will test out the repro this morning


Thanks. Do let me know if I missing something. It is a very odd problem and it is very possible I am doing something silly.


@U050V1N74 Do you need anything further from me?


@U09UV3WP6: I've got the following result for the given query:

#{[{:type :helpdesk,
    :sub-type :request,
    :request-id 0,
    :error-category 2,
    :time #inst "2021-10-13T02:55:31.846-00:00",
    :crux.db/id :helpdesk-error-request-0}
   {:type :helpdesk,
    :sub-type :remediation-start,
    :request-id 0,
    :time #inst "2021-10-13T04:05:31.846-00:00",
    :crux.db/id :helpdesk-error-remediation-start-0}]
  [{:type :helpdesk,
    :sub-type :request,
    :request-id 0,
    :error-category 2,
    :time #inst "2021-10-13T02:55:31.846-00:00",
    :crux.db/id :helpdesk-error-request-0}
   {:type :helpdesk,
    :sub-type :first-response,
    :request-id 0,
    :time #inst "2021-10-13T03:20:31.846-00:00",
    :crux.db/id :helpdesk-error-first-response-0}]}
which seems correct to me?


admittedly I've replaced the predicates with the following, as the example didn't seem to depend on the business logic in example.time (they were all on the same day)

(defn diff-gt-15-mins [^Date t1 ^Date t2]
  (pos? (.compareTo (.abs (Duration/between (.toInstant t1)
                                            (.toInstant t2)))
                    (Duration/ofMinutes 15))))

(defn diff-gt-1-hour [^Date t1 ^Date t2]
  (pos? (.compareTo (.abs (Duration/between (.toInstant t1)
                                            (.toInstant t2)))
                    (Duration/ofHours 1))));


That's the correct result. The problem is that I intermittendly get the same logic variables error mentioned in the documentation from the same query without changing anything. I have no idea what causes this.


I think using the original predicates makes a difference.


that is strange. 😕


that said, I'd be even more surprised if changing the predicates makes a difference - we don't/can't look inside the predicate in any way, so unless the predicate's non-deterministic I doubt it's that


Could it make a difference that the predicates are from a different ns?


I don't think so, although I did put them in example.time to check


@U09UV3WP6: have you managed to repro it on the example given? I've thrown all the cores I have at it and haven't seen it fail yet 😕


Yes, it was reproed on the example, but don'tr spend more time on it. I will get back to you if it happens again. Is there anything I can capture to make it easier to diagnose if it reoccurs?


thanks 🙂 there's debug-level logging on crux.query but that's very chatty, I wouldn't recommend turning that on unless you get a high hit-rate


oh, do you have the full error message? it should contain the offending clause


sorry, should have spotted that earlier


I did not capture the full errror mesage 😞 Will make sure to do so if it happens again.


thanks 🙂 would you mind if I anonymised the code and made a GH issue?


(if not, no worries, we'll keep a private copy)


You are welcome to anonymise the code for use in a GH issue.

🙏 3

Thanks. Is or using or-join underneath?


they're loosely related and use a lot of the same code, but unfortunately it's not quite just a special case of or-join


Ok, I was wondering since you mentioned or-join in the issue.


that's the common function, yep - while there's a lot in common, there's also a fair bit of branching in there based on whether it's an or or an or-join


OK, makes sense.


What is the meaning and proper use of the ? prefix in query variables?

Steven Deobald19:08:24

The ? prefix is a convention is other Datalog dbs. Not so much in Crux. You're welcome to use it, but it doesn't affect the logic vars one way or the other.

👍 4