From b43fb4923f6465cd099bbcb5a88c35cc85ffb02e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 Jun 2023 13:11:24 -0400 Subject: [PATCH] comment --- ..._a2724ab85bc91fba3bb6e55d2b1e3878._comment | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 doc/bugs/importtree_spends_hours_reading_cidsdb/comment_10_a2724ab85bc91fba3bb6e55d2b1e3878._comment 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 index 0000000000..d8ca8820a6 --- /dev/null +++ b/doc/bugs/importtree_spends_hours_reading_cidsdb/comment_10_a2724ab85bc91fba3bb6e55d2b1e3878._comment @@ -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 +"""]] -- 2.30.2