aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded
AgeCommit message (Collapse)Author
2016-09-15Merge branch 'maint'Raimo Niskanen
2016-09-15Merge branch 'raimo/diffserv-socket-option/OTP-13582' into maintRaimo Niskanen
* raimo/diffserv-socket-option/OTP-13582: Tune 'tclass' semantics Implement IPV6_TCLASS
2016-09-15Merge branch 'maint'Björn Gustavsson
* maint: erts: Add nif_SUITE:t_on_load erts: Improve nif_SUITE:upgrade test Don't leak old code when loading a modules with an on_load function Conflicts: erts/preloaded/ebin/erts_code_purger.beam erts/preloaded/ebin/erts_internal.beam erts/preloaded/src/erts_code_purger.erl
2016-09-14Don't leak old code when loading a modules with an on_load functionBjörn Gustavsson
Normally, calling code:delete/1 before re-loading the code for a module is unnecessary but causes no problem. But there will be be problems if the new code has an on_load function. Code with an on_load function will always be loaded as old code to allowed it to be easily purged if the on_load function would fail. If the on_load function succeeds, the old and current code will be swapped. So in the scenario where code:delete/1 has been called explicitly, there is old code but no current code. Loading code with an on_load function will cause the reference to the old code to be overwritten. That will at best cause a memory leak, and at worst an emulator crash (especially if NIFs are involved). To avoid that situation, we will put the code with the on_load function in a special, third slot in Module. ERL-240
2016-09-12Implement IPV6_TCLASSRaimo Niskanen
2016-09-06Update preloadedLukas Larsson
2016-09-06Merge branch 'kvakvs/erts/gc_minor_option/OTP-11695'Lukas Larsson
* kvakvs/erts/gc_minor_option/OTP-11695: erts: Fix req_system_task gc typespec Fix process_SUITE system_task_blast and no_priority_inversion2 Option to erlang:garbage_collect to request minor (generational) GC Conflicts: erts/emulator/beam/erl_process.c erts/preloaded/src/erts_internal.erl
2016-09-06erts: Fix req_system_task gc typespecLukas Larsson
2016-09-05Implement the new ceil/1 and floor/1 guard BIFsBjörn Gustavsson
Implement as ceil/1 and floor/1 as new guard BIFs (essentially part of Erlang language). They are guard BIFs because trunc/1 is a guard BIF. It would be strange to have trunc/1 as a part of the language, but not ceil/1 and floor/1.
2016-09-01Merge branch 'rickard/remove-old-purge-strategy/OTP-13844'Rickard Green
* rickard/remove-old-purge-strategy/OTP-13844: Avoid selective receive in code-purger process Remove old purge strategy Conflicts: erts/emulator/beam/beam_bif_load.c erts/emulator/beam/global.h
2016-08-31Avoid selective receive in code-purger processRickard Green
The code purger process handles vast amounts of messages when there are lots of processes alive. A single message in the message queue that does not match will in such cases cause lots of extra work. The code purger process now always picks the first message in the message queue, and by this avoid this extra work.
2016-08-31Remove old purge strategyRickard Green
2016-08-30Merge branch 'maint'Sverker Eriksson
2016-08-30Merge branch 'rickard/time-unit/OTP-13735' into maintRickard Green
* rickard/time-unit/OTP-13735: Update test-cases to use new symbolic time units Replace misspelled symbolic time units Conflicts: erts/doc/src/erlang.xml erts/emulator/test/long_timers_test.erl
2016-08-29Merge branch 'maint'Rickard Green
* maint: Fix tracing of processes executing dirty Perform check_process_code while process is executing dirty Fix purge of code Reclaim literal area after purge has completed Separate literal area from code Conflicts: erts/emulator/beam/global.h
2016-08-29Merge branch 'rickard/ds-purge-module/OTP-13808' into maintRickard Green
* rickard/ds-purge-module/OTP-13808: Perform check_process_code while process is executing dirty Conflicts: erts/doc/src/erl_nif.xml
2016-08-29Merge branch 'rickard/fun-purge-bug/OTP-13809' and ↵Rickard Green
'rickard/new-purge-strategy/OTP-13833' into maint * rickard/fun-purge-bug/OTP-13809: Fix purge of code Reclaim literal area after purge has completed Separate literal area from code Conflicts: erts/doc/src/erlang.xml erts/emulator/beam/beam_bif_load.c erts/emulator/beam/erl_init.c erts/preloaded/ebin/init.beam
2016-08-29Perform check_process_code while process is executing dirtyRickard Green
2016-08-29Fix purge of codeRickard Green
Ensure that we cannot get any dangling pointers into code that has been purged. This is done by a two phase purge. At first phase all fun entries pointing into the code to purge are marked for purge. All processes trying to call these funs will be suspended and by this we avoid getting new direct references into the code. When all processes has been checked, these processes are resumed. The new purge strategy now also completely ignore the existence of indirect references to the code (funs). If such exist, they will cause bad fun exceptions to the caller, but will not prevent a soft purge or cause a kill of a process having such live references during a hard purge. This since it is impossible to give any guarantees that no processes in the system have such indirect references. Even when the system is completely clean from such references, new ones can appear via distribution and/or disk.
2016-08-26Merge branch 'g-andrade/kernel/fetch_ztream_dictionary/PR-1139/OTP-13842'Lukas Larsson
* g-andrade/kernel/fetch_ztream_dictionary/PR-1139/OTP-13842: Update preloaded modules Specify min zlib ver on inflateGetDictionary doc Skip inflateGetDictionary test case if unsupported zlib: Only link inflateGetDictionary if available zlib: Add test case for inflateGetDictionary zlib: support extraction of inflation dictionary
2016-08-26Reclaim literal area after purge has completedRickard Green
2016-08-25Replace misspelled symbolic time unitsRickard Green
Besides using two words for 'milliseconds' et. al. they are also changed from plural to singular.
2016-08-23Update preloaded modulesLukas Larsson
2016-08-12Option to erlang:garbage_collect to request minor (generational) GCDmytro Lytovchenko
Note: Minor GC option is a hint, and GC may still decide to run fullsweep. Test case for major and minor gc on self Test case for major and minor gs on some other process + async gc test check docs fix
2016-08-12Merge branch 'lukas/erts/fix_init_stop_code_load_race/OTP-13802' into maintLukas Larsson
* lukas/erts/fix_init_stop_code_load_race/OTP-13802: erts/kernel: Fix code loading deadlock during init:stop
2016-08-12erts/kernel: Fix code loading deadlock during init:stopLukas Larsson
When init:stop is called it walks the application hierarchy and terminates each process. Some of these processes may do something while terminating and sometimes that something needs to load some new code in order to work. When this happens the code_server could just be in the process of terminating or the erl_prim_loader could be active. In both these cases the request to load the new code would cause a deadlock in the termination of the system. This commit fixes this by init rejecting attempts to load new code when init:stop has been called and fixing a termination race in the code_server. This however means that the process that tried to do something when told to terminate (for instance logging that it is terminating) will crash instead of loading the code.
2016-07-29Handle AF_UNSPEC and AF_UNDEFINED correctlyRaimo Niskanen
2016-07-23zlib: support extraction of inflation dictionaryGuilherme Andrade
2016-06-20Update preloaded modulesHenrik Nord
2016-06-10Merge branch 'kvakvs/erts/monitor_port/OTP-11384'Lukas Larsson
* kvakvs/erts/monitor_port/OTP-11384: erts: Add port monitors
2016-06-10erts: Add port monitorsDmytro Lytovchenko
* erlang:monitor/2 with port argument is added, erlang:demonitor, using port task API and avoiding locking; * port_info and process_info support for monitored ports (with named port monitors support); * Exit signals contain type 'process' or 'port'; * Propagation of port exit signals; * Self-cleaning when origin process dies with monitor on; * 8 test cases + testcase for port driver crashing; * Documentation for all of the above (monitor, demonitor, port_info and process_info) updated
2016-06-09Document the local (unix) address familyRaimo Niskanen
2016-06-08Remove internal state BOUND from inet_drvRaimo Niskanen
2016-06-02Merge branch 'saleyn/uds/PR-612/OTP-13572'Raimo Niskanen
* saleyn/uds/PR-612/OTP-13572: AF_UNIX is more portable
2016-06-02AF_UNIX is more portableRaimo Niskanen
Fix dialyzer warning for improper list in prim_inet by not using an improper list.
2016-06-02Merge branch 'saleyn/uds/PR-612/OTP-13572'Raimo Niskanen
* saleyn/uds/PR-612/OTP-13572: Rewrite inet* for address family 'local' Rewrite inet_drv for AF_LOCAL Assign externally open fd to gen_tcp (UDS support) Conflicts: erts/preloaded/ebin/prim_inet.beam lib/kernel/doc/src/gen_tcp.xml lib/kernel/doc/src/gen_udp.xml lib/kernel/src/inet6_sctp.erl lib/kernel/test/inet_SUITE.erl
2016-06-01Rewrite inet_drv for AF_LOCALRaimo Niskanen
2016-05-31Merge branch 'rickard/rt-dep-erts-kernel-stdlib-sasl'Rickard Green
* rickard/rt-dep-erts-kernel-stdlib-sasl: Bumped runtime dependencies between erts, kernel, stdlib, sasl
2016-05-30Reintroduce erlang:halt/0/1 in erl_bif_types.erlSverker Eriksson
Removed in f9cb80861f169743 when changed impl from C to Erlang. But seems they are needed to keep dialyzer tests happy. Also improved bif_SUITE:shadow_comments to include all exported in module erlang, not just the "snifs". ...which detected that apply/2 was missing Shadowed comment as well.
2016-05-27Update preloadedSverker Eriksson
2016-05-27Merge branch 'richcarl/erts/fix-init-stop/PR-911/OTP-13630/OTP-13631'Sverker Eriksson
2016-05-27Bumped runtime dependencies between erts, kernel, stdlib, saslRickard Green
2016-05-27Merge branch 'rickard/rm-mqd-mixed/OTP-13366'Rickard Green
* rickard/rm-mqd-mixed/OTP-13366: Remove the 'message_queue_data' option 'mixed'
2016-05-25Remove the 'message_queue_data' option 'mixed'Rickard Green
2016-05-25erts: Update preloadedSverker Eriksson
2016-05-25erts: Remove unnecessary halt string truncationSverker Eriksson
as erlang:halt does it for us now
2016-05-25erts: Implement halt/0 and halt/1 in ErlangSverker Eriksson
just to make things simpler.
2016-05-24erts: Move tracer SecondTraceTerm to Opts mapLukas Larsson
The extra trace data has been moved to the opts map in order for the tracer to be able to distinguish inbetween extra trace data 'undefined' and no extra trace data. In the same commit all opts associations have been changed so that if the tracer should not use them, the key is left unassicated instead of being sent to undefined. This should be give a small performance gain and also makes the API easier to work with.
2016-05-20Check exit status in init:stop/1 and simplify documentationRichard Carlsson
2016-05-16Tolerate bad directories in the code pathBjörn Gustavsson
A bad directory in the path would prevent the run-time system from starting: $ echo >foobar $ erl -pa foobar {"init terminating in do_boot",{load_failed,[supervisor,kernel,gen_server,file_io_server,filename,file,erl_parse,error_logger,code_server,erl_lint,proc_lib,code,application_controller,application_master,gen_event,application,error_handler,lists,heart,gen,file_server,ets,erl_eval]}} Crash dump is being written to: erl_crash.dump...done init terminating in do_boot () The reason is that when attempting to read each of the BEAM files, there would be an 'enotdir' error which erl_prim_load:get_modules/2,3 assumed was a fatal error. Update erl_prim_load:get_modules/2,3 to ignore any error and try the next directory in the path. Reported-by: http://bugs.erlang.org/browse/ERL-142 Reported-by: Michael Truog