Граф коммитов

51772 Коммитов

Автор SHA1 Сообщение Дата
normal 77038f9f82 Revert "thread_sync.c (rb_mutex_sleep): skip interrupt check before sleep"
This reverts commit 2e420b8b99 (r64464)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-19 00:01:03 +00:00
eregon f6f54d776e Guard spec which only works on Linux
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 23:49:34 +00:00
normal 2e420b8b99 thread_sync.c (rb_mutex_sleep): skip interrupt check before sleep
We do not want to risk switching threads before going to sleep
because it can cause unexpected wakeups and put us in an
unexpected state when used with ConditionVariable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 20:04:07 +00:00
eregon 17d20383ef Special case for Solaris 11x on RubyCI
* Where localhost is an alias but not the primary name of 127.0.0.1.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 19:37:46 +00:00
eregon 4dc1c725f8 Be more flexible in the protocol value returned by getaddrinfo()
* Only Solaris 2.10 i386 and Windows seem to return 0 it and other
  Solaris seem to fill the value.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 19:37:29 +00:00
eregon 08bca6b611 Adapt pack_sockaddr_in specs for Solaris
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 19:37:12 +00:00
eregon 10f642ba02 Use ftp for the service in getaddrinfo/getnameinfo/getservbyname specs
* Solaris cannot resolve 'http' but can resolve 'ftp'.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 19:36:57 +00:00
eregon 61a33fa8e2 Simplify to a more standardized Socket SCM constant in specs
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 19:36:41 +00:00
eregon 686a4e2491 Add guards for Solaris for socket specs
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 19:36:26 +00:00
eregon 946c080892 Adapt spec to consider Solaris
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 19:36:10 +00:00
eregon 08563f2e14 Use 127.0.0.1 instead of localhost in Addrinfo specs
* Solaries doesn't support Addrinfo.getaddrinfo('localhost', 80),
  but supports Addrinfo.getaddrinfo('127.0.0.1', 80).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 19:35:54 +00:00
eregon 3405ea62b5 Accept TypeError for Socket#getnameinfo
* Happens when VALIDATE_SOCKLEN() actually checks the length such as on
  FreeBSD.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 19:35:37 +00:00
eregon 7b37c8cdc5 Always set autoclose=false for IO.for_fd fds
* I believe this should be default behavior, see [Feature #2250].
* Now make test-spec MSPECOPT='-R100 spec/ruby/library/socket' works fine.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 19:35:20 +00:00
svn bf4276b4a1 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 19:35:03 +00:00
eregon 0cd6355791 Re-add socket specs
* This reverts commit df9521fd043df1fb862e46f9b1af83223f16eb2d:
  "Remove failing spec files"
* Platform guards follow in the next commits.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 19:35:02 +00:00
normal bfdf6cde9f Revert "thread.c (sleep_*): check interrupt before changing th->status"
This reverts commit 9e59487a38 (r64449)

More (but different) CI failures I can't reproduce locally...
http://ci.rvm.jp/results/trunk-test@ruby-sky3/1235951

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 19:03:44 +00:00
svn 49a5f2c57c * 2018-08-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 18:29:29 +00:00
normal 9e59487a38 thread.c (sleep_*): check interrupt before changing th->status
Having threads switch before we sleep can cause applications
to misread the state of the thread.  Now, we are consistent
with blocking_region_begin behavior and change th->status
AFTER checking interrupts.

Maybe this can fix [Bug #15002]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 18:29:28 +00:00
eregon c742050ea5 Revert r64441
* This reverts commit 647fc1227a4146ecbfeb0d59358abc8d99cd8ae6:
  "thread_sync.c (rb_mutex_synchronize): only unlock if we own the mutex"
* Let's try to preserve the semantics of always being locked inside
  Mutex#synchronize, even if an exception interrupts ConditionVariable#wait.
* As discussed on [Bug #14999].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 13:52:53 +00:00
naruse b5b5b28c65 Temporary revert "process.c: dead code when no SIGCHLD"
This reverts commit r64407.
Maybe it breaks http://mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/log/20180817T095734Z.fail.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 12:35:28 +00:00
nobu 3e1a6feeb6 NEWS: quote false [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 09:56:43 +00:00
nobu b6eb3fcbec NEWS: converted to Markdown [ci skip]
* NEWS: Converted to Markdown format, from (wrongly) Markdown-mixed
  RDoc format.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 09:53:11 +00:00
normal fe2f89af9a thread.c (sleep_*): reduce the effect of spurious interrupts
Spurious interrupts from SIGCHLD cause Mutex#sleep (via
ConditionVariable#wait) to return early and breaks some use
cases.  Since these are outside the programs's control with
MJIT, we will only consider pending interrupts (e.g. those
from Thread#run) and signals which cause a Ruby-level Signal.trap
handler to fire as "spurious" wakeups.

[ruby-core:88537] [Feature #15002]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 09:07:36 +00:00
kazu 3bee3527fd [DOC] Fix indent [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 07:26:23 +00:00
normal 647fc1227a thread_sync.c (rb_mutex_synchronize): only unlock if we own the mutex
If an exception is raised inside Mutex#sleep (via ConditionVariable#wait),
we cannot guarantee we can own the mutex in the ensure callback.

However, who owns the mutex at that point does not matter.  What
matters is the Mutex is usable after an exception occurs.

* thread_sync.c (rb_mutex_synchronize): only unlock if we own the mutex

* spec/ruby/library/conditionvariable/wait_spec.rb: only test lock
  usability after thread kill.  Who owns the lock at any
  particular moment is an implementation detail which we cannot
  easily guarantee.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 06:33:49 +00:00
normal 6e0d69e4a7 Revert "thread_sync.c (do_sleep): avoid thread-switch/interrupt check"
This reverts commit d7ddbff295 (r64436)

Seems worthless at preventing CI failures

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 06:05:17 +00:00
normal d7ddbff295 thread_sync.c (do_sleep): avoid thread-switch/interrupt check
Calling rb_mutex_sleep directly should avoid
thread-switching/interrupt checking which can lead to occasional
failures.

Unfortunately, this means overriding Mutex#sleep is no longer
supported.  Will let this commit run for a bit see if CI failures
from ConditionVariable specs continue...

cf. https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu/ruby-trunk/log/20180817T213003Z.fail.html.gz

[ruby-core:88524] [Bug #14999]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 04:24:31 +00:00
kazu 38f137276d Suppress read of ~/.irbrc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 04:09:48 +00:00
nobu 26336dda67 test/ruby/test_system.rb: suppress prompt and echo on Windows
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 02:44:35 +00:00
k0kubun b2826ef7e9 test/lib/zombie_hunter.rb: enable zombie hunter for MJIT
I think this issue is solved by Eric Wong.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 02:20:46 +00:00
k0kubun 29aa73fcec test_function.rb: try running test_nogvl_poll again
According to some runs in mjit-test (make test-all RUN_OPTS="--jit-wait"),
this test might not be the cause of its failure.

So, let me try running this again.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 02:15:41 +00:00
k0kubun 288e27899b tool/downloader.rb: retry 500 from GitHub
Unfortunately, GitHub may return 500 for temporary failure:
https://travis-ci.org/ruby/ruby/builds/417246523

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 02:04:44 +00:00
k0kubun b173fc92c0 mjit_worker.c: revert r64322 and r64323
I gave up to introduce the optimization that skips pc motion by checking
C code's line number. The same code can often be shared by multiple
program counters and it's so hard to achieve the optimization in MJIT's
architecture.

Reverting to improve performance by removing -g1 and to remove so file
when it becomes not necessary.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18 01:10:03 +00:00
svn 91bea9db75 * 2018-08-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17 23:51:48 +00:00
eregon a2d2a55d0c Guard spec failing on Solaris
* https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20180817T182406Z.fail.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17 23:51:47 +00:00
eregon fb01ef38a1 Add guard for Solaris in Socket#connect_nonblock spec
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17 14:52:18 +00:00
eregon abd8880d27 Guard connect_nonblock spec on FreeBSD
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17 13:07:37 +00:00
eregon 28ed3c0f80 Guard with a :pktinfo feature specs relying on PKTINFO
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17 13:07:24 +00:00
eregon a48339c2c9 Re-add specs
* This reverts commit 325fd38901.
* Platform guards in the next commit.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17 13:07:11 +00:00
eregon a88e5cccba Add a note how to run specs under older Ruby versions
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17 11:22:55 +00:00
eregon 1630728e9d Fix typo in version guard
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17 11:22:43 +00:00
eregon f3b347e109 Add version guards for Enumerator::ArithmeticSequence
* And keep specs for older versions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17 11:22:30 +00:00
eregon 5032f6377b spec/README.md: add a note about version guards
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17 10:14:01 +00:00
eregon 3993cd8058 Integrate new specs for ConditionVariable#wait to prevent regressions
* See [Bug #14999].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17 09:51:26 +00:00
normal 30ad342975 NEWS: clarify that we still use FD_CLOEXEC [ci skip]
[Misc #14907]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17 07:47:26 +00:00
nobu 3bd2d01f96 process.c: dead code when no SIGCHLD
* process.c (ruby_waitpid_all): nothing to do unless SIGCHLD is
  available.

* signal.c (ruby_nocldwait): used only if SIGCHLD is available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17 05:59:45 +00:00
kazu 59bbe8a95b [DOC] Add ticket number [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17 04:01:12 +00:00
kazu 6cd8896bfa [DOC] Update NEWS about close_others [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17 04:00:09 +00:00
mame 6f63671feb vm.c: add a simple rdoc for RubyVM
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17 03:36:01 +00:00
normal 8b6297e56d thread_pthread.c (rb_sigwait_fd_get): skip getpid check
This is not called in signal handlers, so there's no reason for
it.  glibc 2.25+ no longer caches getpid(), so it will cost a
syscall for those users.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-17 02:06:54 +00:00