Skip to content

bug: aborted signal not handled properly by libp2p router #780

@SgtPooki

Description

@SgtPooki

See https://github.com/ipfs/service-worker-gateway/pull/681#issuecomment-2816001952.}

I don't have a good repro usecase besides some code changes in ipfs/service-worker-gateway#681 and manual testing.

It's difficult to set up tests with all the things enabled that I need..

It's somewhere in the combination of ipfs-unixfs-exporter and @helia/routers when bitswap is enabled.

I was able to get this fixed in verified-fetch with:

import { abortableSource } from 'abortable-iterator'

// ...

	const iterator = options?.signal != null 
		? abortableSource(exporterWalk(path, blockstore, options), options.signal) 
		: exporterWalk(path, blockstore, options)
    for await (const entry of iterator) {

// ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Critical: Tackled by core team ASAPdif/expertExtensive knowledge (implications, ramifications) requiredeffort/daysEstimated to take multiple days, but less than a weekkind/bugA bug in existing code (including security flaws)kind/discussionTopical discussion; usually not changes to codebaseneed/analysisNeeds further analysis before proceeding

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions