Fix panic in extractFromImageEnv #81

Merged
wolfogre merged 1 commits from wolfogre/act:bugfix/panic_extractFromImageEnv into main 2023-10-31 14:48:41 +00:00
Owner

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

Also fixed the upstream: https://github.com/nektos/act/pull/2071

Panic log: ```txt [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 ``` Also fixed the upstream: https://github.com/nektos/act/pull/2071
wolfogre added 1 commit 2023-10-31 14:36:07 +00:00
All checks were successful
checks / check and test (pull_request) Successful in 1m17s
67918333fa
fix: panic
wolfogre added the
kind
bug
label 2023-10-31 14:36:55 +00:00
lunny approved these changes 2023-10-31 14:45:58 +00:00
wolfogre merged commit 15045b4fc0 into main 2023-10-31 14:48:41 +00:00
wolfogre referenced this issue from a commit 2023-10-31 15:03:09 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/act#81
No description provided.