aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys
AgeCommit message (Collapse)Author
2019-07-18Fix io:columns() and io:rows() are not working from escripts bugKjell Winblad
The functions io:columns() and io:rows() only worked correctly inside interactive erlang shells before this fix. These functions returned {error,enotsup} before this fix even if stdout and stdin were connected to a terminal when they were invoked from an escript or a program started with e.g., `erl -noshell`. This commit fixes issue ERL-717.
2019-05-02erts: Fix so that non-oneshot pollset on OpenBSD worksLukas Larsson
The poll code for kevent on OpenBSD and NetBSD had not been fixed to work properly when disabling events in the scheduler poll-set. Because they use ONESHOT the delete operation was built into the trigger and thus a lot of code was not needed when doing oneshot, however it is needed when doing non-oneshot.
2019-04-09Merge branch 'maint'Lukas Larsson
2019-04-09erts: Fix sys_driver to correctly deselect fdsLukas Larsson
Incorrect precidence rules made the driver never deselect the given fds.
2019-03-25erts: Fix file desc leak in poll debug get_evtsLukas Larsson
2019-02-28erts: Stop using madvise(2) on SolarisJohn Högberg
inet_drv adds some arcane #defines to get SCTP working, which may end up disabling madvise(2) locally in that file, breaking the build in the process. This commit disables madvise(2) altogether on Solaris as it's far simpler than undoing the define dance in erl_mmap.h.
2019-02-22Merge PR-2147 from sverker/sverker/enif-null-pid/OTP-15011Sverker Eriksson
Add enif_set_pid_undefined & enif_is_pid_undefined
2019-02-22Merge branch ↵Lukas Larsson
'lukas/erts/fragment-dist-messages/OTP-13397/OTP-15610/OTP-15611/OTP-15612/OTP-15613' * lukas/erts/fragment-dist-messages/OTP-13397/OTP-15610/OTP-15611/OTP-15612/OTP-15613: erts: Add debug dist obuf memory leak check win32: Fix ./otp_build debuginfo_win32 Make ld.sh on windows print better error reason erts: Fix so that externals with creation 0 compare equal to all erts: Expand etp to look for free processes erts: Implement trapping while sending distr exit/down erts: Add ERL_NODE_BOOKKEEP to node tables refc erts: Refactor ErtsSendContext to be ErtsDSigSendContext erts: Add distr testcases for fragmentation erts: Make remote send of exit/2 trap erts: Implement fragmentation of distrubution messages erts: Expand distribution protocol documentation erts: Move reason in dist messages to payload erts: Remove a copy of distribution data payload erts: Yield later during process exit and allow free procs to run erts: Refactor rbt _yielding to use reductions erts: Limit binary printout for %.XT in erts_print
2019-02-22erts: Implement fragmentation of distrubution messagesLukas Larsson
2019-02-20erts: Add enif_set_pid_undefined & enif_is_pid_undefinedSverker Eriksson
2019-02-18Merge branch 'maint'Lukas Larsson
2019-02-18Merge branch 'lukas/erts/fix-exit_status-netbsd/OTP-15558' into maintLukas Larsson
* lukas/erts/fix-exit_status-netbsd/OTP-15558: Fix EV_DISPATCH detection on NetBSD
2019-02-11Merge branch 'maint'Sverker Eriksson
2019-02-11Merge branch 'sverker/enif_select-faulty-assert' into maintSverker Eriksson
* sverker/enif_select-faulty-assert: erts: Fix faulty debug assert in enif_select
2019-02-06erts: Fix faulty debug assert in enif_selectSverker Eriksson
2019-02-05erts: Refactor rbt _yielding to use reductionsLukas Larsson
All of the Red-Black Tree _yielding functions have been updated to work with reductions returned by the called function instead of yielding on each element.
2019-02-01Fix EV_DISPATCH detection on NetBSDLukas Larsson
2019-01-31Merge branch 'maint'Sverker Eriksson
2019-01-28erts: Add magic port control numbersSverker Eriksson
to increase the probablity of a nice badarg from erlang:port_control.
2019-01-23Merge branch 'maint'Lukas Larsson
2019-01-23Merge branch 'lukas/erts/scheduler-pollset-fixes/OTP-15538' into maintLukas Larsson
* lukas/erts/scheduler-pollset-fixes/OTP-15538: erts: Fix getting of poll events on linux >= 4.15.0 erts: Use reduction based polling for starved poll-set erts: Fix pollset test cases
2019-01-21erts: Fix getting of poll events on linux >= 4.15.0Lukas Larsson
2019-01-18erts: Fix too early close of spawn driver fdLukas Larsson
2019-01-07erts: Add enif_select_read|write with 'msg_env' argumentSverker Eriksson
2019-01-07erts: Fix pollset test casesLukas Larsson
2018-12-20erts: Add ERL_NIF_SELECT_CUSTOM_MSGSverker Eriksson
2018-12-07Merge pull request #2046 from ↵John Högberg
jhogberg/john/erts/mark-pooled-free-blocks-unused/OTP-15075 Mark free blocks in pooled carriers as unused
2018-12-07Mark free blocks in pooled carriers as unused (MADV_FREE)John Högberg
This lets the OS reclaim the physical memory associated with these blocks which reduces the impact of long-lived awkward allocations. A small allocated block will still keep a huge carrier alive, but the unused part of the carrier will now be available to the OS. Co-authored-by: Dmytro Lytovchenko <[email protected]>
2018-12-06Merge branch 'maint'Lukas Larsson
Conflicts: erts/emulator/beam/erl_process.c
2018-12-06Merge branch 'lukas/OTP-21.1.1/scheduler_pollset/OTP-15475' into maintLukas Larsson
* lukas/OTP-21.1.1/scheduler_pollset/OTP-15475: erts: Move fds with active true behaviour to own pollset erts: Fix lists_member_2 reduction count erts: Allow code_model_small to be set in xcomp setting erts: Implement delay_send using timer instead of poll erts: Optimize driver_set_timer(0) to fire at once erts: Optimize the inet driver multi timers for one timer erts: Move all inet tcp CONNECTED timers to multi timer erts: Add erts_io_notify_port_task_executed to check_io msacc state erts: Add pre-alloc to ALLOC msacc state erts: Make thr prgr wakeup current or sched 1 erts: Pass thread progress data where possible
2018-12-06erts: Move fds with active true behaviour to own pollsetLukas Larsson
At start of the VM a poll-set that the schedulers will check is created where fds that have triggered many (at the moment, many means 10) times without being deselected inbetween. In this scheduler specific poll-set fds do not use ONESHOT, which means that the number of syscalls goes down dramatically for such fds. This pollset is introduced in order to handle fds that are used by the erlang distribution and that never change their state from {active, true}. This pollset only handles ready_input events, ready_output is still handled by the poll threads. During overload, polling the scheduler poll-set is done on a 10ms timer.
2018-12-03erts: Add erts_io_notify_port_task_executed to check_io msacc stateLukas Larsson
OTP-15450
2018-10-29Merge branch 'maint'Lukas Larsson
2018-10-23erts: Pass thread progress data where possibleLukas Larsson
The poll thread does a lot of waking up and then going back to sleep. A large part of the waking up is managing thread progress and a large part of that was using thread specific data to get the thread progress data pointer. With this refactor the tpd is passed to each of the functions which greatly decreases the number of ethr_get_tsd calls which in turn halves the CPU usage of the poller thread in certain scenarios.
2018-09-29SELinux is another cause of MSG_CTRUNCAlexander Clouter
https://github.com/termux/termux-packages/issues/2882
2018-09-21Merge branch 'maint'Henrik Nord
2018-09-21Update copyright yearHenrik Nord
2018-09-12Merge branch 'maint'Rickard Green
* maint: Updated OTP version Update release notes Update version numbers erts: Fix "Prevent inconsistent node lists" fix Fix include-path regression caused by dd0a39c Restore default SIGTERM behaviour for port programs
2018-09-12Merge branch 'maint-21' into maintRickard Green
* maint-21: Updated OTP version Update release notes Update version numbers erts: Fix "Prevent inconsistent node lists" fix Fix include-path regression caused by dd0a39c Restore default SIGTERM behaviour for port programs
2018-09-11Merge branch 'sverker/enif-cancel-select/OTP-15095'Sverker Eriksson
* sverker/enif-cancel-select/OTP-15095: erts: Add ERL_NIF_SELECT_CANCEL flag for enif_select
2018-09-10Restore default SIGTERM behaviour for port programsRickard Green
erl_child_setup program ignores TERM signals as of ERTS version 10.0 (cff8dce0). This setting was unfortunately inherited by port programs. This commit restores handling of TERM signals in port programs to the default behavior. That is, terminate the process.
2018-08-27Fix bug in compact representation of float_to_list/2Serge Aleynikov
2018-08-10erts: Delete fd from poll-set when closing fd_driver portLukas Larsson
2018-08-03erts: Fix seq_trace to not clear token for system messagesLukas Larsson
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
2018-07-30erts: Handle EMFILE errors in forker_driver for writeLukas Larsson
Before this change, if a write to the uds failed due to EMFILE to ETOOMANYREFS the entire vm would crash. This change makes it so that an SIGCHLD is simulated to that the error is propagated to the user instead of terminating the VM.
2018-07-30Merge branch 'lukas/erts/win_break_poll_thread_fix/OTP-15205' into maintLukas Larsson
* lukas/erts/win_break_poll_thread_fix/OTP-15205: erts: Fix bug where break would not trigger on windows
2018-07-26Merge branch 'maint-21' into maintJohn Högberg
2018-07-20erts: Add ERL_NIF_SELECT_CANCEL flag for enif_selectSverker Eriksson
to deselect read and/or writes without stop callback.
2018-07-13erts: Fix bug where break would not trigger on windowsLukas Larsson
This bug was introduced in 988f5f5e8061ce2. The aux_thread needs to be poked as it is the thread that handles all break actions.
2018-07-10erts: Fix buggy calls to erts_sys_explicit_8bit_getenvSverker Eriksson
Two of them only affect valgrind builds and the one for ERL_CRASH_DUMP_NICE seems benign. Return value changed in c2d70945dce9cb09d5d7120d6e9ddf7faac8d230 old -> new -1 -> 0 not found 0 -> 1 found ok 1 -> -1 found but too big