Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segfault in github.com/armon/circbuf #798

Closed
jazzdan opened this issue Feb 22, 2021 · 1 comment · Fixed by #800
Closed

segfault in github.com/armon/circbuf #798

jazzdan opened this issue Feb 22, 2021 · 1 comment · Fixed by #800
Assignees
Labels
type:bug Something isn't working

Comments

@jazzdan
Copy link
Contributor

jazzdan commented Feb 22, 2021

Encountered when executing a RUN that looked like this:

RUN --mount=type=cache,target=/root/.npm npm install

it was reproducible.

Output looked like this:

+backend-standalone-test | Setting up librsvg2-common:amd64 (2.48.9-1ubuntu0.20.04.1) ...
+backend-standalone-test | Setting up x11-xkb-utils (7.7+5) ...
+backend-standalone-test | Setting up xserver-common (2:1.20.9-2ubuntu1.2~20.04.1) ...
+backend-standalone-test | Setting up xvfb (2:1.20.9-2ubuntu1.2~20.04.1) ...
+backend-standalone-test | Setting up adwaita-icon-theme (3.36.1-2ubuntu0.20.04.2) ...
+backend-standalone-test | update-alternatives: using /usr/share/icons/Adwaita/cursor.theme to provide /usr/share/icons/default/index.theme (x-cursor-theme) in auto mode
+backend-standalone-test | Setting up humanity-icon-theme (0.6.15) ...
+backend-standalone-test | Setting up ubuntu-mono (19.04-0ubuntu3) ...
+backend-standalone-test | Processing triggers for systemd (245.4-4ubuntu3.4) ...
+backend-standalone-test | Processing triggers for mime-support (3.64ubuntu1) ...
+backend-standalone-test | Processing triggers for libglib2.0-0:amd64 (2.64.6-1~ubuntu20.04.1) ...
+backend-standalone-test | Setting up libgtk-3-0:amd64 (3.24.20-0ubuntu1) ...
+backend-standalone-test | Processing triggers for libc-bin (2.31-0ubuntu9.1) ...
+backend-standalone-test | Setting up libgtk-3-bin (3.24.20-0ubuntu1) ...
+backend-standalone-test | Setting up firefox (85.0.1+build1-0ubuntu0.20.04.1) ...
+backend-standalone-test | update-alternatives: using /usr/bin/firefox to provide /usr/bin/gnome-www-browser (gnome-www-browser) in auto mode
+backend-standalone-test | update-alternatives: using /usr/bin/firefox to provide /usr/bin/x-www-browser (x-www-browser) in auto mode
+backend-standalone-test | Please restart all running instances of firefox, or you will experience problems.
+backend-standalone-test | Processing triggers for libgdk-pixbuf2.0-0:amd64 (2.40.0+dfsg-3ubuntu0.2) ...
+backend-standalone-test | --> COPY package.json package-lock.json tsconfig.json .
+backend-standalone-test | --> RUN npm install
+backend-standalone-test | ERROR: Command exited with non-zero code: RUN npm install
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x1a4cd10]

goroutine 31 [running]:
github.com/armon/circbuf.(*Buffer).Bytes(...)
	github.com/armon/circbuf@v0.0.0-20190214190532-5111143e8da2/circbuf.go:71
github.com/earthly/earthly/builder.(*solverMonitor).monitorProgress(0xc00089a460, 0x1e45820, 0xc0000a35c0, 0xc0000ea780, 0x1cf7a81, 0x4, 0xc0000a81f0, 0x0, 0x0, 0x0)
	github.com/earthly/earthly/builder/solver_monitor.go:321 +0xd90
github.com/earthly/earthly/builder.(*solver).buildMainMulti.func2(0xc0000ea480, 0xc0000a81f0)
	github.com/earthly/earthly/builder/solver.go:124 +0x67
golang.org/x/sync/errgroup.(*Group).Go.func1(0xc00011baa0, 0xc0000a3680)
	golang.org/x/sync@v0.0.0-20201207232520-09787c993a3a/errgroup/errgroup.go:57 +0x59
created by golang.org/x/sync/errgroup.(*Group).Go
	golang.org/x/sync@v0.0.0-20201207232520-09787c993a3a/errgroup/errgroup.go:54 +0x66

Earthly version:

❯ earthly --version
earthly version v0.5.2 darwin/amd64

I fixed it by removing the --mount flag.

@vladaionescu vladaionescu self-assigned this Feb 22, 2021
@vladaionescu vladaionescu added the type:bug Something isn't working label Feb 22, 2021
@vladaionescu
Copy link
Member

Thanks for the report, Dan! Will be fixed in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants