You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Explain what kind of behaviour you are getting and how you think it should do
I have a typical knexfile with a sqlite database that works fine when developing locally on macos.
in the container, I base my docker image off the official node:20 image. I verify that sqlite3 works, I can go into the REPL and create tables, do soe dummy insertions etc..
But as soon as I try to run npx knex migrate:latest or rollback commands it gives me a segfault. I was able to capture this finally with this code in knexfile.ts. I didn't think it could be a knex issue and maybe it was sqlite3, but seeing as I can
# yarn migrate
yarn run v1.22.19
$ npx knex migrate:latest
Requiring external module ts-node/register
Using Spatialite extension at: mod_spatialite
Spatialite extension loaded
PID 107 received SIGSEGV for address: 0x88
/code/node_modules/segfault-handler/build/Release/segfault-handler.node(+0x31e8)[0x7f45d06c31e8]
/lib/x86_64-linux-gnu/libc.so.6(+0x3c050)[0x7f45d278a050]
/lib/x86_64-linux-gnu/libsqlite3.so.0(sqlite3VtabUnlockList+0x23)[0x7f45a8c36303]
/lib/x86_64-linux-gnu/libsqlite3.so.0(+0xbcae0)[0x7f45a8bdaae0]
/lib/x86_64-linux-gnu/libsqlite3.so.0(+0xbd801)[0x7f45a8bdb801]
/lib/x86_64-linux-gnu/libsqlite3.so.0(sqlite3_prepare_v2+0x16)[0x7f45a8bdbc36]
/code/node_modules/sqlite3/build/Release/node_sqlite3.node(_ZN12node_sqlite39Statement12Work_PrepareEP10napi_env__Pv+0x69)[0x7f45d0302689]
/usr/local/bin/node(_ZZN4node14ThreadPoolWork12ScheduleWorkEvENUlP9uv_work_sE_4_FUNES2_+0x59)[0xc67dc9]
/usr/local/bin/node[0x1886e10]
/lib/x86_64-linux-gnu/libc.so.6(+0x89134)[0x7f45d27d7134]
/lib/x86_64-linux-gnu/libc.so.6(__clone+0x40)[0x7f45d2856a40]
Segmentation fault
error Command failed with exit code 139.
Reduced test code, for example in https://npm.runkit.com/knex or if it needs real
database connection to MySQL or PostgreSQL, then single file example which initializes
needed data and demonstrates the problem.
I can create a example container if there is traction, just waiting to see if anyone has any insight before commiting the time to do that
The text was updated successfully, but these errors were encountered:
1mike12
changed the title
Segmentation Fault when running migrations in Debian based node container
Segmentation Fault when running migrations in Debian based node container & Sqlite3
Feb 27, 2024
Environment
Knex version:
Database + version: sqlite3 3.40.1 2022-12-28 14:03:47
OS: Debian node:20 image
Bug
I have a typical knexfile with a sqlite database that works fine when developing locally on macos.
in the container, I base my docker image off the official node:20 image. I verify that sqlite3 works, I can go into the REPL and create tables, do soe dummy insertions etc..
But as soon as I try to run
npx knex migrate:latest
or rollback commands it gives me a segfault. I was able to capture this finally with this code in knexfile.ts. I didn't think it could be a knex issue and maybe it was sqlite3, but seeing as I candatabase connection to MySQL or PostgreSQL, then single file example which initializes
needed data and demonstrates the problem.
I can create a example container if there is traction, just waiting to see if anyone has any insight before commiting the time to do that
The text was updated successfully, but these errors were encountered: