Re: IOCP touching my OVERLAPPED after my Write has completed
- From: "anton bassov" <soviet_bloke@xxxxxxxxxxx>
- Date: 18 Aug 2006 03:21:45 -0700
Hi Alberto
When the request completes I uncommit the page
Are you doing it in IO completion routine?
Anton Bassov
Alberto Demichelis wrote:
Hi, I've recently posted about a crash I was experiencing in my server on
heavy load.
Recently I've rewritten part of my IOCP routines and added some extra
consistency checks. While doing this I've
realized that the my OVERLAPPED struct gets read by winsock after the IO
request has completed. That in my current implementation means that is
reading freed memory.
This is my scenario. I have a IO request pool implemented using VirtualAlloc.
I reserve few megs of virtual memory, every time I allocate a request I
commit a page and put all my IO structs in it.
When the request completes I uncommit the page.
The result is an access violation in WSAWriteTo() [Access violation reading
location 0x1185d004]. This happens when the IO request completes before
WSAWriteTo() returns.
Probably the same happens in my ReadFrom but apparently it never gets
triggered beacuse I deallocate my read requests in my main app thread after
processing.
Now I'm a bit lost, all the IOCP samples I found on the net use the same
pattern I use. When can I safely
release my OVERLAPPED and related buffers? I thought was 'on completion' by
apparently I'm wrong.
thanks for your time
Alberto
.
- Prev by Date: Re: is firewall installed
- Next by Date: Re: zwMapViewOfSection hooking
- Previous by thread: passing additional data when establishing a non-interactive authentication
- Next by thread: Re: IOCP touching my OVERLAPPED after my Write has completed
- Index(es):
Relevant Pages
|