-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
Error after upgrading to Ember 2.4 #13071
Comments
What's even more odd is that you can see in the last screenshot, there is |
I have seen something like this too. Happens rarely and i do not know how to reproduce. Also i am not sure if it is my app's problem or something else. |
@raido is your stack the same as mine (IE the failure is on We upgraded from Ember 2.2 => Ember 2.4 and started seeing this issue pretty heavily in our server logs within a few days. |
👍 seen this myself and confused the heck out of me, from my bugsnag logs:
As you say, how can Likewise only seen it on production when minified (above comes from sourcemaps). Logs show we've only seen it on Chrome so far. |
@workmanw Yes, my error is also related too _lookupFactory and is see lookupHelper in the stacktrace. Logs from production build, happened just now with v2.3.0
|
I can confirm this issue on 2.4.2, seeing it sometimes in production, not seen in development yet. Can this be caused by the ember-inspector maybe? For more info: never had this on 2.3.x and the stack is the same (_lookupFactory) EDIT: I can confirm that this is not a ember-inspector issue, error occured while inspector was disabled. |
Confirmed bug in 2.4.1 and 2.4.2. Happens only with minified js |
@jcbvm @gdub22 Have either of you been able to reproduce it consistently? I've tried and tried to find at least a consistent set of steps in our app with the hope of building an ember-twiddle, but I've had no luck. This is completely anecdotal and probably a red herring, but it seems to happen while trying to render a helper which has an ancestor component rendered with the component helper ( |
@workmanw Likewise not been able to reproduce consistently, we do use the |
@workmanw not 100% consistently but I think I narrowed it down to a particular component which does happen to use the component helper in its own template. |
Uglify transpiles the function above to: function n(e,t,r,n){
var i=r.helpers[e];
if(!i){
var o=r.owner;
if (a(e,o,r.hooks.keywords)){
var s="helper:"+e;
o.hasRegistration(s,n) && (i=o._lookupFactory(s,n));
}
}
return i;
} Notice that both property accesses on Edited to add: Ah, but the crash is definitely for a |
@ef4 Maybe ... but the few times I've caught this exception in the debugger, |
@ef4 yep it's definitely a strange one. Could V8 be optimising it away for some reason? Who knows most about the dark arts of V8, @stefanpenner maybe? |
If the line code that is crashing is: o.hasRegistration(s,n) && (i=o._lookupFactory(s,n)); then:
Am I missing something obvious? |
For people who have reproduced this problem, what version of Chrome are you running? Have you reproduced it in Firefox, IE, or Safari? |
@wycats I don't see anything obvious you're missing. These are the same conclusions I arrived at. We have only seen this issue logged on Chrome latest (48). In my reproduction testing, I was using 48.0.2564.116. I personally did not try Firefox, IE or Safari, but I will try them out and report back. EDIT: I cannot simplify the problem to the point of producing a twiddle. But if it would be helpful, I can queue up one or more failures paused at a breakpoint, and jump on a screenhero if someone wants to poke around in the chrome debugger. Sometimes I can reproduce it 3 times in a minute. Sometimes it takes 20 minutes or more. |
@wycats Alright. I spent the last hour trying Chrome, Safari and Firefox. I was able to reproduce it several times in Chrome and not at all in Safari and Firefox. I'm not sure this is conclusive, but it is certainly pointing more and more toward a Chrome specific issue. |
This whole thing reminds me of http://yehudakatz.com/2010/01/02/the-craziest-fing-bug-ive-ever-seen/ |
I have not been able to reproduce it either. For me it typically happens when app boots. Reloading app several times probably crash it, yet it is not consistent. It may crash 5 times in just minutes or take half an hour. I tested on latest Chrome. |
@workmanw I would recommend forcing that function to stay in specific modes, this may help us find out more about the issue. At which point we should also ping our v8 friends. But for that, a reproduction (even a full app) is likely going to be required. To keep functions in specific modes, you can slowly disable parts of v8, and see if the bug stops. This will help us get closer to the root cause. first I would just disable inlining, by running chromes v8 with it disabled: /Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --js-flags="--nouse_inlining" --user-data-dir=/tmp/foobar On the flip side, try disabling crankshaft all together /Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --js-flags="--crankshaft=false" --user-data-dir=/tmp/foobar |
I tested this using Chrome 48 (rather than canary). If you'd like me to try with Canary, I'd be happy to. With
I completely understand. I've spent about 4 hours trying to "work forwards" and build an Ember-twiddle that reproduces this. I just don't understand enough of what's going on to do that. So now I'm going to start "working backwards" using our app to simplify the reproduction by reducing the reproduction steps and ripping out as much out of our app as I can. |
seems expected, so its most likely related to inlining bug of some kind.
this may be the wrong flag, i can't remember.
@workmanw is it possible to share the app (or a URL to the app) as-is with steps to reproduce? |
A :sadpanda: work-around, is to force the function to exceed the max AST that can be inlined. This should allow you to 🚢 putting the following string in that function's body, should do the trick (right now, these limits/heuristics change overtime)
|
@workmanw if you can also check in canary, that would be handy. |
Your knowledge of the internals never cease to amaze me.
Yea, I should be able to make that happen. If you give me a little bit I'll provision some credentials to one of our pre-production environments and get the data primed. I could probably get okay to share the source if need be, but would have to do that privately.
Done. I checked canary "version 51.0.2673.0 canary (64-bit)" without either of the flags and unfortunately I could still reproduce it. |
It would help me personally try and reduce the problem further, although no guarantees. I more or less would love to do the following:
With a app in-front of me (where I can change code + explore) discovering a proper work-around/reproduction might be possible. |
EDIT: The application linked below is using a build of ember which contains the workaround from PR #13118. It is no longer be valid for reproduction of this issue. If anyone is interested in reproducing this issue using our app, contact me and I could probably make that happen. @stefanpenner So I did whittle down the reproduction by injecting some code into the page. Believe me, otherwise it would have been a nightmare. This is still not 100% reproducible. If you follow these steps and it still hasn't occurred, try restarting chrome all together.
(function() {
var room = 'MTpSb29tLDE5NzQ2MzAwMQ',
wall = 'MTpSb29tLDE5NzQ2MzAwMSxXYWxsLDEwMDAx',
wallitem = 'MTpXYWxsSXRlbSwxOTg0NjMwMDQ';
function promiseTimer(ms) {
return new Ember.RSVP.Promise(function(resolve) {
Ember.run.later(resolve, ms);
});
}
function timedTransition() {
return BC.router.transitionTo.apply(BC.router, arguments).then(function() {
return promiseTimer(800);
});
}
function takeActions() {
var downloadUrl = window.wallitemRecord.get('downloadUrl');
window.open(downloadUrl);
promiseTimer(1400).then(function() {
return timedTransition('wall.wallitem', room, wall, wallitem);
}).then(function() {
return timedTransition('wall', room, wall);
}).then(function() {
return timedTransition('wall.wallitem', room, wall, wallitem);
}).then(function() {
return timedTransition('wall', room, wall);
}).then(function() {
return timedTransition('wall.wallitem', room, wall, wallitem);
}).then(function() {
return timedTransition('wall', room, wall);
}).then(function() {
return timedTransition('wall.wallitem', room, wall, wallitem);
}).then(function() {
return timedTransition('wall', room, wall);
}).then(function() {
return timedTransition('wall.wallitem', room, wall, wallitem);
}).then(function() {
return timedTransition('wall', room, wall);
});
}
BC.store.findRecord('wallitem', wallitem).then(function(wallitem) { window.wallitemRecord = wallitem; });
$('<button id="crash-reproduce">Crash Reproduce</button>').appendTo('.top-right-nav');
$('#crash-reproduce').on('click', takeActions);
})();
I'll work on getting you source code in the meantime. We run on Google App Engine so you will still have to connect to a cloud server, but I should be able to arrange it so you can run the client app locally (proxying to a cloud server). Lastly, I'm on slack now and will be until about 4PM EST. I'd be happy to screenhero if need be. I'll also be available all day tomorrow. |
🎊 🎉 I tested @raido's PR and I cannot reproduce the issue. That does seem to be a successful workaround. 😄 Edit: Tested with Chrome 49 and Chrome 51. |
I have been trying to follow the reported scenarios closely, but I believe this code is in Ember 2.3 also. Does Ember 2.3 also suffer this issue? |
Yes, i can confirm that Ember v2.3 is affected by this too. |
[BUGFIX release] Fix for #13071 V8 inlining bug
OK, pulled #13118 into beta, release, and release-2-3 branches. The release and beta channels should get new builds shortly (via Travis) please bang on it for a while so we can confirm it does indeed fix this... |
@workmanw @raido Thank you so much for spending so much time reproducing the bug, working with Chromium to find & fix this issue. |
Good job all! @2468ben i wonder if we should maybe have a hesienbug/maybe vmbug label? |
[fixed by #13118] |
:) @rwjblue I've updated my bower.json now to use |
Thank you very much!
|
We've also been experiencing this issue and this appears to have fixed it. I've been hammering our site against the |
v2.4.3 has been released with the work around added in #13118. |
Oh man, the hours I spent trying to reproduce/fix this bug before finding this thread... ugh. Good work guys! |
we're currently running an app on |
@Turbo87 This issue was also fix in Chrome as well. So there should only be 1 or 2 versions of Chrome that could run into this. Are you sure it's the same issue? |
@workmanw yeah, pretty sure it's the same. apparently some of our users are still running old Chrome versions and in fact some derived browsers (Sogou Explorer, Opera, Chromium, Dragon) are showing similar behavior according to our Sentry logs |
:(. I feel your pain. Some of our customers are enterprises that lock users into specific versions of Chrome and never let them upgrade. It's possible that this issue resurfaced in some way. I can say with 100% certainty that, at the time, this workaround did resolve the issue for us ( |
Same here. |
@Turbo87 do you have specific versions? |
Chrome 49 is by far the most common one for some reason |
@Turbo87 did you ever found a way around this problem? |
@givanse we've upgraded to Ember 2.12 by now and don't seem to have this issue anymore |
This error only occurs after the app has been active and running for a while, giving the user a chance to navigate between several different routes. It's very hard to reproduce, it seems to "just happen" after a while. We've been able to reproduce it a few times using our production build (ember.min.js), but never using a debug build (ember.debug.js).
Here is the stack:
That seems to point back to the lookup-helper. The few times I've been lucky enough to catch this at a breakpoint, I've observed that the minified
owner
parameter becomes undefined. The rest of theenv
looks correct. See:I know that's very little to go on. Short of coming up with an easy way to reproduce this, is there any additional information about the stack that might helpful in debugging this?
The text was updated successfully, but these errors were encountered: