-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
IndexError in RequestHandler #2752
Comments
This part has been refactorized in Aiohttp 3.X so its susceptible to have a bug. You could try to run the same server with the last 2.X series of Aiohttp and see if the error persists, it will allow us to narrow a bit the issue. Regarding the Cython version, you can always change the version of run Aiohttp using the pure Python implementation disabling them using the environ variable AIOHTTP_NO_EXTENSIONS=1. I don't know how difficult is narrow the issue in terms of request that triggers that error, but for us, this information is worth it and will help us a lot to find a likely bug. PD: TBH I don't think that the Cython version is related, but in any case, you can always the previous recipe. |
The problem with this is that I'm using an AppRunner instead of
I'll try this and see if it still occurs. The error occurs pretty sporadically though; sometimes a few times a day, sometimes once every few days. So if it doesn't occur, I'll have to run it for about a week before I'm sure it's not in the pure Python implementation.
I'm not sure how to properly determine the details of the request. It doesn't even show up in the access log when it errors. I'm not averse to modifying my local version of aiohttp, so if there's a better way to debug it, just let me know and I can try it out. |
It just occurred using the pure Python implementation, so it's not just the Cython version. |
@Harmon758 do you have some error reporting set up? Smth like Sentry is good for getting more context out of error. |
I don't, because it's a small server I'm running locally, specifically for callbacks/webhooks that it's expecting requests from. I expect the requests that are erroring are some of the port scraper ones that I'm 400'ing on. I don't have any experience using Sentry, but I can try to see if I can set something up though. |
I tried printing the data passed to
I also tried using Sentry with its Raven Python client by initializing it in RequestHandler's try:
message, payload = self._messages.popleft()
except IndexError:
self.raven_client.captureException() but it doesn't seem to provide any meaningful information. |
There were breadcrumbs from Sentry this time, but I think it was data from websockets.protocol, from an irrelevant part of my program. |
It reminds me of IRC commands. I've found similar log reports at
It looks like wide-range checking of vulnerable web(IRC?)-services by sending |
Fixed by #2752 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
While running a server with aiohttp 3.0.1 using Python 3.6 on Windows 7, I'm occasionally encountering this error:
I'm not sure what requests are causing this, but it seems to be because it's possible for the Cython version of the HTTPRequestParser to return an empty tuple for
messages
through HTTPParser'sfeed_data
.The text was updated successfully, but these errors were encountered: