Skip to content

strconv: windows float conversion runtime error #11870

@harshavardhana

Description

@harshavardhana

I have been consistently receiving a problem on windows where a float conversion using fmt.Sprintf leads to a runtime error, do not know if its a golang bug or a programmatic bug. It seems like an overflow to me.

Wasn't able to find previous reports for this issue, following is the backtrace.

C:\mygo\src\github.com\minio\mc>mc ls s3:ddd
fatal error: unexpected signal during runtime execution
[signal 0xc0000005 code=0x0 addr=0xf pc=0x472231]

runtime stack:
runtime.gothrow(0x8d92d0, 0x2a)
        c:/go/src/runtime/panic.go:503 +0x8e
runtime.sigpanic()
        c:/go/src/runtime/os_windows.go:36 +0x65
adjustpointers(0xc08205b550, 0x7fc70, 0x7fe10, 0x0)
        c:/go/src/runtime/stack.c:440 +0x1c1
adjustframe(0x7fd40, 0x7fe10, 0x201)
        c:/go/src/runtime/stack.c:537 +0x200
runtime.gentraceback(0x516720, 0xc0820591c8, 0x0, 0xc082018000, 0x0, 0x0, 0x7fffffff, 0x7fe00, 0x7f
        c:/go/src/runtime/traceback.go:311 +0x7af
copystack(0xc082018000, 0x8000)
        c:/go/src/runtime/stack.c:623 +0x17e
runtime.newstack()
        c:/go/src/runtime/stack.c:789 +0x60f
runtime.morestack()
        c:/go/src/runtime/asm_amd64.s:324 +0x86

goroutine 1 [stack growth]:
strconv.genericFtoa(0xc08200a398, 0x1, 0x41, 0x406af66666666666, 0x66, 0x0, 0x40, 0x0, 0x0, 0x0)
        c:/go/src/strconv/ftoa.go:54 fp=0xc0820591d0 sp=0xc0820591c8
strconv.AppendFloat(0xc08200a398, 0x1, 0x41, 0x406af66666666666, 0x66, 0x0, 0x40, 0x0, 0x0, 0x0)
        c:/go/src/strconv/ftoa.go:51 +0x96 fp=0xc082059228 sp=0xc0820591d0
fmt.(*fmt).formatFloat(0xc08200a398, 0x406af66666666666, 0x66, 0x0, 0x40)
        c:/go/src/fmt/format.go:397 +0xbb fp=0xc082059328 sp=0xc082059228
fmt.(*fmt).fmt_f64(0xc08200a398, 0x406af66666666666)
        c:/go/src/fmt/format.go:447 +0x62 fp=0xc082059358 sp=0xc082059328
fmt.(*pp).fmtFloat64(0xc08200a340, 0x406af66666666666, 0xc000000066)
        c:/go/src/fmt/print.go:470 +0x8c fp=0xc082059370 sp=0xc082059358
fmt.(*pp).printArg(0xc08200a340, 0x72c540, 0xc08207e558, 0x66, 0x0, 0x0)
        c:/go/src/fmt/print.go:759 +0x37d fp=0xc082059440 sp=0xc082059370
fmt.(*pp).doPrintf(0xc08200a340, 0x8464b0, 0x6, 0xc0820b18d0, 0x2, 0x2)
        c:/go/src/fmt/print.go:1183 +0x21d4 fp=0xc0820597d0 sp=0xc082059440
fmt.Sprintf(0x8464b0, 0x6, 0xc0820b18d0, 0x2, 0x2, 0x0, 0x0)
        c:/go/src/fmt/print.go:203 +0x7f fp=0xc082059820 sp=0xc0820597d0
github.com/dustin/go-humanize.humanateBytes(0x34a68, 0x408f400000000000, 0xc0820b1948, 0x7, 0x7, 0x
        C:/mygo/src/github.com/minio/mc/Godeps/_workspace/src/github.com/dustin/go-humanize/bytes.g
github.com/dustin/go-humanize.Bytes(0x34a68, 0x0, 0x0)
        C:/mygo/src/github.com/minio/mc/Godeps/_workspace/src/github.com/dustin/go-humanize/bytes.g
github.com/minio/minio/pkg/iodine.getSystemData(0xc082082300)
        C:/mygo/src/github.com/minio/mc/Godeps/_workspace/src/github.com/minio/minio/pkg/iodine/iod
github.com/minio/minio/pkg/iodine.createStackEntry(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        C:/mygo/src/github.com/minio/mc/Godeps/_workspace/src/github.com/minio/minio/pkg/iodine/iod
github.com/minio/minio/pkg/iodine.New(0xc08200e300, 0x0, 0xc0820822d0, 0x0, 0x0)
        C:/mygo/src/github.com/minio/mc/Godeps/_workspace/src/github.com/minio/minio/pkg/iodine/iod
main.url2Client(0xc08209f640, 0x1c, 0x0, 0x0, 0x0, 0x0)
        C:/mygo/src/github.com/minio/mc/common-methods.go:206 +0x540 fp=0xc08205b5f8 sp=0xc08205b55
main.target2Client(0xc08209f640, 0x1c, 0x0, 0x0, 0x0, 0x0)
        C:/mygo/src/github.com/minio/mc/common-methods.go:223 +0x77 fp=0xc08205b698 sp=0xc08205b5f8
main.doListCmd(0xc08209f640, 0x1c, 0xc08209f600, 0x0, 0x0)
        C:/mygo/src/github.com/minio/mc/ls-main.go:109 +0x5f fp=0xc08205b728 sp=0xc08205b698
main.runListCmd(0xc0820622d0)
        C:/mygo/src/github.com/minio/mc/ls-main.go:100 +0x56e fp=0xc08205b8f0 sp=0xc08205b728
github.com/minio/cli.Command.Run(0x855650, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x885190, 0x16, 0x0, ...)
        C:/mygo/src/github.com/minio/mc/Godeps/_workspace/src/github.com/minio/cli/command.go:123 +
github.com/minio/cli.(*App).Run(0xc082072200, 0xc082003da0, 0x3, 0x3, 0x0, 0x0)
        C:/mygo/src/github.com/minio/mc/Godeps/_workspace/src/github.com/minio/cli/app.go:192 +0x85
github.com/minio/cli.(*App).RunAndExitOnError(0xc082072200)
        C:/mygo/src/github.com/minio/mc/Godeps/_workspace/src/github.com/minio/cli/app.go:203 +0x53
main.main()
        C:/mygo/src/github.com/minio/mc/main.go:194 +0xc1 fp=0xc08205bf98 sp=0xc08205bf78
runtime.main()
        c:/go/src/runtime/proc.go:63 +0xfa fp=0xc08205bfe0 sp=0xc08205bf98
runtime.goexit()
        c:/go/src/runtime/asm_amd64.s:2232 +0x1 fp=0xc08205bfe8 sp=0xc08205bfe0

goroutine 2 [runnable]:
runtime.forcegchelper()
        c:/go/src/runtime/proc.go:90
runtime.goexit()
        c:/go/src/runtime/asm_amd64.s:2232 +0x1

goroutine 3 [runnable]:
runtime.bgsweep()
        c:/go/src/runtime/mgc0.go:82
runtime.goexit()
        c:/go/src/runtime/asm_amd64.s:2232 +0x1

goroutine 4 [runnable]:
runtime.runfinq()
        c:/go/src/runtime/malloc.go:712
runtime.goexit()
        c:/go/src/runtime/asm_amd64.s:2232 +0x1

goroutine 5 [runnable]:
os/signal.loop()
        c:/go/src/os/signal/signal_unix.go:19
created by os/signal.init┬╖1
        c:/go/src/os/signal/signal_unix.go:27 +0x3c

C:\mygo\src\github.com\minio\mc>
C:\mygo\src\github.com\minio\mc>go version
go version go1.4.2 windows/amd64
C:\mygo\src\github.com\minio\mc>
C:\mygo\src\github.com\minio\mc>go env
set GOARCH=amd64
set GOBIN=
set GOCHAR=6
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\mygo
set GORACE=
set GOROOT=c:\go
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions