Overview
| Artifact ID: | ecbda6b66f1503d41b03fc334edb37a5a6a735b5d767161d17234659b4498dcf |
|---|---|
| Ticket: | 54683c0e7bc3ae1e1edcd7603925ffd84c8cdc23
Creeping up on maximum O/S allowable file descriptors aborts |
| User & Date: | anonymous on 2018-11-18 01:38:55 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed 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 - foundin changed to: "8.6.9"
- is_private changed to: "0"
- login: "anonymous"
- priority changed to: "5 Medium"
- private_contact changed to: "16910d69b11045755316a073070779a85cd9218f"
- resolution changed to: "None"
- severity changed to: "Important"
- status changed to: "Open"
- submitter changed to: "anonymous"
- subsystem changed to: "37. File System"
- title changed to:
Creeping up on maximum O/S allowable file descriptors aborts
- type changed to: "Bug"