huh TIL OpenSSL only supports negotiating a contiguous range of protocol versions
you can't say "TLS 1.0 or TLS 1.2 but not TLS 1.1"
"In clients, when a protocol version is disabled without disabling all previous protocol versions, the effect is to also disable all subsequent protocol versions."
hawkowl
haha
well that's interesting
itamar has quit
radix has quit
glyph
idnar: hey so
idnar: spoiler alert: openssl is bad
specifically, you can adopt this general principle when interacting with it: if its interface *implies* something about its underlying operation, that probably has no bearing on its actual underlying operation
idnar
glyph: don't worry I already saw that episode
moshez
glyph: can't wait until reimplement ssl in Python
glyph
moshez: ashfall's working on it
as is runciter
moshez
glyph: I know :)
Matthew[m] joined the channel
radix joined the channel
stryx` joined the channel
oberstet_ joined the channel
glyph
moshez: hey do you want to fix some memory leaks
moshez
in general, yes
specifically, I have an ingress op I need to leave for in 3
glyph
moshez: see the mailing list when you have some time :)
glyph: i don't think they turned off DTLS, but they did turn off heartbeat
glyph
runciter: that's the one
tomprince
glyph: I think that leak is due to LogBeginner._initialBuffer.
glyph
tomprince: ZOMG
tomprince: you are a genius
tomprince: did you use a tool to arrive at that answer?
tomprince
I used a combination of heappy and gc.get_objects/get_referrers and instrumenting the example.
Although I first got distracted by the reactor collecting up to 50 cancelled DelayedCalls.
Once I reconfirmed that it was Logger instances, I looked at the namespaces of uncollected Loggers, which where ~all twisted.internet.endpoints.OneShotFactory
Then looking at the referrers of those instances, it all looked like log message dicts.
Then I tried starting to log to /dev/null, and the memory flat-lined.
runciter
sorry, back
tomprince: you are fast :)
hawkowl
is this because people arent starting their loggers?
tomprince
glyph: Is log_logger actually valuable information? It seems like it is redundent with log_source and log_namespace.
hawkowl
there was a ML post about some diagnosing a memory leak but it was really because they never actually started their loggers :D
runciter
the example isn't leaking memory for me?
or does it take a while?
tomprince
I needed to change the example so it connected to itself, and also make an initial connection.
runciter
i've got a twisted web server running on 8080 and netcat running in a loop
hm
asdf
isnt the initial logger supposed to keep only a bounded amount of messages :o
runciter
heh
tomprince: sorry to be a pain, but can you share the version that manifests the leak?
tomprince
runciter: Well, it isn't an unbounded leak (as asdf said, the initial logger is bounded), but it does use ~double the amount of memory it would otherwise use.
watching the memory usage in top shows that it stays relatively constant between connections
yeah
but it also doesn't show a meaningful diff, which is probably just user error
runciter has quit
glyph
tomprince: starting logging killed the leak for you?
tomprince
Yeah.
Well, it was a bounded leak anyway (~535M vs ~232M steady state)
glyph
tomprince: Well, this is reassuring. connectProtocol doesn't leak any more or less than using the endpoint directly?
tomprince
I didn't try with the endpoint directly. Let me se.
glyph: One difference is that you can share a factory if you use an endpoint directly (which with the recursive calling my modified example has) so there is only a single starting message, rather than a fresh one for every connection.