fix: Crash before starting on OpenBSD #1421
No reviewers
Labels
No labels
Blocked
Bug
Cherry-picking
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
To-Merge
Wont fix
old/ci/cd
old/rust
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
continuwuation/continuwuity!1421
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "katie/continuwuity:openbsd"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This calculates the max number of senders using core count only when we actually know how many cores there are.
core_affinity doesn't return any cores on OpenBSD, so otherwise we try to
clamp(1, 0), which blows up when the bounds are asserted.A better fix would be adding OpenBSD support to that crate, but that seems hard and still only fixes one unsupported platform.
I also thought about updating
available_parallelisminstead to never return zero, but the cause of the issue is the odd "conservative" bound and how it's used, so this seemed like a better place to put it. That function is used in other places as well, and I didn't want to introduce weird side effects.mainbranch, and the branch is named something other thanmain.myself, if applicable. This includes ensuring code compiles.
Looks good, I just think the news fragment could be clearer
@ -0,0 +1 @@Fixed a crash on startup when running on OpenBSD. Contributed by @katie.This is quite generic and will lose context when it makes its way into the changelog. I'd suggest describing the specific conditions that caused the crash.
416d0b57c9d558700b48d558700b48efd879fcd8