aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2014-08-29Clarify error for slow `cpu_sup` port initLuca Favatella
I noticed that running an R16B03-1 node on an overloaded host produced log entries like the following ones: ``` 2014-08-22 21:52:31 =ERROR REPORT==== Error in process <0.24112.3> on node '[email protected]' with exit value: {{case_clause,{data,4711}},[{cpu_sup,get_uint32_measurement,2,[{file,"cpu_sup.erl"},{line,227}]},{cpu_sup,measurement_server_loop,1,[{file,"cpu_sup.erl"},{line,585}]}]} ``` ``` ===== ALIVE Fri Aug 22 21:50:14 CEST 2014 [os_mon] cpu supervisor port (cpu_sup): Erlang has closed [os_mon] cpu supervisor port (cpu_sup): Erlang has closed [os_mon] cpu supervisor port (cpu_sup): Erlang has closed [os_mon] cpu supervisor port (cpu_sup): Erlang has closed ===== ALIVE Fri Aug 22 22:07:46 CEST 2014 ``` I performed a code inspection on the `cpu_sup` module and I concluded that the `case_clause` error shows a small issue in the `cpu_sup` module, that happens when the port used in `cpu_sup` is slow to start - as it may happen on an overloaded node. The `cpu_sup` `gen_server` process keeps in its state the pid of an unlinked process (called "measurement server" - see `cpu_sup:init/1`), in order to do dirty stuff (e.g. reading the filesystem, running OS commands) and start_link-ing & managing the connected process to a port (called "port server" - see `measurement_server_init/0`). So the process organization looks like this: ``` cpu_sup - measurement server - port server - port ``` When the measurement server start_links the port server (see `port_server_start/0`) it sends a `{self(), ?ping}` message to it and expects an answer within 6s, otherwise it returns `{error, timeout}` rather than the pid. This has two issues: * The measurement server keeps `{error, ...}` in its state as if it were a pid - that makes no sense; * A late `{Pid, {data,4711}}` response may arrive in the mailbox of the measurement server, that will believe it to be a request to be processed, causing a `case_clause` error. This commit teaches the measurement server to check the success of the initialization of the port server by matching on the return value of `port_server_start/0` (renamed to `port_server_start_link/0` for the sake of clarity) in order to fail earlier and with an error clearer than `{case_clause,{data,4711}}`. In such case I expect the measurement server to be restarted by the `cpu_sup` `gen_server` (see `handle_call/3`) - as before. BTW It is not clear to me when the `handle_info({'EXIT', _Port, Reason}, State)` may be called (the `cpu_sup` `gen_server` does not link to the measurement server) but I am leaving it.
2014-08-26Merge branch 'ia/public_key/PBES2/OTP-11915' into maintIngela Anderton Andin
* ia/public_key/PBES2/OTP-11915: public_key: Add encodeing functionality for PBES1 and PBES2 public_key: Add PBES1 decoding support
2014-08-25Merge branch 'vladdu/jinterface_fun_equals' into maintBruce Yinhe
OTP-12121 * vladdu/jinterface_fun_equals: jinterface: fix bug in equality for OtpErlangFun
2014-08-25Merge branch 'ia/inets/ipv6-tests' into maintIngela Anderton Andin
* ia/inets/ipv6-tests: inets: Enable ipv6 tests for httpd
2014-08-25public_key: Add encodeing functionality for PBES1 and PBES2Ingela Anderton Andin
2014-08-22inets: Enable ipv6 tests for httpdIngela Anderton Andin
2014-08-22public_key: Add PBES1 decoding supportIngela Anderton Andin
2014-08-22Merge branch 'marcus/OTP-17.2.1/mergefix' into maintMarcus Arendt
* marcus/OTP-17.2.1/mergefix: Updated OTP version Update release notes
2014-08-22Update release notesErlang/OTP
2014-08-21Merge branch 'egil/proc_lib-optimizations/OTP-12060' into maintBjörn-Egil Dahlberg
* egil/proc_lib-optimizations/OTP-12060: stdlib: Update dependencies to erts-6.2 erts: Update preloaded erlang.beam stdlib: Use erlang:fun_info_mfa/1 in proc_lib:init_p/3 erts: Test erlang:fun_info_mfa/1 erts: Introduce erlang:fun_info_mfa/1
2014-08-21Merge branch 'nox/reedr-logging/OTP-12115' into maintLukas Larsson
* nox/reedr-logging/OTP-12115: Add number of entries to mnesia copy debug message Add thread index to allocator enomem dump slogan Add run queue index to process dump info Add missing error string to syslog logging in epmd Demote rare debug slogan of message discarding to debug build
2014-08-21Merge branch 'ia/ssl/dialyzer-certificate_requests' into maintIngela Anderton Andin
* ia/ssl/dialyzer-certificate_requests: ssl: Fix boolean expression ssl: Fix broken contract
2014-08-21Merge branch 'lucafavatella/accept-ip-in-net_adm-names' into maintMarcus Arendt
* lucafavatella/accept-ip-in-net_adm-names: Refactor erl_epmd:names/1 Accept inet:ip_address() in net_adm:names/1
2014-08-21dialyzer, hipe: Fix a bug concerning is_record/2,3Hans Bolinder
Also fixed some cases where Dialyzer could crash due to reaching system limits.
2014-08-20dialyzer: fix a -Wunderspecs bugHans Bolinder
Sometimes bogus warnings were generated for parametrized types. Thanks to Krzesimir Sarnecki for pointing the bug out. Also corrected warnings where the structure of opaque types were exposed (thanks to Kostis for pointing the bug out).
2014-08-20ssh: Updated vsn.mkHans Nilsson
2014-08-20ssh: negotiation_timeout bug fixedHans Nilsson
2014-08-20ssh: Negotiation_timeout testcaseHans Nilsson
2014-08-19ssl: Fix boolean expressionIngela Anderton Andin
2014-08-18stdlib: Update dependencies to erts-6.2Björn-Egil Dahlberg
2014-08-18ssl: Fix broken contractIngela Anderton Andin
2014-08-14Add number of entries to mnesia copy debug messageRick Reed
2014-08-14Refactor erl_epmd:names/1Luca Favatella
Simplify erl_epmd:names/1, keeping the same functionalities, relying on inet:gethostbyname/1 being able to handle both atoms and strings.
2014-08-14Accept inet:ip_address() in net_adm:names/1Luca Favatella
This change also simplifies the code avoiding a double (conditional) call to inet:gethostbyname/1 (in net_adm:names/1 and then erl_epmd:names/1).
2014-08-14ssh: Add testcases for max_sessions optionHans Nilsson
Now checks that if we have max_session sessions we could close one session and open a new one. That is checked both for parallel and non-parallel logins.
2014-08-14Merge branch 'ia/ssl/certificate_types/certificate_requests/OTP-12026' into ↵Ingela Anderton Andin
maint * ia/ssl/certificate_types/certificate_requests/OTP-12026: public_key: Updated User Guide with ECC records ssl: Make sure the correct ROOT-cert is used ssl: Test ECDSA and improve test suite maintainability public_key: Correct ASN1-type EcpkParameters in PEM handling public_key: Correct ASN-1 spec ssl: Correct handling of certificate_types in Certificate Requests
2014-08-14public_key: Updated User Guide with ECC recordsIngela Anderton Andin
2014-08-13Merge branch 'pascalchap/observer_issue' into maintMarcus Arendt
* pascalchap/observer_issue: correction of huge status bar
2014-08-11ssh: Updated vsn.mkHans Nilsson
2014-08-11ssh: negotiation_timeout bug fixedHans Nilsson
2014-08-11ssh: Negotiation_timeout testcaseHans Nilsson
2014-08-11ssl: Make sure the correct ROOT-cert is usedIngela Anderton Andin
When dealing with older certificates that does not indicate its signer with a certificate extension, we must search the database for the issure. Finding the issuer is not enough, we need to verify the signature with the key in the found issuer cert.
2014-08-11ssl: Test ECDSA and improve test suite maintainabilityIngela Anderton Andin
Use generated certs instead of hard coded
2014-08-08Merge branch 'tuncer/sanitizers' into maintBruce Yinhe
OTP-12081 * tuncer/sanitizers: Implement --enable-sanitizers[=sanitizers]
2014-08-08Merge branch 'maint-17' into maintMarcus Arendt
2014-08-08public_key: Correct ASN1-type EcpkParameters in PEM handlingIngela Anderton Andin
2014-08-08public_key: Correct ASN-1 specIngela Anderton Andin
2014-08-08ssl: Correct handling of certificate_types in Certificate RequestsIngela Anderton Andin
FROM TLS 1.2 RFC: The interaction of the certificate_types and supported_signature_algorithms fields is somewhat complicated. certificate_types has been present in TLS since SSLv3, but was somewhat underspecified. Much of its functionality is superseded by supported_signature_algorithms. The following rules apply: - Any certificates provided by the client MUST be signed using a hash/signature algorithm pair found in supported_signature_algorithms. - The end-entity certificate provided by the client MUST contain a key that is compatible with certificate_types. If the key is a signature key, it MUST be usable with some hash/signature algorithm pair in supported_signature_algorithms. - For historical reasons, the names of some client certificate types include the algorithm used to sign the certificate. For example, in earlier versions of TLS, rsa_fixed_dh meant a certificate signed with RSA and containing a static DH key. In TLS 1.2, this functionality has been obsoleted by the supported_signature_algorithms, and the certificate type no longer restricts the algorithm used to sign the certificate. For example, if the server sends dss_fixed_dh certificate type and {{sha1, dsa}, {sha1, rsa}} signature types, the client MAY reply with a certificate containing a static DH key, signed with RSA- SHA1.
2014-08-08correction of huge status barpascalchap
following the last evolution - use wxStatusBar:new(Frame) then wxFrame:setStatusBar(Frame, StatusBar), the status bar use the full space available in frame. move the creation of the status bar after the creation of the notebook and the mainsizer. it is ok on windows 7 64bits, no other test done so far.
2014-08-07Update release notesErlang/OTP
2014-08-07Merge branch 'raimo/snmp/ipv4+ipv6/OTP-12020' into maint-17Erlang/OTP
* refs/heads/fetch-and-merge.maint-17-opu/FETCH_HEAD/54676: (46 commits) Fix error printouts to not crash Improve ct_snmp test cases Fix misspelled community in manager Rearrange test suite group structure Fix testcase for really dual ip Adjust test cases for daily builds Fix call to non-existent function Fix test manager in agent tests for IPv6 Call new Net-SNMP test suite from top suite Improve external snmp commands args Test inform to dual transports Write list of trap targets Improve dual stack test suite Use {ipv6_v6only, true} Remove commented out code Add dual_ip tests in snmp_to_snmpnet_SUITE Silence logging from agent net_if at shutdown Rewrite agent for IPv4 + IPv6 snmp: Add inform test snmp: Add new test suite ...
2014-08-07Merge branch 'lars/orber/dual_ipv6_and_ipv4' into maint-17Erlang/OTP
* lars/orber/dual_ipv6_and_ipv4: [orber] Fix bug in testcase [orber] Fix malformed macros [orber] Add test suite for ORB with dual ipv4/ipv6 configuration [orber] Update documentation and fix testcase for IPv4/IPv6 [orber] Update testcases and fixed some minor faults [orber] Remove unused file corba_request.erl [orber] Remove a define of ORBVSN when compiling orbers erlang modules [orber] Add possibilty to configure orber to run in both IPv4 and IPv6
2014-08-07Fix error printouts to not crashRaimo Niskanen
2014-08-06Merge branch 'lukas/os_mon/testfixes/OTP-12053' into maintLukas Larsson
* lukas/os_mon/testfixes/OTP-12053: os_mon: Fix so that all testcases are run os_mon: Ignore posix_only on windows and solaris
2014-08-06os_mon: Fix so that all testcases are runLukas Larsson
For some reason only a new testcases were run on the majority of platforms. After this change all tests are run on all unix and win32 platforms.
2014-08-06os_mon: Ignore posix_only on windows and solarisLukas Larsson
2014-08-06erts: Fix tc and docs after {fd,FD} bind changeLukas Larsson
The sha of the original change is 52810718b
2014-08-05Improve ct_snmp test casesRaimo Niskanen
2014-08-05Fix misspelled community in managerRaimo Niskanen
2014-08-01[orber] Fix bug in testcaseLars Thorsen