Fork me on GitHub
#xtdb
<
2021-08-23
>
tatut10:08:08

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?

tatut10:08:32

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

refset10:08:11

Hi @U11SJ6Q0K am I right in thinking you are using OSX? It looks ~identical to https://github.com/juxt/crux/issues/1564 and https://github.com/juxt/crux/issues/894#issuecomment-891181861 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)

tatut10:08:45

yeah, intel mac and openjdk 15

tatut10:08:35

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

refset10:08:42

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:

tatut12:08:36

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

👍 2
🙏 2
🙂 2
tatut12:08:56

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

👌 2
mac15:08:01

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.

mac16:08:36

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.)

mac16:08:18

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

🙇 2
Steven Deobald19:08:01

Awesome. Thanks!

mac05:08:44

Your more than welcome. Should I ping @U050V1N74 ?

jarohen07:08:55

consider me pinged 🙂 will test out the repro this morning

mac08:08:46

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.

mac07:08:22

@U050V1N74 Do you need anything further from me?

jarohen08:08:49

@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?

jarohen08:08:51

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))));

mac08:08:06

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.

mac08:08:46

I think using the original predicates makes a difference.

jarohen09:08:43

that is strange. 😕

jarohen09:08:23

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

mac09:08:36

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

jarohen09:08:47

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

jarohen09:08:32

@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 😕

mac09:08:54

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?

jarohen09:08:06

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

jarohen09:08:39

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

jarohen09:08:58

sorry, should have spotted that earlier

mac09:08:54

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

jarohen09:08:41

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

jarohen09:08:59

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

mac09:08:41

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

🙏 3
mac09:08:03

Thanks. Is or using or-join underneath?

jarohen09:08:41

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

mac09:08:25

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

jarohen09:08:53

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

mac10:08:12

OK, makes sense.

sheluchin19:08:55

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