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

[Bug]: fatal error: concurrent map read and map write #577

Closed
3 tasks done
iqinlongfei opened this issue Apr 18, 2024 · 1 comment
Closed
3 tasks done

[Bug]: fatal error: concurrent map read and map write #577

iqinlongfei opened this issue Apr 18, 2024 · 1 comment
Assignees
Labels
bug Something isn't working inactivity needs investigation needs more info waiting for response waiting for the response from commenter

Comments

@iqinlongfei
Copy link

Actions I've taken before I'm here

  • I've thoroughly read the documentations on this issue but still have no clue.
  • I've searched the Github Issues but didn't find any duplicate issues that have been resolved.
  • I've searched the internet for this issue but didn't find anything helpful.

What happened?

image

Major version of gnet

v2

Specific version of gnet

v2.3.3

Operating system

Linux

OS version

Linux 5.15.56.bsk.1-amd64 x86_64

Go version

go1.19.2

Relevant log output

fatal error: concurrent map read and map write

goroutine 398788 [running]:
github.com/panjf2000/gnet/v2.(*connMatrix).getConn(...)
	/go/pkg/mod/github.com/panjf2000/gnet/v2@v2.3.3/conn_map.go:66
github.com/panjf2000/gnet/v2.(*eventloop).close(0xc354050380, 0xc4d02c3960, {0x1099680, 0xc50f578860})
	/go/pkg/mod/github.com/panjf2000/gnet/v2@v2.3.3/eventloop_unix.go:174 +0xc5
github.com/panjf2000/gnet/v2.(*conn).write(0xc4d02c3960, {0xc4b0751b30, 0xee, 0xee})
	/go/pkg/mod/github.com/panjf2000/gnet/v2@v2.3.3/connection_unix.go:137 +0x165
github.com/panjf2000/gnet/v2.(*conn).Write(0xc483353680?, {0xc4b0751b30?, 0x0?, 0x0?})
	/go/pkg/mod/github.com/panjf2000/gnet/v2@v2.3.3/connection_unix.go:353 +0x5b

Code snippets (optional)

No response

How to Reproduce

Steps to reproduce the behavior:

  1. Go to '....'
  2. Click on '....'
  3. Do '....'
  4. See '....'

Does this issue reproduce with the latest release?

It can reproduce with the latest release

@iqinlongfei iqinlongfei added the bug Something isn't working label Apr 18, 2024
@panjf2000
Copy link
Owner

Did you call some APIs that are not concurrency-safe outside the eventloop? Please provide a reproducer for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working inactivity needs investigation needs more info waiting for response waiting for the response from commenter
Projects
None yet
Development

No branches or pull requests

2 participants