Intermittent SecuritySpy plugin crash

Posted on
Sun Aug 21, 2016 2:01 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Intermittent SecuritySpy plugin crash

Howdydoody!

For the last few months i've had an intermittent crashing issue with the plugin. I've not been able to detect a pattern for something causing it and while it's not a massive issue (restarting the plugin fixes it immediately) i'd love to stop it from happening.

Code: Select all
  Cynical SecuritySpy Error       plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  Z-Wave                          received "Bathroom - Danfoss LC TRV" heat setpoint is 21.00 °C
  Cynical SecuritySpy Error       in runConcurrentThread: Traceback (most recent call last):
  File ".../Server Plugin/cyin/debugging.py", line 46, in diagnostic_log
    yield
  File ".../Server Plugin/cyin/debugging.py", line 56, in diagnose_call
    return method(*args, **kwargs)
  File ".../Server Plugin/cyin/asynplugin.py", line 52, in runConcurrentThread
    self.run()
  File ".../Server Plugin/asyn/inject.py", line 49, in run
    asyn.Controller.run(self)
  File ".../Server Plugin/asyn/controller.py", line 93, in run
    item._can_read()
  File ".../Server Plugin/asyn/selectable.py", line 219, in _can_read
    self._scan(input)
  File ".../Server Plugin/asyn/scan.py", line 50, in _scan
  File ".../Server Plugin/asyn/core.py", line 140, in callout
    results = [cb(ctx, *args) for cb in list(self._callbacks)]   # latch callback list
  File ".../Server Plugin/asyn/http.py", line 296, in incoming
    super(Request, self).incoming(ctx, *args)
  File ".../Server Plugin/asyn/selectable.py", line 377, in incoming
    self._scan(data)
  File ".../Server Plugin/asyn/scan.py", line 53, in _scan
  File ".../Server Plugin/asyn/scan.py", line 111, in scan
  File ".../Server Plugin/asyn/core.py", line 140, in callout
    results = [cb(ctx, *args) for cb in list(self._callbacks)]   # latch callback list
  File ".../Server Plugin/spy/core.py", line 223, in reply
    self.cameras[cnum]._event_tap(ctx, *args[3:])
  File ".../Server Plugin/spy/core.py", line 341, in _event_tap
    self.spy.update()   # see if the camera was deleted
  File ".../Server Plugin/spy/core.py", line 96, in update
    req = self._request("/++systemInfo", callout=reply)
  File ".../Server Plugin/spy/core.py", line 238, in _request
    callout=callout, action=action, query=query, auth=self._auth)
  File ".../Server Plugin/asyn/http.py", line 317, in request
    return Request(control, url, res=res, callout=callout, action=action, query=query, auth=auth)
  File ".../Server Plugin/asyn/http.py", line 182, in __init__
    self.open(url)
  File ".../Server Plugin/asyn/http.py", line 205, in open
    self._con = self.control.connector(self.res, self._connected)
  File ".../Server Plugin/asyn/controller.py", line 128, in connector
    return resolve.TCPConnector(self, res, callout=callout)
  File ".../Server Plugin/asyn/resolve.py", line 94, in __init__
    self._schedule()
  File ".../Server Plugin/asyn/resolve.py", line 109, in _schedule
    self.connector = Connector(self.control, res, callout=self._connected)
  File ".../Server Plugin/asyn/resolve.py", line 40, in __init__
    socket.socket(res[0], res[1], res[2]), callout=callout)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/socket.py", line 184, in __init__
error: [Errno 24] Too many open files

  Cynical SecuritySpy Error       plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)


Steps i've tried so far:

Deleting the plugin, preferences and devices and re-creating them
Updating the plugin to v2.1 (and various other ones over the last wee while.. i'd say it's been happening about 6 months now)
Ran a trial version of SecuritySpy 4 (both 32 and 64 bit)
Setup a brand new server (moved from a broken 2011 mac mini to a 2008 8 core Mac Pro with a brand new system install) - Both were running El Capitan

Perhaps i'm missing something?

Computer says no.

Posted on
Fri Sep 09, 2016 10:31 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: Intermittent SecuritySpy plugin crash

Your plugin seems to be running out of file descriptors, a limit process resource. You can temporarily fix that by reloading the plugin, but the question is why you're running out.

To get better logging, open the Cynical SecuritySpy plugin configuration window, check the debug checkbox, and in the text field below enter
spy.core,asyn.http
Then reload the plugin and let it go its merry way until the problem occurs again. Then send me the entire Indigo log from the moment you restarted to that point.

If I had to guess, it's likely that you're having problems communicating with SecuritySpy. After the initial startup, additional file descriptors are really only used when something goes wrong, so it's possible that something goes semi-regularly wrong between SecuritySpy and Cynical SecuritySpy (I'd guess the connection drops every so often), and that may trigger a rarely-seen leak somewhere. But we won't know for sure until you get that log.

Cheers
-- perry

Posted on
Sat Sep 10, 2016 1:27 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Intermittent SecuritySpy plugin crash

Odd thing, since I filed this report the issue has disappeared. That said sometimes it does for a while, so I'll keep this bookmarked for the next instance!

Computer says no.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests