Garbage collector errors

Hey! New to IPFS, trying to understand everything.
We have a S3-backed IPFS node and some time ago we noticed that each time we’re trying to run an ipfs repo gc, it shows us errors like this:

Error: could not retrieve links for QmQ1L8ysYwBoyvSR26eVWzTYkWXdTw9yrqRQwm9QNsJdBh: merkledag: not found
Error: could not retrieve links for QmcJ9s5J5GMBf4xULByVZiC6K734nsoLaCcQNuwK7BYhVZ: merkledag: not found
Error: could not retrieve links for bafybeiaogy4xrbvaqm76jl5jnuqmw6olg2v4s5gaxyra34xnsny53z7hee: merkledag: not found
Error: could not retrieve links for bafybeibo322elrbd43fs4y3rjus5quksrymni4v3cz3j7kcgkf7nggugaa: merkledag: not found
Error: garbage collection aborted: could not retrieve some links
Error: encountered errors during gc run

Seems like some files were incorrectly removed or broken links, or something like that.
So, the questions are:

  1. How to find the root cause of the error?
  2. How to correctly remove them, so the gc can be run?
  1. Are you using ---enable-gc with ipfs daemon command ?

Yes, I do.

root 692 25.3 12.0 2053472 485288 ? Ssl May22 332:57 /usr/local/bin/ipfs daemon --enable-gc --enable-namesys-pubsub

Does anyone, have any ideas on how to fix that?

This error occurs when daemon is not running. Run the daemon first in 1 ssh session using command ipfs daemon only. Then minimize this ssh session and run ipfs repo gc in new ssh session. check whether gc get done. After that close both ssh sessions and run ipfs daemon using your complete command in fresh ssh session.

Nope, the same errors.

what is daemon status? Running or failed?

Yes, the daemon is running.

There is similer issue mentioned here.