Age | Commit message (Collapse) | Author |
|
* egil/fix-LM_TRY_ENABLE_CFLAG:
Fix LM_TRY_ENABLE_CFLAG to use correct environment
|
|
* nox/rm-reverse-eta-conversion/OTP-10682:
Don't use fun references in cprof_SUITE
Make trace_local_SUITE work without the reverse eta conversion
Remove the reverse eta-conversion from v3_kernel
|
|
Conflicts:
erts/vsn.mk
|
|
* mh/escript_emulator_flags_vs_shebang/OTP-10691:
escript to accept emulator arguments when script file has no shebang
|
|
* yamt/erl_driver-ssize_t/OTP-10699:
Use correct way to pull the definition of ssize_t
|
|
Necessary for NetBSD with _POSIX_SOURCE at least.
|
|
LM_TRY_ENABLE_CFLAG takes which environment variable should be updated
but only CFLAGS was updated. Though CFLAGS is the normally the intended
variable, others may be used. For instance CXXFLAGS.
|
|
* dgud/wx/fix-wx-2.9-compat/OTP-10407: (26 commits)
wx: Fix comments
wx: Workaround wx-2.9 bugs
wx: Mac fixes
wx: Fix demo and tests
wx: Allow 64 bits compilation on mac, requires wxWidgets-2.9
appmon: Move runtime part to runtime_tools app
reltool: fix wxWidgets-2.9 compability
debugger: Fix 2.9 compat
observer: Fix check for graphics contexts
Observer: Fix distribution dialog
observer: Fix font sizes
wx: Fix the demo
wx: Fix loading icons and cursors in Windows
wx: Remove unnecessary casts
wx: Fix changed getfunctions
wx: Depricate wxCursor new functions
wx: Fix int to enum
wx: Include correct m4 file in 2.9
wx: Update examples so they work with both wxWidgets 2.8 and 2.9
wx: Modify tests so they work on wxWidgets-2.9
...
|
|
|
|
* fdm/file-allocate/OTP-10680:
Update preloaded prim_file.beam
erts: Fix xcomp configure for fallocate
Add file:allocate/3 operation
|
|
* pn/ansi-console/OTP-10678:
Support ANSI in the console
|
|
* fdm/fix_fd_leak_async_thread_pool/OTP-10677:
Fix fd leak when using async thread pool
|
|
The exceptions tracing tests look for {trace_local_SUITE,exc,2} in
stacktraces to strip them and compare them to the excepted result, the
removal of the reverse eta conversion renames '-exception_test/3-fun-0-'
to exc and thus confuses the stripping code. This commit fix this by
not using `fun exc/2` but `fun (F, As) -> exc(F, As) end` instead, which
was what the reverse eta conversion was doing.
|
|
|
|
* Default to 'no' for finding a working fallocate
|
|
This operation allows pre-allocation of space for files.
It succeeds only on systems that support such operation.
The POSIX standard defines the optional system call
posix_fallocate() to implement this feature. However,
some systems implement more specific functions to
accomplish the same operation.
On Linux, if the more specific function fallocate() is
implemented, it is used instead of posix_fallocate(),
falling back to posix_fallocate() if the fallocate()
call failed (it's only supported for the ext4, ocfs2,
xfs and btrfs file systems at the moment).
On Mac OS X it uses the specific fcntl() operation
F_PREALLOCATE, falling back to posix_fallocate() if
it's available (at the moment Mac OS X doesn't provide
posix_fallocate()).
On any other UNIX system, it uses posix_fallocate() if it's
available. Any other system not providing this system call
or any function to pre-allocate space for files, this operation
always fails with the ENOTSUP POSIX error.
|
|
When using the async thread pool, if an erlang process
asks to open a file and it gets shutdown/killed while
the file:open/2 call hasn't returned, it's possible to
leak a file descriptor against the target file.
This happens because when the file driver is stopped
(file_stop() function is called), an async thread is
executing, about to execute, or executed already the
invoke_open() function. After file_stop() is called,
the file_async_ready() function will not run, and this
function is responsible for setting desc->fd with the
file descriptor that invoke_open() got. The file_stop()
call closes desc->fd if it refers to a valid file
descriptor, which is not the case here, because this
function was called before file_async_ready() could
run.
This leak is easily reproducile in a GNU/Linux system
using the following test code:
-module(t).
-export([t/1]).
t(N) ->
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) ->
Name = integer_to_list(N),
Server = self(),
Pid = spawn(fun() ->
Server ! continue,
{ok, FdW} = file:open(Name, [raw, write]),
{ok, FdR} = file:open(Name, [raw, read]),
% Optional close calls, with or without them
% it makes no difference.
%ok = file:close(FdW),
%ok = file:close(FdR),
ok
end),
receive continue -> ok end,
exit(Pid, shutdown),
loop(N - 1).
Running this code with a few iterations is enough to very often
notice, with the lsof command, that the beam.smp process is holding
forever file descriptors open. This issue doesn't happen if the
async thread pool is not used.
Example:
$ erl +A 4
Erlang R15B03 (erts-5.9.3) [source] [64-bit] [smp:4:4] [async-threads:4] [hipe] [kernel-poll:false]
Eshell V5.9.3 (abort with ^G)
1> c(t).
{ok,t}
2> os:getpid().
"31975"
3> t:t(20).
ok
In a separate shell:
$ lsof -p 31975
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
beam.smp 31975 fdmanana cwd DIR 8,18 22736896 32563204 /home/fdmanana/git/hub/otp/tmp
beam.smp 31975 fdmanana rtd DIR 8,1 4096 2 /
beam.smp 31975 fdmanana txt REG 8,1 7600263 1835126 /opt/r15b03/lib/erlang/erts-5.9.3/bin/beam.smp
beam.smp 31975 fdmanana mem REG 8,1 7220736 2497283 /usr/lib/locale/locale-archive
beam.smp 31975 fdmanana mem REG 8,1 10280 2505021 /usr/lib/libsctp.so.1.0.11
beam.smp 31975 fdmanana mem REG 8,1 1811128 917795 /lib/x86_64-linux-gnu/libc-2.15.so
beam.smp 31975 fdmanana mem REG 8,1 31752 917803 /lib/x86_64-linux-gnu/librt-2.15.so
beam.smp 31975 fdmanana mem REG 8,1 135366 917799 /lib/x86_64-linux-gnu/libpthread-2.15.so
beam.smp 31975 fdmanana mem REG 8,1 159200 921249 /lib/x86_64-linux-gnu/libtinfo.so.5.9
beam.smp 31975 fdmanana mem REG 8,1 1030512 917962 /lib/x86_64-linux-gnu/libm-2.15.so
beam.smp 31975 fdmanana mem REG 8,1 14768 917702 /lib/x86_64-linux-gnu/libdl-2.15.so
beam.smp 31975 fdmanana mem REG 8,1 149280 917974 /lib/x86_64-linux-gnu/ld-2.15.so
beam.smp 31975 fdmanana 0u CHR 136,1 4 /dev/pts/1
beam.smp 31975 fdmanana 1u CHR 136,1 4 /dev/pts/1
beam.smp 31975 fdmanana 2u CHR 136,1 4 /dev/pts/1
beam.smp 31975 fdmanana 3r FIFO 0,8 1298297 pipe
beam.smp 31975 fdmanana 4w FIFO 0,8 1298297 pipe
beam.smp 31975 fdmanana 5r FIFO 0,8 1298298 pipe
beam.smp 31975 fdmanana 6w FIFO 0,8 1298298 pipe
beam.smp 31975 fdmanana 7w REG 8,18 0 32564173 /home/fdmanana/git/hub/otp/tmp/20
beam.smp 31975 fdmanana 8w REG 8,18 0 32564176 /home/fdmanana/git/hub/otp/tmp/16
beam.smp 31975 fdmanana 9w REG 8,18 0 32564177 /home/fdmanana/git/hub/otp/tmp/15
beam.smp 31975 fdmanana 10w REG 8,18 0 32564179 /home/fdmanana/git/hub/otp/tmp/12
beam.smp 31975 fdmanana 11w REG 8,18 0 32564180 /home/fdmanana/git/hub/otp/tmp/11
beam.smp 31975 fdmanana 12w REG 8,18 0 32564205 /home/fdmanana/git/hub/otp/tmp/10
beam.smp 31975 fdmanana 13w REG 8,18 0 32564182 /home/fdmanana/git/hub/otp/tmp/8
beam.smp 31975 fdmanana 14w REG 8,18 0 32564183 /home/fdmanana/git/hub/otp/tmp/7
beam.smp 31975 fdmanana 15w REG 8,18 0 32564186 /home/fdmanana/git/hub/otp/tmp/3
|
|
|
|
Testing using wxWidgets-2.9 on mac
|
|
According to the documentation, if the second or third line in a
script starts with %%!, then escript will use the rest of the line
as emulator options. However, previously this was only the case
if the first line started with #!. This change removes that check,
and unconditionally uses the %%! line if present.
|
|
* sverk/hipe-smp-independence:
erts,hipe: Make hipe compiler ask running emulator about process struct offsets
|
|
|
|
|
|
|
|
|
|
|
|
Thanks to Ádám Gólya <[email protected]>
|
|
Changes in "struct process" has made native code more depenedent on if the
executing emulator is smp enabled or not.
This commit will make a default built hipe compiler (without -xcomp)
to ask the running emulator about process struct offsets. This will
make native code work (again) as long as the same emulator is used for
compilation as well as execution of the native code.
|
|
* rickard/r16/port-optimizations/OTP-10336:
Fix driver_monitor_process() ASSERT
Fix scheduled port link operation
Fix aborts of port tasks when terminating ports
|
|
|
|
|
|
|
|
Document new BIFs:
* erlang:insert_element/3
* erlang:delete_element/2
|
|
* Test erlang:insert_element/3 BIF
* Test erlang:delete_element/2 BIF
|
|
* erlang:insert_element/3 - extend a tuple at an index
* erlang:delete_element/2 - remove an element at an index
|
|
OTP-10415
* sverk/egil/r16/new-alloc-header-scheme/OTP-10273: (42 commits)
erts: Make ll main mbc fit into 2pow size
erts: Clear entire mseg cache upon request
erts: Reduce max heap sizes
tests: Refactor away ?line macro in beam_SUITE
tests: Fix heap_sizes check
tests: Refactor away ?line macro in process_SUITE
tests: Use new correct min_bin_vheap_size in test
erts: Set super alignment (256kb) and limits for sbct (8Mb) and lmbcs (128Mb)
erts: Do not cache segments that are misaligned
erts: Add mseg cache for large sbc segments
erts: Reintroduce mseg options amcbf and rmcbf
erts: Optimize erl_alloc_util.c by substitute MBC_BLK_SZ
erts: Fix bug when allocating size near sbc_threshold
erts: Make gc sizes fit into MB Carrier blocks
erts: Force sbmbc to be disabled in a crude way
erts: Fix new header scheme for win64
erts: Fix mseg cache. Malplaced NULL pointer
erts: Remove unused mseg options amcbf and rmcbf
erts: Use aligned bits as constant in mseg_alloc
erts: Don't let zero be considered a power of two
...
Conflicts:
erts/emulator/test/process_SUITE.erl
|
|
|
|
|
|
Reduces max heap sizes to max addressable memory space. In reality this could be
even less since we need at least twice as much adressable memory to do a garbage
collection.
The rest of the system also uses memory thus further constraining heap memory
space and in the 64 bit case we really only have 48 bits mappable memory.
|
|
|
|
|
|
|
|
|
|
|
|
* SBC may realloc carriers to misaligned addresses which
is perfectly fine. However, those segments may not be cached
because MBC allocations might find them and MBC's *needs*
correct alignment.
|
|
* Not a power of two (unpowered) segements
|
|
Used with new sbc cache
|
|
with either MBC_ABLK_SZ or MBC_FBLK_SZ in all cases when we already know
what kind of block it is.
|
|
A block larger than sbc_threshold can be allocated in MBC if the subsequent
"residue block" is smaller than min_block_size.
Solved by lowering sbc_threshold to ("hard limit" - min_block_size).
|
|
* Account for block header size in gc-sizes
* Also slow down growth to 20% instead of 25% when
size threshold is reached
|