Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 4f8206141ba4266b271b11be49e46c40b62f572a
Ticket: 3486554fffffffffffffffffffffffffffffffff
FD_SET macros must be used
User & Date: ferrieux on 2012-02-10 14:55:28
Changes

  1. assignee changed to: "das"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    This report is here to document a past fix, but is nonetheless important as a reference for people encountering the associated bugs in older versions, since these bugs have not been reported here.
    
    Prior to Check-in [e496f9ef50] by Daniel A. Steffen,  2009-04-10 20:46:21,
    
    * unix/tclUnixChan.c: TclUnixWaitForFile(): use FD_* macros * macosx/tclMacOSXNotify.c:to manipulate select masks (Cassoff). Bug 1960647
    
    there were dangerously non-portable shift manipulations in TclUnixWaitForFile(). These have been properly replaced by the clean FD_SET et al. macros by Daniel.
    
    Here is the behavior, observed independently by me on 8.4.13 and by evilotto on 8.4.12, both on x84_64 Linux:
    
    A fileevent readable on a high descriptor (above 32) repeatedly fires, but the [read]s done on it don't consume any bytes, leading to a busyloop known as "select bomb". The failing bitshifts misdirected the setting of the select() bits.
    
    Attached scripts, courtesy of evilotto, expose the behavior.
    Also, the problem is likely to occur under load when using [package require httpd] asynchronously (many simultaneous requests must be active).
    
  4. foundin changed to: "obsolete: 8.4.19"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "ferrieux"
  10. subsystem changed to: "01. Notifier"
  11. title changed to: "FD_SET macros must be used"
  12. type changed to: "Bug"