Project

General

Profile

Actions

バグ #837

closed

ネットワーク接続を失うとmikutterのCPU使用率が上がって暴走状態になる

Added by Akira Ouchi over 5 years ago. Updated about 5 years ago.

Status:
終了
Priority:
通常
Assignee:
Target version:
プラグイン名:
ブランチ:
クラッシュする:

Description

mikutter 3.3.10で、ネットワーク接続を失うとCPU使用率が上がって暴走状態になるようです。
debugでログを採取したところ、ネットワークが切断された後から以下のログが大量に出力されるのを確認できました。

notice: {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:62:in `block (2 levels) in start': retry wait 0, fail_count 1
warning: {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:59:in `rescue in block (2 levels) in start': filter stream: disconnected: exception Failed to open TCP connection to stream.twitter.com:443 (getaddrinfo: nodename nor servname provided, or not known)
warning: {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:61:in `rescue in block (2 levels) in start': Failed to open TCP connection to stream.twitter.com:443 (getaddrinfo: nodename nor servname provided, or not known)
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:882:in `rescue in block in connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:879:in `block in connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:878:in `connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:852:in `start'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:1398:in `request'
from {MIKUTTER_DIR}/core/lib/mikutwitter/api_shortcuts.rb:208:in `stream'
from {MIKUTTER_DIR}/core/lib/mikutwitter/api_shortcuts.rb:184:in `filter_stream'
from {MIKUTTER_DIR}/core/service.rb:172:in `streaming'
from {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:37:in `block (2 levels) in start'
from {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:27:in `loop'
from {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:27:in `block in start'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:28:in `block (3 levels) in _deferredable_trap_proc'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:26:in `catch'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:26:in `block (2 levels) in _deferredable_trap_proc'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:25:in `catch'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:25:in `block in _deferredable_trap_proc'
notice: {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:62:in `block (2 levels) in start': retry wait 0.25, fail_count 2
warning: {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:59:in `rescue in block (2 levels) in start': filter stream: disconnected: exception Failed to open TCP connection to stream.twitter.com:443 (getaddrinfo: nodename nor servname provided, or not known)
warning: {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:61:in `rescue in block (2 levels) in start': Failed to open TCP connection to stream.twitter.com:443 (getaddrinfo: nodename nor servname provided, or not known)
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:882:in `rescue in block in connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:879:in `block in connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:878:in `connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:852:in `start'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:1398:in `request'
from {MIKUTTER_DIR}/core/lib/mikutwitter/api_shortcuts.rb:208:in `stream'
from {MIKUTTER_DIR}/core/lib/mikutwitter/api_shortcuts.rb:184:in `filter_stream'
from {MIKUTTER_DIR}/core/service.rb:172:in `streaming'
from {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:37:in `block (2 levels) in start'
from {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:27:in `loop'
from {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:27:in `block in start'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:28:in `block (3 levels) in _deferredable_trap_proc'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:26:in `catch'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:26:in `block (2 levels) in _deferredable_trap_proc'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:25:in `catch'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:25:in `block in _deferredable_trap_proc'
notice: {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:62:in `block (2 levels) in start': retry wait 0.5, fail_count 3
warning: {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:59:in `rescue in block (2 levels) in start': filter stream: disconnected: exception Failed to open TCP connection to stream.twitter.com:443 (getaddrinfo: nodename nor servname provided, or not known)
warning: {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:61:in `rescue in block (2 levels) in start': Failed to open TCP connection to stream.twitter.com:443 (getaddrinfo: nodename nor servname provided, or not known)
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:882:in `rescue in block in connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:879:in `block in connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:878:in `connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:852:in `start'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:1398:in `request'
from {MIKUTTER_DIR}/core/lib/mikutwitter/api_shortcuts.rb:208:in `stream'
from {MIKUTTER_DIR}/core/lib/mikutwitter/api_shortcuts.rb:184:in `filter_stream'
from {MIKUTTER_DIR}/core/service.rb:172:in `streaming'
from {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:37:in `block (2 levels) in start'
from {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:27:in `loop'
from {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:27:in `block in start'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:28:in `block (3 levels) in _deferredable_trap_proc'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:26:in `catch'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:26:in `block (2 levels) in _deferredable_trap_proc'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:25:in `catch'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:25:in `block in _deferredable_trap_proc'
notice: {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:62:in `block (2 levels) in start': retry wait 0.75, fail_count 4
error: {MIKUTTER_DIR}/core/plugin/streaming/streamer.rb:54:in `rescue in mainloop': Net::ReadTimeout
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/protocol.rb:158:in `rbuf_fill'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/protocol.rb:136:in `readuntil'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/protocol.rb:146:in `readline'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http/response.rb:313:in `read_chunked'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http/response.rb:283:in `block in read_body_0'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http/response.rb:251:in `inflater'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http/response.rb:281:in `read_body_0'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http/response.rb:202:in `read_body'
from {MIKUTTER_DIR}/core/lib/mikutwitter/api_shortcuts.rb:210:in `block in stream'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:1446:in `block in transport_request'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http/response.rb:163:in `reading_body'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:1445:in `transport_request'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:1407:in `request'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:1400:in `block in request'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:853:in `start'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:1398:in `request'
from {MIKUTTER_DIR}/core/lib/mikutwitter/api_shortcuts.rb:208:in `stream'
from {MIKUTTER_DIR}/core/lib/mikutwitter/api_shortcuts.rb:181:in `userstream'
from {MIKUTTER_DIR}/core/service.rb:172:in `streaming'
from {MIKUTTER_DIR}/core/plugin/streaming/streamer.rb:49:in `mainloop'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:28:in `block (3 levels) in _deferredable_trap_proc'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:26:in `catch'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:26:in `block (2 levels) in _deferredable_trap_proc'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:25:in `catch'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:25:in `block in _deferredable_trap_proc'
notice: {MIKUTTER_DIR}/core/plugin/streaming/perma_streamer.rb:31:in `block in mainloop': PermaStreamer exit
notice: {MIKUTTER_DIR}/core/plugin/streaming/perma_streamer.rb:32:in `block in mainloop': 
notice: {MIKUTTER_DIR}/core/plugin/streaming/perma_streamer.rb:37:in `block in mainloop': retry wait 0, fail_count 0
error: {MIKUTTER_DIR}/core/plugin/streaming/streamer.rb:54:in `rescue in mainloop': Failed to open TCP connection to userstream.twitter.com:443 (getaddrinfo: nodename nor servname provided, or not known)
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:882:in `rescue in block in connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:879:in `block in connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:878:in `connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:852:in `start'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:1398:in `request'
from {MIKUTTER_DIR}/core/lib/mikutwitter/api_shortcuts.rb:208:in `stream'
from {MIKUTTER_DIR}/core/lib/mikutwitter/api_shortcuts.rb:181:in `userstream'
from {MIKUTTER_DIR}/core/service.rb:172:in `streaming'
from {MIKUTTER_DIR}/core/plugin/streaming/streamer.rb:49:in `mainloop'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:28:in `block (3 levels) in _deferredable_trap_proc'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:26:in `catch'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:26:in `block (2 levels) in _deferredable_trap_proc'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:25:in `catch'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:25:in `block in _deferredable_trap_proc'
notice: {MIKUTTER_DIR}/core/plugin/streaming/perma_streamer.rb:31:in `block in mainloop': PermaStreamer exit
notice: {MIKUTTER_DIR}/core/plugin/streaming/perma_streamer.rb:32:in `block in mainloop': 
notice: {MIKUTTER_DIR}/core/plugin/streaming/perma_streamer.rb:37:in `block in mainloop': retry wait 0, fail_count 0
error: {MIKUTTER_DIR}/core/plugin/streaming/streamer.rb:54:in `rescue in mainloop': Failed to open TCP connection to userstream.twitter.com:443 (getaddrinfo: nodename nor servname provided, or not known)
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:882:in `rescue in block in connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:879:in `block in connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:878:in `connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:852:in `start'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:1398:in `request'
from {MIKUTTER_DIR}/core/lib/mikutwitter/api_shortcuts.rb:208:in `stream'
from {MIKUTTER_DIR}/core/lib/mikutwitter/api_shortcuts.rb:181:in `userstream'
from {MIKUTTER_DIR}/core/service.rb:172:in `streaming'
from {MIKUTTER_DIR}/core/plugin/streaming/streamer.rb:49:in `mainloop'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:28:in `block (3 levels) in _deferredable_trap_proc'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:26:in `catch'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:26:in `block (2 levels) in _deferredable_trap_proc'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:25:in `catch'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:25:in `block in _deferredable_trap_proc'
notice: {MIKUTTER_DIR}/core/plugin/streaming/perma_streamer.rb:31:in `block in mainloop': PermaStreamer exit
notice: {MIKUTTER_DIR}/core/plugin/streaming/perma_streamer.rb:32:in `block in mainloop': 
notice: {MIKUTTER_DIR}/core/plugin/streaming/perma_streamer.rb:37:in `block in mainloop': retry wait 0, fail_count 0
error: {MIKUTTER_DIR}/core/plugin/streaming/streamer.rb:54:in `rescue in mainloop': Failed to open TCP connection to userstream.twitter.com:443 (getaddrinfo: nodename nor servname provided, or not known)
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:882:in `rescue in block in connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:879:in `block in connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:878:in `connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:852:in `start'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:1398:in `request'
from {MIKUTTER_DIR}/core/lib/mikutwitter/api_shortcuts.rb:208:in `stream'
from {MIKUTTER_DIR}/core/lib/mikutwitter/api_shortcuts.rb:181:in `userstream'
from {MIKUTTER_DIR}/core/service.rb:172:in `streaming'
from {MIKUTTER_DIR}/core/plugin/streaming/streamer.rb:49:in `mainloop'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:28:in `block (3 levels) in _deferredable_trap_proc'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:26:in `catch'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:26:in `block (2 levels) in _deferredable_trap_proc'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:25:in `catch'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:25:in `block in _deferredable_trap_proc'

いちおうgemのバージョンも。

$ bundle
Using rake 10.5.0
Using addressable 2.4.0
Using pkg-config 1.1.7
Using safe_yaml 1.0.4
Using delayer 0.0.2
Using egison 1.0.0
Using locale 2.1.2
Using text 1.3.1
Using hashdiff 0.3.0
Using httpclient 2.8.0
Using instance_storage 1.0.0
Using json_pure 1.8.3
Using memoist 0.14.0
Using metaclass 0.0.4
Using mini_portile2 2.0.0
Using moneta 0.8.0
Using oauth 0.4.7
Using power_assert 0.3.0
Using ruby-hmac 0.4.0
Using totoridipjp 0.1.0
Using unf_ext 0.0.7.2
Using typed-array 0.1.2
Using watch 0.1.0
Using bundler 1.12.2
Using glib2 3.0.7
Using cairo 1.15.2
Using crack 0.4.3
Using delayer-deferred 1.0.3
Using matsuya 0.1.1
Using gettext 3.0.9
Using pluggaloid 1.1.1
Using mocha 0.14.0
Using nokogiri 1.6.7.2
Using test-unit 3.1.8
Using unf 0.1.4
Using atk 3.0.7
Using gdk_pixbuf2 3.0.7
Using pango 3.0.7
Using webmock 1.24.6
Using twitter-text 1.13.4
Using gtk2 3.0.7

再現手順

ネットワーク接続を失うとCPU使用率が上がって暴走状態になる

Actions #1

Updated by toshi_a 初音 over 5 years ago

以下のパターンっぽいですね

error: {MIKUTTER_DIR}/core/plugin/streaming/streamer.rb:54:in `rescue in mainloop': Failed to open TCP connection to userstream.twitter.com:443 (getaddrinfo: nodename nor servname provided, or not known)
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:882:in `rescue in block in connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:879:in `block in connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:878:in `connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:852:in `start'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:1398:in `request'
from {MIKUTTER_DIR}/core/lib/mikutwitter/api_shortcuts.rb:208:in `stream'
from {MIKUTTER_DIR}/core/lib/mikutwitter/api_shortcuts.rb:181:in `userstream'
from {MIKUTTER_DIR}/core/service.rb:172:in `streaming'
from {MIKUTTER_DIR}/core/plugin/streaming/streamer.rb:49:in `mainloop'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:28:in `block (3 levels) in _deferredable_trap_proc'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:26:in `catch'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:26:in `block (2 levels) in _deferredable_trap_proc'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:25:in `catch'
from {MIKUTTER_DIR}/vendor/delayer/deferred/thread.rb:25:in `block in _deferredable_trap_proc'
notice: {MIKUTTER_DIR}/core/plugin/streaming/perma_streamer.rb:31:in `block in mainloop': PermaStreamer exit
notice: {MIKUTTER_DIR}/core/plugin/streaming/perma_streamer.rb:32:in `block in mainloop': 
notice: {MIKUTTER_DIR}/core/plugin/streaming/perma_streamer.rb:37:in `block in mainloop': retry wait 0, fail_count 0

Actions #2

Updated by toshi_a 初音 over 5 years ago

  • Assignee set to Akira Ouchi

もう少し再現手順を詳しく知りたいんですが、Wifi接続を切ったりLANケーブルを抜いた時ですか?

Actions #3

Updated by toshi_a 初音 over 5 years ago

  • Assignee changed from Akira Ouchi to toshi_a 初音

OSC名古屋で遊んでた時に、テザリング端末の電池が切れて再現しました。一応、接続できない状態が短い場合は繋がったあと復旧しますが、長いこと暴走していると復旧しづらい印象でした。長い・短いというのは検証足りてませんが多分数分とかが閾値ですね。

Actions #4

Updated by toshi_a 初音 about 5 years ago

  • Status changed from 新規 to 実装待ち
  • 再現手順 updated (diff)
Actions #5

Updated by toshi_a 初音 about 5 years ago

/etc/hosts に

127.0.0.1 userstream.twitter.com

とか書いたら

error: /home/toshi/Documents/hobby/scripts/mikutter.git/core/plugin/streaming/streamer.rb:54:in `rescue in mainloop': Failed to open TCP connection to userstream.twitter.com:443 (接続を拒否されました - connect(2) for "userstream.twitter.com" port 443)
from /usr/lib/ruby/2.3.0/net/http.rb:882:in `rescue in block in connect'
...

と、おそらく同じエラーと思われるものが何度も表示され、高負荷状態になったので、おそらくこれで再現できたと思います

Actions #6

Updated by toshi_a 初音 about 5 years ago

  • Status changed from 実装待ち to レビュー待ち
  • Assignee changed from toshi_a 初音 to Akira Ouchi
  • % Done changed from 0 to 100

delayer-deferredのバグでした。
不具合修正をしたdelayer-deferred 1.0.4を使えば直ります。

hotfix/3.3 ブランチでは、1.0.4以降を要求するようになったので、ブランチを切り替えて bundle install すればいいです。
他のブランチだと、不思議な力で器用にdelayer-deferredのバージョンだけを上げるか、 bundle update すればいけると思う

Actions #7

Updated by Akira Ouchi about 5 years ago

  • Status changed from レビュー待ち to まだダメ

問題の解消を確認できませんでした……

mikutter起動中にhostsに書くパターンで試したところ、特に変化がありませんでした。
これはセッションが張られたあとなので関係ないだけかなと思います。

hostsを書いた後にmikutterを起動した場合は、接続できないメッセージが出て負荷も多少上がりますが
40%前後の負荷となりました。

error: {MIKUTTER_DIR}/core/plugin/streaming/streamer.rb:54:in `rescue in mainloop': Failed to open TCP connection to userstream.twitter.com:443 (Connection refused - connect(2) for "userstream.twitter.com" port 443)

私が試していた、mikutter起動中にネットワークを全て切断する(有線LAN抜いて無線LANもOFFにする)方法だと
以前と変わらず100%前後まで負荷が上がるようでした。

Actions #8

Updated by toshi_a 初音 about 5 years ago

  • Assignee changed from Akira Ouchi to toshi_a 初音

やはり適当なことするとダメか…何故か仮想マシンでは再現できないのでらずぴっぴに手伝ってもらうにこ

Actions #9

Updated by toshi_a 初音 about 5 years ago

  • Status changed from まだダメ to レビュー待ち
  • Assignee changed from toshi_a 初音 to Akira Ouchi

マシンのネットワーク接続を切って試したところ、問題は再現できませんでした。以下の内容を教えてもらっていいですか

1. 高負荷時にターミナルに出力されるログをください
2. mikutterコンソール(ALT+Xで出てくる奴)で、以下のコードを実行した時の結果を教えてください
  • Delayer::Deferred::VERSION
  • Environment::VERSION

3. git show コマンドの出力結果で確認できるリビジョン番号(ec85fbd79c8775dbb9f9059e77ac07a1c1cff161)

こちらの環境ではこんな感じの出力です

>>> Delayer::Deferred::VERSION
"1.0.4" 
>>> Environment::VERSION
mikutter ver.3.3.10

$ git show
commit ec85fbd79c8775dbb9f9059e77ac07a1c1cff161
Author: Toshiaki Asai <toshi.alternative@gmail.com>
Date:   Sat Jul 23 04:48:18 2016 +0900

    delayer-deferred 1.0.4 refs #837

    ネットワーク接続を失うとmikutterのCPU使用率が上がって暴走状態になる

(以下略)
Actions #10

Updated by Akira Ouchi about 5 years ago

  • Status changed from レビュー待ち to 解決

ヽ('ω')ノ三ヽ('ω')ノもうしわけ

すみません、環境を合わせたら改善を確認できました……。
hotfix/3.3にして確認した内容を貼り付けます。

warning: {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:59:in `rescue in block (2 levels) in start': filter stream: disconnected: exception Failed to open TCP connection to stream.twitter.com:443 (getaddrinfo: nodename nor servname provided, or not known)
warning: {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:61:in `rescue in block (2 levels) in start': Failed to open TCP connection to stream.twitter.com:443 (getaddrinfo: nodename nor servname provided, or not known)
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:882:in `rescue in block in connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:879:in `block in connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:878:in `connect'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:852:in `start'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:1398:in `request'
from {MIKUTTER_DIR}/core/lib/mikutwitter/api_shortcuts.rb:208:in `stream'
from {MIKUTTER_DIR}/core/lib/mikutwitter/api_shortcuts.rb:184:in `filter_stream'
from {MIKUTTER_DIR}/core/service.rb:172:in `streaming'
from {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:37:in `block (2 levels) in start'
from {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:27:in `loop'
from {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:27:in `block in start'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/delayer-deferred-1.0.4/lib/delayer/deferred/thread.rb:28:in `block (3 levels) in _deferredable_trap_proc'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/delayer-deferred-1.0.4/lib/delayer/deferred/thread.rb:26:in `catch'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/delayer-deferred-1.0.4/lib/delayer/deferred/thread.rb:26:in `block (2 levels) in _deferredable_trap_proc'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/delayer-deferred-1.0.4/lib/delayer/deferred/thread.rb:25:in `catch'
from /Users/akkie/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/delayer-deferred-1.0.4/lib/delayer/deferred/thread.rb:25:in `block in _deferredable_trap_proc'
notice: {MIKUTTER_DIR}/core/plugin/streaming/filter.rb:62:in `block (2 levels) in start': retry wait 6.75, fail_count 28
>>> Delayer::Deferred::VERSION
"1.0.4" 
>>> Environment::VERSION
mikutter ver.3.3.10
$ git show
commit ec85fbd79c8775dbb9f9059e77ac07a1c1cff161

#837-7 は、不精してリリース版3.4.1のGemfileのバージョン番号だけを書き換えていました。

gem 'delayer-deferred', '>= 1.0.4', '< 2.0'

bundleしてUsing delayer-deferred 1.0.4と出たので油断していましたが、
コンソールで見たら1.0.3をつかっていて、調べたらvendorディレクトリに入ってるものが読まれていました。
vendorディレクトリを爆破したら1.0.4が読まれて、こちらでも問題の解消を確認できました。

お手数をお掛けしました。。

Actions #11

Updated by toshi_a 初音 about 5 years ago

  • Status changed from 解決 to 終了
Actions

Also available in: Atom PDF