Artifacts Associated With Ticket 734138ded8cca190
Ticket change [282c1a24d4] (rid 138300) by oehhar on 2014-05-30 13:43:53:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized to:
<h1>Symptom</h1> Test socket-14.11.1 fails on Windows and on Linux with a localhost resolving to ::1 and 127.0.0.1 <h1>Issue</h1> When a background flush (for example invoked by a reported writable fileevent) fails, the error code is saved. If this socket is closed, the error should show up. <h1>Demo</h1> <h2>Correct behaviour</h2> Version [9b3b3adf47] (before commit of [bug-13d3af3ad5]) showed the IMHO correct behaviour. Here is a log in a windows tclsh: <verbatim> % set h [socket -async localhost 30001] sock01AC6220 % fconfigure $h -blocking 0 % puts $h Hi % flush $h % fileevent $h writable {set ::x 1} % vwait x % close $h socket is not connected % </verbatim> What happens: * in the first row, a socket connect on an unopened port is started (which would take on a syncroneous connect up to 10 seconds on windows to report "connection refused" so the following commands are executed while connectiong). * then it is set to non-blocking and a write is issued. * The drivers send routine is called and returns with "EWOULDBLOCK" * fileevent and vwait wait until the connect fails. The fileevent reporting of the driver invokes, that the tclIO will call send on the driver which will report "socket is not connected" posix error code. This is stored by tclIO * close is executed. The socket is correctly closed and the stored error is shown to the user. <h2>Trunk behaviour</h2> With the current trunk, one gets: <verbatim> % set h [socket -async localhost 30001] sock01A26150 % fconfigure $h -blocking 0 % puts $h Hi % flush $h % fileevent $h writable {set ::x 1} % vwait x % close $h % </verbatim> So, the error does not show up. - foundin initialized to: "trunk"
- is_private initialized to: "0"
- login: "oehhar"
- priority initialized to: "5 Medium"
- private_contact initialized to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "oehhar"
- subsystem initialized to: "25. Channel System"
- title initialized to:
close does not report error which was saved by a failing background flush (socket-14.11.1)
- type initialized to: "Bug"
Ticket change [8ccf0f491f] (rid 138301) by oehhar on 2014-05-30 13:44:27:
- assignee changed to: "dgp"
- login: "oehhar"
- mimetype: "text/plain"
Ticket change [69df83f8f8] (rid 138302) by dgp on 2014-05-30 15:23:08:
- icomment:
It would be most helpful if the demo of the issue can be made into a portable test we can put in the test suite to track progress fixing and not re-breaking the issue.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [d62ca48e6e] (rid 138303) by dgp on 2014-05-30 15:26:41:
- icomment:
Either post it here, or commit to the bug-13d3af3ad5 branch.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [67e38698e8] (rid 138305) by oehhar on 2014-05-30 19:14:08:
- icomment:
The upper mentioned test "socket-14.11.1" is portable and shows the issue on Windows and Unix. The only condition for Unix is, that localhost must resolve to ::1 and 127.0.0.1 which is normally the case. Nevertheless this is not the case for (my) CentOS where etc/hosts is: <verbatim> 127.0.0.1 localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6 </verbatim> The "6"s should not be there which breaks the test for my CentOS. Reinhard already creates a test condition for that and forgot to apply it to all relevant tests. He may do that soon.
- login: "oehhar"
- mimetype: "text/x-fossil-wiki"
- username: "oehhar"
- icomment:
Ticket change [1ef6d7eea0] (rid 138315) by dgp on 2014-05-31 13:55:54:
- icomment:
The test failure socket-14.11.1 appears rooted in the checkin http://core.tcl.tk/tcl/info/84f992ce503821fd94f25acc28186e53a586afa4
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [1eadbc6554] (rid 138316) by dgp on 2014-05-31 14:13:33:
- icomment: "see new branch bug-734138ded8"
- login: "dgp"
- mimetype: "text/plain"
Ticket change [3684d81b4e] (rid 138319) by oehhar on 2014-06-01 20:00:24:
- icomment:
Unfortunately, the branch does not build for me. The error is: <verbatim> cl -nologo -c -W3 -DUNICODE -D_UNICODE -QI0f -W3 -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE -Fp.\Release\tcl_ThreadedDynamic\ -O2 -Ot -Oi -Op -Gs -YX -MD -I"C:\test\tcl-bug-13d3af3ad5_ipv6_win\win\..\win" -I"C:\test\tcl-bug-13d3af3ad5_ipv6_win\win\..\generic" -I"C:\test\tcl-bug-13d3af3ad5_ipv6_win\win\..\libtommath" -DTCL_TOMMATH -DMP_PREC=4 -Dinline=__inline -DHAVE_ZLIB=1 -DTCL_CFGVAL_ENCODING=\"cp1252\" -DSTDC_HEADERS -DTCL_THREADS=1 -DUSE_THREAD_ALLOC=1 -DNDEBUG -DTCL_CFG_OPTIMIZED -DNO_STRTOI64 -DBUILD_tcl -Fo.\Release\tcl_ThreadedDynamic\ @C:\Users\oehhar\AppData\Local\Temp\nm45B7.tmp tclStubInit.c C:\test\tcl-bug-13d3af3ad5_ipv6_win\win\..\generic\tclStubInit.c(596) : error C2152: 'initializing' : pointers to functions with different attributes C:\test\tcl-bug-13d3af3ad5_ipv6_win\win\..\generic\tclStubInit.c(597) : error C2152: 'initializing' : pointers to functions with different attributes C:\test\tcl-bug-13d3af3ad5_ipv6_win\win\..\generic\tclStubInit.c(601) : error C2152: 'initializing' : pointers to functions with different attributes NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop. </verbatim> Perhaps, I may retry tomorrow with more time. - login: "oehhar"
- mimetype: "text/x-fossil-wiki"
- username: "oehhar"
- icomment:
Ticket change [9d32f0f882] (rid 138320) by oehhar on 2014-06-02 07:47:00:
- icomment:
Branch [bug-734138ded8] checkin [5f5b6fc4b2]: Test on Win Vista 32 bit with ms-vc6: * Manual test descriped above ok * All socket tests ok * chan-io-1.9 fails I don't know what was wrong yesterday, now it compiles very well. Sorry, Harald
- login: "oehhar"
- mimetype: "text/x-fossil-wiki"
- username: "oehhar"
- icomment:
Ticket change [56118b8202] (rid 138343) by dgp on 2014-06-03 12:44:30:
- icomment: "see branch dgp-async-socket for another attempt."
- login: "dgp"
- mimetype: "text/plain"
Ticket change [4143bb7575] (rid 138348) by dgp on 2014-06-03 17:47:51:
- closedate changed to: "2456812.24157193"
- closer changed to: "dgp"
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"