wine and asyncronous file i/o

Martin Fuchs martin-fuchs at gmx.net
Fri Nov 22 03:30:35 CST 2002


On Fri 22. November 2002 09:47, Martin Wilck wrote:
> This should work. The IO is currently not truly asynchronous, though -
> but with SleepEx() all should be fine.
>
> > Which debug switches wold be usefull to trace this?
>
> trace+file,trace+server

I've attached the interesting section of the resulting trace file.
Maybe you see, what's going on.
The programs reads a file with 21517 bytes length.
After fetching five blocks of 4096 bytes correctly, it reads the remaining 
1037 bytes. But it does not stop! It reads this last file block continuously.

-- 
Martin Fuchs
martin-fuchs at gmx.net
-------------- next part --------------
trace:file:CreateFileW L"/trace2" GENERIC_READ FILE_SHARE_READ OPEN_EXISTING  attributes 0x48000000
Warning: L"/trace2" not accessible from a configured DOS drive
08073d90: create_file( access=80000000, inherit=0, sharing=00000001, create=3, attrs=48000000, drive_type=4, filename="/home/martin/trace2" )
08073d90: create_file() = 0 { handle=0x58 }
trace:file:CreateFileW returning 0x58
trace:file:FILE_ReadFileEx file 0x58 to buf 0x406df648 num 4096 0x406e1650 func 0x58055c80
08073d90: get_handle_fd( handle=0x58, access=80000000 )
08073d90: *fd* 0x58 -> 23
08073d90: get_handle_fd() = 0 { fd=-1, type=1, flags=1 }
08073d90: set_handle_info( handle=0x58, flags=0, mask=0, fd=10 )
08073d90: set_handle_info() = 0 { old_flags=0, cur_fd=10 }
08073d90: register_async( handle=0x58, type=1, overlapped=0x403d1558, count=4096, status=00000103 )
08073d90: register_async() = 0
08073d90: select( flags=6, cookie=0x406df4c4, sec=0, usec=0, handles={0x18} )
08073d90: select() = USER_APC
08073d90: get_apc( alertable=1 )
08073d90: get_apc() = 0 { func=(nil), type=4, args={0x403d1558,0x101} }
trace:file:FILE_AsyncReadService 0x406e1650 0x406df648
trace:file:FILE_AsyncReadService read 4096 more bytes 4096/4096 so far
08073d90: register_async( handle=0x58, type=1, overlapped=0x403d1558, count=0, status=00000000 )
08073d90: register_async() = 0
08073d90: queue_apc( handle=0xfffffffe, user=1, func=0x40086870, param=0x403d1558 )
08073d90: queue_apc() = 0
08073d90: get_apc( alertable=1 )
08073d90: get_apc() = 0 { func=0x40086870, type=1, args={0x403d1558} }
trace:file:fileio_call_completion_func data: 0x403d1558
08073d90: get_apc( alertable=1 )
08073d90: get_apc() = 0 { func=(nil), type=0, args={} }
trace:file:FILE_ReadFileEx file 0x58 to buf 0x406e0648 num 4096 0x406e1650 func 0x58055c80
08073d90: get_handle_fd( handle=0x58, access=80000000 )
08073d90: get_handle_fd() = 0 { fd=10, type=1, flags=1 }
08073d90: register_async( handle=0x58, type=1, overlapped=0x403d1558, count=4096, status=00000103 )
08073d90: register_async() = 0
08073d90: select( flags=6, cookie=0x406df450, sec=0, usec=0, handles={0x18} )
08073d90: select() = USER_APC
08073d90: get_apc( alertable=1 )
08073d90: get_apc() = 0 { func=(nil), type=4, args={0x403d1558,0x101} }
trace:file:FILE_AsyncReadService 0x406e1650 0x406e0648
trace:file:FILE_AsyncReadService read 4096 more bytes 4096/4096 so far
08073d90: register_async( handle=0x58, type=1, overlapped=0x403d1558, count=0, status=00000000 )
08073d90: register_async() = 0
08073d90: queue_apc( handle=0xfffffffe, user=1, func=0x40086870, param=0x403d1558 )
08073d90: queue_apc() = 0
08073d90: get_apc( alertable=1 )
08073d90: get_apc() = 0 { func=0x40086870, type=1, args={0x403d1558} }
trace:file:fileio_call_completion_func data: 0x403d1558
08073d90: get_apc( alertable=1 )
08073d90: get_apc() = 0 { func=(nil), type=0, args={} }
trace:file:FILE_ReadFileEx file 0x58 to buf 0x406df648 num 4096 0x406e1650 func 0x58055c80
08073d90: get_handle_fd( handle=0x58, access=80000000 )
08073d90: get_handle_fd() = 0 { fd=10, type=1, flags=1 }
08073d90: register_async( handle=0x58, type=1, overlapped=0x403d1558, count=4096, status=00000103 )
08073d90: register_async() = 0
08073d90: select( flags=6, cookie=0x406df450, sec=0, usec=0, handles={0x18} )
08073d90: select() = USER_APC
08073d90: get_apc( alertable=1 )
08073d90: get_apc() = 0 { func=(nil), type=4, args={0x403d1558,0x101} }
trace:file:FILE_AsyncReadService 0x406e1650 0x406df648
trace:file:FILE_AsyncReadService read 4096 more bytes 4096/4096 so far
08073d90: register_async( handle=0x58, type=1, overlapped=0x403d1558, count=0, status=00000000 )
08073d90: register_async() = 0
08073d90: queue_apc( handle=0xfffffffe, user=1, func=0x40086870, param=0x403d1558 )
08073d90: queue_apc() = 0
08073d90: get_apc( alertable=1 )
08073d90: get_apc() = 0 { func=0x40086870, type=1, args={0x403d1558} }
trace:file:fileio_call_completion_func data: 0x403d1558
08073d90: get_apc( alertable=1 )
08073d90: get_apc() = 0 { func=(nil), type=0, args={} }
trace:file:FILE_ReadFileEx file 0x58 to buf 0x406e0648 num 4096 0x406e1650 func 0x58055c80
08073d90: get_handle_fd( handle=0x58, access=80000000 )
08073d90: get_handle_fd() = 0 { fd=10, type=1, flags=1 }
08073d90: register_async( handle=0x58, type=1, overlapped=0x403d1558, count=4096, status=00000103 )
08073d90: register_async() = 0
08073d90: select( flags=6, cookie=0x406df450, sec=0, usec=0, handles={0x18} )
08073d90: select() = USER_APC
08073d90: get_apc( alertable=1 )
08073d90: get_apc() = 0 { func=(nil), type=4, args={0x403d1558,0x101} }
trace:file:FILE_AsyncReadService 0x406e1650 0x406e0648
trace:file:FILE_AsyncReadService read 4096 more bytes 4096/4096 so far
08073d90: register_async( handle=0x58, type=1, overlapped=0x403d1558, count=0, status=00000000 )
08073d90: register_async() = 0
08073d90: queue_apc( handle=0xfffffffe, user=1, func=0x40086870, param=0x403d1558 )
08073d90: queue_apc() = 0
08073d90: get_apc( alertable=1 )
08073d90: get_apc() = 0 { func=0x40086870, type=1, args={0x403d1558} }
trace:file:fileio_call_completion_func data: 0x403d1558
08073d90: get_apc( alertable=1 )
08073d90: get_apc() = 0 { func=(nil), type=0, args={} }
trace:file:FILE_ReadFileEx file 0x58 to buf 0x406df648 num 4096 0x406e1650 func 0x58055c80
08073d90: get_handle_fd( handle=0x58, access=80000000 )
08073d90: get_handle_fd() = 0 { fd=10, type=1, flags=1 }
08073d90: register_async( handle=0x58, type=1, overlapped=0x403d1558, count=4096, status=00000103 )
08073d90: register_async() = 0
08073d90: select( flags=6, cookie=0x406df450, sec=0, usec=0, handles={0x18} )
08073d90: select() = USER_APC
08073d90: get_apc( alertable=1 )
08073d90: get_apc() = 0 { func=(nil), type=4, args={0x403d1558,0x101} }
trace:file:FILE_AsyncReadService 0x406e1650 0x406df648
trace:file:FILE_AsyncReadService read 4096 more bytes 4096/4096 so far
08073d90: register_async( handle=0x58, type=1, overlapped=0x403d1558, count=0, status=00000000 )
08073d90: register_async() = 0
08073d90: queue_apc( handle=0xfffffffe, user=1, func=0x40086870, param=0x403d1558 )
08073d90: queue_apc() = 0
08073d90: get_apc( alertable=1 )
08073d90: get_apc() = 0 { func=0x40086870, type=1, args={0x403d1558} }
trace:file:fileio_call_completion_func data: 0x403d1558
08073d90: get_apc( alertable=1 )
08073d90: get_apc() = 0 { func=(nil), type=0, args={} }
trace:file:FILE_ReadFileEx file 0x58 to buf 0x406e0648 num 4096 0x406e1650 func 0x58055c80
08073d90: get_handle_fd( handle=0x58, access=80000000 )
08073d90: get_handle_fd() = 0 { fd=10, type=1, flags=1 }
08073d90: register_async( handle=0x58, type=1, overlapped=0x403d1558, count=4096, status=00000103 )
08073d90: register_async() = 0
08073d90: select( flags=6, cookie=0x406df450, sec=0, usec=0, handles={0x18} )
08073d90: select() = USER_APC
08073d90: get_apc( alertable=1 )
08073d90: get_apc() = 0 { func=(nil), type=4, args={0x403d1558,0x101} }
trace:file:FILE_AsyncReadService 0x406e1650 0x406e0648
trace:file:FILE_AsyncReadService read 1037 more bytes 1037/4096 so far
08073d90: register_async( handle=0x58, type=1, overlapped=0x403d1558, count=3059, status=00000103 )
08073d90: register_async() = 0
08073d90: get_apc( alertable=1 )
08073d90: get_apc() = 0 { func=(nil), type=4, args={0x403d1558,0x101} }
trace:file:FILE_AsyncReadService 0x406e1650 0x406e0648
trace:file:FILE_AsyncReadService read 0 more bytes 1037/4096 so far
08073d90: register_async( handle=0x58, type=1, overlapped=0x403d1558, count=3059, status=00000103 )
08073d90: register_async() = 0
08073d90: get_apc( alertable=1 )
08073d90: get_apc() = 0 { func=(nil), type=4, args={0x403d1558,0x101} }
trace:file:FILE_AsyncReadService 0x406e1650 0x406e0648
trace:file:FILE_AsyncReadService read 0 more bytes 1037/4096 so far
08073d90: register_async( handle=0x58, type=1, overlapped=0x403d1558, count=3059, status=00000103 )
08073d90: register_async() = 0
08073d90: get_apc( alertable=1 )
08073d90: get_apc() = 0 { func=(nil), type=4, args={0x403d1558,0x101} }
trace:file:FILE_AsyncReadService 0x406e1650 0x406e0648
trace:file:FILE_AsyncReadService read 0 more bytes 1037/4096 so far
08073d90: register_async( handle=0x58, type=1, overlapped=0x403d1558, count=3059, status=00000103 )
08073d90: register_async() = 0
08073d90: get_apc( alertable=1 )
08073d90: get_apc() = 0 { func=(nil), type=4, args={0x403d1558,0x101} }
trace:file:FILE_AsyncReadService 0x406e1650 0x406e0648
trace:file:FILE_AsyncReadService read 0 more bytes 1037/4096 so far
08073d90: register_async( handle=0x58, type=1, overlapped=0x403d1558, count=3059, status=00000103 )
08073d90: register_async() = 0
08073d90: get_apc( alertable=1 )
08073d90: get_apc() = 0 { func=(nil), type=4, args={0x403d1558,0x101} }
trace:file:FILE_AsyncReadService 0x406e1650 0x406e0648
trace:file:FILE_AsyncReadService read 0 more bytes 1037/4096 so far
08073d90: register_async( handle=0x58, type=1, overlapped=0x403d1558, count=3059, status=00000103 )
08073d90: register_async() = 0
08073d90: get_apc( alertable=1 )
08073d90: get_apc() = 0 { func=(nil), type=4, args={0x403d1558,0x101} }


More information about the wine-devel mailing list