[GH-ISSUE #1716] crash: "panic: runtime error: invalid memory address or nil pointer dereference" #842

Closed
opened 2026-03-01 21:46:50 +03:00 by kerem · 3 comments
Owner

Originally created by @ljharb on GitHub (Apr 5, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1716

Originally assigned to: @ChristopherHX on GitHub.

Bug report info

act version:            0.2.44
GOOS:                   darwin
GOARCH:                 amd64
NumCPU:                 16
Docker host:            DOCKER_HOST environment variable is unset/empty.
Sockets found:
	/var/run/docker.sock
	/Users/ljharb/.docker/run/docker.sock
Config files:           
	/Users/ljharb/.actrc:
		-P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest
		-P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04
		-P ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04
Build info:
	Go version:            go1.20.2
	Module path:           command-line-arguments
	Main version:          
	Main path:             
	Main checksum:         
	Build settings:
		-buildmode:           exe
		-compiler:            gc
		-ldflags:             -X main.version=0.2.44
		CGO_ENABLED:          1
		CGO_CFLAGS:           
		CGO_CPPFLAGS:         
		CGO_CXXFLAGS:         
		CGO_LDFLAGS:          
		GOARCH:               amd64
		GOOS:                 darwin
		GOAMD64:              v1
Docker Engine:
	Engine version:        20.10.23
	Engine runtime:        runc
	Cgroup version:        2
	Cgroup driver:         cgroupfs
	Storage driver:        overlay2
	Registry URI:          https://index.docker.io/v1/
	OS:                    Docker Desktop
	OS type:               linux
	OS version:            
	OS arch:               x86_64
	OS kernel:             5.15.49-linuxkit
	OS CPU:                4
	OS memory:             7959 MB
	Security options:
		name=seccomp,profile=default
		name=cgroupns

Command used with act

`act -W .github/workflows/node-pretest.yml`

Describe issue

I cloned the repo, and ran the command. I expected it to run the workflow, and it crashed.

https://github.com/inspect-js/has-package-exports

Workflow content

name: 'Tests: pretest/posttest'

on: [pull_request, push]

jobs:
  tests:
    uses: ljharb/actions/.github/workflows/pretest.yml@main

Relevant log output

DEBU[0000] Loading environment from /Users/ljharb/git/inspect-js/has-package-exports.git/.env 
DEBU[0000] Loading action inputs from /Users/ljharb/git/inspect-js/has-package-exports.git/.input 
DEBU[0000] Loading secrets from /Users/ljharb/git/inspect-js/has-package-exports.git/.secrets 
DEBU[0000] Evaluated matrix inclusions: map[]           
DEBU[0000] Conditional GET for notices etag=680f3171-94eb-44c2-8389-46eb30ecffff 
DEBU[0000] Loading workflow '/Users/ljharb/git/inspect-js/has-package-exports.git/.github/workflows/node-pretest.yml' 
DEBU[0000] Reading workflow '/Users/ljharb/git/inspect-js/has-package-exports.git/.github/workflows/node-pretest.yml' 
DEBU[0000] Preparing plan with all jobs                 
DEBU[0000] Using default workflow event: push           
DEBU[0000] Planning jobs for event: push                
DEBU[0000] Final matrix after applying user inclusions '[map[]]' 
DEBU[0000] Loading revision from git directory          
DEBU[0000] Found revision: 8f5975042c6fa5f4c315364ccaee5a2d004df3a0 
DEBU[0000] HEAD points to '8f5975042c6fa5f4c315364ccaee5a2d004df3a0' 
DEBU[0000] using github ref: refs/heads/main            
DEBU[0000] Found revision: 8f5975042c6fa5f4c315364ccaee5a2d004df3a0 
[Tests: pretest/posttest/tests] [DEBUG] evaluating expression 'success()'
[Tests: pretest/posttest/tests] [DEBUG] expression 'success()' evaluated to 'true'
DEBU[0000] Loading workflow '/Users/ljharb/.cache/act/ljharb-actions-.github-workflows-pretest.yml@main/.github/workflows/pretest.yml' 
DEBU[0000] Reading workflow '/Users/ljharb/.cache/act/ljharb-actions-.github-workflows-pretest.yml@main/.github/workflows/pretest.yml' 
DEBU[0000] Final matrix after applying user inclusions '[map[]]' 
[Tests: pretest/posttest/tests] [DEBUG] Loading revision from git directory
[Tests: pretest/posttest/tests] [DEBUG] Found revision: 8f5975042c6fa5f4c315364ccaee5a2d004df3a0
[Tests: pretest/posttest/tests] [DEBUG] HEAD points to '8f5975042c6fa5f4c315364ccaee5a2d004df3a0'
[Tests: pretest/posttest/tests] [DEBUG] using github ref: refs/heads/main
[Tests: pretest/posttest/tests] [DEBUG] Found revision: 8f5975042c6fa5f4c315364ccaee5a2d004df3a0
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x16c2874]

goroutine 15 [running]:
github.com/nektos/act/pkg/runner.setupWorkflowInputs({0x1978500, 0xc000491ad0}, 0xc0000c6a80, 0xc0001b4000)
	/private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/runner/expression.go:379 +0x74
github.com/nektos/act/pkg/runner.getEvaluatorInputs({0x1978500, 0xc000491ad0}, 0xc0001b4000, {0x0, 0x0}, 0xc000683380)
	/private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/runner/expression.go:340 +0x85
github.com/nektos/act/pkg/runner.(*RunContext).NewExpressionEvaluatorWithEnv(0xc0001b4000, {0x1978500, 0xc000491ad0}, 0xc0001208a0)
	/private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/runner/expression.go:69 +0x61b
github.com/nektos/act/pkg/runner.(*RunContext).NewExpressionEvaluator(0x1fb9108?, {0x1978500, 0xc000491ad0})
	/private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/runner/expression.go:24 +0x3f
github.com/nektos/act/pkg/runner.(*runnerImpl).newRunContext(0xc0004b8680, {0x1978500, 0xc000491ad0}, 0xc000460fc0, 0xc000120630)
	/private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/runner/runner.go:206 +0x139
github.com/nektos/act/pkg/runner.(*runnerImpl).NewPlanExecutor.func1({0x1978500, 0xc000491ad0})
	/private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/runner/runner.go:135 +0x665
github.com/nektos/act/pkg/common.Executor.Then.func1({0x1978500, 0xc000491ad0})
	/private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/common/executor.go:129 +0x34
github.com/nektos/act/pkg/runner.newReusableWorkflowExecutor.func1({0x1978500, 0xc000491ad0})
	/private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/runner/reusable_workflow.go:86 +0xda
github.com/nektos/act/pkg/common.Executor.Then.func1({0x1978500, 0xc000491ad0})
	/private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/common/executor.go:141 +0x144
github.com/nektos/act/pkg/runner.(*RunContext).Executor.func1({0x1978500, 0xc000491ad0})
	/private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/runner/run_context.go:442 +0x58
github.com/nektos/act/pkg/runner.(*runnerImpl).NewPlanExecutor.func1.1({0x1978500, 0xc00042db30})
	/private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/runner/runner.go:145 +0x193
github.com/nektos/act/pkg/common.NewParallelExecutor.func1.1(0x0?, 0x0?)
	/private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/common/executor.go:100 +0x5c
created by github.com/nektos/act/pkg/common.NewParallelExecutor.func1
	/private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/common/executor.go:98 +0x89

Additional information

No response

Originally created by @ljharb on GitHub (Apr 5, 2023). Original GitHub issue: https://github.com/nektos/act/issues/1716 Originally assigned to: @ChristopherHX on GitHub. ### Bug report info ```plain text act version: 0.2.44 GOOS: darwin GOARCH: amd64 NumCPU: 16 Docker host: DOCKER_HOST environment variable is unset/empty. Sockets found: /var/run/docker.sock /Users/ljharb/.docker/run/docker.sock Config files: /Users/ljharb/.actrc: -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest -P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04 -P ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04 Build info: Go version: go1.20.2 Module path: command-line-arguments Main version: Main path: Main checksum: Build settings: -buildmode: exe -compiler: gc -ldflags: -X main.version=0.2.44 CGO_ENABLED: 1 CGO_CFLAGS: CGO_CPPFLAGS: CGO_CXXFLAGS: CGO_LDFLAGS: GOARCH: amd64 GOOS: darwin GOAMD64: v1 Docker Engine: Engine version: 20.10.23 Engine runtime: runc Cgroup version: 2 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Docker Desktop OS type: linux OS version: OS arch: x86_64 OS kernel: 5.15.49-linuxkit OS CPU: 4 OS memory: 7959 MB Security options: name=seccomp,profile=default name=cgroupns ``` ### Command used with act ```sh `act -W .github/workflows/node-pretest.yml` ``` ### Describe issue I cloned the repo, and ran the command. I expected it to run the workflow, and it crashed. ### Link to GitHub repository https://github.com/inspect-js/has-package-exports ### Workflow content ```yml name: 'Tests: pretest/posttest' on: [pull_request, push] jobs: tests: uses: ljharb/actions/.github/workflows/pretest.yml@main ``` ### Relevant log output ```sh DEBU[0000] Loading environment from /Users/ljharb/git/inspect-js/has-package-exports.git/.env DEBU[0000] Loading action inputs from /Users/ljharb/git/inspect-js/has-package-exports.git/.input DEBU[0000] Loading secrets from /Users/ljharb/git/inspect-js/has-package-exports.git/.secrets DEBU[0000] Evaluated matrix inclusions: map[] DEBU[0000] Conditional GET for notices etag=680f3171-94eb-44c2-8389-46eb30ecffff DEBU[0000] Loading workflow '/Users/ljharb/git/inspect-js/has-package-exports.git/.github/workflows/node-pretest.yml' DEBU[0000] Reading workflow '/Users/ljharb/git/inspect-js/has-package-exports.git/.github/workflows/node-pretest.yml' DEBU[0000] Preparing plan with all jobs DEBU[0000] Using default workflow event: push DEBU[0000] Planning jobs for event: push DEBU[0000] Final matrix after applying user inclusions '[map[]]' DEBU[0000] Loading revision from git directory DEBU[0000] Found revision: 8f5975042c6fa5f4c315364ccaee5a2d004df3a0 DEBU[0000] HEAD points to '8f5975042c6fa5f4c315364ccaee5a2d004df3a0' DEBU[0000] using github ref: refs/heads/main DEBU[0000] Found revision: 8f5975042c6fa5f4c315364ccaee5a2d004df3a0 [Tests: pretest/posttest/tests] [DEBUG] evaluating expression 'success()' [Tests: pretest/posttest/tests] [DEBUG] expression 'success()' evaluated to 'true' DEBU[0000] Loading workflow '/Users/ljharb/.cache/act/ljharb-actions-.github-workflows-pretest.yml@main/.github/workflows/pretest.yml' DEBU[0000] Reading workflow '/Users/ljharb/.cache/act/ljharb-actions-.github-workflows-pretest.yml@main/.github/workflows/pretest.yml' DEBU[0000] Final matrix after applying user inclusions '[map[]]' [Tests: pretest/posttest/tests] [DEBUG] Loading revision from git directory [Tests: pretest/posttest/tests] [DEBUG] Found revision: 8f5975042c6fa5f4c315364ccaee5a2d004df3a0 [Tests: pretest/posttest/tests] [DEBUG] HEAD points to '8f5975042c6fa5f4c315364ccaee5a2d004df3a0' [Tests: pretest/posttest/tests] [DEBUG] using github ref: refs/heads/main [Tests: pretest/posttest/tests] [DEBUG] Found revision: 8f5975042c6fa5f4c315364ccaee5a2d004df3a0 panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x16c2874] goroutine 15 [running]: github.com/nektos/act/pkg/runner.setupWorkflowInputs({0x1978500, 0xc000491ad0}, 0xc0000c6a80, 0xc0001b4000) /private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/runner/expression.go:379 +0x74 github.com/nektos/act/pkg/runner.getEvaluatorInputs({0x1978500, 0xc000491ad0}, 0xc0001b4000, {0x0, 0x0}, 0xc000683380) /private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/runner/expression.go:340 +0x85 github.com/nektos/act/pkg/runner.(*RunContext).NewExpressionEvaluatorWithEnv(0xc0001b4000, {0x1978500, 0xc000491ad0}, 0xc0001208a0) /private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/runner/expression.go:69 +0x61b github.com/nektos/act/pkg/runner.(*RunContext).NewExpressionEvaluator(0x1fb9108?, {0x1978500, 0xc000491ad0}) /private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/runner/expression.go:24 +0x3f github.com/nektos/act/pkg/runner.(*runnerImpl).newRunContext(0xc0004b8680, {0x1978500, 0xc000491ad0}, 0xc000460fc0, 0xc000120630) /private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/runner/runner.go:206 +0x139 github.com/nektos/act/pkg/runner.(*runnerImpl).NewPlanExecutor.func1({0x1978500, 0xc000491ad0}) /private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/runner/runner.go:135 +0x665 github.com/nektos/act/pkg/common.Executor.Then.func1({0x1978500, 0xc000491ad0}) /private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/common/executor.go:129 +0x34 github.com/nektos/act/pkg/runner.newReusableWorkflowExecutor.func1({0x1978500, 0xc000491ad0}) /private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/runner/reusable_workflow.go:86 +0xda github.com/nektos/act/pkg/common.Executor.Then.func1({0x1978500, 0xc000491ad0}) /private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/common/executor.go:141 +0x144 github.com/nektos/act/pkg/runner.(*RunContext).Executor.func1({0x1978500, 0xc000491ad0}) /private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/runner/run_context.go:442 +0x58 github.com/nektos/act/pkg/runner.(*runnerImpl).NewPlanExecutor.func1.1({0x1978500, 0xc00042db30}) /private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/runner/runner.go:145 +0x193 github.com/nektos/act/pkg/common.NewParallelExecutor.func1.1(0x0?, 0x0?) /private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/common/executor.go:100 +0x5c created by github.com/nektos/act/pkg/common.NewParallelExecutor.func1 /private/tmp/act-20230401-4555-1mg59bd/act-0.2.44/pkg/common/executor.go:98 +0x89 ``` ### Additional information _No response_
kerem 2026-03-01 21:46:50 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@callqh commented on GitHub (Apr 6, 2023):

I also encountered this problem.

<!-- gh-comment-id:1498438058 --> @callqh commented on GitHub (Apr 6, 2023): I also encountered this problem.
Author
Owner

@obervinov commented on GitHub (Apr 13, 2023):

+1

<!-- gh-comment-id:1506671919 --> @obervinov commented on GitHub (Apr 13, 2023): +1
Author
Owner

@ChristopherHX commented on GitHub (Apr 13, 2023):

on: workflow_call

Seems like this is not implemented correctly.

github.com/nektos/act@148a545021/pkg/model/workflow.go (L125-L128)

I guess only the following reusable workflow trigger are working

on:
  workflow_call:
<!-- gh-comment-id:1506890623 --> @ChristopherHX commented on GitHub (Apr 13, 2023): > on: workflow_call Seems like this is not implemented correctly. https://github.com/nektos/act/blob/148a54502167880f90dbf2f68ff44478679f41dd/pkg/model/workflow.go#L125-L128 I guess only the following reusable workflow trigger are working ```yaml on: workflow_call: ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
starred/act#842
No description provided.