Skip to content
Tcl Source Code History Of Ticket 219400
Login

History Of Ticket 219400

Artifacts Associated With Ticket 219400

  1. Ticket change [d936a142fb] (rid 107571) by nobody on 2000-10-26 05:12:27:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 6282 Bug
      Version: 8.3.1
      SubmitDate: '2000-09-18'
      LastModified: '2000-09-20'
      Severity: SER
      Status: UnAssn
      Submitter: techsupp
      ChangedBy: welch
      OS: Linux
      OSVersion: Linux bugger 2.2.17 #1 Fri Sep 15 02:22:10 EEST 2000 i586 unknow
      Machine: Various Pentiums
      FixedDate: '2000-10-25'
      ClosedDate: '2000-10-25'
      
      
      Name:
      Kristoffer Lawson
      
      ReproducibleScript:
      ===============  Server:
      
      variable firstread 1
      
      proc accept {sock addr port} {
          fconfigure $sock -buffering none
          fconfigure $sock -blocking 0
          fileevent $sock r [list stuff $sock]
      }
      
      proc stuff {sock} {
          fileevent $sock r {}    ;# this was in the original code but with them
                                  ;# it's very hard to reproduce!
                                  ;# sudo nice -n -20 for sender should do the
                                  ;# job... ;)
      
          if {[eof $sock]} {
                      puts "***EOF***"
                      exit
          }
          puts -nonewline stdout [read $sock]
      
          variable firstread
              variable delay
      
          if {$firstread} {
              set delay 0
              after 2000 {set delay 1}
              vwait delay
              ## send response
              puts $sock " "
              set firstread 0
          }
      
          fileevent $sock r [list stuff $sock]
      }
      
      socket -server accept 40010
      vwait forever
      
      =================== Client:
      
      set addr [lindex $argv 0]
      
      ## called when data from remote end arrives.
      proc cb {} {
              variable sock
      
              read $sock
      
              puts $sock "<callback firstsend>"
              puts $sock "<callback secondsend>"
      
              for {set i 0} {$i < 9000} {incr i} {
                      puts $sock "test32432 test3211 $i"
              }
      
              puts $sock "<callback lastnormalsend>"
              puts $sock "all data ok"
      
              close $sock
              exit
      }
      
      ## Open & configure
      variable sock [socket $addr 40010]
      fconfigure $sock -blocking 0
      fconfigure $sock -buffering none
      
      fileevent $sock r cb
      # cb
      
      puts $sock "start"
      
      vwait forever
      
      ObservedBehavior:
      I am now fairly convinced this is a bug in Tcl8.3.1. When the client is run on a fast machine and
      especially if it is niced to a high priority tha server receives an EOF before all the data is sent. This also
      only seems to happen when the server has responded with some data first.
      
      The reason for my suspicions is that the http package seems to be doing exactly the same with Tcl 8.3.1.
      Ie. I might try to receive a large image but a chunk from the end is missing. When I do exactly the same
      operation with Tcl8.2 or 8.0 I have no problems. Of course, this might be a bug introduced into
      http but I couldn't see anything in the code that looked like it would cause that kind of behaviour and as we
      have similar behaviour with scripts like the above I believe there really is something fishy in Tcl's IO
      (specifically with sockets). 
      
      This is rather awkward for us as we are building large systems around Tcl which quite heavily use the IO
      facilities. Of course, this might have been fixed in 8.3.2 (I haven't been able to test that yet), but as I
      couldn't find this bug listed specifically then I thought it better to report.
      
      DesiredBehavior:
      In the given script all of the data should be sent and outputted to the screen before the EOF notification.
      
      
      
      I can repeat this with both 8.3.1 and 8.3.2 on Linux, but only
      in the loopback case where the client and server are on the same host.
      It works fine on Solaris loopback, and between Solaris and Linux boxes.
      However, I had to comment-out the 
          fileevent $sock r {}    ;# this was in the original code but with them
                                  ;# it's very hard to reproduce!
                                  ;# sudo nice -n -20 for sender should do the
                                  ;# job... ;)
      call in the server's fileevent handler.  Without that it works - the
      nice'ing doesn't have any effect.  So, it could be possible that setting
      fileevents is perturbing the system somehow.
       
      -- 09/20/2000 welch
      
    4. foundin initialized to: "obsolete: 8.3.1"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "69. Other"
    10. title initialized to:
      EOF sent/received too early or possible bug in http package 
      
    11. type initialized to: "Bug"
  2. Ticket change [60b6f24bd2] (rid 116043) by dkf on 2001-01-25 17:11:52:

    1. subsystem changed to: "62. (unused)"
  3. Ticket change [3db90b44a4] (rid 121139) by dkf on 2001-02-01 03:32:11:

    1. icomment:
      (Maybe put into one of the Channel* categories instead?)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. subsystem changed to: "29. http Package"
    5. username: "dkf"
  4. Ticket change [b68d1f3bc4] (rid 125440) by hobbs on 2001-09-06 08:41:34:

    1. assignee changed to: "andreas_kupries"
    2. subsystem changed to: "25. Channel System"
  5. Ticket change [a1e3b4f72d] (rid 109804) by andreas_kupries on 2001-09-08 02:03:26:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Extracted the inlined code, attaching it to the report
      as proper files now.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  6. Add attachment "219400.server" [0be899fade] (rid 114082) by andreas_kupries on 2001-09-08 02:03:26.

  7. Ticket change [0b11e0f292] (rid 113920) by andreas_kupries on 2001-09-08 02:03:27:

    1. icomment:
      
      
      File Added - 10494: 219400.server
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  8. Ticket change [b1c7c84819] (rid 98214) by andreas_kupries on 2001-09-08 02:03:53:

    1. icomment:
      
      
      File Added - 10495: 219400.client
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  9. Add attachment "219400.client" [aaaa2054bc] (rid 100965) by andreas_kupries on 2001-09-08 02:03:53.

  10. Ticket change [03fbf21535] (rid 119916) by andreas_kupries on 2001-09-08 02:44:22:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      I tried to verify this using the current 8.3.3 from the CVS 
      and 8.4cvs on a RedHat Linux 2.2.18, gclibc 2.1.3. I tried 
      nice'd and not, with the fileevent at the beginning of the 
      handler commented out and not, with stdout redirected and 
      not. I never got the early EOF.
      
      Kristoffer Lawson is <[email protected]>.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  11. Ticket change [40d91dc1c9] (rid 116080) by andreas_kupries on 2001-09-08 03:31:27:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Trying 8.3.2 now ... Can't get the error for this either.
      
      Diffing generic/tclIO.c shows changes, but none which
      should have an impact on this. There are no changes 
      in "generic/tclNotify.c" at all. Same for the unix
      notifier "unix/tclUnixNotfy.c", i.e. no changes at all.
      
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  12. Ticket change [92b23685b4] (rid 120813) by andreas_kupries on 2001-09-08 03:38:35:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Talking with Kristoffer showed that the problem was not 
      reproducible for older linux systems (They had Debian 
      2.2.something) or IRIX. 
      
      This suggests an OS problem, although we can't be sure.
      
      Decision: This item stays open for now, but at lowest 
      priority.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. priority changed to: "1 Zero"
    5. username: "andreas_kupries"
  13. Ticket change [fa3c994a19] (rid 91834) by andreas_kupries on 2006-03-15 05:55:59:

    1. closedate changed to: "2006-03-14T22:55:59"
    2. closer changed to: "andreas_kupries"
    3. icomment:
      Logged In: YES 
      user_id=75003
      
      Closing this one, it is so old, likely out of date.
      
      
    4. login: "andreas_kupries"
    5. mimetype: "text/plain"
    6. resolution changed to: "Out of Date"
    7. status changed to: "Pending"
    8. username: "andreas_kupries"
  14. Ticket change [dc23e92e07] (rid 108088) by sf-robot on 2006-03-29 10:22:05:

    1. closedate changed to: "2006-03-29T03:22:05"
    2. closer changed to: "sf-robot"
    3. icomment:
      Logged In: YES 
      user_id=1312539
      
      This Tracker item was closed automatically by the system. It was
      previously set to a Pending status, and the original submitter
      did not respond within 14 days (the time period specified by
      the administrator of this Tracker).
      
      
    4. login: "sf-robot"
    5. mimetype: "text/plain"
    6. status changed to: "Deleted"
    7. username: "sf-robot"