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

ipfs swarm peering ls crashes if daemon isn't running #8699

Closed
3 tasks done
Dentrax opened this issue Jan 26, 2022 · 1 comment · Fixed by #9261
Closed
3 tasks done

ipfs swarm peering ls crashes if daemon isn't running #8699

Dentrax opened this issue Jan 26, 2022 · 1 comment · Fixed by #9261
Labels
kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked

Comments

@Dentrax
Copy link

Dentrax commented Jan 26, 2022

Checklist

Installation method

third-party binary

Version

go-ipfs version: 0.11.0
Repo version: 11
System version: amd64/darwin
Golang version: go1.16.12

Config

{
  "API": {
    "HTTPHeaders": {}
  },
  "Addresses": {
    "API": "/ip4/127.0.0.1/tcp/5001",
    "Announce": [],
    "AppendAnnounce": [],
    "Gateway": "/ip4/127.0.0.1/tcp/8080",
    "NoAnnounce": [],
    "Swarm": [
      "/ip4/0.0.0.0/tcp/4001",
      "/ip6/::/tcp/4001",
      "/ip4/0.0.0.0/udp/4001/quic",
      "/ip6/::/udp/4001/quic"
    ]
  },
  "AutoNAT": {},
  "Bootstrap": [
    "<REDACTED>",
  ],
  "DNS": {
    "Resolvers": {}
  },
  "Datastore": {
    "BloomFilterSize": 0,
    "GCPeriod": "1h",
    "HashOnRead": false,
    "Spec": {
      "mounts": [
        {
          "child": {
            "path": "blocks",
            "shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
            "sync": true,
            "type": "flatfs"
          },
          "mountpoint": "/blocks",
          "prefix": "flatfs.datastore",
          "type": "measure"
        },
        {
          "child": {
            "compression": "none",
            "path": "datastore",
            "type": "levelds"
          },
          "mountpoint": "/",
          "prefix": "leveldb.datastore",
          "type": "measure"
        }
      ],
      "type": "mount"
    },
    "StorageGCWatermark": 90,
    "StorageMax": "10GB"
  },
  "Discovery": {
    "MDNS": {
      "Enabled": true,
      "Interval": 10
    }
  },
  "Experimental": {
    "AcceleratedDHTClient": false,
    "FilestoreEnabled": false,
    "GraphsyncEnabled": false,
    "Libp2pStreamMounting": false,
    "P2pHttpProxy": false,
    "StrategicProviding": false,
    "UrlstoreEnabled": false
  },
  "Gateway": {
    "APICommands": [],
    "HTTPHeaders": {
      "Access-Control-Allow-Headers": [
        "X-Requested-With",
        "Range",
        "User-Agent"
      ],
      "Access-Control-Allow-Methods": [
        "GET"
      ],
      "Access-Control-Allow-Origin": [
        "*"
      ]
    },
    "NoDNSLink": false,
    "NoFetch": false,
    "PathPrefixes": [],
    "PublicGateways": null,
    "RootRedirect": "",
    "Writable": false
  },
  "Identity": {
    "PeerID": "<REDACTED>"
  },
  "Internal": {},
  "Ipns": {
    "RecordLifetime": "",
    "RepublishPeriod": "",
    "ResolveCacheSize": 128
  },
  "Migration": {
    "DownloadSources": [],
    "Keep": ""
  },
  "Mounts": {
    "FuseAllowOther": false,
    "IPFS": "/ipfs",
    "IPNS": "/ipns"
  },
  "Peering": {
    "Peers": null
  },
  "Pinning": {
    "RemoteServices": {}
  },
  "Plugins": {
    "Plugins": null
  },
  "Provider": {
    "Strategy": ""
  },
  "Pubsub": {
    "DisableSigning": false,
    "Router": ""
  },
  "Reprovider": {
    "Interval": "12h",
    "Strategy": "all"
  },
  "Routing": {
    "Type": "dht"
  },
  "Swarm": {
    "AddrFilters": null,
    "ConnMgr": {
      "GracePeriod": "20s",
      "HighWater": 900,
      "LowWater": 600,
      "Type": "basic"
    },
    "DisableBandwidthMetrics": false,
    "DisableNatPortMap": false,
    "RelayClient": {},
    "RelayService": {},
    "Transports": {
      "Multiplexers": {},
      "Network": {},
      "Security": {}
    }
  }
}

Description

$ ipfs swarm peering ls

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

goroutine 1 [running]:
github.com/ipfs/go-ipfs/peering.(*PeeringService).ListPeers(0x0, 0x0, 0x0, 0x0)
github.com/ipfs/go-ipfs@v0.11.0/peering/peering.go:247 +0x66
github.com/ipfs/go-ipfs/core/commands.glob..func167(0xc000266000, 0x2a1f870, 0xc000339260, 0x240f740, 0xc000339200, 0x1, 0xc000339260)
github.com/ipfs/go-ipfs@v0.11.0/core/commands/swarm.go:149 +0x77
github.com/ipfs/go-ipfs-cmds.(*executor).Execute(0xc00000e730, 0xc000266000, 0x2a1f870, 0xc000339260, 0x240f740, 0xc000339200, 0xc000339260, 0x0)
github.com/ipfs/go-ipfs-cmds@v0.6.0/executor.go:77 +0x16b
github.com/ipfs/go-ipfs-cmds/cli.Run(0x2a1f3d8, 0xc00020dc00, 0x3766920, 0xc0000d4040, 0x4, 0x4, 0xc0000d0000, 0xc0000d0008, 0xc0000d0010, 0x2857768, ...)
github.com/ipfs/go-ipfs-cmds@v0.6.0/cli/run.go:137 +0xab8
main.mainRet(0x0)
github.com/ipfs/go-ipfs@v0.11.0/cmd/ipfs/main.go:168 +0x45e
main.main()
github.com/ipfs/go-ipfs@v0.11.0/cmd/ipfs/main.go:71 +0x25

@Dentrax Dentrax added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Jan 26, 2022
@welcome
Copy link

welcome bot commented Jan 26, 2022

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

@aschmahmann aschmahmann added P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked and removed need/triage Needs initial labeling and prioritization labels Jan 28, 2022
aya added a commit to aya/kubo that referenced this issue Sep 9, 2022
aya added a commit to aya/kubo that referenced this issue Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants