aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-11-04erts: Make erts_printf work with non-blockingLukas Larsson
Now that stdout can be set as non-blocking by the ttsl driver we can no longer use putc and friends for the stdout/stderr streams. Therefore we fallback on write. OTP-12239
2014-10-16Fix io:columns/0 timeout when invoked via userJosé Valim
This patch fixes an issue where io:columns/0 times out when invoked from any application callback (or any supervisor/supervised module since the group leader is inherited). To reproduce the issue, one must simply call io:columns() from any application callback. You will notice the process will block for 2 seconds which then times out and returns {:error, :enotsup}. Note this bug only happens inside the erlang shell (using -noshell or escripts do not trigger the bug). To fix the bug, it is important to understand how io requests flow from application callback processes. Here are the steps followed: 1. Since io:columns/1 is timing out, the first step is to find out who is the group leader for the application callback process. Using process_info/1, we can see the parent process is the application_master and handles io_requests by delegating them to the group_leader. 2. By inspecting the application_master process, we can find the group_leader the message is sent is the registered process named user. The process is running the group module which does handle io:columns/1 requests delegating them to user_drv process. 3. The user_drv process does handle tty_geometry requests, except that a clause above ends up short-circuiting all tty_geometry requests from the user process. This patch moves the user clause below the specific driver messages. OTP-12241
2014-10-16kernel,ssh: Add synchronous user_drv protocolLukas Larsson
Added a put_chars_sync to the protocol that can be used to talk to user_drv and made group use it. This is needed in order to guarantee that bytes has been pushed to the tty port when doing something like this: io:format("halting\n"),erlang:halt(0). Before this change the halting message could be lost in the message queue of the user_drv process, this is no longer possible. This commit also fixes ssh_cli as that plugs itself in as a user_drv process. OTP-12240
2014-10-16erts: Make writing to non-tty fds non-blockingLukas Larsson
If the fd_driver is given non-tty fds it will now use an async thread instead of doing a blocking write. An example of a non-tty fd is the fd used by stderr, but could be anything handed down to the driver.
2014-10-16erts: Make tty driver non-blockingLukas Larsson
Instead of using blocking call to fwrite, the tty driver now uses non-blocking calls to writev and queues any output data that cannot be written into the driver queue. Without this change an stdout write could block an entire scheduler if for some reason the pseudo tty on the other side does not consume the output of the Erlang shell. OTP-12239
2014-06-19Merge branch 'sverk/crypto-ec-mem-leak/OTP-11999' into maintSverker Eriksson
* sverk/crypto-ec-mem-leak/OTP-11999: crypto: Fix memory leak of EC "keys" and "points" crypto: Fix crypto for debug and valgrind
2014-06-18crypto: Fix memory leak of EC "keys" and "points"Sverker Eriksson
2014-06-18Merge branch 'egil/fix-doc-links' into maintBjörn-Egil Dahlberg
* egil/fix-doc-links: doc: Fix broken links in Installation Guide doc: Fix broken links
2014-06-18Update preloaded modulesMagnus Lidén
2014-06-18Update primary bootstrapMagnus Lidén
2014-06-18Merge branch 'siri/cuddle-with-tests' into maintSiri Hansen
* siri/cuddle-with-tests: [reltool] Back out adaption to better quoting on windows
2014-06-18[reltool] Back out adaption to better quoting on windowsSiri Hansen
This commit only changes the test. It reverts commit 710a1fa ([reltool] Adapt tests to better quoting of paths on windows) because the commit that actually changed the quoting behaviour on windows was moved from the maint branch to master (9633e0e win32: Fix quoting of paths).
2014-06-18Merge branch 'siri/cuddle-with-tests' into maintSiri Hansen
* siri/cuddle-with-tests: [upgrade_SUITE] Set previous major to r16b
2014-06-18Merge branch 'ia/inets/prep-for-release' into maintIngela Anderton Andin
* ia/inets/prep-for-release: inets: Prepare for release
2014-06-17crypto: Fix crypto for debug and valgrindSverker Eriksson
without relying on opt-version has been built. Removed ASSERT to make crypto_callback.debug.so work without dynamic linking to libcrypto.so.
2014-06-17doc: Fix broken links in Installation GuideBjörn-Egil Dahlberg
2014-06-17doc: Fix broken linksBjörn-Egil Dahlberg
2014-06-17Merge branch 'hb/dialyzer/fix_recognition_of_records/OTP-11935' into maintHans Bolinder
* hb/dialyzer/fix_recognition_of_records/OTP-11935: [dialyzer] Correct a doc bug introduced in 0b041238 [dialyzer] Use the option 'dialyzer' to control the compiler [dialyzer] Fix handling of literal records
2014-06-17inets: Prepare for releaseIngela Anderton Andin
2014-06-17[dialyzer] Correct a doc bug introduced in 0b041238Hans Bolinder
2014-06-17[dialyzer] Use the option 'dialyzer' to control the compilerHans Bolinder
2014-06-17[dialyzer] Fix handling of literal recordsHans Bolinder
This ticket is about records in Erlang code, and when to check the fields against the (optional) types given when defining records. Dialyzer operates on the Erlang Core format, where there are no trace of records. The fix implemented is a Real Hack: Given the new option 'dialyzer' erl_expand_records marks the line number of records in a way that is undone by v3_core, which in turn inserts annotations that can be recognized by Dialyzer.
2014-06-17Merge branch 'ia/ssl/revert-due-to-performance-issue' into maintIngela Anderton Andin
* ia/ssl/revert-due-to-performance-issue: Revert "ssl: Avoid creating a huge session table"
2014-06-17Merge branch 'bjorn/compiler/fix-latin1-fallback/OTP-11987' into maintBjörn Gustavsson
* bjorn/compiler/fix-latin1-fallback/OTP-11987: Fix handling of latin1 characters in false ifdef branches
2014-06-17Merge branch 'bjorn/kernel/remove-file_info-vestiges/OTP-11982' into maintBjörn Gustavsson
* bjorn/kernel/remove-file_info-vestiges/OTP-11982: Remove documentation and stub for non-exist file:file_info/1
2014-06-17Merge branch 'bjorn/erts/fix-prim_eval' into maintBjörn Gustavsson
* bjorn/erts/fix-prim_eval: add_abstract_code: Remove 'from_asm' option
2014-06-17Merge branch 'siri/ct-and-cover/OTP-11971' into maintSiri Hansen
* siri/ct-and-cover/OTP-11971: [test_server] Fix bug introduced in 5a3c466
2014-06-16Revert "ssl: Avoid creating a huge session table"Ingela Anderton Andin
This reverts commit fcc6a756277c8f041aae1b2aa431e43f9285c368.
2014-06-16[test_server] Fix bug introduced in 5a3c466Siri Hansen
This was detected by dialyzer - an '=' character too much had erronously been inserted.
2014-06-16Merge branch 'jjhoo/mingw_compile_fix_forceinline/OTP-11945' into maintRickard Green
* jjhoo/mingw_compile_fix_forceinline/OTP-11945: Fix redefinition of ETHR_FORCE_INLINE
2014-06-16Fix redefinition of ETHR_FORCE_INLINERickard Green
2014-06-16Merge branch 'siri/reltool-typo/OTP-11977' into maintSiri Hansen
* siri/reltool-typo/OTP-11977: Fix typo in error message in reltool_server
2014-06-16Merge branch 'peppe/common_test/ct_basic_html_error' into maintPeter Andersson
* peppe/common_test/ct_basic_html_error: Fix problem with mismatching html tags when running basic_html log mode OTP-11917
2014-06-16Merge branch 'peppe/common_test/ct_log_cache_error' into maintPeter Andersson
* peppe/common_test/ct_log_cache_error: Force CT log cache to rescan entries with incomplete results OTP-11988
2014-06-16Fix handling of latin1 characters in false ifdef branchesBjörn Gustavsson
The fallback to latin-1 encoding would not work if the invalid UTF-8 characters occurred in a skipped branch in an -ifdef/-ifndef.
2014-06-16Merge branch 'dgud/wx/additional-functionality/OTP-11986' into maintDan Gudmundsson
* dgud/wx/additional-functionality/OTP-11986: wx: Fix destroy bug wx: Add wxPopup(Transient)Window wx: Fix non constant define (wxSL_LABELS) wx: Add wxActivateEvent wx: Add missing wxTextCtrl:changeValue OTP-11985
2014-06-16wx: Fix destroy bugDan Gudmundsson
Do not postpone deletion of wx*DC objects since they need to be deleted directly. Otherwise, if inside showModal, causes an eternal loop of wxPaint events on Windows.
2014-06-16Merge branch 'bjorn/asn1/dialyzer-warnings/OTP-11372' into maintBjörn Gustavsson
* bjorn/asn1/dialyzer-warnings/OTP-11372: (23 commits) BER: Eliminate dialyzer warnings for specialized decode functions BER: Eliminate dialyzer warning for encoding of BIT STRINGs BER: Optimize encoding of ENUMERATED BER: Remove a redundant clause in encoding of open types (U)PER: Fix decoding of named INTEGER (U)PER: Fix encoding of a semi-constrained, named INTEGER (U)PER: Optimize handling of named BIT STRING with a lower zero bound PER: Optimize encoding of character strings with simple ranges PER: Remove unnecessary clause for handling DEFAULT (U)PER: Suppress dialyzer warnings for complete/1 Test suites: Add support for running Dialyzer on generated code Improve tests of DEFAULT values Correct OCTET STRING default when legacy_erlang_types is active Remove old DEFAULT-checking code made obsolete in the previous commit Rewrite the code for testing DEFAULT for DER Test DEFAULT more thoroughly Set.py: Correct illegal DEFAULT value BER: Optimize decoding of ENUMERATED BER: Suppress dialyzer warnings for encode_bit_string/4 BER: Inline testing of constraints when decoding ...
2014-06-16Merge branch 'hans/ssh/decode_encode_fix/OTP-11983' into maintHans Nilsson
2014-06-16ssh: Minor message encode/decode bugfixesHans Nilsson
SSH_MSG_IGNORE SSH_MSG_UNIMPLEMENTED
2014-06-16Merge branch 'hans/ssh/decode_encode_fix/OTP-11972' into maintHans Nilsson
* hans/ssh/decode_encode_fix/OTP-11972: ssh: Prepare for release ssh: Accept disconnect msgs without language tag
2014-06-16ssh: Prepare for releaseHans Nilsson
2014-06-16ssh: Accept disconnect msgs without language tagHans Nilsson
2014-06-16Merge branch 'gorillainduction/improve_mnesia_locker_complexity' into maintHenrik Nord
* gorillainduction/improve_mnesia_locker_complexity: Optimize tid lock table OTP-11981
2014-06-16Merge branch 'ia/ssl/test-cuddle' into maintIngela Anderton Andin
* ia/ssl/test-cuddle: ssl: Test case stability
2014-06-13Merge branch 'sverk/ethr_aux-cache-align-bug' into maintSverker Eriksson
* sverk/ethr_aux-cache-align-bug: erts: Fix cache line alignment bug for ts_event_pool
2014-06-13Merge branch 'ia/ssl/dialyzer-specs' into maintIngela Anderton Andin
* ia/ssl/dialyzer-specs: ssl: Fix dialyzer specs to reflect reality
2014-06-13add_abstract_code: Remove 'from_asm' optionBjörn Gustavsson
The purpose of add_abstract_code is to give Dialyzer some abstract code so that it will not fail fatally when analysing prim_eval which was compiled from BEAM assembly. But if Dialyzer were to pass along the compiler options that the module was compiled with when translating the abstract code to Core Erlang, the 'from_asm' option would crash the compilation. Thus, since we are already cheating, we should cheat a little bit more and also remove the 'from_asm' option.
2014-06-13Remove documentation and stub for non-exist file:file_info/1Björn Gustavsson
file:file_info/1 was removed a long time ago, but its documentation was not removed.
2014-06-12Merge branch 'sverk/etp-alloc-stats' into maintSverker Eriksson
* sverk/etp-alloc-stats: erts: Fix documentation for no of default allocator instances erts: Add etp-alloc-stats and etp-alloc-instances