In Saxon-SA, when large documents are processed in streaming mode using the saxon:read-once option, certain run-time errors can cause a process to be left hanging (occupying memory but consuming no CPU cycles).
This happens when (a) the failure occurs in the "reading" thread (the one that parses and filters the large document), and (b) the failure is a java "error" rather than an "exception" - for example an OutOfMemoryError. It can be triggered for example by reading a second large document within the predicate of the select expression in the xsl:copy-of instruction.
This is Saxon-SA code only. A fix (module com.saxonica.extra.SequenceExchanger) has been produced and will be included in a patch release.