summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-08-29cont.c (rb_context_t): remove ensure_listnormal
It is unused (we use rb_execution_context_t.ensure_list instead) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-28Tag a couple specs failing on AIXeregon
* The rest seems OS bugs, MRI bugs or incomplete IPv6 implementation: https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20180828T103302Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-28Fixed installation failure with mswin environment.hsbt
[ruby-core:88699][Bug #15035] This patch was provided by MSP-Greg. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-28Update to ruby/spec@6fd9472eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-28rest parameter optimization [Feature #15010]ko1
* vm_args.c: rb_ary_dup(args->rest) to be used at most once during parameter setup. [Feature #15010] A patch by chopraanmol1 (Anmol Chopra) <chopraanmol1@gmail.com>. * array.c (rb_ary_behead): added to remove first n elements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-28Fixed test failures in mswin environment at r64555.hsbt
[ruby-core:88699][Bug #15035] This patch was provided by MSP-Greg. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-28thread_pthread.h: rename `gvl.acquired' to `gvl.owner' and documentnormal
`acquired' was an old boolean variable, but nowadays it is a rb_thread_t pointer; "gvl.owner" seems like a more appropriate name. And document the contended path including waitq, timer, and timer_err. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27thread_pthread.c: document sigwait_th and sigwait_fd [ci skip]normal
This is an important concept to document, I think. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27thread_pthread.c: fix deadlock on test_thread.rb::test_signal_at_joinnormal
Fixes: r64575 ("avoid lock ping-pong in do_gvl_timer & ubf_select") git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27Rewrite Etc.sysconf spec to allow nil or Integer for all variableseregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27process.c: fix potential missed wakeups in r64576normal
Oddly, all existing test cases passed multiple times before this patch (even with --jit-wait), so this seems like a difficult failure to prove. Fixes: r64576 ("process.c: simplify SIGCHLD-based waitpid") git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27process.c: simplify SIGCHLD-based waitpidnormal
Introduce a new rb_thread_sleep_interruptible that does not execute interrupts before sleeping. Skipping the interrupt check before sleep is required for out-of-GVL ruby_waitpid_all to function properly when setting waitpid_state.ret Now that ubf_select can be called by the gvl.timer thread without recursive locking gvl.lock, we can safely use rb_threadptr_interrupt to deal with waking up sleeping processes, git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27thread_pthread.c: avoid lock ping-pong in do_gvl_timer & ubf_selectnormal
This simplifies the locking logic somewhat. While we're at it, designate_timer_thread is worthless in ubf_select because gvl_acquire_common already guarantees there is a gvl.timer if gvl->waitq is populated. In the future (for auto-fiber), this will allow using th->unblock.func for rb_waitpid callers (via rb_sigchld_handler). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27* 2018-08-28svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27SC_TZNAME_MAX can also be infiniteeregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27* append newline at EOF.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27Update to ruby/spec@007e908eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27* append newline at EOF.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27Update to ruby/spec@a89819deregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27Fix template/fake.rb.in if ENV["RUBYOPT"] is nileregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27Fix template/fake.rb.in when external and internal encodings are seteregon
* To be able to run spec/ruby/command_line/dash_encoding_spec.rb with the in-repo build. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27* append newline at EOF.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27Update to ruby/spec@09fa86ceregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27Simplify guards, the behavior seems Linux-specificeregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27Merge master branch from rubygems upstream.hsbt
* It's preparation to release RubyGems 3.0.0.beta2 and Ruby 2.6.0 preview 3. * https://github.com/rubygems/rubygems/compare/v3.0.0.beta1...fad2eb15a282b19dfcb4b48bc95b8b39ebb4511f git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27hrtime.h: add note explaining current use of uint64_t [ci skip]normal
[ruby-core:88678] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27hrtime.h: missing parennobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27hrtime.h: explicit casts to time_tnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27configure.ac: printf prifix for int64_tnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27thread.c: check interrupts explicitly in select/ppoll blocking regionsnormal
The logic around blocking_region_begin is confusing to me, but the goal of this patch is to ensure rb_sigwait_fd_get and rb_sigwait_fd_put are matched. In other words, we don't want a thread to hold sigwait_fd forever if an exception is raised while calling select() or ppoll(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27Merge rdoc-6.1.0.beta1.hsbt
* https://github.com/ruby/rdoc/compare/v6.0.4...v6.1.0.beta1 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27* 2018-08-27svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27Merge psych-3.1.0.pre1.hsbt
* Update bundled libyaml-0.2.1 from 0.1.7. https://github.com/ruby/psych/pull/368 * Unify Psych's API: To use keyword arguments with method call. https://github.com/ruby/psych/pull/358 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-26test/ruby/test_io.rb (test_recycled_fd_close): Linux workaroundnormal
Arch Linux CI still seems to timeout on this test... Note, I can't reproduce the failures in these tests on a FreeBSD 11.1 VM while infinite-looping, even without the "th.join(0.001)". It doesn't seem related to the use of rb_wait_for_single_fd (r64529). cf. https://rubyci.org/logs/rubyci.s3.amazonaws.com/arch/ruby-trunk/log/20180826T090003Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-26thread_sync.c: common wakeup_{one,all} implementationnormal
This let us avoid looping in rb_szqueue_max_set, saves us some lines of code and reduces binary size slightly (numbers from 32-bit x86): text data bss dec hex filename before: 91272 392 156 91820 166ac thread.o after: 91200 392 156 91748 16664 thread.o Inspiration from this taken from the FUTEX_WAKE op of the Linux futex(2) syscall. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-26process.c: remove worthless waitpid_sys macronormal
It is identical to do_waitpid, and the win32 version will not be needed for MJIT (since win32 does not suffer from the waitpid(-1, ...) conflict where waits can get stolen. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25test/io/wait/test_io_wait_uncommon.rb: relax /dev/random checknormal
Too many machines lack entropy to have a usable /dev/random. I had similar problems on my system until I started using haveged(8), but we can't require that for CI. cf. https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-trunk/log/20180825T213003Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25thread_pthread.c (ubf_wakeup_thread): `th' is never NULLnormal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25thread_pthread.c: main thread always gets hit by signalsnormal
We need to ensure Signal.trap handlers can function if the main thread is sleeping after a subthread has grabbed sigwait_fd, but later exited. Consider the following timeline: main_thread sub-thread ----------------------------------------- Signal.trap() { ... } get sigwait_fd ppoll on sigwait_fd native_cond_sleep (via pthread_cond_wait) ppoll times-out put sigwait_fd sub-thread exits only thread alive SIGNAL HITS The problem is pthread_cond_wait cannot return EINTR, so we can never run the Signal.trap handler. So we will avoid using native_cond_sleep in the main thread and always use ppoll to sleep when in the main thread. This can guarantee the main thread remains aware of signals; even if it cannot safely read off sigwait_fd git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25* 2018-08-26svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25thread.c: quiet down -Wmaybe-uninitialized on gcc 7.[2-3]normal
Haven't tested gcc 8, yet; but gcc 6 seems fine.... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25hrtime.h: add documentationnormal
I updated the patch with documentation but forgot about it, earlier :x [ruby-core:88616] [Misc #15014] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25thread.c: use rb_hrtime_t scalar for high-resolution time operationsnormal
Relying on "struct timespec" was too annoying API-wise and used more stack space. "double" was a bit wacky w.r.t rounding in the past, so now we'll switch to using a 64-bit type. Unsigned 64-bit integer is able to give us over nearly 585 years of range with nanoseconds. This range is good enough for the Linux kernel internal time representation, so it ought to be good enough for us. This reduces the stack usage of functions while GVL is held (and thus subject to marking) on x86-64 Linux (with ppoll): rb_wait_for_single_fd 120 => 104 do_select 120 => 88 [ruby-core:88582] [Misc #15014] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25drb: close graceful shutdown pipe before socketnormal
Closing a listen socket while entering select(2) may trigger IOError or even deadlock because another thread may give the file descriptor to another file description; meaning the kernel can wait on the wrong description. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25drb: simplify shutdown pipe close logicnormal
IO#close is idempotent, so we don't need to waste bytecode to check or nil it at shutdown time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e