Project

General

Profile

Bug #14950

r64109 thread.c: move ppoll wrapper before thread_pthread.c - Windows compile failure - thread.c

Added by MSP-Greg (Greg L) almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
[ruby-core:88173]

Description

normalperson (Eric Wong)

Eric,

Both windows builds (mswin & mingw) failed compiling thread.c.

Attached logs of both.

Thanks, Greg


Files

64109_mswin.txt (15.6 KB) 64109_mswin.txt MSP-Greg (Greg L), 07/29/2018 11:47 PM
64109_mingw.txt (52.4 KB) 64109_mingw.txt MSP-Greg (Greg L), 07/29/2018 11:47 PM
clang_macos.txt (7.81 KB) clang_macos.txt hsbt (Hiroshi SHIBATA), 07/30/2018 12:13 AM
crash-monitor.log (6.51 KB) crash-monitor.log nobu (Nobuyoshi Nakada), 07/30/2018 05:03 AM
ruby_2018-07-30-135956_ruby.crash (46.7 KB) ruby_2018-07-30-135956_ruby.crash nobu (Nobuyoshi Nakada), 07/30/2018 05:05 AM
ruby_2018-07-30-200222_ruby.crash (52.7 KB) ruby_2018-07-30-200222_ruby.crash nobu (Nobuyoshi Nakada), 07/30/2018 11:05 AM
crash.log (17.9 KB) crash.log nobu (Nobuyoshi Nakada), 07/30/2018 11:06 AM

Updated by hsbt (Hiroshi SHIBATA) almost 2 years ago

I got another error with macOS.

#2

Updated by normalperson (Eric Wong) almost 2 years ago

  • Status changed from Assigned to Closed

Applied in changeset trunk|r64110.


thread.c: move ppoll wrapper into thread_pthread.c

thread_pthread.c relies on ppoll for rb_sigwait_sleep, so ensure
the compatibility wrapper is available for it.

[Bug #14950]

Reported-by: SHIBATA Hiroshi hsbt@ruby-lang.org
Reported-by: Greg L Greg.mpls@gmail.com

Updated by normalperson (Eric Wong) almost 2 years ago

OK, r64110 should work. I mangled #ifdef nesting in r64109 :x

Updated by MSP-Greg (Greg L) almost 2 years ago

normalperson (Eric Wong) Eric,

Thanks. mswin passed, I haven't checked MinGW yet. Bad news is the Travis build had the following error in test-all:

  1) Failure:
TestQueue#test_thr_kill [/home/travis/build/ruby/ruby/test/thread/test_queue.rb:153]:
only 0/250 done in 60 seconds.

Finished tests in 312.498195s, 63.4308 tests/s, 7303.2390 assertions/s.
19822 tests, 2282249 assertions, 1 failures, 0 errors, 78 skips

ruby -v: ruby 2.6.0dev (2018-07-30 trunk 64110) [x86_64-linux]
make: *** [yes-test-all] Error 1

Thanks, Greg

Updated by normalperson (Eric Wong) almost 2 years ago

Greg.mpls@gmail.com wrote:

1) Failure:
TestQueue#test_thr_kill [/home/travis/build/ruby/ruby/test/thread/test_queue.rb:153]:
only 0/250 done in 60 seconds.

Yep r64109 wasn't sufficient; but I'm working on it.

Updated by MSP-Greg (Greg L) almost 2 years ago

normalperson (Eric Wong)

Eric, r64111 passed Appveyor mswin & MingW (ruby-loco). Travis also.

Thanks, Greg

Updated by nobu (Nobuyoshi Nakada) almost 2 years ago

Since r64107, make test-all crashes by EINVAL at pthread_cond_timedwait.
Attached logs at r64113.

#8

Updated by nobu (Nobuyoshi Nakada) almost 2 years ago

  • Status changed from Closed to Assigned

Updated by normalperson (Eric Wong) almost 2 years ago

nobu@ruby-lang.org wrote:

Since r64107, make test-all crashes by EINVAL at pthread_cond_timedwait.
Attached logs at r64113.

I think r64117 will solve this (can't reproduce the problem, but
I understand it).

("process.c (waitpid_nogvl): prevent conflicting use of sleep_cond")

If not, we can try using:
#define USE_NATIVE_SLEEP_COND 0

Updated by nobu (Nobuyoshi Nakada) almost 2 years ago

normalperson (Eric Wong) wrote:

nobu@ruby-lang.org wrote:

Since r64107, make test-all crashes by EINVAL at pthread_cond_timedwait.
Attached logs at r64113.

I think r64117 will solve this (can't reproduce the problem, but
I understand it).

("process.c (waitpid_nogvl): prevent conflicting use of sleep_cond")

It still happens at r64123.

If not, we can try using:
#define USE_NATIVE_SLEEP_COND 0

It didn't help unfortunately.

Other than [BUG], drb/ut_large.rb can hang forever.

Updated by normalperson (Eric Wong) almost 2 years ago

nobu@ruby-lang.org wrote:

normalperson (Eric Wong) wrote:

nobu@ruby-lang.org wrote:

Since r64107, make test-all crashes by EINVAL at pthread_cond_timedwait.
Attached logs at r64113.

I think r64117 will solve this (can't reproduce the problem, but
I understand it).

("process.c (waitpid_nogvl): prevent conflicting use of sleep_cond")

It still happens at r64123.

If not, we can try using:
#define USE_NATIVE_SLEEP_COND 0

It didn't help unfortunately.

Same backtraces as before?

Other than [BUG], drb/ut_large.rb can hang forever.

How easy is this for you to reproduce? I ran "make exam" in a
loop for 24 hours while checking for unexpected core dumps before
committing r64107.

I wonder if condvars on OSX has a "memory" of which mutexes
are associated with it. If so, that would be a problem with
the rewritten GVL. So maybe a second condvar is necessary
in native_thread_data.

Updated by normalperson (Eric Wong) almost 2 years ago

I wrote:

I wonder if condvars on OSX has a "memory" of which mutexes
are associated with it. If so, that would be a problem with
the rewritten GVL. So maybe a second condvar is necessary
in native_thread_data.

Maybe using separate condvar in r64124 will help.
(Maybe reverting r64123 helps, too)

Otherwise, maybe skip rb_native_cond_destroy
in native_thread_destroy but I don't think that
is the problem, here...

I need to go away for a few hours :<

Updated by nobu (Nobuyoshi Nakada) almost 2 years ago

  • Status changed from Assigned to Closed

normalperson (Eric Wong) wrote:

I wrote:

I wonder if condvars on OSX has a "memory" of which mutexes
are associated with it. If so, that would be a problem with
the rewritten GVL. So maybe a second condvar is necessary
in native_thread_data.

Maybe using separate condvar in r64124 will help.

It seems fixed, thanks.

(Maybe reverting r64123 helps, too)

The crash had happened since r64110, I don't think it would help.

Updated by nobu (Nobuyoshi Nakada) almost 2 years ago

It still happens at TestOpen3#test_pipeline_start.
And it seems less frequently with -O0 than with -O3.

Updated by nobu (Nobuyoshi Nakada) almost 2 years ago

  • Status changed from Assigned to Closed

Sorry, it was my mistake.

Also available in: Atom PDF