--- /dev/null
+[[!comment format=mdwn
+ username="joey"
+ subject="""Re: comment 8"""
+ date="2023-06-02T16:49:35Z"
+ content="""
+What's the last thing output before it enters this state? I know it's at some
+point after the last "import filename... ok" but I haven't a clue what it
+could be.
+
+For what it's worth, I straced the importing stage, and there are no reads
+from the database FDs at all. Presumably sqlite realizes its empty and
+doesn't need to keep re-reading to respond to the queries done in that
+stage. Each file imported took 113 syscalls (there are small files, so only
+1 syscall needed to read the content).
+
+I also attached a strace immediately after it finished the importing stage,
+and straced all the way to the end (importing 1000 files). There was not a
+single `pread64`. FD #14 was already closed at that point, and the cidsdb
+was never accessed again.
+
+Which matches my reading of the code that it never accesses the cidsdb after
+that point. Which makes what you're seeing very strange indeed.
+
+Something is missing to let me reproduce this. Can you reproduce it with
+the script I posted in comment #1?
+
+----
+
+Also straced an entire import of 1000 files, and this is all the preads
+from fd 14 (there were a similar amount with 3 other fds)
+
+ joey@darkstar:~/tmp>egrep 'pread64.14' /tmp/strace
+ pread64(14, "", 8, 512) = 0
+ pread64(14, "", 100, 0) = 0
+ pread64(14, "", 16, 24) = 0
+ pread64(14, "\0\0\0\1\0\0\0\1\0\0\0\0\0\0\0\0", 16, 24) = 16
+ pread64(14, "SQLite format 3\0\20\0\2\2\0@ \0\0\0\1\0\0\0\1"..., 4096, 0) = 4096
+"""]]