Age | Commit message (Collapse) | Author |
|
|
|
At Erlang Factory 2013 there was discussion during one of the talks about
the sys:get_status functions and how useful they were for debugging. Geoff
Cant mentioned it would be very useful if the sys module also provided
functions to use while debugging to get just the state of a process and
also to be able to replace the state of a process, and many others in the
audience appeared to agree.
The sys:get_state/1,2 functions return the state of a gen_server, gen_fsm,
or gen_event process. The return value varies depending on the process
type: process state for a gen_server, state name and state data for a
gen_fsm, and handler module, handler id, and handler state for each handler
registered in a gen_event process.
The sys:replace_state/2,3 functions allow the state of a gen_server,
gen_fsm, or gen_event process to be replaced with a new state. These
functions take a function argument that updates or replaces the process
state; using a function to change the state eliminates the race condition
of first reading the state via sys:get_state/1 or sys:get_state/2, using
its return value to create a new state, and then replacing the old state
with the new state, since during that time the process might have received
other calls or messages that could have changed its state.
* For a gen_server process, the state replacement function takes the
process state as an argument and returns a new state.
* For a gen_fsm process, the state replacement function gets a tuple of
{StateName, StateData} and returns a similar tuple that specifies a new
state name, new state data, or both.
* For a gen_event process, the state replacement function is called for
each registered event handler. It gets a tuple {Module, Id, HandlerState}
and returns a similar tuple that specifies the same Module and Id values
but may specify a different value for HandlerState.
If the state replacement function crashes or results in an error, the
original state of a gen_server or gen_fsm process is maintained; if such a
crash occurs for a gen_event process, the original state of the event
handler for which the state replacement function was called is maintained,
but the states of other event handlers of the same gen_event process may
still be updated if no errors or crashes occur while replacing their
states.
Add documentation for sys:get_state/1,2 and sys:replace_state/2,3. The
documentation explicitly notes that the functions are intended for use
during debugging.
Add new tests for these functions to gen_server_SUITE, gen_fsm_SUITE, and
gen_event_SUITE.
|
|
Modify the documentation for the sys:get_status/2,3 functions to reflect
that they also work on gen_event processes, and add a cross reference for
gen_event:format_status/2 to go along with the existing cross references
for gen_server and gen_fsm.
|
|
* sk/odbc64/OTP-10993:
explain postgres pecularity for param query out parameters
postgresql test case for 64bit bug for param_query
rollback disabling scrollable_cursors for oracle
drop procedure after testing
set scrollable_cursors to off for oracle driver
drop procedure after testing
test case for stored procedure with (32bit) integer out params on 64bit platform
odbcserver 64bit bug for SQL_C_SLONG type
|
|
OTP-10988
* hm/reltool_relaxed_exclude:
[reltool] Add test case for missing application
[reltool] Relax requirements on excluded applications
|
|
* anders/diameter/app_not_configured/OTP-10972:
Fix faulty sequence validation
Add config suite
Deal with config errors detected at transport start less brutally
Move most transport_opt() validation into diameter_config
Minor doc/spec fix
Minor diameter_lib cleanup
|
|
* anders/diameter/examples_suite/OTP-10903:
Compile example dictionaries against both RFC 3588 and 6733
Compile example dicts from the repo when running locally
Documentation fixes
Move example dict compilation to examples suite
Add examples suite for testing example code
Minor tweaks and fixes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* siri/cover/hanging-proc/OTP-10979:
[cover] Ensure no process leak when stopping cover on dead node
|
|
* ks/hipe-cleanup/OTP-10985:
Fix handling of bs_match_string translation
Take out 'constant' type test and unnecessary type declaration
Take out 'constant' type test from left over comments
Enable more warnings
Use remote type instead of relying on hipe_icode.hrl
Add type info for hipe_bifs:nstack_used_size/0
Use correct type name
Update a comment
|
|
|
|
A missing application directory is now classified as a warning if the
application is explicitly excluded.
|
|
user and password.
|
|
* nox/ssh/fix-ssh-html-doc/OTP-10983:
Properly ignore everything in lib/ssh/doc/html/
|
|
The validation of {sequence, {H,N}} incorrectly checked that H was an
N-bit integer, instead of the intended 32-N.
|
|
To verify return values from diameter:start_service/2 and
diameter:add_transport/2 when passing various config.
|
|
Crashing watchdog and peer_fsm processes was somewhat unseemly. Emit an
error report and die silently instead.
|
|
Faulty configuration was previously passed directly on to watchdog and
peer_fsm processes, diameter:add_transport/2 happily returning ok and
the error resulting on failure of watchdog and/or peer_fsm processes.
Now check for errors before getting this far, returning {error, Reason}
from diameter:add_transport/2 when one is detected. There are still
some errors that can only be detected after transport start (eg. a
misbehaving callback) but most will be caught early.
|
|
'infinity' is a valid transport_config timeout.
|
|
* vk/fix_ssl_connection/OTP-10980:
Added comment about proxy certificates
Fix ssl_connection to support reading proxy/chain certificates
|
|
When cover:stop(Node) was called on a non-existing node, a process
waiting for cover data from the node would hang forever. This has been
corrected.
|
|
* dgud/testcase_fixes:
Fix timers
mnesia: Decrease test times
Add debug printouts
wx: Fix failing testcases
stdlib: Ignore symlink tests on windows
|
|
Remove unused functions, add dialyzer specs, make wait/1 less fallible.
|
|
* maint-r16:
[orber] Fix bug in corbaloc/corbaname over ssl
|
|
|
|
|
|
Instead of from the installation.
|
|
Fix errors and omissions related to dictionary compilation.
|
|
From compiler suite.
|
|
That is, code installed under examples/code in an installation.
|
|
Fix a broken include in example code, remove an inappropriate ct:pal/2
outside of a testcase, echo more info from test/Makefile.
|
|
* maint-r15:
[orber] Fix bug in corbaloc/corbaname over ssl
|
|
|
|
* bjorn/compiler/fix-slow-compilation/OTP-10939:
Fix slow compilation of complex guards
|
|
beam_utils:is_not_used_at/3 could be very slow for complex guards,
because the cached result for previously encountered labels were
neither used nor updated within blocks.
Reported-by: Magnus Müller
|
|
* bjorn/asn1/fix-latin1-issue:
Eliminate latin1 encoded characters
|
|
|
|
|
|
* anders/diameter/vendor_specific_app_id/OTP-10942:
Minor capx suite fix
Update appup, vsn -> 1.4.1.1
Deal with RFC 6733 change to Vendor-Specific-Application-Id
|
|
* anders/diameter/reopen_abuse/OTP-10898:
Update appup
Tweak okay -> suspect config
Add testcases for watchdog_config
Rework watchdog suite to remove most timing dependencies
Rework stats to avoid concurrent read and write
Minor spec fix
Add transport_opt() watchdog_config
|
|
|
|
The manual says that an Emacs directive can be placed on the second
line. With this patch that directive is also recognized when selecting
encoding of the script.
|
|
* ia/inets/cookie-bug/OTP-10956:
inets httpc: Revert incorrect commit regarding cookie handling.
|