<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tmtms</author_name>
  <author_url>https://blog.hatena.ne.jp/tmtms/</author_url>
  <blog_title>tmtms のメモ</blog_title>
  <blog_url>https://blog.tmtms.net/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>CGI::Session::PStore を使用した CGI を mod_ruby で動かしていると、極まれにハングしてしまうことがありました。strace と /proc//fd を見てみたところ、同じプロセスが同じセッションデータファイルを二重にロックしようとして止まってしまっているようです。現象からして GC まわりの問題だろうと思ったのですが、試しにこんなプログラムを作ってみたらあっさりと再現しました。 require 'tmpdir' require 'cgi/session/pstore' STDIN.reopen &quot;/dev/null&quot; Dir.mktmpdir do |dir|…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.tmtms.net%2Fentry%2F20091104%2F1257287883&quot; title=&quot; CGI::Session::PStore でハング - tmtms のメモ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-11-04 07:38:03</published>
  <title> CGI::Session::PStore でハング</title>
  <type>rich</type>
  <url>https://blog.tmtms.net/entry/20091104/1257287883</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
