Comments (8)
Is this behavior documented in GetCompletionPacketEx
? Unless external packets are sent via the IOCP handle this shouldn't be an issue, if my memory of the Windows I/O API serves me right.
Otherwise, #20 may fix this.
from wepoll.
The following Remark i found in: https://learn.microsoft.com/en-us/windows/win32/fileio/getqueuedcompletionstatusex-func#remarks
This function returns TRUE when at least one pending I/O is completed, but it is possible that one or more I/O operations failed. Note that it is up to the user of this function to check the list of returned entries in the lpCompletionPortEntries parameter to determine which of them correspond to any possible failed I/O operations by looking at the status contained in the lpOverlapped member in each OVERLAPPED_ENTRY.
It is not clearly stating that lpOverlapped can be NULL, when more than 0 completions have been dequed, however it is the behavior i experienced.
Is there a plan to merge #20 ?
from wepoll.
It's hard to believe a NULL lpOverlapped would just randomly show up on the completion port.
Are you using the async_io crate by any chance? Because they use a forked version of wepoll that deliberately people posts NULL packets to the completion port.
from wepoll.
libzmq
is written in C++ and doesn't use async-io
. In addition, there are no crates that depend on async-io
that have reported this bug as far as I know.
Are there any places in libzmq
where an IOCP packet is manually posted to the wepoll
port?
from wepoll.
libzmq
is written in C++ and doesn't useasync-io
.
The OP is reporting they are using Rust, so they could be using async-io.
In addition, there are no crates that depend on
async-io
that have reported this bug as far as I know.
Crates that depend on async-io depend on https://github.com/aclysma/wepoll-ffi which is a patched wepoll that supports this, so I wouldn't expect them to run into this issue in isolation. It only becomes a problem when they use async-io and then link with a "stock" wepoll.
Other than that I can't think of any other way this could ever happen. The latest version of wepoll has been out for more than 2.5 years, and it is used enough in production that if this were a wepoll bug, it would have come up a lot earlier. So there must be something particular to the OP's setup that causes this.
from wepoll.
In fact, looking at the stack trace, I'm pretty convinced this is the issue now:
from wepoll.
Thanks for the catch @piscisaureus! I've opened smol-rs/polling#85 and aclysma/wepoll-ffi#1 to address this
from wepoll.
As of version v2.6.0, polling
now no longer uses wepoll
. This issue can probably be closed.
from wepoll.
Related Issues (20)
- cmake is not work in cygwin, although in linux sometime. raise error with "Could not find CMAKE_ROOT !!!" HOT 1
- Some suggestions on CMake file HOT 1
- WEpoll doesn't compile on VS2017 anymore HOT 4
- Is it safe to remove all lock related codes ? HOT 3
- Windows XP support HOT 1
- epoll_ctl(epfd, EPOLL_CTL_ADD, m_fd, &ev) get an error HOT 2
- Add support for polling HANDLEs HOT 4
- Use NT reserve objects HOT 4
- epoll_ctl: Access Denied HOT 2
- Proxifier CI is borked HOT 1
- Custom build command for wepoll-sys failed HOT 3
- win x64 sdk:10.0.18362.0 + VS2019, Udp-svr EPOLLIN WSARecvFrom and Tcp-client EPOLLIN WSARecv() both return(-1) and errno(112), not work? HOT 6
- Only wake up one thread when use SO_REUSEADDR HOT 4
- compile wepoll failed on vs2010 HOT 1
- Is it possible to change the call to GetQueuedCompletionStatusEx so it is waiting in alertable? HOT 1
- Multi-Threading problems with epoll_wait HOT 1
- why use InterlockedAdd,but not _InterlockedExchangeAdd ? HOT 1
- `socket == 0` is wrong HOT 2
- Seems need to load ws2_32.dll manually
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wepoll.