DBT cli throw memory exception for ffi.callback() on Mac with Apple Sillicon
See original GitHub issueDescribe the bug
dbt run
or dbt --version
throw error Cannot allocate write+execute memory for ffi.callback().
Steps To Reproduce
On Macbook pro with M1 chip
brew tap fishtown-analytics/dbt
brew install dbt
add default profile.yml with connection to snowflake
create new project dbt init
dbt run
with the two sample models, or simply dbt --version
Expected behavior
Should complete successfully, instead of throwing exception. The process works fine on Intel-based Macbook pro.
Screenshots and log output
> dbt run
Running with dbt=0.19.0
Found 3 models, 8 tests, 0 snapshots, 0 analyses, 143 macros, 0 operations, 0 seed files, 0 sources, 0 exposures
Encountered an error:
Cannot allocate write+execute memory for ffi.callback(). You might be running on a system that prevents this. For more information, see https://cffi.readthedocs.io/en/latest/using.html#callbacks
System information
Which database are you using dbt with?
- postgres
- redshift
- bigquery
- snowflake
- other (specify: ____________)
The output of dbt --version
:
Encountered an error:
Cannot allocate write+execute memory for ffi.callback(). You might be running on a system that prevents this. For more information, see https://cffi.readthedocs.io/en/latest/using.html#callbacks
The operating system you’re using: macOS Big Sur 11.2.2
The output of python --version
:
3.8.7
Additional context
Add any other context about the problem here.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:23 (8 by maintainers)
Top Results From Across the Web
Get dbt up and running from the command line on a MacBook ...
Get dbt up and running from the command line on a MacBook with an M1 chip. ). Step 1: Set up your Terminal...
Read more >Scrapy on M1 Mac: MemoryError - Stack Overflow
I've got this working on an M1 with python 3.9.6 but I'm getting the ffi.callback() error on an M1 with 3.10.4. Both are...
Read more >Simple index - piwheels
... simple-rule-engine searvey file-collection-hash django-nested-inline-py3 functional-python fast-dp habitual clade dice-cli mailchimp-python combinemols ...
Read more >the 2 of 3 and 4 0 5 to 6 a 7 in 8 1 9 for 10 image 11 2 12 is 13 ...
... 2003 toxic 2004 exemption 2005 6e 2006 transport 2007 detailed 2008 warrant 2009 indiana 2010 smith 2011 disposition 2012 ord 2013 scientist...
Read more >ecprice › Public › wordlist.ranked – MIT
... problem red give memory nov performance social august quote language story options sell experience rates create key z body young america important...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
TL;DR: if you experience the error during
dbt run
, just add those lines to~/.dbt/profiles.yml
(see the full doc in profiles.yml here)Details:
Here’s the stack trace (
MacBook Air (M1, 2020)
runningMac OS 11.3.1
). The exception is raised in user behavior tracking code. Quickfix will be disabling tracking (see above). I guess the proper way to handle this would be wrappingtracker.flush()
withtry/except
. Failure to track isn’t a critical error after allHey guys,
I fixed this ffi problem by reinstalling the libffi using homebrew, and install cffi wheel: https://files.pythonhosted.org/packages/3e/9b/660d6da900af1976a8b4efea713a7ce9e514bf4659eff9b17f90f00be1cf/cffi-1.15.0-cp39-cp39-macosx_11_0_arm64.whl