nextcloud / recognize

👁 👂 Smart media tagging for Nextcloud: recognizes faces, objects, landscapes, music genres
https://apps.nextcloud.com/apps/recognize
GNU Affero General Public License v3.0
564 stars 45 forks source link

Classify hung/blocked probably because of empty file. #992

Closed tdltdl closed 1 year ago

tdltdl commented 1 year ago

Which version of recognize are you using?

5.0.1

Enabled Modes

Object recognition, Face recognition, Video recognition, Music recognition

TensorFlow mode

Normal mode

Downstream App

Photos App

Which Nextcloud version do you have installed?

27.1.2

Which Operating system do you have installed?

Debian - Docker official

Which database are you running Nextcloud on?

MariaDB

Which Docker container are you using to run Nextcloud? (if applicable)

No response

How much RAM does your server have?

12G

What processor Architecture does your CPU have?

X86_64

Describe the Bug

Recognize was hanging (always at the same point when running occ recognize:classify: generating preview of 1325 with dimension 1024 Copying 1325 preview to tempfolder

Note this error message did not told me which file was causing the issue - which would be a nice addition)

I looked at my source file system (it is an external storage SMB). I did a find for files of file 0 and deleted them.

After I did that deletion, and re-run the classify, it reported generating preview of 1325 with dimension 1024 Copying 1325 preview to tempfolder Could not find file

but continued happily after.

Expected Behavior

Recognize should ignore corrupted/empty files

To Reproduce

Upload a 0 byte jpg image and try to classify

Debug log

No response

github-actions[bot] commented 1 year ago

Hello :wave:

Thank you for taking the time to open this issue with recognize. I know it's frustrating when software causes problems. You have made the right choice to come here and open an issue to make sure your problem gets looked at and if possible solved. I try to answer all issues and if possible fix all bugs here, but it sometimes takes a while until I get to it. Until then, please be patient. Note also that GitHub is a place where people meet to make software better together. Nobody here is under any obligation to help you, solve your problems or deliver on any expectations or demands you may have, but if enough people come together we can collaborate to make this software better. For everyone. Thus, if you can, you could also look at other issues to see whether you can help other people with your knowledge and experience. If you have coding experience it would also be awesome if you could step up to dive into the code and try to fix the odd bug yourself. Everyone will be thankful for extra helping hands! One last word: If you feel, at any point, like you need to vent, this is not the place for it; you can go to the forum, to twitter or somewhere else. But this is a technical issue tracker, so please make sure to focus on the tech and keep your opinions to yourself. (Also see our Code of Conduct. Really.)

I look forward to working with you on this issue Cheers :blue_heart:

geez0x1 commented 1 year ago

Let me help this thread along by posting a bit of output from cat nextcloud.log | grep -i recognize:

{"reqId":"somestring","level":3,"time":"2023-11-01T16:37:25+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"filesize(): stat failed for /nextcloud_data/user/files/somedirectory/somefile.png at /var/www/html/apps/recognize/lib/Classifiers/Classifier.php#92","userAgent":"--","version":"27.1.3.2","data":{"app":"PHP"}}

I'm not sure it actually causes the classification itself to be stopped - I get those errors repeatedly if there are multiple zero-byte files during a run (suggesting files are otherwise processed fine). Running the classify command in a CLI will run until the end, saying 'no more files to be classified' (more than once, for a reason).

(I do have other issues such as missing many faces from the result - still looking into that and will report)