4 Feb 16:55
Fix port leaking after controlling_process(Port, self())
Ricardo Catalinas Jiménez <jimenezrick <at> gmail.com>
2012-02-04 15:55:10 GMT
2012-02-04 15:55:10 GMT
I spotted the same issue that Max Lapshin reported in: http://erlang.org/pipermail/erlang-questions/2011-April/057944.html Add case to handle the situation when someone call {gen_tcp,gen_udp}:controlling_process(Port, self()). Also improve spec and doc from gen_udp and gen_sctp for controlling_process/2. To reproduce the issue, open an UDP port: 4> {ok,Port} = gen_udp:open(9000, [binary]). {ok,#Port<0.587>} 5> gen_udp:controlling_process(Port, self()). ok Simulate error: 6> 1=2. ** exception error: no match of right hand side value 2 Here is the leak: 7> inet:i(). Port Module Recv Sent Owner Local Address Foreign Address State Type 581 inet_udp 0 0 <0.31.0> *:cslistener *:* BOUND DGRAM ok Please fetch:(Continue reading)
hn> there was a release here and we did not really think about this for a
hn> while.
Ja, that branch didn't work so well on the R15B release. There were
a couple of not-so-nice conflicts, due to a late addition of an Opts
property list to file:read_file_info() and a couple other file.erl
functions.
hn> So now im looking at my branches and there are no Dtrace here.
Well, nothing new in a while. Sorry about that. I've been working on
other stuff for the past while....
hn> Do you need assistance from us with something? there was talk about
hn> loader support?
Last I heard, there was going to be some hackery done by the OTP team.
That hackery would load one of two versions of prim_file.beam, depending
on whether or not DTrace support was available.
I didn't hear anything about that hackery being done, or started, so I
figured y'all were busy working on other stuff. So I didn't spend much
time on fixing the merge conflict. To be honest, except for you, nobody
elseuntil today (09 Feb 2012) had asked me about an update for DTrace and
R15B. {sigh}
hn> Let me know what version of the branch you want us to test and how/if we
hn> may be of assistance so that we can add that to our plans.
So, I got blessed time from $DAYJOB to finish work on the DTrace stuff.
I've pushed two new branches to git://github.com/slfritchie/otp.git this
evening:
* dtrace-review4-OTP_R15B, which is DTrace work rebased & conflicts
fixed, based upon the "OTP_R15B" tag from the OTP team's GitHub
repo.
* dtrace-review4-upstream-maint, which is the same rebased & fixed
stuff, based upon the 09 Feb 2012 "maint" branch of the OTP repo.
I haven't run all of the test suite yet, only the "kernel" portion. And
only on OS X. Using code based on the "OTP_R15B" tag, I see 6 test
failures. Using the "dtrace-review4-upstream-maint" branch, I see 7 test
failures (code_SUITE, big_boot_embedded fails with a timeout).
So, I can do more testing on OS X, Linux, and Solaris boxes and letting
the whole test suite run overnight.
It'd be nice to know if/when y'all were thinking of doing the code loader
hacks. I also haven't been paying much attention to any rumors of if/when
R15B01 might be frozen.
-Scott
_______________________________________________
erlang-patches mailing list
erlang-patches <at> erlang.org
RSS Feed