python icon indicating copy to clipboard operation
python copied to clipboard

Cant enable and find core dumped

Open vitassuper opened this issue 2 years ago • 8 comments

When my Python program fails in a Docker container, no core dump or backtrace is generated. I tried enabling it using ulimit -c unlimited, but it didn't help. I cannot find a stack trace to determine why my program is crashing. All I get is a corrupted size vs. prev_size message.

vitassuper avatar Oct 17 '23 22:10 vitassuper

Do you have an example that we can take a look at?

LaurentGoderre avatar Oct 18 '23 20:10 LaurentGoderre

Do you have an example that we can take a look at?

Here is my program https://github.com/vitassuper/flux-bot and screen below image

vitassuper avatar Oct 19 '23 00:10 vitassuper

It would be helpful to add env vars to your docker compose to get it running quicky

environment:
      - DEBUG_MODE=false
      - SQLALCHEMY_DATABASE_URI=postgres://root:root@postgres
      - SQLALCHEMY_DATABASE_DB=connector
      - POSTGRES_SERVER=postgres
      - POSTGRES_USER=root
      - POSTGRES_PASSWORD=root
      - POSTGRES_DB=trading_view_connector
      - APP_KEY=1234
      - TELEGRAM_BOT_TOKEN=1234
      - API_PASSWORD=1234
      - TELEGRAM_CHAT_ID=1234
      - TELEGRAM_CHAT_ID2=1234

LaurentGoderre avatar Oct 19 '23 14:10 LaurentGoderre

It would be helpful to add env vars to your docker compose to get it running quicky

environment:
      - DEBUG_MODE=false
      - SQLALCHEMY_DATABASE_URI=postgres://root:root@postgres
      - SQLALCHEMY_DATABASE_DB=connector
      - POSTGRES_SERVER=postgres
      - POSTGRES_USER=root
      - POSTGRES_PASSWORD=root
      - POSTGRES_DB=trading_view_connector
      - APP_KEY=1234
      - TELEGRAM_BOT_TOKEN=1234
      - API_PASSWORD=1234
      - TELEGRAM_CHAT_ID=1234
      - TELEGRAM_CHAT_ID2=1234

Good to know, but I read tip from docker doc Don't use environment variables to pass sensitive information, such as passwords, in to your containers. Use [secrets](https://docs.docker.com/compose/use-secrets/) instead. Anyway, this is not the reason for my issue

vitassuper avatar Oct 19 '23 20:10 vitassuper

Yeah I know, I was trying to get the app started to see if I can reproduce. It starts but I didn't configure it correctly so it just gives errors

LaurentGoderre avatar Oct 19 '23 21:10 LaurentGoderre

Yeah I know, I was trying to get the app started to see if I can reproduce. It starts but I didn't configure it correctly so it just gives errors

What errors did you get?

vitassuper avatar Oct 19 '23 21:10 vitassuper

Screenshot 2023-12-13 at 10 31 40 AM

LaurentGoderre avatar Dec 13 '23 15:12 LaurentGoderre

Maybe this is useful, but looking at the repo, flux-bot is using a slim variant. This variant strips debug info for file size, where the full fat images do not. Just found this out in https://github.com/docker-library/python/issues/825#issuecomment-1869792567

blopker avatar Dec 26 '23 22:12 blopker