Skip to content

libp2p crashes with ABORT_ERR  #2462

Closed
Closed
@christroutner

Description

@christroutner
  • Version:
    1.3.1

  • Platform:
    Linux pop-os 6.6.6-76060606-generic #202312111032170230614322.04~d28ffec SMP PREEMPT_DYNAMIC Mon D x86_64 x86_64 x86_64 GNU/Linux

  • Subsystem:

Severity:

  • Critical - System crash, application panic.

Description:

During normal operation of finding and connecting with nodes, the libp2p node will crash. This appears to be due to a race condition. Here is is the error message received from v1.3.1 (latest) version of libp2p:

status: getCRGist() Connecting to Circuit Relay /ip4/143.198.70.59/tcp/5101/p2p/12D3KooWMbU9R49aiYUeFBpxFYK6PggacoeMydaZaR2dzDpWgcA6
file:///home/trout/work/psf/code/helia-coord/node_modules/race-signal/dist/src/index.js:22
		return Promise.reject(new AbortError(opts?.errorMessage, opts?.errorCode));

AbortError: The operation was aborted
	at raceSignal (file:///home/trout/work/psf/code/helia-coord/node_modules/race-signal/dist/src/index.js:22:31)
	at YamuxStream.closeWrite (file:///home/trout/work/psf/code/helia-coord/node_modules/@libp2p/utils/dist/src/abstract-stream.js:230:19)
	at YamuxStream.close (file:///home/trout/work/psf/code/helia-coord/node_modules/@libp2p/utils/dist/src/abstract-stream.js:189:18)
	at stream.close (file:///home/trout/work/psf/code/helia-coord/node_modules/@libp2p/utils/dist/src/stream-to-ma-conn.js:13:15)
	at ConnectionImpl.close [as _close] (file:///home/trout/work/psf/code/helia-coord/node_modules/libp2p/dist/src/upgrader.js:443:30)
	at processTicksAndRejections (node:internal/process/task_queues:95:5)
	at runNextTicks (node:internal/process/task_queues:64:3)
	at listOnTimeout (node:internal/timers:540:9)
	at process.processTimers (node:internal/timers:514:7)
	at async ConnectionImpl.close (file:///home/trout/work/psf/code/helia-coord/node_modules/libp2p/dist/src/connection/index.js:121:13) {
  type: 'aborted',
  code: 'ABORT_ERR'
}

Node.js v20.11.0

This is a similar error from an older version of libp2p (v1.2.1):

file:///home/safeuser/ipfs-service-metrics/node_modules/race-signal/dist/src/index.js:22
		return Promise.reject(new AbortError(opts?.errorMessage, opts?.errorCode));
							  ^

AbortError: The operation was aborted
	at raceSignal (file:///home/safeuser/ipfs-service-metrics/node_modules/race-signal/dist/src/index.js:22:31)
	at YamuxStream.closeWrite (file:///home/safeuser/ipfs-service-metrics/node_modules/@libp2p/utils/dist/src/abstract-stream.js:230:19)
	at YamuxStream.close (file:///home/safeuser/ipfs-service-metrics/node_modules/@libp2p/utils/dist/src/abstract-stream.js:189:18)
	at file:///home/safeuser/ipfs-service-metrics/node_modules/libp2p/dist/src/connection/index.js:118:63
	at Array.map (<anonymous>)
	at ConnectionImpl.close (file:///home/safeuser/ipfs-service-metrics/node_modules/libp2p/dist/src/connection/index.js:118:44)
	at initiateConnection (file:///home/safeuser/ipfs-service-metrics/node_modules/@libp2p/webrtc/dist/src/private-to-private/initiate-connection.js:125:34)
	at runMicrotasks (<anonymous>)
	at processTicksAndRejections (node:internal/process/task_queues:96:5)
	at async WebRTCTransport.dial (file:///home/safeuser/ipfs-service-metrics/node_modules/@libp2p/webrtc/dist/src/private-to-private/transport.js:83:35)
	at async DefaultTransportManager.dial (file:///home/safeuser/ipfs-service-metrics/node_modules/libp2p/dist/src/transport-manager.js:81:20)
	at async Job.queue.add.peerId.peerId [as fn] (file:///home/safeuser/ipfs-service-metrics/node_modules/libp2p/dist/src/connection-manager/dial-queue.js:153:38)
	at async raceSignal (file:///home/safeuser/ipfs-service-metrics/node_modules/race-signal/dist/src/index.js:28:16)
	at async Job.run (file:///home/safeuser/ipfs-service-metrics/node_modules/@libp2p/utils/dist/src/queue/job.js:56:28) {
  type: 'aborted',
  code: 'ABORT_ERR'
}

Steps to reproduce the error:

This error can be reproduced by cloning the helia-coord library, deps-04-24 branch. Install dependencies, then run this javascript file with node.js. After a period of time, the error and crash will occur.

Metadata

Metadata

Assignees

No one assigned

    Labels

    need/triageNeeds initial labeling and prioritization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions