[Mono-devel-list] Trouble with HttpWebResponse
Paolo Molaro
lupus at ximian.com
Tue Mar 4 05:41:39 EST 2003
On 03/03/03 Gonzalo Paniagua Javier wrote:
> El lun, 03 de 03 de 2003 a las 19:54, Peter Magnusson escribió:
> > At first I thougt I had some trouble with System.IO.StreamReader.ReadToEnd
> > but it seems that there is trouble elsewhere..
> > The test described below works fine with Microsoft .NET SDK and the csc
> > compiler but it doesn't work with mono, at least not in SuSE 8.1 Pro.
>
> I just tried your program and it works here (debian sid/x86).
>
> At first, I thought it was failing because after a couple of seconds I
> saw no network traffic and I interrupted it.
>
> Then I run it again and waited a few seconds more and...woot!
I straced it and found that it gets the data from the server in about 3
seconds (just like lynx -dump) and then gooes into a loop:
[pid 31923] 09:53:16.038282 nanosleep({0, 99524000}, <unfinished ...>
[pid 31920] 09:53:16.038313 nanosleep({0, 99524000}, <unfinished ...>
[pid 31923] 09:53:16.147281 <... nanosleep resumed> NULL) = 0
[pid 31920] 09:53:16.147309 <... nanosleep resumed> NULL) = 0
[pid 31923] 09:53:16.147374 rt_sigprocmask(SIG_SETMASK, [RTMIN], <unfinished ...>
[pid 31920] 09:53:16.147427 rt_sigprocmask(SIG_SETMASK, [RTMIN], <unfinished ...>
[pid 31923] 09:53:16.147465 <... rt_sigprocmask resumed> NULL, 8) = 0
[pid 31920] 09:53:16.147489 <... rt_sigprocmask resumed> NULL, 8) = 0
[pid 31923] 09:53:16.147524 gettimeofday( <unfinished ...>
[pid 31920] 09:53:16.147552 gettimeofday( <unfinished ...>
[pid 31923] 09:53:16.147580 <... gettimeofday resumed> {1046767996, 147568}, NULL) = 0
[pid 31920] 09:53:16.147620 <... gettimeofday resumed> {1046767996, 147569}, NULL) = 0
[pid 31923] 09:53:16.147695 rt_sigprocmask(SIG_BLOCK, NULL, <unfinished ...>
[pid 31920] 09:53:16.147726 rt_sigprocmask(SIG_BLOCK, NULL, <unfinished ...>
[pid 31923] 09:53:16.147755 <... rt_sigprocmask resumed> [RTMIN], 8) = 0
[pid 31920] 09:53:16.147787 <... rt_sigprocmask resumed> [RTMIN], 8) = 0
[pid 31923] 09:53:16.147825 rt_sigprocmask(SIG_UNBLOCK, [RTMIN], <unfinished ...>
[pid 31920] 09:53:16.147863 rt_sigprocmask(SIG_UNBLOCK, [RTMIN], <unfinished ...>
[pid 31923] 09:53:16.147901 <... rt_sigprocmask resumed> [RTMIN], 8) = 0
[pid 31920] 09:53:16.147932 <... rt_sigprocmask resumed> [RTMIN], 8) = 0
[pid 31923] 09:53:16.148017 gettimeofday( <unfinished ...>
[pid 31920] 09:53:16.148045 gettimeofday( <unfinished ...>
[pid 31923] 09:53:16.148074 <... gettimeofday resumed> {1046767996, 148061}, NULL) = 0
[pid 31920] 09:53:16.148101 <... gettimeofday resumed> {1046767996, 148062}, NULL) = 0
and gets back to the nanosleep.
Calls to nanosleep with a NULL second argument are in:
io-layer/handles.c: nanosleep (&sleepytime, NULL);
io-layer/mono-mutex.c: nanosleep (&sleepytime, NULL);
io-layer/shared.c: nanosleep (&sleepytime, NULL);
The loop continues for about 16 seconds. Note that threads 31920 and
31923 are not the threads downloading the file (31924).
The loop terminates with:
[pid 31920] 09:53:16.258170 nanosleep({0, 99476000}, <unfinished ...>
[pid 31924] 09:53:16.355116 <... recvfrom resumed> "", 102650, 0x4000, NULL, NULL) = 0
[pid 31924] 09:53:16.356942 getpid() = 31924
[pid 31924] 09:53:16.357153 kill(31920, SIGPWR) = 0
[pid 31920] 09:53:16.357203 <... nanosleep resumed> 0) = -1 EINTR (Interrupted system call)
[pid 31924] 09:53:16.357272 kill(31923, SIGPWR <unfinished ...>
[pid 31920] 09:53:16.357313 --- SIGPWR (Power failure) @ 0 (0) ---
[pid 31924] 09:53:16.357417 <... kill resumed> ) = 0
The recvfrom started at:
[pid 31924] 09:53:00.078878 recvfrom(11, <unfinished ...>
Hope this helps.
lupus
--
-----------------------------------------------------------------
lupus at debian.org debian/rules
lupus at ximian.com Monkeys do it better
More information about the Mono-devel-list
mailing list