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

panic: reflect: reflect.Value.SetInt using unaddressable value [recovered] with stop_with_runtime parameter #16

Open
manches opened this issue Mar 9, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@manches
Copy link

manches commented Mar 9, 2023

Describe the bug
When setting the parameter stop_with_runtime with a value, it give a error

To Reproduce
Steps to reproduce the behavior:

  1. Config a yaml with the value: "stop_with_runtime: 900s" for example
  2. Start server with yaml
  3. See error
    [root@server bin]# ./server -c /root/s3-config2.yaml
    panic: reflect: reflect.Value.SetInt using unaddressable value [recovered]
    panic: reflect: reflect.Value.SetInt using unaddressable value [recovered]
    panic: reflect: reflect.Value.SetInt using unaddressable value

goroutine 1 [running]:
gopkg.in/yaml%2ev3.handleErr(0xc0000dfd28)
/root/go/pkg/mod/gopkg.in/yaml.v3@v3.0.0-20220512140231-539c8e751b99/yaml.go:294 +0x6d
panic({0x552cc0, 0xc000094fc0})
/usr/lib/golang/src/runtime/panic.go:838 +0x207
gopkg.in/yaml%2ev3.handleErr(0xc0000ded90)
/root/go/pkg/mod/gopkg.in/yaml.v3@v3.0.0-20220512140231-539c8e751b99/yaml.go:294 +0x6d
panic({0x552cc0, 0xc000094fc0})
/usr/lib/golang/src/runtime/panic.go:838 +0x207
reflect.flag.mustBeAssignableSlow(0x40bee7?)
/usr/lib/golang/src/reflect/value.go:262 +0x85
reflect.flag.mustBeAssignable(...)
/usr/lib/golang/src/reflect/value.go:249
reflect.Value.SetInt({0x56cfa0?, 0x67bdc0?, 0x1?}, 0xd18c2e2800)
/usr/lib/golang/src/reflect/value.go:2163 +0x48
gopkg.in/yaml%2ev3.(*decoder).scalar(0x56cfa0?, 0xc0000f8a00, {0x56cfa0?, 0x67bdc0?, 0x0?})
/root/go/pkg/mod/gopkg.in/yaml.v3@v3.0.0-20220512140231-539c8e751b99/decode.go:647 +0xa54
gopkg.in/yaml%2ev3.(*decoder).unmarshal(0xc0000bd650, 0xc0000f8a00, {0x56cfa0?, 0x67bdc0?, 0x0?})
/root/go/pkg/mod/gopkg.in/yaml.v3@v3.0.0-20220512140231-539c8e751b99/decode.go:505 +0x385
gopkg.in/yaml%2ev3.(*decoder).callObsoleteUnmarshaler.func1({0x56cfa0?, 0x67bdc0?})
/root/go/pkg/mod/gopkg.in/yaml.v3@v3.0.0-20220512140231-539c8e751b99/decode.go:378 +0x125
github.com/mulbc/gosbench/common.(*Duration).UnmarshalYAML(0xc0000e4420, 0xc0000be160)
/root/go/pkg/mod/github.com/mulbc/gosbench@v0.0.0-20220719091319-d9e82dc1c4ed/common/configFile.go:246 +0x39
gopkg.in/yaml%2ev3.(*decoder).callObsoleteUnmarshaler(0xc0000bd650, 0xc0000f8a00, {0x7f06c85eb838, 0xc0000e4420})
/root/go/pkg/mod/gopkg.in/yaml.v3@v3.0.0-20220512140231-539c8e751b99/decode.go:376 +0xa7
gopkg.in/yaml%2ev3.(*decoder).prepare(0x559d80?, 0xc0000e4420?, {0x559d80?, 0xc0000e4420?, 0xc000094cc0?})
/root/go/pkg/mod/gopkg.in/yaml.v3@v3.0.0-20220512140231-539c8e751b99/decode.go:424 +0x228
gopkg.in/yaml%2ev3.(*decoder).unmarshal(0xc0000bd650, 0xc0000f8a00, {0x559d80?, 0xc0000e4420?, 0xc0000df008?})
/root/go/pkg/mod/gopkg.in/yaml.v3@v3.0.0-20220512140231-539c8e751b99/decode.go:499 +0x255
gopkg.in/yaml%2ev3.(*decoder).mappingStruct(0xc0000bd650, 0xc0000b4e60, {0x575920?, 0xc0000e4360?, 0xc0000df270?})
/root/go/pkg/mod/gopkg.in/yaml.v3@v3.0.0-20220512140231-539c8e751b99/decode.go:932 +0xd1b
gopkg.in/yaml%2ev3.(*decoder).mapping(0xc0000bd650, 0xc0000b4e60, {0x575920?, 0xc0000e4360?, 0x7f06c85e17e8?})
/root/go/pkg/mod/gopkg.in/yaml.v3@v3.0.0-20220512140231-539c8e751b99/decode.go:783 +0xbe
gopkg.in/yaml%2ev3.(*decoder).unmarshal(0xc0000bd650, 0xc0000b4e60, {0x54c880?, 0xc0000a80d0?, 0xc0000a2120?})
/root/go/pkg/mod/gopkg.in/yaml.v3@v3.0.0-20220512140231-539c8e751b99/decode.go:507 +0x3a5
gopkg.in/yaml%2ev3.(*decoder).sequence(0x54f8a0?, 0xc0000b4dc0, {0x54f8a0?, 0xc0000c0260?, 0xc000094a30?})
/root/go/pkg/mod/gopkg.in/yaml.v3@v3.0.0-20220512140231-539c8e751b99/decode.go:750 +0x26f
gopkg.in/yaml%2ev3.(*decoder).unmarshal(0xc0000bd650, 0xc0000b4dc0, {0x54f8a0?, 0xc0000c0260?, 0x0?})
/root/go/pkg/mod/gopkg.in/yaml.v3@v3.0.0-20220512140231-539c8e751b99/decode.go:509 +0x34f
gopkg.in/yaml%2ev3.(*decoder).mappingStruct(0xc0000bd650, 0xc0000b45a0, {0x566680?, 0xc0000c0240?, 0xc0000df958?})
/root/go/pkg/mod/gopkg.in/yaml.v3@v3.0.0-20220512140231-539c8e751b99/decode.go:932 +0xd1b
gopkg.in/yaml%2ev3.(*decoder).mapping(0xc0000bd650, 0xc0000b45a0, {0x566680?, 0xc0000c0240?, 0x0?})
/root/go/pkg/mod/gopkg.in/yaml.v3@v3.0.0-20220512140231-539c8e751b99/decode.go:783 +0xbe
gopkg.in/yaml%2ev3.(*decoder).unmarshal(0xc0000bd650, 0xc0000b45a0, {0x566680?, 0xc0000c0240?, 0xc0000dfc60?})
/root/go/pkg/mod/gopkg.in/yaml.v3@v3.0.0-20220512140231-539c8e751b99/decode.go:507 +0x3a5
gopkg.in/yaml%2ev3.(*decoder).document(0x566680?, 0xc0000c0240?, {0x566680?, 0xc0000c0240?, 0xc000086400?})
/root/go/pkg/mod/gopkg.in/yaml.v3@v3.0.0-20220512140231-539c8e751b99/decode.go:524 +0x5d
gopkg.in/yaml%2ev3.(*decoder).unmarshal(0xc0000bd650, 0xc0000b4500, {0x566680?, 0xc0000c0240?, 0xc0000dfcf0?})
/root/go/pkg/mod/gopkg.in/yaml.v3@v3.0.0-20220512140231-539c8e751b99/decode.go:495 +0x415
gopkg.in/yaml%2ev3.unmarshal({0xc0000e8000, 0x31b, 0x31c}, {0x54c8c0?, 0xc0000c0240}, 0x40?)
/root/go/pkg/mod/gopkg.in/yaml.v3@v3.0.0-20220512140231-539c8e751b99/yaml.go:167 +0x406
gopkg.in/yaml%2ev3.Unmarshal(...)
/root/go/pkg/mod/gopkg.in/yaml.v3@v3.0.0-20220512140231-539c8e751b99/yaml.go:89
main.loadConfigFromFile({0xc0000e8000, 0x31b, 0x31c})
/root/go/pkg/mod/github.com/mulbc/gosbench@v0.0.0-20220719091319-d9e82dc1c4ed/server/main.go:56 +0x1f5
main.main()
/root/go/pkg/mod/github.com/mulbc/gosbench@v0.0.0-20220719091319-d9e82dc1c4ed/server/main.go:77 +0xb1

Config

s3_config:

  • access_key: **************
    secret_key: khNE=****************
    region: eu-central-1
    endpoint: ****************

tests:

  • name: read test
    read_weight: 100
    existing_read_weight: 0
    write_weight: 0
    delete_weight: 0
    list_weight: 0
    objects:
    size_min: 1
    size_max: 100000
    part_size: 0
    size_distribution: random
    unit: KB
    number_min: 10
    number_max: 10
    number_distribution: constant
    buckets:
    number_min: 1
    number_max: 10
    number_distribution: constant
    bucket_prefix: 1255gosbenchobject_
    prefix: obj
    stop_with_runtime: 900s
    stop_with_ops:
    workers: 2
    workers_share_buckets: True
    parallel_clients: 3
    clean_after: True
    ...

Without 900s as value, the server works

Environment (please complete the following information):

  • OS: Red Hat Enterprise Linux release 8.7 (Ootpa)
  • Golang version go version go1.18.9 linux/amd64
  • No firewall
@manches manches added the bug Something isn't working label Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants