Age | Commit message (Collapse) | Author |
|
* raimo/receive-TOS-TCLASS/ERIERL-187/OTP-15145:
Elaborate the disclaimer for 'pktoptions'
Improve platform filter
Fix endianness bug for CMSG parsing
|
|
|
|
* siri/cuddle:
[logger] Skip app level test if app cannot be loaded
Terminate nodes after failed test cases in erl_distribution_SUITE
Skip performance test on build types other than 'opt'
|
|
|
|
* raimo/receive-TOS-TCLASS/ERIERL-187/OTP-15145:
Write testcases for recvtos and friends
Fix term buffer overflow bug
Fix documentation due to feedback
Implement socket option recvtos and friends
|
|
Use os:type() and os:version() to predict if the individual options
are supposed to be supported. We'll see if this holds.
|
|
A hanging node from this suite can fail later tests, so terminate all
nodes() after each test case.
|
|
* hasse/kernel/adjust_tests:
kernel: Adjust disk_log tests
kernel: Adjust global testcase
|
|
|
|
|
|
|
|
|
|
The encoding option was introduced in commit
270d909696a753af022df72a404c73f2895b4a02, to allow report callbacks to
format according to a given encoding. There was, however, no
connection between this encoding option, and the encoding of the
device to which the logger handler was writing.
Since a formatter is defined to return unicode:chardata(), and in
order to avoid mismatch with the encoding of the device, the encoding
option is now removed from the formatter. The handler itself must make
sure that it does not write illegal data to its device.
|
|
|
|
Implement socket options recvtclass, recvtos, recvttl and pktoptions.
Document the implemented socket options, new types and message formats.
The options recvtclass, recvtos and recvttl are boolean options that
when activated (true) for a socket will cause ancillary data to be
received through recvmsg(). That is for packet oriented sockets
(UDP and SCTP).
The required options for this feature were recvtclass and recvtos,
and recvttl was only added to test that the ancillary data parsing
handled multiple data items in one message correctly.
These options does not work on Windows since ancillary data
is not handled by the Winsock2 API.
For stream sockets (TCP) there is no clear connection between
a received packet and what is returned when reading data from
the socket, so recvmsg() is not useful. It is possible to get
the same ancillary data through a getsockopt() call with
the IPv6 socket option IPV6_PKTOPTIONS, on Linux named
IPV6_2292PKTOPTIONS after the now obsoleted RFC where it originated.
(unfortunately RFC 3542 that obsoletes it explicitly undefines
this way to get packet ancillary data from a stream socket)
Linux also has got a way to get packet ancillary data for IPv4
TCP sockets through a getsockopt() call with IP_PKTOPTIONS,
which appears to be Linux specific.
This implementation uses a flag field in the inet_drv.c socket
internal data that records if any setsockopt() call with recvtclass,
recvtos or recvttl (IPV6_RECVTCLASS, IP_RECVTOS or IP_RECVTTL)
has been activated. If so recvmsg() is used instead of recvfrom().
Ancillary data is delivered to the application by a new return
tuple format from gen_udp:recv/2,3 containing a list of
ancillary data tuples [{tclass,TCLASS} | {tos,TOS} | {ttl,TTL}],
as returned by recvmsg(). For a socket in active mode a new
message format, containing the ancillary data list, delivers
the data in the same way.
For gen_sctp the ancillary data is delivered in the same way,
except that the gen_sctp return tuple format already contained
an ancillary data list so there are just more possible elements
when using these socket options. Note that the active mode
message format has got an extra tuple level for the ancillary
data compared to what is now implemented gen_udp.
The gen_sctp active mode format was considered to be the odd one
- now all tuples containing ancillary data are flat,
except for gen_sctp active mode.
Note that testing has not shown that Linux SCTP sockets deliver
any ancillary data for these socket options, so it is probably
not implemented yet. Remains to be seen what FreeBSD does...
For gen_tcp inet:getopts([pktoptions]) will deliver the latest
received ancillary data for any activated socket option recvtclass,
recvtos or recvttl, on platforms where IP_PKTOPTIONS is defined
for an IPv4 socket, or where IPV6_PKTOPTIONS or IPV6_2292PKTOPTIONS
is defined for an IPv6 socket. It will be delivered as a
list of ancillary data items in the same way as for gen_udp
(and gen_sctp).
On some platforms, e.g the BSD:s, when you activate IP_RECVTOS
you get ancillary data tagged IP_RECVTOS with the TOS value,
but on Linux you get ancillary data tagged IP_TOS with the
TOS value. Linux follows the style of RFC 2292, and the BSD:s
use an older notion. For RFC 2292 that defines the IP_PKTOPTIONS
socket option it is more logical to tag the items with the
tag that is the item's, than with the tag that defines that you
want the item. Therefore this implementation translates all
BSD style ancillary data tags to the corresponding Linux style
data tags, so the application will only see the tags 'tclass',
'tos' and 'ttl' on all platforms.
|
|
Add logger:set_application_level/2
|
|
When printing a map with ~p in a log message, the formatter's
single_line option in some cases introduced unwanted commas after
'=>', for example:
This is now corrected. When single_line==true, width 0 is added to all
~p and ~P control sequences in the format string.
|
|
A lot of erts internal messages used behind APIs to create
non-blocking calls, e.g. port_command, would cause the seq_trace
token to be cleared from the caller when it should not.
This commit fixes that and adds asserts that makes sure
that all messages sent have to correct token set.
Fixes: ERL-602
|
|
* lukas/erts/fix_udp_realloc_bug:
erts: Limit the automatic max buffer for UDP to 2^16
erts: Free udp buffer when getting EAGAIN
|
|
There is no reason to have a larger buffer than this as
the recvmsg call will never return more data.
OTP-15206
|
|
|
|
|
|
OTP-15146
|
|
* siri/logger/post-21/OTP-15132:
[logger] Allow setting kernel parameter 'logger_level' to 'all'
[kernel] Reduce risk of dead lock when terminating logger_sup
[logger] Fix regexp replacement for unicode strings
Update proc_lib:report_cb to obey logger formatter's size limiting params
[logger] Allow report callback with two arguments returning a string
Don't call report_cb from cth_log_redirect - formatter does that
Add legacy test of sasl_report_file_h and size limiting
[logger] Remove compiler warnings in test
[logger] Fix problem with test cases waiting for handler restart
[logger] Add ?LOG macro which takes Level as argument
[logger] Improve spec for set_handler_config/3 and set_primary_config/2
[logger] Generate .png file from .dia
[logger] Update documentation
|
|
|
|
If the report callback is a fun of arity 2, then the second argument
is a map with the keys 'encoding', 'depth' and 'chars_limit', and the
fun must return a string which is size limited according to the given
depth and chars_limit.
If the report callback is a fun of arity 1, then it must return a
tuple containing a format string and a list of arguments. The
formatter will produce the string, and limit it's size.
|
|
|
|
|
|
|
|
to be no-op and return true
as it always has before OTP-21.0.
|
|
|
|
|
|
|
|
* siri/logger-fix:
[logger] Update documentation
[logger] Adjust priority settings in test
[logger] Unregister handler names before terminating
[logger] Stress overload_kill tests in disk_log handler
|
|
Now only setting high priority on every second burst sending process,
to allow for handler process to be scheduled in every now and then.
|
|
|
|
* peppe/kernel/logger_updates:
[logger] Correct documentation
[logger] Update handler documentation
[logger] Fix test suite compilation warnings
[logger] Fix failing tests
[logger] Change overload_kill_restart_after value to infinity
[logger] Change name of function sync/1 to filesync/1
[logger] Reset logger config after tests
[logger] Don't delete log file of failing test cases
[logger] Set up priority for processes generatig test bursts
[logger] Stress overload_kill tests a bit more
[logger] Remove some compiler warnings in test suites
[logger] Sort keys when testing formatter template
[logger] Skip test involving file access rights on windows
[logger] Skip some overload protection tests when using dirty schedulers
|
|
Included config files relative to sys.config directory
OTP-15137
|
|
Change the way included config files are searched in sys.config.
Search first relative to sys.config directory, then relative
to current working directory, for backward compatibility.
This permit same result when using a sys.config file in a release
or starting manually a node with -config.
Credit to Siri Hansen for test case.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|