astronomer / astro-cli

CLI that makes it easy to create, test and deploy Airflow DAGs to Astronomer
https://www.astronomer.io
Other
347 stars 70 forks source link

astro dev run fails with SIGSEGV signal error #1364

Open hkc-8010 opened 1 year ago

hkc-8010 commented 1 year ago

Describe the bug

Customer reported a bug in Astro CLI 1.18.2 and I was able to replicate the issue on my local machine. The astro dev run command fails with the SIGSEGV signal.

astro dev run dags report                                                                           
Running: airflow dags report
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x28 pc=0x1030112ec]

goroutine 24 [running]:
bufio.(*Reader).Read(0x0, {0x140002c8000?, 0x1400050bfa8?, 0x1031cc38c?})
        bufio/bufio.go:216 +0x9c
github.com/docker/docker/pkg/stdcopy.StdCopy({0x1040e2380, 0x14000126008}, {0x1040e2380, 0x14000126010}, {0x1040df660, 0x0})
        github.com/docker/docker@v20.10.7+incompatible/pkg/stdcopy/stdcopy.go:108 +0x350
github.com/astronomer/astro-cli/docker.ExecPipe.func1()
        github.com/astronomer/astro-cli/docker/docker.go:42 +0x4c
created by github.com/astronomer/astro-cli/docker.ExecPipe
        github.com/astronomer/astro-cli/docker/docker.go:40 +0x180

What CLI Version did you experience this bug?

M1 Mac;
Docker 4.22.0, engine 24.0.5;
go 1.21.0;
astro CLI version 1.18.2

This CLI bug is related to which Astronomer Platform?

What Operating System is the above CLI installed on?

M1 Mac

🪜 Steps To Reproduce

FROM quay.io/astronomer/astro-runtime:8.8.0
apache-airflow-providers-amazon==8.3.1
apache-airflow-providers-common-sql==1.6.0
apache-airflow-providers-ftp==3.4.2
apache-airflow-providers-http==4.5.0
apache-airflow-providers-postgres==5.5.2
apache-airflow-providers-redis==3.2.1
apache-airflow-providers-sftp==4.4.0
apache-airflow-providers-slack==7.3.1
apache-airflow-providers-snowflake==4.3.1
apache-airflow-providers-sqlite==3.4.2
apache-airflow-providers-ssh==3.7.1

📸 Screenshots

image
ttzhou commented 1 year ago

Hi there - I was the original ticket filer; wondering if there are any workarounds (downgrading versions, etc.) I can do in the interim for this?

sunkickr commented 1 year ago

@ttzhou We have found a work around. If you install that latest version with our curl command sudo bash < <(curl -sSL https://install.astronomer.io) instead of brew it should work. We a still trying to figure out what the issue is with the brew binary

ttzhou commented 1 year ago

Thanks @sunkickr, can confirm latest version resolves this. Feel free to close if you wish!

erdos2n commented 1 year ago

Multiple people have experienced this same issue with the latest version when installing with brew install astro. Is there a process for adding these bugs (in post) to the release notes?

$ astro dev run dags list
Running: airflow dags list
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x28 pc=0x104c85e18]

goroutine 23 [running]:
bufio.(*Reader).Read(0x0, {0x14000692000?, 0x0?, 0x0?})
    bufio/bufio.go:223 +0x88
github.com/docker/docker/pkg/stdcopy.StdCopy({0x105d0c768, 0x14000070030}, {0x105d0c768, 0x14000070038}, {0x105d0cc28, 0x0})
    github.com/docker/docker@v20.10.7+incompatible/pkg/stdcopy/stdcopy.go:108 +0x34c
github.com/astronomer/astro-cli/docker.ExecPipe.func1()
    github.com/astronomer/astro-cli/docker/docker.go:42 +0x4c
created by github.com/astronomer/astro-cli/docker.ExecPipe in goroutine 1
    github.com/astronomer/astro-cli/docker/docker.go:40 +0x178

Version

$ astro version
Astro CLI Version: 1.19.1
sunkickr commented 11 months ago

This is fixed in 1.19.2

sunkickr commented 7 months ago

reopened this issue because the problem persists in the latest version of the CLI. We will need to rewrite the command

wolfier commented 7 months ago

Any updates on this issue?

kushalmalani commented 7 months ago

Any updates on this issue?

@wolfier We havent had the chance to re-write this command. The team is currently occupied with 1.23.0 release which has a astrohub to core-api migration work. We should be able to get to this once the release is done. We will keep you updated when this is fixed.

CC: @sunkickr @vandyliu

DongpengLiuFaire commented 4 months ago

Any update on this issue? I'm still experiencing this.

sunkickr commented 4 months ago

The command is currently working for me on Mac M1 on v1.25.0. @DongpengLiuFaire what os are you using?