Re: [go-nuts] Re: Random panic in production with Sprintf

2019-05-03 Thread tsilva
Are you using the fasthttp timeout handler? If its the case you could have a race condition once the timeout is triggered. Tiago On Friday, May 3, 2019 at 5:23:58 AM UTC+1, Burak Serdar wrote: > > On Thu, May 2, 2019 at 6:34 PM Tyler Compton > wrote: > > > > I took a quick look and yes, it us

Re: [go-nuts] Re: Random panic in production with Sprintf

2019-05-02 Thread Burak Serdar
On Thu, May 2, 2019 at 6:34 PM Tyler Compton wrote: > > I took a quick look and yes, it uses unsafe to convert between byte slices > and strings. I don't know enough to say that it's the problem but here's an > example: > > https://github.com/valyala/fasthttp/blob/645361952477dfc16938fb299306513

Re: [go-nuts] Re: Random panic in production with Sprintf

2019-05-02 Thread Robert Engels
Whenever I see fast* I think someone took shortcuts to make something “faster” without fully implementing the spec (or external constraints, like safe data access) > On May 2, 2019, at 7:16 PM, Burak Serdar wrote: > >> On Thu, May 2, 2019 at 6:02 PM XXX ZZZ wrote: >> >> No use of C via CGO a

Re: [go-nuts] Re: Random panic in production with Sprintf

2019-05-02 Thread Tyler Compton
I took a quick look and yes, it uses unsafe to convert between byte slices and strings. I don't know enough to say that it's the problem but here's an example: https://github.com/valyala/fasthttp/blob/645361952477dfc16938fb2993065130ed7c02b9/bytesconv.go#L380 On Thu, May 2, 2019 at 5:16 PM Burak

Re: [go-nuts] Re: Random panic in production with Sprintf

2019-05-02 Thread Burak Serdar
On Thu, May 2, 2019 at 6:02 PM XXX ZZZ wrote: > > No use of C via CGO at all. > > Afaik, there isn't any unsafe use of the string, we are basically reading it > from a get parameter (fasthttp server) on an http request and then adding it > into this structure, most of the times is just a 5 char

Re: [go-nuts] Re: Random panic in production with Sprintf

2019-05-02 Thread XXX ZZZ
No use of C via CGO at all. Afaik, there isn't any unsafe use of the string, we are basically reading it from a get parameter (fasthttp server) on an http request and then adding it into this structure, most of the times is just a 5 char string. Out of several millions requests, this panic happ

Re: [go-nuts] Re: Random panic in production with Sprintf

2019-05-02 Thread Burak Serdar
On Thu, May 2, 2019 at 3:56 PM Ian Lance Taylor wrote: > > On Thu, May 2, 2019 at 2:50 PM Anthony Martin wrote: > > > > What version of Go are you using? > > > > XXX ZZZ once said: > > > fmt.(*pp).fmtString(0xc023c17740, 0x0, 0x5, 0xc00076) > > > /usr/local/go/src/fmt/print.go:448 +0x132

Re: [go-nuts] Re: Random panic in production with Sprintf

2019-05-02 Thread Michael Jones
Is any of this string data touched/from C via CGO? On Thu, May 2, 2019 at 3:09 PM Anthony Martin wrote: > Ian Lance Taylor once said: > > I don't *think* the format string is changing. I think the 0 is from > > the string being printed, not the format string. They both happen to > > be length

Re: [go-nuts] Re: Random panic in production with Sprintf

2019-05-02 Thread Anthony Martin
Ian Lance Taylor once said: > I don't *think* the format string is changing. I think the 0 is from > the string being printed, not the format string. They both happen to > be length 5. Misled by the pair of fives. Mea culpa. Anthony -- You received this message because you are subscribed t

Re: [go-nuts] Re: Random panic in production with Sprintf

2019-05-02 Thread Ian Lance Taylor
On Thu, May 2, 2019 at 2:50 PM Anthony Martin wrote: > > What version of Go are you using? > > XXX ZZZ once said: > > fmt.(*pp).fmtString(0xc023c17740, 0x0, 0x5, 0xc00076) > > /usr/local/go/src/fmt/print.go:448 +0x132 > > fmt.(*pp).printArg(0xc023c17740, 0x9978e0, 0xc016a68a30, 0x76) > >

[go-nuts] Re: Random panic in production with Sprintf

2019-05-02 Thread Anthony Martin
What version of Go are you using? XXX ZZZ once said: > fmt.(*pp).fmtString(0xc023c17740, 0x0, 0x5, 0xc00076) > /usr/local/go/src/fmt/print.go:448 +0x132 > fmt.(*pp).printArg(0xc023c17740, 0x9978e0, 0xc016a68a30, 0x76) > /usr/local/go/src/fmt/print.go:684 +0x880 > fmt.(*pp).doPrintf(0x

[go-nuts] Re: Random panic in production with Sprintf

2019-05-02 Thread XXX ZZZ
using go version go1.12.4 linux/amd64 El jueves, 2 de mayo de 2019, 18:50:24 (UTC-3), Anthony Martin escribió: > > What version of Go are you using? > > XXX ZZZ > once said: > > fmt.(*pp).fmtString(0xc023c17740, 0x0, 0x5, 0xc00076) > > /usr/local/go/src/fmt/print.go:448 +0x132 > > fmt.