benchmark-launcher-cli segfaults for unknown options or missing option values #98357

Open
opened 2022-05-24 22:55:23 +02:00 by Paul Melis · 2 comments

System Information
Operating system: RHEL 8.4
Graphics card: NVIDIA A100-SXM4-40GB

Blender Version

Broken: benchmark-launcher-cli 3.0.0

Short description of error

benchmark-launcher-cli 3.0.0 segfaults when passed an option it doesn't recognize:

# Used --verbose accidentally instead of --verbosity
snellius paulm@gcn30 22:53 ~/software/benchmark-launcher-cli-3.0.0$ ./benchmark-launcher-cli --verbose
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4fd369]

goroutine 1 [running]:
log.(*Logger).Output(0x0, 0x2, {0xc0001dc210, 0x17})
	/home/sergey/lib/go/src/log/log.go:165 +0x89
log.(*Logger).Printf(0xc0001dc1f8, {0x83eae2, 0x200000003}, {0xc0001c9f40, 0xc0001c9f70, 0x408459})
	/home/sergey/lib/go/src/log/log.go:191 +0x4c
git.blender.org/blender-open-data/launcher/internal.ExitWithError({0x8cd300, 0xc000199a80})
	/home/sergey/Developer/blender-open-data/launcher/internal/application.go:10 +0x68
main.main()
	/home/sergey/Developer/blender-open-data/launcher/cmd/benchmark-launcher-cli/main.go:14 +0x38

The same happens when an option value isn't passed:

# Correct option, but missing value
snellius paulm@gcn30 22:53 ~/software/benchmark-launcher-cli-3.0.0$ ./benchmark-launcher-cli --verbosity 
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4fd369]

goroutine 1 [running]:
log.(*Logger).Output(0x0, 0x2, {0xc000030a20, 0x23})
	/home/sergey/lib/go/src/log/log.go:165 +0x89
log.(*Logger).Printf(0xc0000309f0, {0x83eae2, 0x200000003}, {0xc000151f40, 0xc000151f70, 0x408459})
	/home/sergey/lib/go/src/log/log.go:191 +0x4c
git.blender.org/blender-open-data/launcher/internal.ExitWithError({0x8cd300, 0xc0000fba90})
	/home/sergey/Developer/blender-open-data/launcher/internal/application.go:10 +0x68
main.main()
	/home/sergey/Developer/blender-open-data/launcher/cmd/benchmark-launcher-cli/main.go:14 +0x38

# Does work when option value is passed as expected
snellius paulm@gcn30 22:54 ~/software/benchmark-launcher-cli-3.0.0$ ./benchmark-launcher-cli --verbosity 2
2022/05/24 20:54:22 metadata.go:14: Fetching Metadata: https://opendata.blender.org/benchmarks/metadata/
2022/05/24 20:54:22 metadata.go:49: Successfully fetched metadata
2022/05/24 20:54:22 metadata.go:71: Getting current launcher.
2022/05/24 20:54:22 checksum.go:16: Calculating checksum of current launcher.
2022/05/24 20:54:22 checksum.go:35: Launcher checksum: b4649a0deb95d1c611efa9c0b8b919c1554bf4220afcd8d754570533dd2b6672.
? Choose a Blender version:  [Use arrows to move, type to filter]
> 3.1.0

  3.0.1
**System Information** Operating system: RHEL 8.4 Graphics card: NVIDIA A100-SXM4-40GB **Blender Version** Broken: benchmark-launcher-cli 3.0.0 **Short description of error** benchmark-launcher-cli 3.0.0 segfaults when passed an option it doesn't recognize: ``` # Used --verbose accidentally instead of --verbosity snellius paulm@gcn30 22:53 ~/software/benchmark-launcher-cli-3.0.0$ ./benchmark-launcher-cli --verbose panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4fd369] goroutine 1 [running]: log.(*Logger).Output(0x0, 0x2, {0xc0001dc210, 0x17}) /home/sergey/lib/go/src/log/log.go:165 +0x89 log.(*Logger).Printf(0xc0001dc1f8, {0x83eae2, 0x200000003}, {0xc0001c9f40, 0xc0001c9f70, 0x408459}) /home/sergey/lib/go/src/log/log.go:191 +0x4c git.blender.org/blender-open-data/launcher/internal.ExitWithError({0x8cd300, 0xc000199a80}) /home/sergey/Developer/blender-open-data/launcher/internal/application.go:10 +0x68 main.main() /home/sergey/Developer/blender-open-data/launcher/cmd/benchmark-launcher-cli/main.go:14 +0x38 ``` The same happens when an option value isn't passed: ``` # Correct option, but missing value snellius paulm@gcn30 22:53 ~/software/benchmark-launcher-cli-3.0.0$ ./benchmark-launcher-cli --verbosity panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4fd369] goroutine 1 [running]: log.(*Logger).Output(0x0, 0x2, {0xc000030a20, 0x23}) /home/sergey/lib/go/src/log/log.go:165 +0x89 log.(*Logger).Printf(0xc0000309f0, {0x83eae2, 0x200000003}, {0xc000151f40, 0xc000151f70, 0x408459}) /home/sergey/lib/go/src/log/log.go:191 +0x4c git.blender.org/blender-open-data/launcher/internal.ExitWithError({0x8cd300, 0xc0000fba90}) /home/sergey/Developer/blender-open-data/launcher/internal/application.go:10 +0x68 main.main() /home/sergey/Developer/blender-open-data/launcher/cmd/benchmark-launcher-cli/main.go:14 +0x38 # Does work when option value is passed as expected snellius paulm@gcn30 22:54 ~/software/benchmark-launcher-cli-3.0.0$ ./benchmark-launcher-cli --verbosity 2 2022/05/24 20:54:22 metadata.go:14: Fetching Metadata: https://opendata.blender.org/benchmarks/metadata/ 2022/05/24 20:54:22 metadata.go:49: Successfully fetched metadata 2022/05/24 20:54:22 metadata.go:71: Getting current launcher. 2022/05/24 20:54:22 checksum.go:16: Calculating checksum of current launcher. 2022/05/24 20:54:22 checksum.go:35: Launcher checksum: b4649a0deb95d1c611efa9c0b8b919c1554bf4220afcd8d754570533dd2b6672. ? Choose a Blender version: [Use arrows to move, type to filter] > 3.1.0 3.0.1 ```
Author

Added subscriber: @PaulMelis

Added subscriber: @PaulMelis

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
This repo is archived. You cannot comment on issues.
No description provided.