Project

General

Profile

Bug #8790

r41424 以降、Solaris と gdbm 1.1.10 にて TestGDBM#test_s_open_lock が終わらない

Added by ngoto (Naohisa Goto) about 6 years ago. Updated about 5 years ago.

Status:
Feedback
Priority:
Normal
Target version:
-
ruby -v:
ruby 2.1.0dev (2013-08-13) [sparc64-solaris2.10]
[ruby-dev:47631]

Description

r41424以降、Solarisにて make test-all すると、 TestGDBM#test_s_open_lock がブロックして、いつまで待っても make test-all が終わらなくなっています。この現象は、下記のように、Solaris以外でも、flockは無いがlockfは存在する環境では同様に発生すると思われます。

Solarisにて gdbm 1.1.10 を ./configure したときのログの一部を抜粋します。

checking for flock... no
checking for lockf... yes

このようにflockは無いがlockfはある場合、gdbm 1.1.10 のソース( ftp://ftp.gnu.org/gnu/gdbm/gdbm-1.10.tar.gz )の gdbm-1.10/src/lock.c の124行目のコードがファイルのロックに使用されるようです。その周辺のコードを引用します。

#if HAVE_LOCKF
/* Mask doesn't matter for lockf. */
lock_val = lockf (dbf->desc, F_LOCK, (off_t)0L);

このように、lockfでロックを取得する際に F_LOCK つまり前のロックが解除されるまでブロックして待ち続けるオプションを付けています。このため、現在の TestGDBM#test_s_open_lock の実装では、ブロックし続けて永遠に終わりません。


Related issues

Related to Ruby master - Bug #8810: GDBM.open内で処理がブロックしたらTimeout.timeout が効かないOpen08/23/2013Actions

Associated revisions

Revision 4d0fd22e
Added by ngoto (Naohisa Goto) about 6 years ago

  • test/gdbm/test_gdbm.rb: skip TestGDBM#test_s_open_lock on Solaris. On Solaris (and platforms which do not have flock and have lockf), with GDBM 1.10, gdbm_open(3) blocks when opening already locked gdbm file. [Bug #8790] [ruby-dev:47631]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 42634
Added by ngoto (Naohisa Goto) about 6 years ago

  • test/gdbm/test_gdbm.rb: skip TestGDBM#test_s_open_lock on Solaris. On Solaris (and platforms which do not have flock and have lockf), with GDBM 1.10, gdbm_open(3) blocks when opening already locked gdbm file. [Bug #8790] [ruby-dev:47631]

Revision 42634
Added by ngoto (Naohisa Goto) about 6 years ago

  • test/gdbm/test_gdbm.rb: skip TestGDBM#test_s_open_lock on Solaris. On Solaris (and platforms which do not have flock and have lockf), with GDBM 1.10, gdbm_open(3) blocks when opening already locked gdbm file. [Bug #8790] [ruby-dev:47631]

Revision 42634
Added by ngoto (Naohisa Goto) about 6 years ago

  • test/gdbm/test_gdbm.rb: skip TestGDBM#test_s_open_lock on Solaris. On Solaris (and platforms which do not have flock and have lockf), with GDBM 1.10, gdbm_open(3) blocks when opening already locked gdbm file. [Bug #8790] [ruby-dev:47631]

Revision 42634
Added by ngoto (Naohisa Goto) about 6 years ago

  • test/gdbm/test_gdbm.rb: skip TestGDBM#test_s_open_lock on Solaris. On Solaris (and platforms which do not have flock and have lockf), with GDBM 1.10, gdbm_open(3) blocks when opening already locked gdbm file. [Bug #8790] [ruby-dev:47631]

Revision 42634
Added by ngoto (Naohisa Goto) about 6 years ago

  • test/gdbm/test_gdbm.rb: skip TestGDBM#test_s_open_lock on Solaris. On Solaris (and platforms which do not have flock and have lockf), with GDBM 1.10, gdbm_open(3) blocks when opening already locked gdbm file. [Bug #8790] [ruby-dev:47631]

Revision 42634
Added by ngoto (Naohisa Goto) about 6 years ago

  • test/gdbm/test_gdbm.rb: skip TestGDBM#test_s_open_lock on Solaris. On Solaris (and platforms which do not have flock and have lockf), with GDBM 1.10, gdbm_open(3) blocks when opening already locked gdbm file. [Bug #8790] [ruby-dev:47631]

History

#1

Updated by ngoto (Naohisa Goto) about 6 years ago

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

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


  • test/gdbm/test_gdbm.rb: skip TestGDBM#test_s_open_lock on Solaris. On Solaris (and platforms which do not have flock and have lockf), with GDBM 1.10, gdbm_open(3) blocks when opening already locked gdbm file. [Bug #8790] [ruby-dev:47631]

Updated by nobu (Nobuyoshi Nakada) about 6 years ago

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

今のSolarisで開発環境を作るのってどうすればいいんでしょうか。

Updated by hsbt (Hiroshi SHIBATA) about 5 years ago

  • Status changed from Open to Feedback

Also available in: Atom PDF