eXist-db / exist-xqts-runner

W3C XQTS driver for eXist-db
GNU Lesser General Public License v3.0
5 stars 6 forks source link

[BUG] Running some test sets from sbt (at least) hangs.. #22

Open alanpaxton opened 2 years ago

alanpaxton commented 2 years ago

Describe the bug

Expected behavior sbt "run --test-set map-find" should also run to completion.

To Reproduce Build from source following the instructions. sbt "run --test-set map-find" The behaviour is the same on Mac and on Ubuntu.

My initial guess, given what I have observed, is that something in the test set description is causing the runner to choke. I only have the information described in this ticket to suggest that.

Context (please always complete the following information):

Additional context

adamretter commented 2 years ago

I have tried to reproduce this but found that both

  1. sbt "run --xqts-version HEAD --test-set map-find"
  2. sbt "run --xqts-version HEAD --test-set fn-round"

Hang at the same stage with the message:

08 Jun 2022 08:57:12,994 [XQTSRunnerSystem-akka.actor.default-dispatcher-8] INFO  (slf4j.scala [info]:159) - Parsing XQTS Catalog: work/qt3tests-master/catalog.xml...

As a workaround, if however I launch sbt in interactive mode by just running sbt and then within sbt run:

sbt:exist-xqts-runner> run --xqts-version HEAD --test-set map-find

I find that both of these do run to completion. So this is very confusing why sbt runs them in one way but not in another - I will have to enquire with the Scala sbt folks...

adamretter commented 2 years ago

Trying to debug this by using sbt -J-Xdebug -J-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 "run --xqts-version HEAD --test-set map-find" and connecting the remote debugger from IntelliJ.

With this my application starts and logs some messages, but it doesn't get as far as it does before it hangs when running sbt "run --xqts-version HEAD --test-set map-find", and then sbt just exits back to the console with a 0 exit code.

This feels like an sbt bug...

adamretter commented 2 years ago

Looks like this is actually caused by a deadlock in eXist-db - https://github.com/eXist-db/exist/issues/4438