Closed gsbelarus closed 4 years ago
Test case?
The error is definitely here. I see it every day. Now, I'm trying to figure out how to make a reproducible case. The problem is that database is huge (around150 GB) and application is rather complex. I will try to extract a sequence of SQLs which leads to driver's crash and test it against smaller database. If an error will appear on that database I will pack it and send to you. notice: @sywka
While looking for the error found such a thing
it("Error code: 3221225477", async () => {
const path = resolve("./TEST.FDB");
if (existsSync(path)) {
unlinkSync(path);
}
const client = createNativeClient(getDefaultLibraryFilename());
const attachment = await client.createDatabase(path, {username: "SYSDBA", password: "masterkey"});
const transaction = await attachment.startTransaction();
attachment.execute(transaction, "DROP TABLE TEST").catch(console.log); // don't wait for the end
await transaction.commit();
await attachment.dropDatabase(); // if don't wait for the end then will crash process too
await client.dispose();
});
I still don't know whether this is the cause of our error, but in any case, this should generate an js error, not a process error.
The driver really don't yet protect from this kind of programming error. I believe many functions will have a natural protection in fbclient, but in this case, you're unloading the client library while some of its code is running.
This seems to be fixed in #15.
This is Access violation some where in the code of driver. We have a big problem because of unstable work of driver. Is it possible to compile it with extended debug information and source map, so when error arise we could see reference to the sources and stack trace?
Or if you provide us with instructions we could setup MS Visual Studio and try to find this bug by ourselves.
We use node 11, windows 2012 server, fb 3.0.4.