Skip to content
Tcl Source Code History Of Ticket 54683c0e7bc3ae1e
Login

History Of Ticket 54683c0e7bc3ae1e

Artifacts Associated With Ticket 54683c0e7bc3ae1e

  1. Ticket change [ecbda6b66f] (rid 167536) by anonymous on 2018-11-18 01:38:55:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      Running the script below reliably causes an abort under Linux.  My supposition is that somewhere there's a limit on file descriptor storage, presumably sized by guess.  That limit is improperly enforced, and much wackiness ensues. I am confident that this is a rogue pointer or table index, because the behaviour changes when I compile with different -g options.
      
      # Cause Tcl (8.6.9, 8.7a1 etc) to SIGABORT
      # Sufficiently small values of $overhead abort immediately
      # Larger values don't abort, but once the number of connections exceed $maxfiles
      # connections to port 8091 occur, but are never presented to ::Connected, nor are they closed
      
      lassign $argv overhead
      
      if {$overhead eq ""} {
          set overhead 3
      }
      
      try {
          # calculate o/s max fd limit for Linux
          lindex [split [exec -- prlimit --output SOFT --nofile] \n] end
      } on ok {maxfiles} {
          # works for Linux    
      } on error {e eo} {
          set maxfiles 1024	;# I have no idea what value this is for your system
      }
      puts stderr maxfiles:$maxfiles
      
      set count [llength [chan names]]
      while {$count < $maxfiles-$overhead} {
          open [info script]
          incr count
      }
      puts Opened:[llength [chan names]]
      
      proc Connected {args} {
          puts stderr Connected:$args
      }
      
      ::socket -server ::Connected 8091
      
      vwait forever
      
    5. foundin initialized to: "8.6.9"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "16910d69b11045755316a073070779a85cd9218f"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "37. File System"
    15. title initialized to:
      Creeping up on maximum O/S allowable file descriptors aborts
      
    16. type initialized to: "Bug"
  2. Ticket change [3528281dd1] (rid 167579) by dgp on 2018-11-19 18:41:07:

    1. assignee changed to: "max"
    2. icomment:
      
      Reinhard, anything here you can look at?
      
    3. login: "dgp"
    4. mimetype: "text/plain"
  3. Ticket change [aabff163f2] (rid 257800) by serhiy.storchaka on 2026-10-12 19:51:12:

    1. icomment:
      Duplicate of [c6897e6e6a]: the select notifier overflows its fd_set for
      descriptors >= FD_SETSIZE (1024 on Linux). With a 2048 or 4096 descriptor limit
      8.6.17 aborts ("bit out of range 0 - FD_SETSIZE on fd_set"). 9.0 and 9.1 use
      epoll on Linux and accept the connection at any limit. The connections that are
      never presented when the limit is reached are accept() failing with EMFILE,
      also discussed there.
      
    2. login: "serhiy.storchaka"
    3. mimetype: "text/x-fossil-wiki"
    4. resolution changed to: "Duplicate"
    5. status changed to: "Closed"
  4. Ticket change [7400effcb0] (rid 259901) by serhiy.storchaka on 2026-10-22 17:19:25:

    1. closedate changed to: "2461326.327228808"
    2. closer changed to: "serhiy.storchaka"
    3. login: "serhiy.storchaka"