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
Write operations hanging on systems with low disk space #78
Comments
After a little bit of digging, here is what I've found so far:
|
Thanks for your findings so far. It would be important to know whether this is a Dexie or browser problem. Would you have a chance to test it on chrome and/or firefox on your system to know for sure it's not a Safari issue? |
Actually, it would have been nice of me to note that this is in a Chrome App ;-) I'm currently trying to get the Dexie unit tests running inside the Chrome App - I'll let you know what I find. |
Alright - unit tests on the full Mac refuse to run in the Chrome App. Getting stuck on extendability:recursive-pause. Tried running just the "transaction" module - hangs on the first test: transaction: empty transaction block. Windows box with lots of space, all tests pass fine in the Chrome app except for WebWorker because Chrome apps are sandboxed and cannot eval - no worries on that one. |
What version of Chrome on the Mac? |
41.0.2272.89 |
Ok so it's new then. Just wondering what could be the differences between your mac- and windows- Chrome since they behave differently. |
Well - the problem only happens on the mac when it's disk space is hella low - I'm going to give the unit tests a go with more available disk space and see if they run fine. Might not get to that until tomorrow though. |
Alright - so... Operating system doesn't seem to affect test results - the variable here is low disk space. Any write operation inside of a Dexie transaction causes it to never call through to the appropriate .then() callback. Here's the breakdown of what I ran: (It's also worth noting I've seen the bug manifest in Yosemite on two other machines... I just don't have those machines to test with) Test environment 1Windows 8 Running tests a Chrome App Window: Fail Running tests in browser tab: Success Test environment 2Mac OS X 10.8.5 Running tests a Chrome App Window: Fail Running tests in browser tab: Success Test environment 3Windows 8 Running tests a Chrome App Window: Success Running tests in browser tab: Success Test environment 4Mac OS X 10.8.5 Running tests a Chrome App Window: Success Running tests in browser tab: Success |
Any chance you can email me? My company is looking to ship a product and this is the source of one of very few remaining known bugs. Trying to get this out the door as soon as possible! graham@kennery.com |
I would suggest you to put a break-point or console.log on Dexie.js line 1272 (directly after the line idbtrans.onerror = function (e) {. If you don't come there at all, the problem lies in Chrome, not in Dexie. |
Issue seems to be a chromium issue since the onerror callback never gets fired when running in chrome app with low available disk space. Discussing having some kind of workaround in Dexie such as a configurable timeout for transactions. But the issue really needs to be solved in Chrome. |
A customer found that the abort event was actually fired on the transaction in this situation, but not the error event. This is good news because then we could work around the issue by ensuring the error event will be explicitely called when abort error happens. |
Issue #78 happens on chrome devices with low disk space - transaction.onerror is never called, only transaction.onabort. A workaround in Dexie is therefore to always make sure the returned Promise will fail whenever an onabort occurs.
Seems like I'm failing to get callbacks when trying to add/put data during a transactions when a user's disk space is low. Trying to dig into the problem right now, all of my operations have corresponding .catch() callbacks and none are getting called for any reason.
So far, reproduced on OS X with disk space < 2GB
When Dexie gets into this, "hanging" state, no operations within the transaction will callback - reads or writes.
The text was updated successfully, but these errors were encountered: