• bug in http / autoproxy?

    From saito@saitology9@gmail.com to comp.lang.tcl on Sun Jan 12 15:07:00 2025
    From Newsgroup: comp.lang.tcl

    I have a server that stops working now and then. It gets stuck somewhere
    and it does not respond to any requests anymore. This is a public facing server and it receives a lot of bad requests and attacks.

    With many puts statements sprinkled here and there, I have traced it
    down to this error message:

    TCL READ VARNAME
    can't read "state(sock)": no such element in array
    while executing
    "fileevent $state(sock) writable {}


    I don't have this line anywhere in my code. But they are present in http
    and autoproxy (with version info: http 2.9.1, autoproxy 1.7).

    In http, it occurs in http::reset and http::Connect. The one in
    http::reset is in a catch statement so it should be OK, but the one in http::Connect is not, and I suspect this is where the error comes from.

    In autoproxy, it occurs in ::autoproxy::tunnel_write, again without a catch.


    I am not really familiar with either of these packages. Putting a catch
    around these calls seems simple enough but I wonder if an expert can
    provide a more robust fix.




    --- Synchronet 3.20a-Linux NewsLink 1.114