www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/09/19/03:47:35

From: sos AT prospect DOT com DOT ru (Sergey Okhapkin)
Subject: Problem with select()
19 Sep 1998 03:47:35 -0700 :
Message-ID: <01BDE3DC.595A43C0.cygnus.cygwin32.developers@sos>
To: "'cygwin32-developers AT cygnus DOT com'" <cygwin32-developers AT cygnus DOT com>

Hi!

I have a strange problem with wget-1.5.2 running a new dll. Select call (to 
check for write and except on socket) succeeded in select thread, but fails 
in poll later with WSAENOTSOCK error (one more NT bug?-). Here is an 
extract from tracefile, note marked lines:

[main] wget 1000 (0) cygwin32_select: 4, 0x0, 0x242EC20, 0x242EC18, 
0x242EC10
[main] wget 1000 (0) hinfo::select_write: /dev/tcp fd 3
[main] wget 1000 (0) hinfo::select_except: /dev/tcp fd 3
>[main] wget 1000 (0) start_thread_socket: adding socket 0x100
[main] wget 1000 (0) start_thread_socket: stuff_start 0x242EB2C, exitsock 
148
[main] wget 1000 (0) select_stuff::wait: n 2, ms 900000
[select_socket] wget 1000 (0) thread_socket: stuff_start 0xA044E04
>[select_socket] wget 1000 (0) thread_socket: Win32 select returned 1
[select_socket] wget 1000 (0) thread_socket: s 0xA031880, testing fd 3 
(/dev/tcp)
[select_socket] wget 1000 (0) thread_socket: write_ready
[main] wget 1000 (0) select_stuff::wait: woke up.  wait_ret 1.  verifying
[main] wget 1000 (0) select_stuff::wait: gotone 1
>[main] wget 1000 (0) poll_socket: polling socket 0x100
[main] wget 1000 (0) poll_socket: adding write fd_set /dev/tcp, fd 3
[main] wget 1000 (0) poll_socket: adding except fd_set /dev/tcp, fd 3
>[main] wget 1000 (0) poll_socket: WINSOCK_SELECT returned -1
[main] wget 1000 (0) poll_socket: error 10038
[main] wget 1000 (0) select_stuff::poll: returning 0
[main] wget 1000 (0) select_stuff::~select_stuff: calling cleanup routines
[main] wget 1000 (0) socket_cleanup: si 0xA041DF0 si->thread 0x158
[main] wget 1000 (0) select_stuff::~select_stuff: deleting select records

I run NTS4.0 SP3 with MS winsock proxy client installed. To fix a problem I 
made the following changes in select() code:

select.cc	(poll_socket): do not call win32 select if the socked is checked
		already in select thread, debug printf added.
		(start_thread_socket): debug printfs added.
		(socket_cleanup): delete si when it no longer needed.

 

--
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia


begin 600 select.diff
M+2TM("]W:6YS=7 O<V5L96-T+F-C"49R:2!397 @,3$@,#4Z,C$Z-#4@,3DY
M. HK*RL@<V5L96-T+F-C"5-A="!397 @,3D@,3,Z,3DZ,#(@,3DY. I 0" M
M-S,S+#D@*S<S.2PQ,R! 0"!S=&%T:6,@:6YT"B!P;VQL7W-O8VME=" H<V5L
M96-T7W)E8V]R9" J;64L(&9D7W-E=" J<F5A9&9D<RP AT 9F1?<V5T("IW<FET
M969D<RP*( D@("!F9%]S970@*F5X8V5P=&9D<RD*('L**R @:68@*&UE+3YR
M96%D7W)E861Y('Q\(&UE+3YW<FET95]R96%D>2!\?"!M92T^97AC97!T7W)E
M861Y*0HK(" @(')E='5R;B!S971?8FET<R H;64L(')E861F9',L('=R:71E
M9F1S+"!E>&-E<'1F9',I.PHK"B @('=I;G-O8VM?9F1?<V5T('=S7W)E861F
M9',L('=S7W=R:71E9F1S+"!W<U]E>&-E<'1F9',["B @('-T<G5C="!T:6UE
M=F%L('1V(#T@>S!].PH@("!(04Y$3$4@:" ](&UE+3YF:"T^9V5T7VAA;F1L
M92 H*3L**R @<V5L96-T7W!R:6YT9B H(G!O;&QI;F<@<V]C:V5T(#!X)7 AT B
M+"!H*3L*(" @5TE.4T]#2U]&1%]:15)/("@F=W-?<F5A9&9D<RD["B @(%=)
M3E-/0TM?1D1?6D523R H)G=S7W=R:71E9F1S*3L*(" @5TE.4T]#2U]&1%]:
M15)/("@F=W-?97AC97!T9F1S*3L*0$ @+3 AT S-"PV("LX-#0L-R! 0"!S=&%R
M=%]T:')E861?<V]C:V5T("AS96QE8W1?<F5C;W)D("IM92P@"B @(" @:68@
M*',M/G-T87)T=7 @/3T@<W1A<G1?=&AR96%D7W-O8VME="D*(" @(" @('L*
M( E(04Y$3$4@:" ](',M/F9H+3YG971?:&%N9&QE("@I.PHK"7-E;&5C=%]P
M<FEN=&8@*")A9&1I;F<@<V]C:V5T(#!X)7 AT B+"!H*3L*( EI9B H<RT^<F5A
M9%]S96QE8W1E9"D*( D@(%=)3E-/0TM?1D1?4T54("AH+" F<VDM/G)E861F
M9',I.PH@"6EF("AS+3YW<FET95]S96QE8W1E9"D*0$ @+3 AT U,BPW("LX-C,L
M-R! 0"!S=&%R=%]T:')E861?<V]C:V5T("AS96QE8W1?<F5C;W)D("IM92P@
M"B @(%=)3E-/0TM?1D1?4T54("@H2$%.1$Q%*7-I+3YE>&ET<V]C:RP@)G-I
M+3YE>&-E<'1F9',I.PH@("!S='5F9BT^9&5V:6-E7W-P96-I9FEC6T9(1$56
M3BA&2%]33T-+150I72 ]("AV;VED("HI('-I.PH@("!S:2T^<W1A<G0@/2 F
M<W1U9F8M/G-T87)T.PHM("!S96QE8W1?<')I;G1F("@B<W1U9F9?<W1A<G0@
M)7 B+" F<W1U9F8M/G-T87)T*3L**R @<V5L96-T7W!R:6YT9B H(G-T=69F
M7W-T87)T("5P+"!E>&ET<V]C:R E>"(L("9S='5F9BT^<W1A<G0L('-I+3YE
M>&ET<V]C:RD["B @('-I+3YT:')E860@/2!M92T^:" ](&UA:V5T:')E860@
M*'1H<F5A9%]S;V-K970L("A,4%9/240I<VDL(# L"B )"0D)(" B<V5L96-T
M7W-O8VME="(I.PH@("!R971U<FX@(2%M92T^:#L*0$ @+3 AT V-RPY("LX-S AT L
M.2! 0"!S;V-K971?8VQE86YU<" H<V5L96-T7W)E8V]R9" J;64L('-E;&5C
M"B @(" @>PH@(" @(" @*"II7V-L;W-E<V]C:V5T*2 H<VDM/F5X:71S;V-K
M*3L*(" @(" @(%=A:71&;W)3:6YG;&5/8FIE8W0@*'-I+3YT:')E860L($E.
M1DE.251%*3L*+2 @(" @(&1E;&5T92!S:3L*(" @(" @('-T=69F+3YD979I
M8V5?<W!E8VEF:6-;1DA$159.*$9(7U-/0TM%5"E=(#T AT 3E5,3#L*(" @(" @
M($-L;W-E2&%N9&QE("AS:2T^=&AR96%D*3L**R @(" @(&1E;&5T92!S:3L*
,(" @("!]"B!]"B *
`
end

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019