Re: [go-nuts] strconv.ParseFloat panic

2020-11-09 Thread blade...@gmail.com
thanks all, i find a race problem, and fix it. 

在2020年11月7日星期六 UTC+8 上午5:28:51 写道:

> OK, so you're not using Cgo, that leaves some other unsafe use, a data
> race or unlikely some weird compiler bug.
>
> I'd start looking in api.handleDPriceRange to see where the string
> input to strconv.ParseFloat is being constructed.
>
> On Fri, 2020-11-06 at 01:10 -0800, blade...@gmail.com wrote:
> > go version is 1.15 , cross compile on darwin and run on linux, i
> > will try to run with race deector
> > 
> > 
> > 
> > 在2020年11月6日星期五 UTC+8 下午4:34:21 写道:
> > > The full panic would help, but somehow you have a string with a
> > > nil 
> > > pointer that is 4 bytes long. Where is the string generated? Are
> > > you 
> > > using Cgo? Have you run with the race detector? Also, what version
> > > of 
> > > Go are you using? 
> > > 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/e0939854-7dea-450e-a1ec-c3985b889cb2n%40googlegroups.com.


Re: [go-nuts] strconv.ParseFloat panic

2020-11-06 Thread 'Dan Kortschak' via golang-nuts
OK, so you're not using Cgo, that leaves some other unsafe use, a data
race or unlikely some weird compiler bug.

I'd start looking in api.handleDPriceRange to see where the string
input to strconv.ParseFloat is being constructed.

On Fri, 2020-11-06 at 01:10 -0800, blade...@gmail.com wrote:
> go version is 1.15 , cross compile on darwin  and run on linux,  i
> will try to run with race deector
> 
> 
> 
> 在2020年11月6日星期五 UTC+8 下午4:34:21 写道:
> > The full panic would help, but somehow you have a string with a
> > nil 
> > pointer that is 4 bytes long. Where is the string generated? Are
> > you 
> > using Cgo? Have you run with the race detector? Also, what version
> > of 
> > Go are you using? 
> > 


-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/dc04cd21bb00f2e520f9791fdad6c1731c85a8a2.camel%40kortschak.io.


Re: [go-nuts] strconv.ParseFloat panic

2020-11-06 Thread blade...@gmail.com
go version is 1.15 , cross compile on darwin  and run on linux,  i will try 
to run with race deector



在2020年11月6日星期五 UTC+8 下午4:34:21 写道:

> The full panic would help, but somehow you have a string with a nil
> pointer that is 4 bytes long. Where is the string generated? Are you
> using Cgo? Have you run with the race detector? Also, what version of
> Go are you using?
>
> On Fri, 2020-11-06 at 00:00 -0800, blade...@gmail.com wrote:
> > i check my code, and strconv.ParseFloat(s, 64), s is a string, it is
> > correct, but after run my program for a while, it's panic and report
> > some output info. i cant't find why , anyone can help me 
> > 
> > 
> > output infor:
> > panic: runtime error: invalid memory address or nil pointer
> > dereference
> > [signal SIGSEGV: segmentation violation code=0x1 addr=0x0
> > pc=0x4a2654]
> > 
> > goroutine 2948735 [running]:
> > strconv.special(0x0, 0x4, 0x0, 0x3ff2e147ae147ae1, 0x1)
> > strconv/atof.go:48 +0x34
> > strconv.atof64(0x0, 0x4, 0x41421d, 0xc05323c380, 0xc05dd95ab0, 0xa)
> > strconv/atof.go:612 +0x50
> > strconv.parseFloatPrefix(0x0, 0x4, 0x40, 0x3, 0xc078741b48,
> > 0xc05dd95ab0, 0xc078741b40)
> > strconv/atof.go:695 +0x95
> > strconv.ParseFloat(0x0, 0x4, 0x40, 0xa, 0xc078741bc8, 0xc05dd95a01)
> > strconv/atof.go:683 +0x45
> > xx/api.handleDPriceRange(0xc01777c820)
> > xx/api/PriceCalendar.go:1008 +0x212
> > xx/api.priceCalendarItemExpand(0xc016e34a80, 0xc96, 0xc96)
> > xx/api/PriceCalendar.go:1104 +0xb9b
> > xx/api.FlightlineRT(0xc001bd9d98, 0xc0002294f0, 0x1306020,
> > 0xc04f1415c0, 0xc05e653a70, 0x1c000229518, 0xc05193dc00)
> > xx/api/external_api.go:146 +0x108
> > xx/api.aaa.func2(0xc04f1456b0, 0xc04f102340, 0xc05d23aa68, 0x3,
> > 0xc05465c230, 0x63, 0xc04f13c301, 0x7, 0x0, 0x0, ...)
> > xx/api/external_api.go:343 +0x25b
> > created by xx/api.AppMainpage
> > xx/api/external_api.go:330 +0x57e
> > -- 
> > You received this message because you are subscribed to the Google
> > Groups "golang-nuts" group.
> > To unsubscribe from this group and stop receiving emails from it,
> > send an email to golang-nuts...@googlegroups.com.
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/golang-nuts/9c672d72-7daa-4fe1-9f84-136c2eaa2065n%40googlegroups.com
> > .
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/afa99a55-f4ec-46d7-8a5f-fc981953583bn%40googlegroups.com.


Re: [go-nuts] strconv.ParseFloat panic

2020-11-06 Thread 'Dan Kortschak' via golang-nuts
The full panic would help, but somehow you have a string with a nil
pointer that is 4 bytes long. Where is the string generated? Are you
using Cgo? Have you run with the race detector? Also, what version of
Go are you using?

On Fri, 2020-11-06 at 00:00 -0800, blade...@gmail.com wrote:
> i check my code, and strconv.ParseFloat(s, 64), s is a string, it is
> correct, but  after run my program for a while, it's panic and report
> some output info. i cant't find why , anyone can help me 
> 
> 
> output infor:
> panic: runtime error: invalid memory address or nil pointer
> dereference
> [signal SIGSEGV: segmentation violation code=0x1 addr=0x0
> pc=0x4a2654]
> 
> goroutine 2948735 [running]:
> strconv.special(0x0, 0x4, 0x0, 0x3ff2e147ae147ae1, 0x1)
>   strconv/atof.go:48 +0x34
> strconv.atof64(0x0, 0x4, 0x41421d, 0xc05323c380, 0xc05dd95ab0, 0xa)
>   strconv/atof.go:612 +0x50
> strconv.parseFloatPrefix(0x0, 0x4, 0x40, 0x3, 0xc078741b48,
> 0xc05dd95ab0, 0xc078741b40)
>   strconv/atof.go:695 +0x95
> strconv.ParseFloat(0x0, 0x4, 0x40, 0xa, 0xc078741bc8, 0xc05dd95a01)
>   strconv/atof.go:683 +0x45
> xx/api.handleDPriceRange(0xc01777c820)
>   xx/api/PriceCalendar.go:1008 +0x212
> xx/api.priceCalendarItemExpand(0xc016e34a80, 0xc96, 0xc96)
>   xx/api/PriceCalendar.go:1104 +0xb9b
> xx/api.FlightlineRT(0xc001bd9d98, 0xc0002294f0, 0x1306020,
> 0xc04f1415c0, 0xc05e653a70, 0x1c000229518, 0xc05193dc00)
>   xx/api/external_api.go:146 +0x108
> xx/api.aaa.func2(0xc04f1456b0, 0xc04f102340, 0xc05d23aa68, 0x3,
> 0xc05465c230, 0x63, 0xc04f13c301, 0x7, 0x0, 0x0, ...)
>   xx/api/external_api.go:343 +0x25b
> created by xx/api.AppMainpage
>   xx/api/external_api.go:330 +0x57e
> -- 
> You received this message because you are subscribed to the Google
> Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/9c672d72-7daa-4fe1-9f84-136c2eaa2065n%40googlegroups.com
> .


-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/a0ebd55eb6be63355c1e44f9717a5710f78ca5a0.camel%40kortschak.io.


[go-nuts] strconv.ParseFloat panic

2020-11-06 Thread blade...@gmail.com
i check my code, and strconv.ParseFloat(s, 64), s is a string, it is 
correct, but  after run my program for a while, it's panic and report some 
output info. i cant't find why , anyone can help me 


output infor:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4a2654]

goroutine 2948735 [running]:
strconv.special(0x0, 0x4, 0x0, 0x3ff2e147ae147ae1, 0x1)
strconv/atof.go:48 +0x34
strconv.atof64(0x0, 0x4, 0x41421d, 0xc05323c380, 0xc05dd95ab0, 0xa)
strconv/atof.go:612 +0x50
strconv.parseFloatPrefix(0x0, 0x4, 0x40, 0x3, 0xc078741b48, 0xc05dd95ab0, 
0xc078741b40)
strconv/atof.go:695 +0x95
strconv.ParseFloat(0x0, 0x4, 0x40, 0xa, 0xc078741bc8, 0xc05dd95a01)
strconv/atof.go:683 +0x45
xx/api.handleDPriceRange(0xc01777c820)
xx/api/PriceCalendar.go:1008 +0x212
xx/api.priceCalendarItemExpand(0xc016e34a80, 0xc96, 0xc96)
xx/api/PriceCalendar.go:1104 +0xb9b
xx/api.FlightlineRT(0xc001bd9d98, 0xc0002294f0, 0x1306020, 
0xc04f1415c0, 0xc05e653a70, 0x1c000229518, 0xc05193dc00)
xx/api/external_api.go:146 +0x108
xx/api.aaa.func2(0xc04f1456b0, 0xc04f102340, 0xc05d23aa68, 0x3, 
0xc05465c230, 0x63, 0xc04f13c301, 0x7, 0x0, 0x0, ...)
xx/api/external_api.go:343 +0x25b
created by xx/api.AppMainpage
xx/api/external_api.go:330 +0x57e

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/9c672d72-7daa-4fe1-9f84-136c2eaa2065n%40googlegroups.com.