Skip to content
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

Deque index out of range #159

Closed
lenisko opened this issue Mar 15, 2015 · 10 comments
Closed

Deque index out of range #159

lenisko opened this issue Mar 15, 2015 · 10 comments
Labels

Comments

@lenisko
Copy link

lenisko commented Mar 15, 2015

When spamming channel with .ask life or death

then it is responding sometimes.. one time, sometimes two times same reply

[__WRITE FAILED] deque index out of range
Traceback (most recent call last):
File "/usr/lib/python2.7/asyncore.py", line 91, in write
obj.handle_write_event()
File "/usr/lib/python2.7/asyncore.py", line 468, in handle_write_event
self.handle_write()
File "/usr/lib/python2.7/asynchat.py", line 174, in handle_write
self.initiate_send()
File "/usr/lib/python2.7/asynchat.py", line 244, in initiate_send
del self.producer_fifo[0]
IndexError: deque index out of range

Traceback (most recent call last):
File "/usr/lib/python2.7/asyncore.py", line 91, in write
obj.handle_write_event()
File "/usr/lib/python2.7/asyncore.py", line 468, in handle_write_event
self.handle_write()
File "/usr/lib/python2.7/asynchat.py", line 174, in handle_write
self.initiate_send()
File "/usr/lib/python2.7/asynchat.py", line 244, in initiate_send
del self.producer_fifo[0]
IndexError: deque index out of range

Traceback (most recent call last):
File "/usr/lib/python2.7/asyncore.py", line 91, in write
obj.handle_write_event()
File "/usr/lib/python2.7/asyncore.py", line 468, in handle_write_event
self.handle_write()
File "/usr/lib/python2.7/asynchat.py", line 174, in handle_write
self.initiate_send()
File "/usr/lib/python2.7/asynchat.py", line 244, in initiate_send
del self.producer_fifo[0]
IndexError: deque index out of range

1426382434.1
[__WRITE FAILED] deque index out of range
1426382441.33
[__WRITE FAILED] deque index out of range

@kaneda
Copy link
Contributor

kaneda commented Mar 15, 2015

This is an inherent issue with multi-threading. Jenni can't have a response lock otherwise it would break threading, therefore this isn't an issue that can be easily solved. @myano any thoughts?

@kaneda kaneda added the Bug label Mar 15, 2015
@lenisko
Copy link
Author

lenisko commented Mar 15, 2015

Hmm, maybe something is wrong with priority, after changing it to medium, it's working like it should.
So.. maybe 'low' priority is 'bad'.

@kaneda
Copy link
Contributor

kaneda commented Mar 15, 2015

@lenisko I'm not sure about that. I'll let @myano comment.

@lenisko
Copy link
Author

lenisko commented Mar 15, 2015

Hmm, even on simple info.py I'm getting:
[__WRITE FAILED] deque index out of range && duplicated respond

edit:
it's weird... after after excluding some scripts:
#'quote', 'remind', 'roulette', 'rss', 'scores', 'slap', 'tell', 'tld', 'unicode', 'weather', 'wikiquote']

I have this error, but without exclude I'm not getting it :o

@kaneda
Copy link
Contributor

kaneda commented Mar 15, 2015

@lenisko if I had to guess I'd say you could get this error with any script at any time, depending. It's caused by asynchronicity, meaning that a job may be fired off to the async server twice before call-back is received.

@kaneda
Copy link
Contributor

kaneda commented Mar 23, 2015

Discussed w/ @myano, don't think this has any reasonable resolution.

@kaneda kaneda closed this as completed Mar 23, 2015
@lenisko
Copy link
Author

lenisko commented Mar 23, 2015

Ohh... but well, it's weird to see two outputs sometimes... but so far no crash from this.

@myano
Copy link
Owner

myano commented Mar 23, 2015

If I remember correctly, the code here was added to prevent crashes when a double message was sent. As for preventing the double-output, there have been numerous attempts at this over the years, as this problem has existed since the days of 'phenny'. There have even been patches back-ported from Willie to attempt to fix this but it doesn't seem there is a solution insight for this, sadly. :-(

@lenisko
Copy link
Author

lenisko commented Mar 23, 2015

Hmm, weird solution. Sad there is no fix : /

I'm having weird issue right now, maybe it's related, maybe not.
Bot is working like it should, my modules too.
After some time, bot stops responding to anything, then: Ping timeout: 240 seconds, no rejoin.
Inside bot console no errors, script seems to be still working.

@lenisko
Copy link
Author

lenisko commented Mar 27, 2015

Okay, I have fixed it using sleep....
#160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants