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
Test fails on node.js 0.10 #126
Comments
make test fails for me on Ubuntu 12.04, x86_64, with node 0.10. In my case, test/support/createdb.js consumes all available memory until the OOM killer gets it. 2G memory in the system, freshly booted. If I reduce the number of rows inserted into big.db to 1e6, then it fails thusly:
I think this may be the same bug. Not sure. I re-ran under node 0.10.1 and got similar result, but this backtrace:
|
So something went wrong in Database::Work_Close profiling rerunning statements |
I am seeing this as well with node 0.10.4 and node-sqlite3 2.1.7. |
same here, using 0.10.4, 0.10.5, 0.11.2 |
@pkoretic - can you try node-sqlite3 from master and see if that works? If not an you post the errors exactly? Its running fine for me on ubuntu precise (though a few tests are failing). |
I've just compiled it from master. Now I only got 'Segmentation fault (core dumped)' (after I've done two selects on database with two tables and 3 rows). |
@pkoretic - this is running the existing mocha tests, or with a custom script? If the latter, please post it here. |
.schema gives CREATE TABLE list(ID INTEGER PRIMARY KEY NOT NULL, name TEXT, valid NUMBER); select * from list gives
1|test1|1
2|test2|2
3|test3|3 script part is: response.writeHead(200, { "Content-Type" : "application/json"});
var db = new sqlite3.Database("database.db", sqlite3.OPEN_READONLY);
var data = [];
db.each("SELECT ID, name, desc FROM list", function(error, row)
{
if(!error)
data.push({ID : row.ID, NAME : row.name, DESC : row.desc});
},
function()
{
db.close();
response.end(JSON.stringify(data));
}); Doing few requests one after another breaks it. As I've said, using 0.8.x version of nodejs works fine. |
With node.js 0.10.5 (Debian Linux 6.0.5 (x64) ) and the latest node-sqlite3 code from the repo, the test fails at another point. Creating test database... This may take several minutes.
make[1]: Entering directory
query properties blob cache constants error handling each |
Also fails on node 0.8.9 ( #142 ) |
same problem on Ubuntu 12.04.2 LTS, var tables = [],
expected = 'authors,books,sqlite_sequence,books_authors_link,books_languages_link,books_plugin_data,books_publishers_link,books_ratings_link,books_series_link'+
'books_tags_link,comments,conversion_options,custom_columns,data,feeds,identifiers,languages,library_id,metadata_dirtied,preferences,publishers,ratings,series,tags,sqlite_stat1'.split(',');
calibreDatabase.each(
"select name from sqlite_master where type='table'",
function(err, row) {tables.push(row.name);},
function() {console.log(tables);done&&done();}
);
/*
[ 'authors',
'books',
'sqlite_sequence',
'books_authors_link',
'books_languages_link',
'books_plugin_data',
'books_publishers_link',
'books_ratings_link',
'books_series_link',
'books_tags_link',
'comments',
'conversion_options',
'custom_columns',
'data',
'feeds',
'identifiers',
'languages',
'library_id',
'metadata_dirtied',
'preferences',
'publishers',
'ratings',
'series',
'tags',
'sqlite_stat1' ]
Segmentation fault (core dumped)
*/ // in mocha i get the array, then:
*** glibc detected *** node: free(): corrupted unsorted chunks: 0x0000000000e8d500 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7f9858d92b96]
/home/ciprian/workbench/calibre/node_modules/sqlite3/build/Release/node_sqlite3.node(_ZN12node_sqlite39Statement5BatonD0Ev+0xd7)[0x7f985826d017]
/home/ciprian/workbench/calibre/node_modules/sqlite3/build/Release/node_sqlite3.node(_ZN12node_sqlite39Statement8FinalizeEPNS0_5BatonE+0x31)[0x7f9858269861]
/home/ciprian/workbench/calibre/node_modules/sqlite3/build/Release/node_sqlite3.node(_ZN12node_sqlite39Statement7ProcessEv+0x57)[0x7f9858269917]
/home/ciprian/workbench/calibre/node_modules/sqlite3/build/Release/node_sqlite3.node(_ZN12node_sqlite39Statement14Work_AfterEachEP9uv_work_s+0x49)[0x7f985826a429]
node(uv__work_done+0xa1)[0x6d7201]
node[0x6cd532]
node[0x6cd606]
node(uv__io_poll+0x1ae)[0x6d9e5e]
node(uv_run+0xd0)[0x6cde30]
......
Aborted (core dumped) |
I resolved by downgrading to node.js 0.8.22, which was the most recent version that worked for me on both Ubuntu 13.04 and 12.04.2. (I think I tried node.js 0.8.23; not 100% sure.) |
I got the same segfault when running the example code from https://github.com/developmentseed/node-sqlite3. node v0.10.8, sqlit3 v2.1.7, Ubuntu 12.10, 64bit |
Same error. Please fix. |
fixed by 25db957, the node-sqlite3 v2.1.8 tag now works with node v0.10.x |
Builds are passing for any-db again, awesome! 🍰 |
On Debian Linux 6.0.5 (x64) and node.js 0.10, make is ok but 'make test' fails at the beginning of the test.
*** glibc detected *** node: free(): corrupted unsorted chunks: 0x00000000022a0a20 ***
======= Backtrace: =========
/lib/libc.so.6(+0x71bd6)[0x2b8eea6b4bd6]
/lib/libc.so.6(cfree+0x6c)[0x2b8eea6b994c]
/home/test/node-sqlite3/build/Release/node_sqlite3.node(_ZN5AsyncISsN12node_sqlite38DatabaseEE5closeEP11uv_handle_s+0x41)[0x2b8eea9bd851]
node(uv_run+0x20e)[0x6f359e]
node(_ZN4node5StartEiPPc+0x13d)[0x5b184d]
/lib/libc.so.6(__libc_start_main+0xfd)[0x2b8eea661c8d]
node[0x5a80a9]
[snip]
/bin/sh: line 1: 22792 Aborted NODE_PATH="./lib:" expresso -I lib test/*.test.js
The text was updated successfully, but these errors were encountered: