Occ files:scan: non-existing file is locked exception

I am attempting a bulk file import:

  • I cp -r into the files directory of user foo
  • I change ownership of those files: chown -R http:http
  • From the web root, I run sudo -u http php occ files:scan foo

After some hours, I get this:

Exception during scan: "files/6ed446de9247b384cd4971ec9e8b61ca" is locked
#0 /ubos/http/sites/s551cbd4c906198d0e8b8972a3b30bc4fa8c5a0f1/nextcloud/lib/private/Files/Storage/Common.php(714): OC\Lock\DBLockingProvider->acquireLock('files/6ed446de9...', 1)
#1 /ubos/http/sites/s551cbd4c906198d0e8b8972a3b30bc4fa8c5a0f1/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(593): OC\Files\Storage\Common->acquireLock('Pictures/organi...', 1, Object(OC\Lock\DBLockingProvider))

If I look for a file whose name contains 6ed446de9247b384cd4971ec9e8b61ca, I come up empty. What might this mean? The import seems to have succeeded, although I’m not certain because there’s a ton of files.

Running the scan a second time passes without errors.