Age | Commit message (Collapse) | Author |
|
* maint:
Do not fail if there is no variables file
Run iter max ports on a seperate vm with smaller port table
Set max ports for slave node
Decrease sleep timer
|
|
* lukas/r16b01/testcase-fixes/OTP-11138:
Do not fail if there is no variables file
Run iter max ports on a seperate vm with smaller port table
Set max ports for slave node
Decrease sleep timer
|
|
Allow unicode strings in os:cmd and try to convert the
result bytes to unicode list.
Also test it.
|
|
|
|
* avi/fix-os-cmd-win/OTP-11104:
Add testcase to exported
Added primary bootstrap for os.beam
kernel: redefined deep_list_command test
Remove unnecessary whitespaces in os.erl and os_SUITE.erl
Fix deep list argument error under Windows in os:cmd/1
|
|
* maint:
Only verify not busy for erlang:send(Port, Msg, [nosuspend]) until scheduled
Make high_msgq_watermark and low_msgq_watermark generic inet options
Do not treat port_set_data/port_get_data as signals
Add 'frmptr' emulator type
Conflicts:
erts/preloaded/ebin/erlang.beam
erts/preloaded/ebin/erts_internal.beam
erts/preloaded/ebin/prim_inet.beam
|
|
* rickard/inet_opts/OTP-11075:
Make high_msgq_watermark and low_msgq_watermark generic inet options
Conflicts:
erts/preloaded/ebin/prim_inet.beam
|
|
|
|
|
|
|
|
Conflicts:
lib/kernel/test/os_SUITE.erl
|
|
Because of leeway in implementing os:cmd/1 under different OS there is
a difference in results when calling it with deep list
argument. os:cmd/1 specifies io_lib:chars() type for its argument and
io_lib functions can produce deep lists inspite of io_lib:chars()
result type specification. This commit flattens the argument for
erlang:open_port/2 (which is used under Windows) and expands the
os_SUITE to regress the bug.
|
|
|
|
* bjorn/fix-encoding/OTP-11041:
Encode Erlang source files with non-ascii characters in UTF-8
|
|
To ensure that 'master' compiles when we merge 'maint' to it,
regardless of which encoding is default in 'master', all source
files with non-ascii characters *must* have the encoding specified.
|
|
* lh/demonitor-flush/OTP-11039:
Use erlang:demonitor(Ref, [flush]) where applicable
|
|
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.
|
|
|
|
interactive_shell_SUITE: nodes names with '-'
|
|
|
|
|
|
Refactor away ?line macro in application_SUITE
|
|
|
|
|
|
|
|
* hb/file_name_type/OTP-10852:
Introduce new type file:name_all()
|
|
* pan/unicode_filename_warnings:
prim_file: Fix error return from prim_file:list_dir/1
|
|
|
|
* ks/hipe_bif-remove_refs_from/OTP-10851:
Fixed test to allow for lists:foreach/2 call
Change the return value of hipe_bifs:remove_refs_from/1
|
|
* sverk/is_module_native-fix:
erts: Fix code:is_module_native
OTP-10870
|
|
When the run-time system was started with +fnue, the error tuple
indicating a non-translatable filename was added as a non-proper
list tail inside an {ok,Files} term.
|
|
|
|
code:is_module_native returned false for hipe compiled module if
the first function in the module was a BIF stub
|
|
Because {prim_file,file}:list_dir/1 no longer returns untranslatable
filenames, we must use list_dir_all/1 instead. We also need to use
read_link_all/1 instead of read_link/1.
|
|
6d516de001dde82c02fe050db8e3aab47914fa90 added prim_file:list_dir_all/1.
Unfortunately, only the first element in the list would be handled
as intended.
|
|
Commit 70b5e24c9498225fadc08d19503269c8aad851bf broke
filelib:wildcard(Pattern, ".").
Over the years, the logic for filelib:wilcard() has become a mess
of special cases.
Probably because of premature optimization, filelib:wildcard(Pattern)
and filelib:wildcard(Pattern, Cwd) are handled differently.
They can be consolidated if we use a "." as the default Cwd argument.
We can also simplify things by compiling the Cwd argument into the
wildcard. We did not that in the initial implementation because it
used to be possible to pre-compile a wildcard and pass it to
filelib:wildcard/{1,2}. Since that is no longer possible, there is
no point in keeping the compiled wildcard "portable" (not dependent
on the Cwd argument).
|
|
* pan/unicode_filename_warnings:
Add file:list_dir_all/1 and file:read_link_all/1
prim_file: Add list_dir_all() and read_link_all()
Teach prim_file:set_cwd() to avoid entering non-translatable directories
Make prim_file skip invalid filenames in unicode mode
prim_file: Refactor functions that return filenames
prim_file: Refactor handling of responses
prim_file: Always open non-file ports in binary mode
Test that list_dir("non-existing-dir") fails with the correct error
|
|
|
|
|
|
|
|
servers behaves
Rationale:
Some applications (like erlide) have code to be loaded dynamically on a
node. It may be slow to load everything upfront every time, so if the
node is in interactive mode, we would like to just append to the load
path. Currently, there is no direct way to detect if the node is running
in embedded mode or not so that we can do the right thing.
|
|
|
|
|
|
|
|
When using the async thread pool and compressed files, when
an efile driver port instance is shutdown, the efile_drv
stop callback closes the file descriptor (a gzFile instance
actually) - this is dangerous if at the same time there's
an async thread performing an operation against the file,
for example calling invoke_read(), which can result in a
segmentation fault, or calling invoke_close() which double
closes the gzFile and this in turn causes 2 consecutive calls
to driver_free() against same gzFile instance (resulting in
later unexpected crashes in erl_bestfit_alloc.c for example).
The following test program makes the emulator crash when using
the async thread pool:
-module(t2).
-export([t/1]).
t(N) ->
file:delete("foo.bar"),
% Use of 'compressed' option, for creating/writing the file,
% is irrelevant. It only matters when opening it later for
% reads - a non-compressed file open with the 'compressed'
% option goes through an internal gzFile handle (instead of
% a plain integer fd), just like a compressed file.
%{ok, Fd} = file:open("foo.bar", [raw, write, binary]),
{ok, Fd} = file:open("foo.bar", [raw, write, binary, compressed]),
ok = file:write(Fd, <<"qwerty">>),
ok = file:close(Fd),
Pid = spawn_link(fun() ->
process_flag(trap_exit, true),
loop(N)
end),
Ref = erlang:monitor(process, Pid),
receive
{'DOWN', Ref, _, _, _} ->
ok
end.
loop(0) ->
ok;
loop(N) ->
Server = self(),
Pid = spawn(fun() ->
{ok, Fd} = file:open("foo.bar", [read, raw, binary, compressed]),
Server ! continue,
% Comment the file:read/2 call to make the file:close/1 call much
% more likely to crash or end up causing efile_drv to close twice
% the fd (gzFile), which will make the emulator crash later in the
% best fit allocator (erl_bestfit_alloc.c).
_ = file:read(Fd, 5),
file:close(Fd)
end),
receive continue -> ok end,
exit(Pid, shutdown),
loop(N - 1).
Running this test when using the async thread pool:
shell> erl +A 4
Erlang R15B03 (erts-5.9.3.1) [source] [64-bit] [smp:4:4] [async-threads:4] [hipe] [kernel-poll:false]
Eshell V5.9.3.1 (abort with ^G)
1> c(t2).
{ok,t2}
2> t2:t(500000).
Segmentation fault (core dumped)
When not using the async thread pool, there are no issues:
shell> erl
Erlang R15B03 (erts-5.9.3.1) [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.9.3.1 (abort with ^G)
1> c(t2).
{ok,t2}
2> t2:t(500000).
ok
3>
An example stack trace when the crash happens because there's
an ongoing read operation is:
Thread 1 (Thread 0x7f021cf2c700 (LWP 10687)):
#0 updatewindow (strm=0x2691bf8, out=5) at zlib/inflate.c:338
#1 0x00000000005a2ba0 in inflate (strm=0x2691bf8, flush=0) at zlib/inflate.c:1141
#2 0x000000000055c46a in erts_gzread (file=0x2691bf8, buf=0x7f0215b29e80, len=5) at drivers/common/gzio.c:523
#3 0x00000000005849ef in invoke_read (data=0x26b2228) at drivers/common/efile_drv.c:1114
#4 0x000000000050adcb in async_main (arg=0x7f021bf5cf40) at beam/erl_async.c:488
#5 0x00000000005c21a0 in thr_wrapper (vtwd=0x7fff69c6ff10) at pthread/ethread.c:106
#6 0x00007f021c573e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#7 0x00007f021c097cbd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#8 0x0000000000000000 in ?? ()
And when there's an ongoing close operation when the driver
is stopped:
Thread 1 (Thread 0x7fe5f5654700 (LWP 747)):
#0 0x0000000000459b64 in bf_unlink_free_block (block=0x10b2a70, allctr=<optimized out>, flags=<optimized out>) at beam/erl_bestfit_alloc.c:792
#1 bf_unlink_free_block (flags=0, block=0x10b2a70, allctr=0x873380) at beam/erl_bestfit_alloc.c:822
#2 bf_get_free_block (allctr=0x873380, size=<optimized out>, cand_blk=<optimized out>, cand_size=<optimized out>, flags=0) at beam/erl_bestfit_alloc.c:869
#3 0x000000000044f0dd in mbc_alloc_block (alcu_flgsp=<synthetic pointer>, blk_szp=<synthetic pointer>, size=200, allctr=0x873380) at beam/erl_alloc_util.c:1198
#4 mbc_alloc (allctr=0x873380, size=200) at beam/erl_alloc_util.c:1345
#5 0x000000000045449b in do_erts_alcu_alloc (size=200, extra=0x873380, type=165) at beam/erl_alloc_util.c:3442
#6 erts_alcu_alloc_thr_pref (type=165, extra=<optimized out>, size=192) at beam/erl_alloc_util.c:3520
#7 0x000000000055c0bf in gz_open (mode=0x5d98b2 "rb", path=0x1103418 "foo.bar") at drivers/common/gzio.c:164
#8 erts_gzopen (path=0x1103418 "foo.bar", mode=0x5d98b2 "rb") at drivers/common/gzio.c:307
#9 0x0000000000584e47 in invoke_open (data=0x1103330) at drivers/common/efile_drv.c:1857
#10 0x000000000050adcb in async_main (arg=0x7fe5f698af80) at beam/erl_async.c:488
|
|
* lukas/kernel/iter_max_socks_to_node/OTP-10734:
Isolate iter_max_socks to own node
|
|
This prevents this testcase from ruining the entire
testrun if it should fail critically.
|
|
* bjorn/kernel/undefined-function-handler/OTP-10617:
Teach error_handler to call '$handle_undefined_function'
|
|
global_SUITE registers the name 'test_server' in the global registry
for what seems to be only historical reasons. Exactly how it happened
is lost in the mists of time, but I think the following is a reasonable
reconstruction:
* At one point in time, the test_server application started to do
a global registration of a 'test_server' process to support
embedded systems when the test_server application was run on both a
host and a target system.
* global_SUITE had to be modified to take the pre-existing
'test_server' registration into account.
* When Erlang/OTP switched to using common_test, global_SUITE was
modified to register the 'test_server' name itself in commit
8bd07f450816eaaae52d28740d89ead1f930cd02 (since the test_server
application does not register the 'test_server' name when run
under control of common_test).
To slightly reduce the size of global_SUITE, remove the redundant
registration and stop expecting 'test_server' to be registered.
|
|
* sal/get_env/OTP-10694:
Moved documentation in a separate entry
Removed obsolete ?line macro
Add application:get_key/3
|