-
Notifications
You must be signed in to change notification settings - Fork 7.3k
illegal access error from decodeURIComponent function. #25551
Comments
I am the original reporter of this error, and I agree that the error probably originates from within the V8 code. This error prevents us from upgrading Node beyond version 0.11.14. |
@domenic ... there's not a lot to go on here but can you take a look? |
First, of course, is the question of whether this still occurs on a modern V8 version, such as that included in io.js 2.x or io.js next-nightly. |
Unfortunately, can't confirm that from my side. We haven't seen this in our dev environments, and can't deploy io.js in prod. |
Bump. |
@lmarkus ... I unfortunately have not had the opportunity to look into it further yet. One thought, however: would you happen to be able to capture the input to the decodeURIComponent that is triggering the error. If the error really is occurring within the decodeURIComponent function in V8, and it's only happening in production, then it's possible that you're getting hit by inputs with invalid code sequences and V8 isn't handling it appropriately. Collecting a log of those inputs ought to allow you to construct a test case that can be used to diagnose the problem. |
Fair enough. We'll try to capture that. |
From what we've seen, when this error occurs ALL strings fail in decodeURIComponent, even empty strings. The problem is that it's really difficult to trigger/reproduce on Heroku (needs a lot of dyno restarts). @lmarkus can probably reproduce this much easier if he's running in a private environment. Are you running docker btw? |
No docker. Plain deploy + PM2 |
Ok, given this it's going to be difficult to diagnose. It's conceivably a problem in the older version of V8 we're using in which case you'd need to test against io.js to see if the issue has been resolved. If a specific issue in V8 can be identified, we can investigate backporting a fix but absent that, there's really not anything we can do here. I'm going to go ahead and close this issue for now, but we can reopen once there is new information and once it's clear that something needs to be fixed in node itself. Fair? |
That's going to be a tough one. We will be putting additional logging in place, to see if we can at least come up with a reproducible test case. Now, if we are able to reproduce, could we realistically expect any action to be taken? (Assuming that this in fact points to V8). |
Realistically it will depend on just how big of a fix is required.
|
We're seeing the same issue in production with 0.12.6 and 0.12.7 |
So, a few more points of data about the issue: Once it happens decodeURIComponent then fails for all subsequent calls. We added the following code as we detect the issue (right before the process restarts):
and decoded="failed", reason="illegal access" after this code. |
The other thing we've seen is that it's not always related to process startup. We've had one case where a process ran for 1hr 12m and handled over 5000 requests before it got into this error state. |
I think I can probably fix it. Will need to have a test case to reproduce it, though. |
Any progress here? |
We gave up and migrated to io.js (and I can confirm the problem does not occur on io.js). |
Could you guys take a look at expressjs/express#2652
Might be a bug in the underlying V8 for Node 0.12.x
The text was updated successfully, but these errors were encountered: