Regression: SIGILL crashing JVM when loading spatial module in DuckDB 2.0.1.0

Aperta
#1,007 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java, linux
Ambito
backend, database

Direzione di ricerca

Start by reproducing the crash with the provided Java program and DuckDB JDBC 2.0.1.0 on Ubuntu 26.04, then inspect the attached hs_err log for the native crash details. Compare the same spatial extension load with a 1.x driver to narrow down the regression; done means loading spatial no longer triggers SIGILL in the reported setup.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Create this simple Java program:

import java.sql.*;

void main() throws Exception {
        try (
                Connection c = DriverManager.getConnection("jdbc:duckdb:~/duckdb.db");
                Statement s = c.createStatement();
        ) {
                s.executeUpdate("install spatial");
                s.executeUpdate("load spatial");
        }
}

Now run it like so:

java -cp duckdb_jdbc-2.0.1.0.jar Test.java

This produces the following crash output:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x00007c79efe15026, pid=136403, tid=136404
#
# JRE version: OpenJDK Runtime Environment (25.0.5.1+2) (build 25.0.5.1+2-1-26.04.1-Ubuntu)
# Java VM: OpenJDK 64-Bit Server VM (25.0.5.1+2-1-26.04.1-Ubuntu, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [spatial.duckdb_extension+0x1215026]  _GLOBAL__sub_I_spatial_join_optimizer.cpp+0x66
#
# Core dump will be written. Default location: Determined by the following: "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -F%F -- %E" (alternatively, falling back to /home/lukaseder/core.136403)
#
# An error report file with more information is saved as:
# /home/lukaseder/hs_err_pid136403.log
#
# If you would like to submit a bug report, please visit:
#   https://bugs.launchpad.net/ubuntu/+source/openjdk-25
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted                    (core dumped) java -cp duckdb_jdbc-2.0.1.0.jar Test.java

Attached the core dump: hs_err_pid136403.log

I'm running on this Linux distribution:

lukaseder@dg-test-26:~$ lsb_release -irc
Distributor ID: Ubuntu
Release:        26.04
Codename:       resolute

This is a 2.x regression as the issue didn't appear with 1.x

Lingua principale
C++
Stelle
129
Fork
90
Merge medio
5h 34m
PR unite (30g)
56

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di duckdb/duckdb-java

Tutte le issue di duckdb/duckdb-java

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.