Project

General

Profile

Actions

Bug #4943

closed

test/testunit/test_parallel.rb reports an Error on mswin/mingw

Added by usa (Usaku NAKAMURA) almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.3dev (2011-06-29 trunk 32282) [x64-mswin64_100]
Backport:
[ruby-dev:43990]

Description

1.9.3のcode freezeまでになんとかなる気がしてないので備忘録として。

  1. Error:
    test_quit(TestParallel::TestParallelWorker):
    Errno::EPERM: Operation not permitted
    C:/Users/usa/ruby/test/testunit/test_parallel.rb:27:in kill' C:/Users/usa/ruby/test/testunit/test_parallel.rb:27:in rescue in teardown'
    C:/Users/usa/ruby/test/testunit/test_parallel.rb:20:in `teardown'

で、別にparallel testが悪いわけではなくて、なぜかProcess.killができないのが
問題なのですが、ミニマム再現ケースを作れない(つまり普段は成功する)ので
悩み中です。
なお、このテストに関しては95%くらいの再現率です(つまり稀には通る)。

細かく分解すると、win32/win32.cのkill()内で、OpenProcess()に成功した後で
TerminateProcess()がERROR_ACCESS_DENIEDとなっています。
普通は権限が足りなければOpenProcess()時に既にエラーになるはずなので、
かなり奇妙な現象と言えます。
また、対象プロセスの死亡タイミングかなんかの問題かと思って遅延とか
リトライとかも試してみたのですが、回避に至ってはいません。

Actions #1

Updated by usa (Usaku NAKAMURA) almost 13 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r32426.
Usaku, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • win32/win32.c (kill): check the process exited or not before
    teminationg it. [Bug #4943]
Actions

Also available in: Atom PDF

Like0
Like0