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

Libp2p max listeners warning #6317

Closed
nflaig opened this issue Jan 17, 2024 · 5 comments
Closed

Libp2p max listeners warning #6317

nflaig opened this issue Jan 17, 2024 · 5 comments
Labels
meta-bug Issues that identify a bug and require a fix. meta-investigate Issues found that require further investigation and may not have a specific resolution/fix

Comments

@nflaig
Copy link
Member

nflaig commented Jan 17, 2024

Describe the bug

After recent libp2p upgrade (#6285) I am seeing the following error (with --trace-warnings enabled)

(node:206518) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. Use events.setMaxListeners() to increase limit
    at [kNewListener] (node:internal/event_target:546:17)
    at [kNewListener] (node:internal/abort_controller:239:24)
    at EventTarget.addEventListener (node:internal/event_target:659:23)
    at anySignal (file:///home/devops/goerli/lodestar/node_modules/libp2p/node_modules/any-signal/dist/src/index.js:21:20)
    at DialQueue.createDialAbortController (file:///home/devops/goerli/lodestar/node_modules/libp2p/dist/src/connection-manager/dial-queue.js:200:24)
    at queue.add.peerId.peerId [as fn] (file:///home/devops/goerli/lodestar/node_modules/libp2p/dist/src/connection-manager/dial-queue.js:126:33)
    at Job.run (file:///home/devops/goerli/lodestar/node_modules/@libp2p/utils/dist/src/queue/job.js:56:50)
    at Queue.tryToStartAnother (file:///home/devops/goerli/lodestar/node_modules/@libp2p/utils/dist/src/queue/index.js:79:17)
    at Queue.add (file:///home/devops/goerli/lodestar/node_modules/@libp2p/utils/dist/src/queue/index.js:121:14)
    at DialQueue.dial (file:///home/devops/goerli/lodestar/node_modules/libp2p/dist/src/connection-manager/dial-queue.js:123:27)

Expected behavior

No MaxListenersExceededWarning warnings

Steps to reproduce

Run lodestar beacon node

Additional context

Operating system

Linux

Lodestar version or commit hash

9eb9cce

@nflaig nflaig added the meta-bug Issues that identify a bug and require a fix. label Jan 17, 2024
@philknows
Copy link
Member

What is the scope and estimation of this fix? It's not really a blocker for v1.15 but can degrade the UX if we released with this.

@nflaig
Copy link
Member Author

nflaig commented Apr 5, 2024

Could be related to the memory leak we are observing on some nodes? As far as I remember this warning only happens with connected validators

Seems unrelated

@nflaig nflaig added the meta-investigate Issues found that require further investigation and may not have a specific resolution/fix label Apr 5, 2024
@nflaig
Copy link
Member Author

nflaig commented Apr 11, 2024

Possibly related listeners warning

(node:7) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 101 message listeners added to [Worker]. Use emitter.setMaxListeners() to increase limit
    at genericNodeError (node:internal/errors:984:15)
    at wrappedFn (node:internal/errors:538:14)
    at _addListener (node:events:592:17)
    at Worker.addListener (node:events:610:10)
    at Worker.addEventListener (/usr/app/node_modules/@chainsafe/threads/dist/master/implementation.node.js:134:18)
    at /usr/app/node_modules/@chainsafe/threads/dist/master/invocation-proxy.js:64:16
    at new Subscription (/usr/app/node_modules/observable-fns/dist/observable.js:159:40)
    at Observable.subscribe (/usr/app/node_modules/observable-fns/dist/observable.js:210:16)
    at /usr/app/node_modules/observable-fns/dist/multicast.js:31:49
    at new Subscription (/usr/app/node_modules/observable-fns/dist/observable.js:159:40)

@nflaig
Copy link
Member Author

nflaig commented Apr 20, 2024

This issue should be fixed by

Just need to update all libp2p libs to latest

@wemeetagain
Copy link
Member

resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta-bug Issues that identify a bug and require a fix. meta-investigate Issues found that require further investigation and may not have a specific resolution/fix
Projects
None yet
Development

No branches or pull requests

3 participants