comment
authorJoey Hess <joeyh@joeyh.name>
Fri, 2 Jun 2023 17:11:24 +0000 (13:11 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 2 Jun 2023 17:11:24 +0000 (13:11 -0400)
doc/bugs/importtree_spends_hours_reading_cidsdb/comment_10_a2724ab85bc91fba3bb6e55d2b1e3878._comment [new file with mode: 0644]

diff --git a/doc/bugs/importtree_spends_hours_reading_cidsdb/comment_10_a2724ab85bc91fba3bb6e55d2b1e3878._comment b/doc/bugs/importtree_spends_hours_reading_cidsdb/comment_10_a2724ab85bc91fba3bb6e55d2b1e3878._comment
new file mode 100644 (file)
index 0000000..d8ca882
--- /dev/null
@@ -0,0 +1,38 @@
+[[!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
+"""]]