Git Product home page Git Product logo

Comments (4)

dosubot avatar dosubot commented on June 23, 2024 2

🤖

Thank you for providing the detailed information and the code to reproduce the issue. It's clear that you're experiencing a panic due to a data race when using the lookupIPAddr function for DNS resolving in the Kratos microservices framework.

The error message you provided indicates a segmentation violation, which usually occurs when a program tries to read or write an illegal memory location. This could be due to a nil pointer dereference or an out-of-bounds array index.

You mentioned that you're using Kratos version v2.6.2 and Go version 1.20. The issue seems to be related to the use of the sync.Pool object pool.

To better understand and resolve this issue, could you please provide the following additional information:

  1. Have you tried updating to the latest version of Kratos (v2.7.1) to see if the issue persists?
  2. Could you provide the full stack trace of the panic? This could help identify the exact line of code causing the issue.
  3. Are there any specific conditions under which the panic occurs? For example, does it happen every time you run the server and start 200 threads, or only under certain conditions?
  4. Have you made any modifications to the Kratos or Go runtime environment that could potentially affect the behavior of the lookupIPAddr function or the sync.Pool object pool?

Your answers to these questions will help us better understand the issue and find a solution.


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

from kratos.

dosubot avatar dosubot commented on June 23, 2024

🤖

Hello @lyouthzzz,

Nice to meet you! I'm Dosu, a helpful bot designed to assist you with Kratos. While we're waiting for a human maintainer, I'm here to help solve bugs, answer questions, and guide you on how to become a contributor.

I'm currently reviewing your issue and will provide a full answer shortly. Hang tight!

from kratos.

lyouthzzz avatar lyouthzzz commented on June 23, 2024

more detail: golang/go#63927

from kratos.

freehere107 avatar freehere107 commented on June 23, 2024

@lyouthzzz I still have this problem after updating to v2.7.2.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x63f1b2]

goroutine 3315105 [running]:
net.(*Resolver).lookupIPAddr(0x3a68320, {0x2316a70?, 0xc007a505a0}, {0x1e6ff2f, 0x3}, {0xc003c8bc20, 0x26})
	/opt/hostedtoolcache/go/1.19.13/x64/src/net/lookup.go:346 +0x8b2
net.(*Resolver).internetAddrList(0x2316a70?, {0x2316a70?, 0xc007a505a0?}, {0x1e6ff2f, 0x3}, {0xc003c8bc20?, 0x2b?})
	/opt/hostedtoolcache/go/1.19.13/x64/src/net/ipsock.go:288 +0x67a
net.(*Resolver).resolveAddrList(0x3a9db40?, {0x2316a70, 0xc007a505a0}, {0x1e7119f, 0x4}, {0x1e6ff2f?, 0x433a90?}, {0xc003c8bc20, 0x2b}, {0x0, ...})
	/opt/hostedtoolcache/go/1.19.13/x64/src/net/dial.go:222 +0x41b
net.(*Dialer).DialContext(0xc0000a22a0, {0x2316a70, 0xc007a505a0}, {0x1e6ff2f, 0x3}, {0xc003c8bc20, 0x2b})
	/opt/hostedtoolcache/go/1.19.13/x64/src/net/dial.go:410 +0x448
net/http.(*Transport).dial(0x0?, {0x2316a70?, 0xc007a505a0?}, {0x1e6ff2f?, 0x0?}, {0xc003c8bc20?, 0x8?})
	/opt/hostedtoolcache/go/1.19.13/x64/src/net/http/transport.go:1170 +0xda
net/http.(*Transport).dialConn(0x3a4bf40, {0x2316a70, 0xc007a505a0}, {{}, 0x0, {0xc006a357a0, 0x4}, {0xc003c8bc20, 0x2b}, 0x0})
	/opt/hostedtoolcache/go/1.19.13/x64/src/net/http/transport.go:1608 +0x83f
net/http.(*Transport).dialConnFor(0xc0041347e0?, 0xc003f138c0)
	/opt/hostedtoolcache/go/1.19.13/x64/src/net/http/transport.go:1450 +0xb0
created by net/http.(*Transport).queueForDial
	/opt/hostedtoolcache/go/1.19.13/x64/src/net/http/transport.go:1419 +0x3f2

from kratos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.