ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
From: merch-redmine@jeremyevans.net
To: ruby-dev@ruby-lang.org
Subject: [ruby-dev:51073] [Ruby master Bug#8810] GDBM.open内で処理がブロックしたらTimeout.timeout が効かない
Date: Mon, 28 Jun 2021 17:53:37 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-92674.20210628175336.263@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-8810.20130823002755.263@ruby-lang.org>

Issue #8810 has been updated by jeremyevans0 (Jeremy Evans).

Backport deleted (1.9.3: UNKNOWN, 2.0.0: UNKNOWN)
Status changed from Open to Closed

gdbm was removed in commit:edcc29dcff1b269b7748ab83adf21b2f3f97ebff

----------------------------------------
Bug #8810: GDBM.open内で処理がブロックしたらTimeout.timeout が効かない
https://bugs.ruby-lang.org/issues/8810#change-92674

* Author: ngoto (Naohisa Goto)
* Status: Closed
* Priority: Normal
* ruby -v: -
----------------------------------------
GDBM.open内で処理がブロックした場合にTimeout.timeoutが効きません。

再現方法は、Solarisにて、以下のようにGDBMをオープンしたままにして、

 $ ruby -r gdbm -e 'db = GDBM.open("/var/tmp/tmpdb"); gets'

同一マシンで別のシェルで

 $ ruby -r gdbm -r timeout -e 'Timeout.timeout(5) { db = GDBM.open("/var/tmp/tmpdb") }'

を実行しても、タイムアウトすることなく後者のGDBM.openがブロックし続けて終わりません。

Solarisだけでなく、Linux上にて、以下のように無理やりflockを使わないようconfigureしてmakeしたlibgdbm.soを使用した場合でも同様に再現しました。

 $ wget ftp://ftp.gnu.org/gnu/gdbm/gdbm-1.10.tar.gz
 $ tar xvf gdbm-1.10.tar.gz
 $ cd gdbm-1.10
 $ ./configure --prefix=/home/xxxxx/gdbm ac_cv_func_flock=no
 $ make
 $ make install
 $ LD_PRELOAD=/home/xxxxx/gdbm/lib/libgdbm.so ruby -r gdbm -e 'db = GDBM.open("/var/tmp/tmpdb"); gets'
(別のシェルにて)
 $ LD_PRELOAD=/home/xxxxx/gdbm/lib/libgdbm.so ruby -r gdbm -r timeout -e 'Timeout.timeout(5) { db = GDBM.open("/var/tmp/tmpdb") }'



-- 
https://bugs.ruby-lang.org/

           reply	other threads:[~2021-06-28 17:53 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <redmine.issue-8810.20130823002755.263@ruby-lang.org>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-92674.20210628175336.263@ruby-lang.org \
    --to=merch-redmine@jeremyevans.net \
    --cc=ruby-dev@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).