Malloc: double free error on M3 Macbook pro

2.5k Views Asked by At

I am working on a Django python project with a postgres db hosted with render.com.

The code works fine on server and my imac. I recently got a Macbook Pro M3 (running sonoma). I have replicated the exact same setup and environment however when I try to run the code locally, I get

Python(40505,0x1704f7000) malloc: double free for ptr 0x1368be800 Python(40505,0x1704f7000) malloc: *** set a breakpoint in malloc_error_break to debug

The setup is the exact same on the other device and it works fine there. Here is the link to repo

https://github.com/moreshk/django-postgres

Any assistance would be useful.

Setup https://github.com/moreshk/django-postgres on my new device. Setup virtual environment, any dependencies and installed requirements and .env file. Would have expected it to run fine locally. Other Django Python projects seem to work fine, except this one which has a postgres db with render.com

When I try to run the code locally, I get the below error:

python manage.py runserver Watching for file changes with StatReloader Performing system checks...

System check identified no issues (0 silenced). Python(40505,0x1704f7000) malloc: double free for ptr 0x1368be800 Python(40505,0x1704f7000) malloc: *** set a breakpoint in malloc_error_break to debug

1

There are 1 best solutions below

3
On BEST ANSWER

if you have installed PostgreSQL with Homebrew,

brew upgrade postgresql and ensure you have version 14.10_1

https://github.com/Homebrew/homebrew-core/issues/155651#issuecomment-1827988313

psql(6636,0x10f1de600) malloc: *** error for object 0x7f916b00bc00: pointer being freed was not allocated
psql(6636,0x10f1de600) malloc: *** set a breakpoint in malloc _error break to debug