<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kiririmode</author_name>
  <author_url>https://blog.hatena.ne.jp/kiririmode/</author_url>
  <blog_title>理系学生日記</blog_title>
  <blog_url>https://kiririmode.hatenablog.jp/</blog_url>
  <categories>
    <anon>golang</anon>
  </categories>
  <description>なぜかおかしな振る舞いをするサーバプログラムをデバッグするというのは、それなりに骨の折れる作業です。大量のソースを前に「ここが怪しい」と言いながらデバッグログを埋め込むこともあるでしょう。また、lsof や ss といったコマンドやスタックトレースから見える状況を元に仮説を立てて検証していくこともあるでしょう。 リクエストを受け付けるとなぜか応答を返さないままになってしまう gRPC サーバに対し、ソースから解析をかけていったことがありました。そのときは目の前の対応で必死になってしまいましたが、本エントリでは「本来はどのようにデバッグを進めるべきだったのか」を考えます。 実験コード mutex…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkiririmode.hatenablog.jp%2Fentry%2F20190506%2F1557097529&quot; title=&quot;golang でのデバッグに非常に便利な go tool trace - 理系学生日記&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>https://cdn-ak.f.st-hatena.com/images/fotolife/k/kiririmode/20190506/20190506080425.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-05-06 08:05:29</published>
  <title>golang でのデバッグに非常に便利な go tool trace</title>
  <type>rich</type>
  <url>https://kiririmode.hatenablog.jp/entry/20190506/1557097529</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
