#18195 closed enhancement (fixed)
Unportable assumptions about SCHED_OTHER
Reported by: | wiz | Owned by: | vadz |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | base | Version: | 3.0.4 |
Keywords: | wxThread priority | Cc: | tk@… |
Blocked By: | Blocking: | ||
Patch: | yes |
Description
When starting filezilla, I'm always greeted by a dialog:
"Cannot get priority range for scheduling policy 0."
The filezilla bug report claims this is wxWidgets and in particular NetBSD's fault:
https://trac.filezilla-project.org/ticket/11690
So I filed a NetBSD bug report, only to be told it's an unportable assumption in wxWidgets:
https://gnats.netbsd.org/53495
Can you please improve the SCHED_OTHER handling so it behaves better on NetBSD?
Change History (6)
comment:1 Changed 2 years ago by vadz
- Component changed from wxGTK to base
- Keywords wxThread priority added
- Owner set to vadz
- Patch set
- Status changed from new to accepted
comment:2 Changed 2 years ago by wiz
- Cc tk@… added
I've tried this patch and filezilla does not display the popup for me any longer. Thank you!
P.S. Please also let us know about any other NetBSD-specific problems you
might encounter, we don't have many users under this OS nor do I use it
myself but I'd still like to support it.
Thank you for mentioning this, it was motivating me to report more issues.
comment:3 Changed 2 years ago by Vadim Zeitlin <vadim@…>
- Resolution set to fixed
- Status changed from accepted to closed
I'm afraid all this code dealing with setting the thread priority is rather broken, even under Linux, as SCHED_OTHER policy doesn't support priorities there neither (priority must be 0). I'm not sure what's the right way to fix it, but I think we need to change the policy to SCHED_FIFO or SCHED_RR (but which one?) to do it.
We can work around the problem you're seeing however by just skipping all this code entirely if thread priority is not changed explicitly, so I've just done this in this commit, please let me know if it helps.
Beyond this, for now I've just documented that SetPriority() is broken under Unix as I don't have time to do anything else, nor do I think that it's particularly important, to be honest.
Anyhow, please test my changes and if they solve the problem for you, we'll merge them. Thanks!
P.S. Please also let us know about any other NetBSD-specific problems you might encounter, we don't have many users under this OS nor do I use it myself but I'd still like to support it.