Closed
Bug 686919
Opened 13 years ago
Closed 13 years ago
TI: sqlite.js gives incorrect behavior
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
DUPLICATE
of bug 687768
People
(Reporter: azakai, Assigned: jandem)
References
Details
Attachments
(2 files)
The attachment is SQLite compiled to JS. Running it with -m -j -p gives something like this:
'startup' : took 0 ms
create table : took 179 ms
25,000 inserts : took 2789 ms
[..more stuff..]
whereas with -m -n the result is
'startup' : took 0 ms
create table : took 3352 ms
SQL error on 1007: out of memory
uncaught exception: exit(1) called, at __exit(1)@/home/alon/Documents/sqlite.js:2838
_exit(1)@/home/alon/Documents/sqlite.js:2840
_main(1,1091252,0)@/home/alon/Documents/sqlite.js:32359
callMain([object Array])@/home/alon/Documents/sqlite.js:217698
run()@/home/alon/Documents/sqlite.js:219046
@/home/alon/Documents/sqlite.js:219082
So 'create table' takes 19X more time with TI, and in addition we get an incorrect failure afterwards.
Note that the failure says "out of memory", but that is an internal SQLite error message (which should not have occurred here), not an actual out of memory problem in the JS engine.
![]() |
||
Comment 1•13 years ago
|
||
Requesting tracking for the correctness regression....
tracking-firefox9:
--- → ?
Assignee | ||
Comment 2•13 years ago
|
||
I considered reducing this, but it will take a long time. This works for me with a JM build from about a month ago, so bisecting (using nightly shell builds?) may be faster.
Assignee | ||
Comment 3•13 years ago
|
||
Regression from bug 670493; I will have a look tomorrow.
Assignee | ||
Comment 4•13 years ago
|
||
OK so at some point we recompile, inline several functions and then it fails. Hard to debug 219,076 lines of JS so I'm going to reduce this first. Atm it's down to 159k lines.
Reporter | ||
Comment 5•13 years ago
|
||
I filed a followup bug for the speed issue, bug 687127. Turns out that running closure compiler avoids the correctness issue, but the slowdown remains. So focusing this bug on correctness and the followup on speed.
No longer blocks: infer-perf-regress
Summary: TI: sqlite.js runs slowly and gives incorrect behavior → TI: sqlite.js gives incorrect behavior
Comment 6•13 years ago
|
||
Can we reduce using lithium or delta or something automatic?
http://delta.tigris.org/using_delta.html
/be
Assignee | ||
Comment 7•13 years ago
|
||
(In reply to Brendan Eich [:brendan] from comment #6)
> Can we reduce using lithium or delta or something automatic?
Yeah, I'm already using lithium and delta. Lithium in this case because it seems to be faster for very large files and its console output is cleaner and easier to understand. Takes a long time for large files like this, but that's fine as it just runs in the background while I spend my time doing other stuff :)
Updated•13 years ago
|
Comment 8•13 years ago
|
||
We're really using JS to (wrongly, but still) emulate OOM in C here? "The hearts of men, moreover, are full of evil and there is madness in their hearts while they live."
;-)
Assignee | ||
Comment 9•13 years ago
|
||
Down to 1500 lines using Lithium and my Reflect.parse-based reducer. Gives different error message with -n -m -a. Not finished yet.
Assignee | ||
Comment 10•13 years ago
|
||
Duplicate of bug 687768. sqlite.js no longer fails on m-c tip but the patch in bug 687768 fixes the reduced testcase. I also verified that applying the patch to an older m-c revision, where I can still reproduce the problem, fixes sqlite.js
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Comment 11•13 years ago
|
||
Tracking the original for Fx9, removing the flag from this bug.
tracking-firefox9:
+ → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•