Comments (16)
@Mytherin confirmed, the locally compiled version works without issues.
$ python3 -m pip install duckdb --no-binary="duckdb"
$ python3
Python 3.8.19 (default, May 23 2024, 09:16:31)
[Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import duckdb
>>> duckdb.sql("SELECT 42").show()
┌───────┐
│ 42 │
│ int32 │
├───────┤
│ 42 │
└───────┘
from duckdb.
This should be fixed via #12236, where we will provide pre-built wheels only for MacOS >= 12.0, and support for MacOS 11.0 will be via building from source.
Given MacOS 11 is mostly discontinued, I think this might be an OK stance.
Tonight set of nightly (available in about 6 hours) will be reviewed / tested some more, but I expect that PR to solve this issue.
Thanks for raising this.
from duckdb.
11 errors
Can you provide these?
from duckdb.
@Tishj The "11" number is the error code. The error message is literally this: Segmentation fault: 11
Btw, I chased it down and it looks like this is a regression. Version 0.10.2 does not display this behavior.
from duckdb.
Some more information that might be relevant:
The earliest version that causes the seg fault is 0.10.3.dev848
. Digging around in the changelog I found a PR that changes the files where the crash appears.
It looks like there was a change between versions 0.10.2 and 0.10.3 in how the python stubs are generated and for some reason it causes a segfault on my setup.
from duckdb.
I've tried to reproduce this using asdf
on my Mac (although it is an ARM model), and everything seems to work as expected:
asdf install python 3.8.19
asdf global python 3.8.19
asdf exec python -m pip install duckdb
asdf exec python
```py
>>> import duckdb
>>> duckdb.sql('select 42')
┌───────┐
│ 42 │
│ int32 │
├───────┤
│ 42 │
└───────┘
Perhaps there are some existing packages this is conflicting with. Could you provide the list of installed packages and versions? Are you using a wheel build or a source build?
from duckdb.
@Tishj hm, probably not it, I can reproduce this with only duckdb installed. Here's what pip list
is reporting. I installed the package with pip install duckdb==0.10.3.dev848
(0.10.3.dev848 is the earliest version where this happens but the issue is present all the way up to the nightly build i.e. pip install --pre --upgrade duckdb
).
$ pip list
Package Version
---------- -------------
duckdb 0.10.3.dev848
pip 24.0
setuptools 69.5.1
wheel 0.43.0
from duckdb.
Just to confirm you are using the wheel builds right? (e.g. if you try running python3 -m pip install duckdb --only-binary=:all:
it succeeds)?
from duckdb.
@Mytherin hey, yes it succeeds:
python3 -m pip install duckdb --only-binary=:all:
Collecting duckdb
Using cached duckdb-0.10.3-cp38-cp38-macosx_10_9_x86_64.whl.metadata (763 bytes)
Using cached duckdb-0.10.3-cp38-cp38-macosx_10_9_x86_64.whl (15.5 MB)
Installing collected packages: duckdb
Successfully installed duckdb-0.10.3
from duckdb.
Do you have pybind11 installed locally? If so what is the version? (pybind11-config --version
)?
from duckdb.
@Mytherin no pybind
pybind11-config --version
bash: pybind11-config: command not found
from duckdb.
I can replicate this on an older (non-updated) x86_64 mac.
0.10.3.dev848
wheel or later segfaults Python on import.
(Creating a wheel locally from a source build works without error.)
Is there anything I can do to help with debugging?
from duckdb.
Can you try this to troubleshoot?
You say this crashes:
import duckdb
duckdb.sql("select 42")
Does this also crash?
import duckdb
duckdb.default_connection.sql("select 42")
import duckdb
con = duckdb.connect()
con.sql("select 42")
from duckdb.
@cmdlineluser Could you also try these snippets and report your results?
from duckdb.
@Tishj It's the import duckdb
that segfaults.
$ python3 -m pip install duckdb -U --force-reinstall --only-binary=:all:
Collecting duckdb
Using cached duckdb-0.10.3-cp310-cp310-macosx_10_9_x86_64.whl.metadata (763 bytes)
Installing collected packages: duckdb
Attempting uninstall: duckdb
Found existing installation: duckdb 0.10.2
Uninstalling duckdb-0.10.2:
Successfully uninstalled duckdb-0.10.2
Successfully installed duckdb-0.10.3
$ python3
Python 3.10.9 (main, Jan 14 2023, 16:56:26) [Clang 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import duckdb
Segmentation fault: 11
(This is on an older mac that cannot be updated.)
from duckdb.
Could you try compiling from source using the --no-binary
flag (python3 -m pip install duckdb --no-binary="duckdb"
)?
We've done some internal investigation and this seems to be related specifically to MacOS 11. It's also not limited to Python - and can also be triggered using the CLI. Since MacOS 11 is no longer supported by Apple itself, the problem could be that newer Apple build toolchains do not support MacOS 11 anymore or do not support it by default anymore and we might need to set specific flags for our binaries. Maybe building with the machine itself will circumvent the issue.
from duckdb.
Related Issues (20)
- Changing precision prints incorrect value (number of leading zeros) when using precision {:.2} vs {:.3} HOT 1
- `make bundle-library` doesn't work on windows HOT 1
- Detecting data races in duckdb::Connection::Query() under ThreadSanitizer HOT 3
- Illegal Predicate Pushdown leads to Casting error HOT 1
- Wrong result/data loss when using Filter Pushdown and Union_By_Name HOT 3
- Query unnesting with grouping sets results in wrong output HOT 1
- IN/OR operator removes completely Parquet Filter Pushdown on other filters HOT 2
- Exporting to Pandas has incorrect column type for BOOLEAN and BIGINT when some entries are NA/NULL HOT 4
- hive_partitioning=True can interpret empty string values in directory as NULL
- Race condition in parallel installations of extensions HOT 1
- `DuckDBPyRelation.intersect()` (Python function API) implicitly performs `.distinct()` operation (i.e. deduplicates for set semantics)
- CSV reader: combination of null_padding = true and parallel = false introduces extra row
- DuckDB lag seems to be much slower than Polars HOT 8
- Binder error when using 'split_part' and reading from stdin
- Python API suggests increasing maximum_object_size when read_json but it's unclear how to do that
- motherduck pivot Invalid Error: PendingQuery can only take a single statement erro HOT 2
- Parquet read : Invalid decimal encoding in Parquet file HOT 1
- DuckDB Build Failure in Alpine Linux Docker Image (host: mac M1) HOT 1
- v1.0.0 jdbc connector: TransactionContext Error on DBeaver
- Incorrect results returned when using JOIN statement HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from duckdb.