Merge branch 'atj/atj-fix-message_que_len-typo/OTP-11024' into maint

* atj/atj-fix-message_que_len-typo/OTP-11024:
  Fix typo in type: erlang:process_info_item()
Update preloaded modules
Fix watchdog table leak

A service process maintains a table keyed on watchdog process pids. When
a watchdog process dies the corresponding entry should be removed but
this was broken in commit f115a9f7, causing entries with watchdog state
DOWN to accumulate.

Watchdog processes die as a result of diameter:remove_transport/2, or
when a peer reestablishes a connection in the listening case. Neither is
typically a frequent occurrence.

The fault manifests itself in the return value of
diameter:service_info(SvcName, transport), which displays entries for
watchdog processes that are no longer alive.
Merge branch 'sa/dialyzer-bitstring-fixes/OTP-11027' into maint

* sa/dialyzer-bitstring-fixes/OTP-11027:
  Minor refactorings
  Fix minor error in natively compiled module list
  Fix notification for duplicate modules
  Fix an error in the type inference of bitstring data
Merge branch 'mar/cover-fix/OTP-11028' into maint

* mar/cover-fix/OTP-11028:
  Delete ets tables when stopped
  fix a race condition when there're several applications in apps directory
mnesia: Fixed bad data in table

If mnesia:cleartable/1 was called during a table_load an schema event
with delete and write of that table is sent, which caused the table
to contain the schema record instead of clearing the table.
Merge branch 'ks/hipe-cleanup-escaping/OTP-11031' into maint

* ks/hipe-cleanup-escaping/OTP-11031:
  Loosen the assumptions of code that handles escaping functions
Merge branch 'sverk/dets_remove_test_otp_9607' into maint

* sverk/dets_remove_test_otp_9607:
  stdlib: Fix unstable testcase ets_SUITE:delete_large_named_table
  stdlib: Remove obsolete testcase dets_SUITE:otp_9607
erts: Adjust sizes for fix allocator
Optimize communication with file io server

The file module communicates with a file io server with the following
protocol for file operations:

> {file_request,From,ReplyAs,Request}
< {file_reply,ReplyAs,Reply}

The ReplyAs value is sent by the client side to match against when
receiving the reply and is otherwise left untouched and passed as is by
the server.

This commit enables receive optimizations by using the reference of the
server monitor, changing the protocol to:

> {file_request,From,MonitorRef,Request}
< {file_reply,MonitorRef,Reply}

As the shape of the messages is not changed, backwards compatibility is
not a concern.
erts: Change locking order for "port_table" and "port_sched_lock"

Keep order between the two but move them before all the allocation locks.

Old order violated for "port_table" lock in ptab_list_bif_engine().
Add transport interface 'connected' message with local address list

A transport module can return a local address list from its start/3
function in order to specify addresses to be used as Host-IP-Address
during capabilities exchange. Now allow addresses to be communicated in
a 'connected' message in the case of a connecting transport, so that
diameter_tcp (in particular) can make local address configuration
optional, communicating the gen_tcp default after connection
establishment instead.
Make explicit local address to diameter_tcp:start/3 optional

Use the default address address (as selected by gen_tcp) if none is
configured, passing it in the new 'connected' message introduced by the
previous commit.

The corresponding update to diameter_sctp has to wait until problems
with inet:sockname/1 are resolved: the function currently only returns
one address, and sometimes {0,0,0,0}. See OTP-11018.
Update example client to allow default local address

Note that the semantics of client:connect/1 have changed slightly: the
second element in an argument 3-tuple is a remote address, the local
address being the transport module's default. Previously it was
interpreted as a common local/remote address.
More robust listening port lookup in test suites

In particular, remove timing dependence by using diameter_reg:wait/1 to
wait on the term registered by diameter_{tcp,sctp} when opening a
listening socket.
Comment fix
Merge branch 'fredrik/ct/telnet_wo_line_breaks/OTP-10085' into maint
Merge branch 'lh/otp-optims/OTP-11035' into maint

* lh/otp-optims/OTP-11035:
  Use erlang:demonitor's flush option on timeout
  Don't lookup the node unless required in gen:call/{3,4}
Add testcase to exercise reconnect behaviour
Minor doc fix