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

[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x5d2068] #14

Open
antondollmaier opened this issue Oct 5, 2022 · 3 comments

Comments

@antondollmaier
Copy link

Hi folks,

when re-starting one of our containers, go-replace exits with a SEGV:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x5d2068]

goroutine 1 [running]:
main.searchFilesInPath.func1(0x7ffe6f609c49, 0x16, 0x0, 0x0, 0x73cb20, 0xc420017560, 0x20, 0x618f40)
        /Users/mblaschke/Projects/go-replace/filehandling.go:56 +0x38
path/filepath.Walk(0x7ffe6f609c49, 0x16, 0xc42000b240, 0x10, 0x610960)
        /usr/local/Cellar/go/1.8.1/libexec/src/path/filepath/path.go:396 +0x8f
main.searchFilesInPath(0x7ffe6f609c49, 0x16, 0xc420013b80)
        /Users/mblaschke/Projects/go-replace/filehandling.go:84 +0xb0
main.buildFileitems(0xc4200db340, 0x0, 0x7, 0x7, 0x0, 0x0)
        /Users/mblaschke/Projects/go-replace/main.go:463 +0x45e
main.main()
        /Users/mblaschke/Projects/go-replace/main.go:482 +0x10a
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x5d2068]

goroutine 1 [running]:
main.searchFilesInPath.func1(0x7ffd3d8e7c49, 0x16, 0x0, 0x0, 0x73cb20, 0xc4200174d0, 0x20, 0x618f40)
        /Users/mblaschke/Projects/go-replace/filehandling.go:56 +0x38
path/filepath.Walk(0x7ffd3d8e7c49, 0x16, 0xc42000af80, 0x10, 0x610960)
        /usr/local/Cellar/go/1.8.1/libexec/src/path/filepath/path.go:396 +0x8f
main.searchFilesInPath(0x7ffd3d8e7c49, 0x16, 0xc420013930)
        /Users/mblaschke/Projects/go-replace/filehandling.go:84 +0xb0
main.buildFileitems(0xc4200df420, 0x0, 0x7, 0x7, 0x0, 0x0)
        /Users/mblaschke/Projects/go-replace/main.go:463 +0x45e
main.main()
        /Users/mblaschke/Projects/go-replace/main.go:482 +0x10a

At the moment, I don't have the exact command being run - nevertheless, let me know if you need more information to resolve this.

Thank you very much for your time!

Best,
Anton

@mblaschke
Copy link
Member

which version have you used?

@antondollmaier
Copy link
Author

# go-replace --version
go-replace version 1.1.2
Copyright (C) 2017 webdevops.io

And now with the actual command:

+ go-replace -s '<MYSQL_ROOT_PASSWORD>' -r '' --path=/opt/docker/etc/mysql/ '--path-pattern=*.cnf' --ignore-empty
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x5d2068]

goroutine 1 [running]:
main.searchFilesInPath.func1(0x7ffe642ab770, 0x16, 0x0, 0x0, 0x73cb20, 0xc42006b4a0, 0x20, 0x618f40)
        /Users/mblaschke/Projects/go-replace/filehandling.go:56 +0x38
path/filepath.Walk(0x7ffe642ab770, 0x16, 0xc42000af40, 0x10, 0x610960)
        /usr/local/Cellar/go/1.8.1/libexec/src/path/filepath/path.go:396 +0x8f
main.searchFilesInPath(0x7ffe642ab770, 0x16, 0xc4200139c0)
        /Users/mblaschke/Projects/go-replace/filehandling.go:84 +0xb0
main.buildFileitems(0xc4200e3730, 0x0, 0x7, 0x7, 0x0, 0x0)
        /Users/mblaschke/Projects/go-replace/main.go:463 +0x45e
main.main()
        /Users/mblaschke/Projects/go-replace/main.go:482 +0x10a
+ go-replace -s '<MYSQL_DATABASE>' -r b2b-live --path=/opt/docker/etc/mysql/ '--path-pattern=*.cnf' --ignore-empty
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x5d2068]

goroutine 1 [running]:
main.searchFilesInPath.func1(0x7fffaec77770, 0x16, 0x0, 0x0, 0x73cb20, 0xc42006f530, 0x20, 0x618f40)
        /Users/mblaschke/Projects/go-replace/filehandling.go:56 +0x38
path/filepath.Walk(0x7fffaec77770, 0x16, 0xc42007cda0, 0x10, 0x610960)
        /usr/local/Cellar/go/1.8.1/libexec/src/path/filepath/path.go:396 +0x8f
main.searchFilesInPath(0x7fffaec77770, 0x16, 0xc42006b9f0)
        /Users/mblaschke/Projects/go-replace/filehandling.go:84 +0xb0
main.buildFileitems(0xc4200f7500, 0x0, 0x7, 0x7, 0x0, 0x0)
        /Users/mblaschke/Projects/go-replace/main.go:463 +0x45e
main.main()
        /Users/mblaschke/Projects/go-replace/main.go:482 +0x10a

mblaschke added a commit that referenced this issue Oct 5, 2022
Signed-off-by: Markus Blaschke <[email protected]>
@mblaschke
Copy link
Member

can you try 22.10.0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants