Unable to start a server on Win10.
Context
Odin: dev-2023-11-nightly:ef5eb4b6 OS: Windows 10 Home Basic (version: 22H2), build 19045.3636 CPU: AMD Ryzen 5 3600 6-Core Processor RAM: 32712 MiB Odin-http: Commit f3c5d1acda30a319ce468aa59696635bf78c6f02 Firewall rules for Inbound are set to Any for the exe. Network type is public for both rule & network.
Expected Behavior
Server should run & I assume there shouldn't be any events running right at the start.
Current Behavior
I think there's an event, or at least Windows thinks there is. Windows doesn't populate events with it but entries_removed get set to 1.
Exists on nbio_windows.odin(99) runtime assertion, because the event is still the default set by Odin.
Steps to Reproduce
I'm not sure it can be reproduced outside of my system but: Build & run any project that makes a server. (Used the examples minimal & complete todo so.)
Notes
It works on my other system which is Windows 11 Home Basic (version: 22H2), build 22621.2428.
Using netstat -a -f -q -o -b there's nothing else using, nor listing to the default endpoint. Nor an old ghost/hanging process bound to it.
I could start a server before nbio was introduced.
I will have a go at reproducing the issue, what happens if you turn the assert into an if condition that continues the loop if it is nil? If that fixes it and I can't reproduce it myself it can be the way to "fix", maybe I'll add a log.warn to inform it happened too
Doing that, it now exists on the assert above it nbio_windows.odin(95). Commenting out that assert makes it work. But when closing says many times that the same connection is closing & it sometimes leaks
Ok I put in the "fix" I talked about, I can't reproduce it unfortunately, please let me know if everything else works, if not, I will see if I can get on Windows 10 somehow and try reproduce there. I also did a few searches but couldn't find anything.
Will leave this open cause it is not technically fixed if you are ok with that.
I'm fine with leaving it open. I'll check if it's working later. I'll too see if I can reproduce it on another win10 system, when I can.
Server's working and serving on the og system, all be it being flooded with 950k warnings & a 230MB log file. It's not too much of an issue. I'm not doing anything with servers rn.
Oh well thats not great either, I imagined it was only the first even that would be nil, not a bunch of subsequent ones, It seems like it just returns from the kernel with however many events that were completed even when 0, which is not how we expect it with how we are calling it.
I will make the warning only log once.
On my older system below it's the same deal. Server starts, serves and has the same issue.
Odin: dev-2023-11-nightly:ef5eb4b6 OS: Windows 10 Home Basic (version: 22H2), build 19045.3693 CPU: AMD FX-9830P RADEON R7, 12 COMPUTE CORES 4C+8G RAM: 7116 MiB Odin-http: commit aacea28e5678a473f4836c4ff08288129f695afc
hey. same issue
Processor: AMD Ryzen 7 3700X 8-Core Processor, 3593 Mhz, 8 Core(s), 16 Logical Processor(s) Odin: dev-2025-01-nightly:2aae4cf odin-http: 41a5cb2cf5a1d2be0a19806661f01c7f1ee133be
hacked/Fixed it on my own; in the current state, the io_pending will decrement to negative amount and tick never waits.
*although, looking more into it, it appears wait_ms is always set to zero by virtue of accepting connections, and then something to do with flush_timeouts, which I'm quite ignorant about.
Seems like entries_removed should just never be > 0 if win.GetQueuedCompletionStatusEx returns false. Alas, so it is
Letting you know I got:
[WARN ] --- [2025-03-02 20:21:56] [nbio_windows.odin:80:_tick()] You have ran into a strange error some users have ran into on Windows 10 but I can't reproduce, I try to recover from the error but please chime in at https://github.com/laytan/odin-http/issues/34
Let me know if I can be of any help