Corinna, On Mon, Jan 13, 2003 at 03:55:17PM +0100, Corinna Vinschen wrote: > On Mon, Jan 13, 2003 at 09:36:24AM -0500, Jason Tishler wrote: > > 160 37333219 [main] vsftpd 2232 fixup_mmaps_after_fork: ReadProcessMemory failed >for MAP_PRIVATE address 0xB40000, Win32 error 299 > > > > I will try to dig deeper to determine why ReadProcessMemory() is > > failing with ERROR_PARTIAL_COPY (i.e., 299), but any help or > > pointers will be greatly appreciated. > > If you can figure out why that happens, I'd really appreciate a simple > testcase. Please compare the above with the strace output generated > by mmap(), probably you will find a discrepancy like the address in > the above strace output is not inside of a mapped block.
I haven't tried the above yet. See below... > It's also a big difference if the mmap is mapped anonymously or to a > file since the mmap() code behaves pretty different. vsFTPd defaults to anonymous mappings under Cygwin. However, I forced it to try file based mappings on Friday as a workaround, but this failed in the same way. After reading the vsFTPd *and* Cygwin code some more, it is clear why the behavior is the same. vsFTPd uses /dev/zero if anonymous mappings are not available and Cygwin treats mappings to /dev/zero the same as anonymous mappings. > Another way would be to remove MAP_PRIVATE from the mmap() call and > try again. MAP_PRIVATE is somewhat problematic on Windows hosts, > unfortunately. Replacing MAP_PRIVATE with MAP_SHARED worked around the mmap()/fork() problem. Is this a reasonable accommodation? Or, should I try to get MAP_PRIVATE to work? Thanks, Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/