Hello, I have a "small" reproducible segfault at https://github.com/vhiairrassary/debug-duckdb-with-solid-queue.
My notes:
SELECT statements are fine, it happens when doing a CREATE SECRET statement
- Job only fails when running asynchronously in Solid Queue (using
.perform_later), synchronous executions (.perform_now) are fine
- The repository contains two commits
- a
rails new debug-duckdb-with-solid-queue --database=postgresql (I do not have the issue with sqlite)
- the code causing the issue (see below) and few lines of configuration
class DebugJob < ApplicationJob
def perform
DuckDB::Database.open do |db|
db.connect do |conn|
p conn.query('SELECT 1').to_a
p conn.query('SELECT 2').to_a
conn.query("CREATE SECRET s3_secret (TYPE S3, KEY_ID 'abc', SECRET 'def')")
end
end
end
end
To reproduce, open three terminals:
- First: run Postgres using
podman run --rm -ti -e 'POSTGRES_USER=my_user' -e 'POSTGRES_PASSWORD=my_password' -e 'POSTGRES_DB=postgres' -p '5432:5432' postgres:17.5-alpine
- Second: prepare database (using
bundle exec rails db:drop db:create db:migrate db:seed ) and then launch Solid Queue using ./bin/jobs
- Third: in a Rails console
I am trying to simplify the example and find the root cause.
Hello, I have a "small" reproducible segfault at https://github.com/vhiairrassary/debug-duckdb-with-solid-queue.
My notes:
SELECTstatements are fine, it happens when doing aCREATE SECRETstatement.perform_later), synchronous executions (.perform_now) are finerails new debug-duckdb-with-solid-queue --database=postgresql(I do not have the issue with sqlite)To reproduce, open three terminals:
podman run --rm -ti -e 'POSTGRES_USER=my_user' -e 'POSTGRES_PASSWORD=my_password' -e 'POSTGRES_DB=postgres' -p '5432:5432' postgres:17.5-alpinebundle exec rails db:drop db:create db:migrate db:seed) and then launch Solid Queue using./bin/jobsreload!; DebugJob.perform_now✅Log
reload!; DebugJob.perform_later🔴Log
I am trying to simplify the example and find the root cause.