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

net/http: http.Client send reqeust via https cause memory leak #66401

Closed
liumingmin opened this issue Mar 19, 2024 · 2 comments
Closed

net/http: http.Client send reqeust via https cause memory leak #66401

liumingmin opened this issue Mar 19, 2024 · 2 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@liumingmin
Copy link

liumingmin commented Mar 19, 2024

Go version

go verison go1.20.13 windows/amd64

Output of go env in your module/workspace:

set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\admin\AppData\Local\go-build
set GOENV=C:\Users\admin\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\gowork\pkg\mod
set GOOS=windows
set GOPATH=C:\gowork
set GOPROXY=https://goproxy.cn,direct
set GOROOT=C:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.20.13
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=**\go.mod
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=C:\Users\admin\AppData\Local\Temp\go-build3559619048=/tmp/go-build -gno-record-gcc-switches

What did you do?

My project use net/http Client to send request via https to server,
build env is windows10 use go build -buildmode=c-shared to build dll and run on windows7 PC.
when windows7 PC local certificate donot have server certificate's Root CA certificate , then return error is tls: failed to verify certificate: x509: certificate signed by unknown author
At this time many request be sent to server, and the progream memory increase fast to 1GB.
I think maybe the http.Client send reqeust via https and No RootCA certificate cause memory leak.

What did you see happen?

My project use net/http Client to send request via https to server,
build env is windows10 use go build -buildmode=c-shared to build dll and run on windows7 PC.
when windows7 PC local certificate donot have server certificate's Root CA certificate , then return error is tls: failed to verify certificate: x509
At this time many request be sent to server, and the progream memory increase fast to 1GB.
I think maybe the http.Client send reqeust via https and No RootCA certificate cause memory leak.

What did you expect to see?

Can this be fixed?

@panjf2000
Copy link
Member

Could you provide a program that can reproduce this issue?

@panjf2000 panjf2000 added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Mar 19, 2024
@panjf2000 panjf2000 added this to the Backlog milestone Mar 19, 2024
@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@gopherbot gopherbot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants