New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script crashing after processing several hundred edits #114

Closed
parlieditsza opened this Issue Aug 9, 2014 · 13 comments

Comments

Projects
None yet
4 participants
@parlieditsza

parlieditsza commented Aug 9, 2014

As mentioned on the chat. Here is the Stack trace. I've replaced the path to anon repo with [path]:

loaded config from ./config.json
[path]/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:672
                    throw err;
                          ^
TypeError: Cannot read property 'compareTo' of undefined
  at compareIps ([path]/anon/anon.coffee:28:19)
  at isIpInRange ([path]/anon/anon.coffee:38:5)
  at [path]/anon/anon.coffee:45:28
  at Array.filter (native)
  at isIpInAnyRange ([path]/anon/anon.coffee:45:10)
  at inspect ([path]/anon/anon.coffee:105:12)
  at [path]/anon/anon.coffee:136:11
  at Client. ([path]/anon/node_modules/wikichanges/wikichanges.js:34:9)
  at Client.emit (events.js:118:17)
  at Client. ([path]/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:477:22)
  at Client.emit (events.js:107:17)
  at [path]/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:669:22
  at Array.forEach (native)
  at Socket. ([path]/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:666:15)
  at Socket.emit (events.js:107:17)
  at readableAddChunk (_stream_readable.js:161:16)
  at Socket.Readable.push (_stream_readable.js:128:10)
  at TCP.onread (net.js:514:20)

Appears to be a network issue? We're on an Amazon instance if that's relevant.

@edsu

This comment has been minimized.

Owner

edsu commented Aug 9, 2014

Thanks. What version of node are you running?

@parlieditsza

This comment has been minimized.

parlieditsza commented Aug 9, 2014

The latest version from the repository. Output from git describe --tags is "v0.0.5-11-g0087da2"

@edsu

This comment has been minimized.

Owner

edsu commented Aug 10, 2014

I was more interested in the version of node:

node --version
@parlieditsza

This comment has been minimized.

parlieditsza commented Aug 10, 2014

Sorry, reading too fast. The node is "v0.11.14-pre"

@edsu

This comment has been minimized.

Owner

edsu commented Aug 11, 2014

Can you share the ranges stanza from your config.json?

@parlieditsza

This comment has been minimized.

parlieditsza commented Aug 11, 2014

"ranges": {
        "South African Parliament": [
        ["196.2.60.32","196.2.60.47"]
        ],
        "South African National Government":[
        ["164.146.0.0","164.151.255.255"]
        ]
      }
@snubbegbg

This comment has been minimized.

snubbegbg commented Aug 11, 2014

I have the exact same problem, same stack trace. Began when upgrading to v0.0.5
Node v0.10.29
Downgraded to v0.0.4 and It works fine.

@parlieditsza

This comment has been minimized.

parlieditsza commented Aug 12, 2014

Interesting, OK I'll downgrade to 0.0.4 for the meanwhile.

@parlieditsza

This comment has been minimized.

parlieditsza commented Aug 12, 2014

Still getting the issue with 0.0.4.

@parlieditsza

This comment has been minimized.

parlieditsza commented Aug 12, 2014

To keep things up I using a short Python script:

#!/usr/bin/python
import subprocess
while(True):
        try: subprocess.check_output(["./anon.coffee"])
        except: print("Crash!")
@snubbegbg

This comment has been minimized.

snubbegbg commented Aug 12, 2014

Yeah, I was too early. I still have problems with 0.0.4 too.

This is the stack trace for v0.0.4

[path]node_modules/wikichanges/node_modules/irc/lib/irc.js:672
throw err;
^
TypeError: Cannot read property '1' of null
at parse_msg ([path]node_modules/wikichanges/wikichanges.js:55:48)
at Client. ([path]node_modules/wikichanges/wikichanges.js:32:15)
at Client.emit (events.js:106:17)
at Client. ([path]node_modules/wikichanges/node_modules/irc/lib/irc.js:477:22)
at Client.emit (events.js:95:17)
at [path]node_modules/wikichanges/node_modules/irc/lib/irc.js:669:22
at Array.forEach (native)
at Socket. (/home/pi/anon/node_modules/wikichanges/node_modules/irc/lib/irc.js:666:15)
at Socket.emit (events.js:95:17)
at Socket. (stream_readable.js:748:14)
at Socket.emit (events.js:92:17)
at emitReadable
(_stream_readable.js:410:10)
at emitReadable (_stream_readable.js:406:5)
at readableAddChunk (_stream_readable.js:168:9)
at Socket.Readable.push (_stream_readable.js:130:10)
at TCP.onread (net.js:528:21)

Thank you for the code snippet. Very useful!

@PedroFelipe

This comment has been minimized.

PedroFelipe commented Aug 12, 2014

I'm experiencing the same problem. After dozens of edits, it crashes with the same error.

[root@wiki anon]# node --version
v0.10.29

@edsu

This comment has been minimized.

Owner

edsu commented Aug 12, 2014

I don't quite understand why we don't all crash out after a dozen edits ; we all see the same stream. Perhaps it's just luck. I'm going to address this over in edsu/wikichanges#8

@edsu edsu closed this in 4a17fdd Jan 21, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment