nextcloud / nextcloud/recognize
"Checking CPU" never completes on FreeBSD
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 699
- Forks
- 68
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 5
Description
Describe the bug
"Checking CPU" wheel just keeps spinning on FreeBSD
To Reproduce
Steps to reproduce the behavior:
- Go to Recognize admin settings
- Watch the wheel spin round and round
Expected behavior
It finishes detecting the CPU type and features
Recognize (please complete the following information):
- JS-only mode: [e.g. Yes/No]
- Enabled modes: [e.g. object detection, face recognition]
Server (please complete the following information):
- Nextcloud: 25.0.0
- OS: (FreeBSD Jail in) FreeBSD virtual machine (on Linux KVM Host)
- RAM: 16GiB
- Processor Architecture: amd64 (QEMU Virtual CPU version 2.5+)
Additional context
Relevant error message:
Error: file_get_contents(/proc/cpuinfo): Failed to open stream: No such file or directory at /usr/local/www/nextcloud/apps/recognize/lib/Controller/AdminController.php#79
/proc/cpuinfo is a Linux thing and does not exist on FreeBSD. The serverinfo admin page of FreeBSD used to have the same problem, but now it works properly, you may want to check how they are determining CPU information now. But generally on FreeBSD you would use sysctl hw or sysctl hw.whatever.
But I would assume this is checking for AVX(2) anyway and pointless, since FreeBSD needs to use the JS implementation anyway.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at lib/Controller/AdminController.php#79 and inspect the CPU detection path that reads /proc/cpuinfo. Compare the FreeBSD handling described for Nextcloud's serverinfo admin page and the suggested sysctl hw approach. Reproduce on FreeBSD and verify that the CPU check completes without the missing-file error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100