Strange Ants problem: win32-recv fails using LineLevelTiming
SamJost
Posts: 3
I'm using Ants Profiler 7.4 Standard to profile a .NET executable (mixed c#/c++/clr application) and encounter a very strange problem:
When I start the problem standalone it works as it should.
When I start it using Ants and use Sample method-level timings it works, too.
But when I use Line-level and method-level timings I get an error when using tcp/ip-Connections regarding this win32 api:
int PASCAL FAR recv (
__in SOCKET s,
__out_bcount_part(len, return) __out_data_source(NETWORK) char FAR * buf,
__in int len,
__in int flags);
When some legacy part of the app uses this win32 api recv the call will fail with the error: WSAENOTSOCK 10038
Socket operation on nonsocket.
An operation was attempted on something that is not a socket. Either the socket handle parameter did not reference a valid socket, or for select, a member of an fd_set was not valid.
So for some strange reason line-level timing messes up my application communication.
Is this a known problem and a workaround?
I just upgraded Ants to the most current version 7.4 without any changes (the problem also existed on version 6). The system is x64 Windows 7.
Kind regards,
Sam
When I start the problem standalone it works as it should.
When I start it using Ants and use Sample method-level timings it works, too.
But when I use Line-level and method-level timings I get an error when using tcp/ip-Connections regarding this win32 api:
int PASCAL FAR recv (
__in SOCKET s,
__out_bcount_part(len, return) __out_data_source(NETWORK) char FAR * buf,
__in int len,
__in int flags);
When some legacy part of the app uses this win32 api recv the call will fail with the error: WSAENOTSOCK 10038
Socket operation on nonsocket.
An operation was attempted on something that is not a socket. Either the socket handle parameter did not reference a valid socket, or for select, a member of an fd_set was not valid.
So for some strange reason line-level timing messes up my application communication.
Is this a known problem and a workaround?
I just upgraded Ants to the most current version 7.4 without any changes (the problem also existed on version 6). The system is x64 Windows 7.
Kind regards,
Sam
Comments
Does it help by locking out this part of the code to mulitple threads (if only to test)?
So I can lock this part out (exclude it) from profiling? I found no option in the "new session"-dialogue to achieve this.
The recv should block until it receives data instead of throwing an error, so it might have to do something with the problem. I just don't see how to work around this.