nextcloud / nextcloud/recognize

"Checking CPU" never completes on FreeBSD

Open
#431 8 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug freebsd priority: normal
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:

  1. Go to Recognize admin settings
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.