New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ssl:getstat/1 and ssl:getstat/2 #987
Conversation
Patch has passed first testings and has been assigned to be reviewed I am a script, I am not human |
Have not had time to analyse this yet but currently tests are failing. This should be the most relevant part of the log: *** CT Error Notification 2016-03-22 04:30:59.955 *** Full error description and stacktrace *** User 2016-03-22 04:30:59.955 *** === Ended at 2016-03-22 04:30:59 |
For use in ssl:getstat/{1,2}.
These functions call getstat on the underlying TCP socket. The only way to do this before now was to use a hack, either by looking inside the #sslsocket{} record directly, or by not using the SSL listen/accept functions and upgrading from a TCP socket that is kept around for the purpose of calling getstat later on.
@IngelaAndin I can't reproduce. Considering the code, what happens is probably a timing issue, so I introduced two |
Patch has passed first testings and has been assigned to be reviewed I am a script, I am not human |
This PR has been stalled in waiting for my rewrite of ssl to use gen_statem. I included in a first version into our builds yesterday, and it will be merged for 19-RC1. I know that it will take care of some timing issues and hopefully these issues too. |
This wasn't merged for 19-RC1 (or wasn't in the README). Is this still going in for 19? |
This is a small addition in comparison to the gen_statem rewrite, and does not have a big impact on other parts, so it may till make it for 19. Several ssl PR are stalled as gen_statem rewrite has been prioritized. I just put this one into the test machinery again. Alas the case is failing on 22 of 28 machines ssl_basic_SUITE:getstat failed on line 651 I understand that this is due to timing issues in the test case. We need to try and find a way around this. I will try to help but to be frank I have some other things higher on the prio list at the moment. |
Fair enough, statem is more important, just tell me when you got time. |
I changed you timer:sleep to _ = ssl:connection_information(Socket), which makes things alot better.
|
Which platforms? |
Linux, windows7 and openbsd 5.9. I am not sure if is true for all of the failing machines but at least one of them is slow machine. |
It is 5 failing out of 33 so far (still 10 machines running and 2 aborted) . Before my change it failed on 20+ machines. |
You can not depend on send_avg having changed. I changed the test to just use send_cnt and sned_oct hopefully it will pass now. |
Ah right, it's an average... feels silly |
Merged with my updates to the tests. |
Thanks! |
These functions call getstat on the underlying TCP socket.
The only way to do this before now was to use a hack, either
by looking inside the #sslsocket{} record directly, or by
not using the SSL listen/accept functions and upgrading
from a TCP socket that is kept around for the purpose of
calling getstat later on.
A separate commit also exports the type inet:stat_option/0
to be able to use it in the ssl module's specs.
Rebase of #929 against master, along with requested test fixes.