Skip to content

Fix panic in extractFromImageEnv#2071

Merged
mergify[bot] merged 2 commits intonektos:masterfrom
wolfogre:bugfix/panic_extractFromImageEnv
Nov 4, 2023
Merged

Fix panic in extractFromImageEnv#2071
mergify[bot] merged 2 commits intonektos:masterfrom
wolfogre:bugfix/panic_extractFromImageEnv

Conversation

@wolfogre
Copy link
Member

Panic log:

[Build and Publish Docs site/build-docs] Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.42/images/node:16-bullseye/json": context deadline exceeded
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0xb5e0e1]
goroutine 617134 [running]:
github.com/nektos/act/pkg/container.(*containerReference).UpdateFromImageEnv.(*containerReference).extractFromImageEnv.func1({0xefd3a8, 0xc000a315f0})
        github.com/nektos/act@v0.2.51/pkg/container/docker_run.go:528 +0x1e1
github.com/nektos/act/pkg/container.(*containerReference).UpdateFromImageEnv.Executor.IfNot.func2({0xefd3a8, 0xc000a315f0})
        github.com/nektos/act@v0.2.51/pkg/common/executor.go:166 +0x4f
github.com/nektos/act/pkg/runner.(*RunContext).ApplyExtraPath(0xc000334b40, {0xefd3a8, 0xc000a315f0}, 0xc000292f38)
        github.com/nektos/act@v0.2.51/pkg/runner/run_context.go:416 +0x204
github.com/nektos/act/pkg/runner.(*stepActionRemote).post.runPostStep.func1({0xefd3a8, 0xc000a315f0})
        github.com/nektos/act@v0.2.51/pkg/runner/action.go:656 +0x891
github.com/nektos/act/pkg/runner.(*stepActionRemote).post.runStepExecutor.func2({0xefd3a8, 0xc000a315f0})
        github.com/nektos/act@v0.2.51/pkg/runner/step.go:141 +0xd83
github.com/nektos/act/pkg/runner.(*stepActionRemote).post.Executor.If.func4({0xefd3a8, 0xc000a315f0})
        github.com/nektos/act@v0.2.51/pkg/common/executor.go:156 +0x45
github.com/nektos/act/pkg/runner.(*stepActionRemote).post.Executor.If.func6({0xefd3a8, 0xc000a315f0})
        github.com/nektos/act@v0.2.51/pkg/common/executor.go:156 +0x45
github.com/nektos/act/pkg/runner.newJobExecutor.useStepLogger.func12({0xefd3a8, 0xc0020baa20})
        github.com/nektos/act@v0.2.51/pkg/runner/job_executor.go:225 +0x2e2
github.com/nektos/act/pkg/runner.newJobExecutor.Executor.Finally.func13({0xefd3a8, 0xc0020baa20})
        github.com/nektos/act@v0.2.51/pkg/common/executor.go:183 +0x4f
github.com/nektos/act/pkg/runner.newJobExecutor.Executor.Finally.func13({0xefd3a8, 0xc0020baa20})
        github.com/nektos/act@v0.2.51/pkg/common/executor.go:183 +0x4f
github.com/nektos/act/pkg/runner.newJobExecutor.Executor.Finally.func13({0xefd3a8, 0xc0020baa20})
        github.com/nektos/act@v0.2.51/pkg/common/executor.go:183 +0x4f
github.com/nektos/act/pkg/runner.newJobExecutor.Executor.Finally.func13({0xefd3a8, 0xc0020baa20})
        github.com/nektos/act@v0.2.51/pkg/common/executor.go:183 +0x4f
github.com/nektos/act/pkg/runner.newJobExecutor.Executor.Finally.func13({0xefd3a8, 0xc0020baa20})
        github.com/nektos/act@v0.2.51/pkg/common/executor.go:183 +0x4f
github.com/nektos/act/pkg/runner.newJobExecutor.Executor.Finally.func13({0xefd3a8, 0xc0020baa20})
        github.com/nektos/act@v0.2.51/pkg/common/executor.go:183 +0x4f
github.com/nektos/act/pkg/runner.newJobExecutor.Executor.Finally.func13({0xefd3a8, 0xc0020baa20})
        github.com/nektos/act@v0.2.51/pkg/common/executor.go:183 +0x4f
github.com/nektos/act/pkg/runner.newJobExecutor.Executor.Finally.func13({0xefd3a8, 0xc0020baa20})
        github.com/nektos/act@v0.2.51/pkg/common/executor.go:183 +0x4f
github.com/nektos/act/pkg/runner.newJobExecutor.Executor.Finally.func13({0xefd3a8, 0xc0020baa20})
        github.com/nektos/act@v0.2.51/pkg/common/executor.go:183 +0x4f
github.com/nektos/act/pkg/runner.newJobExecutor.Executor.Finally.func13({0xefd3a8, 0xc0020baa20})
        github.com/nektos/act@v0.2.51/pkg/common/executor.go:183 +0x4f
github.com/nektos/act/pkg/runner.newJobExecutor.Executor.Finally.func14({0xefd3a8, 0xc0020baa20})
        github.com/nektos/act@v0.2.51/pkg/common/executor.go:182 +0x31
github.com/nektos/act/pkg/runner.newJobExecutor.func7({0xefd3a8, 0xc0020baa20})
        github.com/nektos/act@v0.2.51/pkg/runner/job_executor.go:159 +0xe2
github.com/nektos/act/pkg/runner.newJobExecutor.Executor.Finally.func16({0xefd3a8, 0xc0020baa20})
        github.com/nektos/act@v0.2.51/pkg/common/executor.go:183 +0x4f
github.com/nektos/act/pkg/runner.newJobExecutor.Executor.Finally.func17({0xefd3a8, 0xc0020baa20})
        github.com/nektos/act@v0.2.51/pkg/common/executor.go:182 +0x31
github.com/nektos/act/pkg/runner.newJobExecutor.Executor.Finally.func18({0xefd3a8, 0xc0020baa20})
        github.com/nektos/act@v0.2.51/pkg/common/executor.go:182 +0x31
github.com/nektos/act/pkg/runner.newJobExecutor.NewPipelineExecutor.Executor.Then.func21({0xefd3a8, 0xc0020baa20})
        github.com/nektos/act@v0.2.51/pkg/common/executor.go:148 +0x142
github.com/nektos/act/pkg/runner.(*RunContext).Executor.func1({0xefd3a8, 0xc0020baa20})
        github.com/nektos/act@v0.2.51/pkg/runner/run_context.go:595 +0x50
github.com/nektos/act/pkg/runner.(*runnerImpl).NewPlanExecutor.func1.1({0xefd3a8, 0xc00009d890})
        github.com/nektos/act@v0.2.51/pkg/runner/runner.go:214 +0x19a
github.com/nektos/act/pkg/runner.(*runnerImpl).NewPlanExecutor.func1.NewParallelExecutor.func2.1(0x8f4ba5?, 0xc000126c60?)
        github.com/nektos/act@v0.2.51/pkg/common/executor.go:107 +0x52
created by github.com/nektos/act/pkg/runner.(*runnerImpl).NewPlanExecutor.func1.NewParallelExecutor.func2 in goroutine 617133
        github.com/nektos/act@v0.2.51/pkg/common/executor.go:105 +0xf7

@wolfogre wolfogre added the kind/bug Something isn't working label Oct 31, 2023
@wolfogre wolfogre requested a review from a team as a code owner October 31, 2023 14:41
@codecov
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

Merging #2071 (9e4d7c9) into master (4989f44) will increase coverage by 0.19%.
Report is 264 commits behind head on master.
The diff coverage is 59.44%.

@@            Coverage Diff             @@
##           master    #2071      +/-   ##
==========================================
+ Coverage   61.22%   61.41%   +0.19%     
==========================================
  Files          46       53       +7     
  Lines        7141     8779    +1638     
==========================================
+ Hits         4372     5392    +1020     
- Misses       2462     2957     +495     
- Partials      307      430     +123     
Files Coverage Δ
pkg/common/executor.go 51.69% <100.00%> (+1.69%) ⬆️
pkg/container/docker_cli.go 82.23% <ø> (ø)
pkg/container/docker_logger.go 52.08% <ø> (ø)
pkg/runner/step_action_local.go 93.54% <100.00%> (ø)
pkg/runner/step_action_remote.go 91.56% <100.00%> (+0.65%) ⬆️
pkg/runner/step_docker.go 93.18% <100.00%> (ø)
pkg/container/file_collector.go 39.68% <0.00%> (+2.38%) ⬆️
pkg/container/util.go 0.00% <0.00%> (ø)
pkg/container/docker_build.go 60.00% <80.00%> (+1.02%) ⬆️
...ontainer/linux_container_environment_extensions.go 23.07% <0.00%> (-1.25%) ⬇️
... and 31 more

... and 2 files with indirect coverage changes

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

Copy link
Contributor

@ChristopherHX ChristopherHX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happens on cancellation / timeout I guess.

@mergify mergify bot merged commit 5a79256 into nektos:master Nov 4, 2023
jmikedupont2 pushed a commit to meta-introspector/act that referenced this pull request Mar 10, 2024
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants