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 : panic: expected chan in accept muxer #9693

Closed
3 tasks done
RadioSteve-dev opened this issue Mar 3, 2023 · 12 comments · Fixed by #9862
Closed
3 tasks done

ipfs : panic: expected chan in accept muxer #9693

RadioSteve-dev opened this issue Mar 3, 2023 · 12 comments · Fixed by #9862
Labels
kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization

Comments

@RadioSteve-dev
Copy link

Checklist

Installation method

ipfs-desktop

Version

Kubo version: 0.18.1
Repo version: 13
System version: amd64/windows
Golang version: go1.19.1

Config

{
  "API": {
    "HTTPHeaders": {
      "Access-Control-Allow-Methods": [
        "put",
        "post"
      ],
      "Access-Control-Allow-Origin": [
        "webui://-",
        "http://localhost:3000",
        "http://127.0.0.1:5001",
        "https://webui.ipfs.io",
        "http://webui.ipfs.io.ipns.localhost:8080"
      ]
    }
  },
  "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",
      "/ip4/0.0.0.0/udp/4001/quic-v1",
      "/ip4/0.0.0.0/udp/4001/quic-v1/webtransport",
      "/ip6/::/udp/4001/quic",
      "/ip6/::/udp/4001/quic-v1",
      "/ip6/::/udp/4001/quic-v1/webtransport"
    ]
  },
  "AutoNAT": {},
  "Bootstrap": [
    "/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN",
    "/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa",
    "/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb",
    "/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt",
    "/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ",
    "/ip4/104.131.131.82/udp/4001/quic/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ"
  ],
  "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": false
    }
  },
  "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": "12D3KooWJTTkV2isnMPneGqnhNghPrCgZDsYHGpd7d2ZKLqoWb8p"
  },
  "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": {},
  "Routing": {
    "Methods": null,
    "Routers": null
  },
  "Swarm": {
    "AddrFilters": null,
    "ConnMgr": {},
    "DisableBandwidthMetrics": false,
    "DisableNatPortMap": false,
    "RelayClient": {},
    "RelayService": {},
    "ResourceMgr": {},
    "Transports": {
      "Multiplexers": {},
      "Network": {},
      "Security": {}
    }
  }
}

Description

Various times per day, the ipfs daemon quits with the following error message, on both of my Windows Servers (one 2019, the other 2022):

ipfs : panic: expected chan in accept muxer
At line:1 char:1

  • ipfs daemon
  •   + CategoryInfo          : NotSpecified: (panic: expected chan in accept muxer:String) [], RemoteException
      + FullyQualifiedErrorId : NativeCommandError
    
    

goroutine 326 [running]:
github.com/libp2p/go-libp2p/p2p/transport/quic.(*acceptLoopRunner).RmAcceptForVersion(0xc002d49a58, 0x7691e50?)
github.com/libp2p/go-libp2p@v0.24.2/p2p/transport/quic/virtuallistener.go:72 +0x14a
github.com/libp2p/go-libp2p/p2p/transport/quic.(*virtualListener).Close(0xc000598440)
github.com/libp2p/go-libp2p@v0.24.2/p2p/transport/quic/virtuallistener.go:32 +0x28
github.com/libp2p/go-libp2p/p2p/net/swarm.(*Swarm).AddListenAddr.func2.1()
github.com/libp2p/go-libp2p@v0.24.2/p2p/net/swarm/swarm_listen.go:117 +0x14e
github.com/libp2p/go-libp2p/p2p/net/swarm.(*Swarm).AddListenAddr.func2()
github.com/libp2p/go-libp2p@v0.24.2/p2p/net/swarm/swarm_listen.go:130 +0x3a4
created by github.com/libp2p/go-libp2p/p2p/net/swarm.(*Swarm).AddListenAddr
github.com/libp2p/go-libp2p@v0.24.2/p2p/net/swarm/swarm_listen.go:106 +0x271

@RadioSteve-dev RadioSteve-dev added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Mar 3, 2023
@Radderz81
Copy link

I'm getting this too, on a daemon running in a windows shell. Similar error, except for the start. Note that this started after updating to the latest version. Performing a clean installs with fresh repo (rather than upgraded) is still presenting the below error. I also have ipfs-desktop runing on another machine with inbuilt daemon, which has also started to fail multiple times a day.

panic: expected chan in accept muxer

goroutine 358 [running]:
github.com/libp2p/go-libp2p/p2p/transport/quic.(*acceptLoopRunner).RmAcceptForVersion(0xc002022108, 0x7d37e50?)
github.com/libp2p/go-libp2p@v0.24.2/p2p/transport/quic/virtuallistener.go:72 +0x14a
github.com/libp2p/go-libp2p/p2p/transport/quic.(*virtualListener).Close(0xc00201e080)
github.com/libp2p/go-libp2p@v0.24.2/p2p/transport/quic/virtuallistener.go:32 +0x28
github.com/libp2p/go-libp2p/p2p/net/swarm.(*Swarm).AddListenAddr.func2.1()
github.com/libp2p/go-libp2p@v0.24.2/p2p/net/swarm/swarm_listen.go:117 +0x14e
github.com/libp2p/go-libp2p/p2p/net/swarm.(*Swarm).AddListenAddr.func2()
github.com/libp2p/go-libp2p@v0.24.2/p2p/net/swarm/swarm_listen.go:130 +0x3a4
created by github.com/libp2p/go-libp2p/p2p/net/swarm.(*Swarm).AddListenAddr
github.com/libp2p/go-libp2p@v0.24.2/p2p/net/swarm/swarm_listen.go:106 +0x271

@susarlanikhilesh
Copy link
Contributor

From the above stack trace, tried to dig into the code.
What I understood is it is trying to remove the entry from the map, but it was not added in the map.

So, adding into the map is coming from Listen() which listens to new QUIC connections on the passed multiaddr.

@EurekaChen
Copy link

me too

@hsjgit
Copy link

hsjgit commented Apr 4, 2023

俺也一样

@xcatpc
Copy link

xcatpc commented Apr 7, 2023

I got the same error on windows.:

panic: expected chan in accept muxer

goroutine 467 [running]:
github.com/libp2p/go-libp2p/p2p/transport/quic.(*acceptLoopRunner).RmAcceptForVersion(0xc0027815a8, 0x162fdd0?)
github.com/libp2p/go-libp2p@v0.26.3/p2p/transport/quic/virtuallistener.go:73 +0x14a
github.com/libp2p/go-libp2p/p2p/transport/quic.(*virtualListener).Close(0xc000c96940)
github.com/libp2p/go-libp2p@v0.26.3/p2p/transport/quic/virtuallistener.go:33 +0x28
github.com/libp2p/go-libp2p/p2p/net/swarm.(*Swarm).AddListenAddr.func2.1()
github.com/libp2p/go-libp2p@v0.26.3/p2p/net/swarm/swarm_listen.go:117 +0x14e
github.com/libp2p/go-libp2p/p2p/net/swarm.(*Swarm).AddListenAddr.func2()
github.com/libp2p/go-libp2p@v0.26.3/p2p/net/swarm/swarm_listen.go:130 +0x49c
created by github.com/libp2p/go-libp2p/p2p/net/swarm.(*Swarm).AddListenAddr
github.com/libp2p/go-libp2p@v0.26.3/p2p/net/swarm/swarm_listen.go:106 +0x271
panic: expected chan in accept muxer

goroutine 468 [running]:
github.com/libp2p/go-libp2p/p2p/transport/quic.(*acceptLoopRunner).RmAcceptForVersion(0xc0027815a8, 0x1631dd0?)
github.com/libp2p/go-libp2p@v0.26.3/p2p/transport/quic/virtuallistener.go:73 +0x14a
github.com/libp2p/go-libp2p/p2p/transport/quic.(*virtualListener).Close(0xc000c969c0)
github.com/libp2p/go-libp2p@v0.26.3/p2p/transport/quic/virtuallistener.go:33 +0x28
github.com/libp2p/go-libp2p/p2p/net/swarm.(*Swarm).AddListenAddr.func2.1()
github.com/libp2p/go-libp2p@v0.26.3/p2p/net/swarm/swarm_listen.go:117 +0x14e
github.com/libp2p/go-libp2p/p2p/net/swarm.(*Swarm).AddListenAddr.func2()
github.com/libp2p/go-libp2p@v0.26.3/p2p/net/swarm/swarm_listen.go:130 +0x49c
created by github.com/libp2p/go-libp2p/p2p/net/swarm.(*Swarm).AddListenAddr
github.com/libp2p/go-libp2p@v0.26.3/p2p/net/swarm/swarm_listen.go:106 +0x271

@valen320
Copy link

valen320 commented Apr 12, 2023

Same for me,

Kubo version: 0.19.0
Repo version: 13
System version: amd64/windows
Golang version: go1.19.1

"Could not connect to the IPFS API" message appears after some time of IPFS work in Status window of IPFS Desktop. This time is quite random, and can be from 10 min to several hours. If to restart then with the right-click button on tray icon, or with the "ipfs daemon" command in Windows PowerShell, everything works again. But the after a while again stops.

The log in Powershell gives the following before I get the "panic" line (each 1 minute these 7 warnings coming up, I don't know if this important):
2023/04/12 13:21:04 [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied.
2023/04/12 13:21:04 [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied.
2023/04/12 13:21:04 [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied.
2023/04/12 13:21:04 [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied.
2023/04/12 13:21:04 [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied.
2023/04/12 13:21:04 [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied.
2023/04/12 13:21:04 [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied.
2023/04/12 13:22:04 [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied.
2023/04/12 13:22:04 [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied.
2023/04/12 13:22:04 [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied.
2023/04/12 13:22:04 [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied.
2023/04/12 13:22:04 [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied.
2023/04/12 13:22:04 [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied.
2023/04/12 13:22:04 [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied.
2023/04/12 13:23:04 [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied.
2023/04/12 13:23:04 [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied.
2023/04/12 13:23:04 [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied.
2023/04/12 13:23:04 [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied.
2023/04/12 13:23:04 [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied.
2023/04/12 13:23:04 [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied.
2023/04/12 13:23:04 [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied.
panic: expected chan in accept muxer

goroutine 395 [running]:
github.com/libp2p/go-libp2p/p2p/transport/quic.(*acceptLoopRunner).RmAcceptForVersion(0xc00200b080, 0xbccfdd0?)
github.com/libp2p/go-libp2p@v0.26.3/p2p/transport/quic/virtuallistener.go:73 +0x14a
github.com/libp2p/go-libp2p/p2p/transport/quic.(*virtualListener).Close(0xc001a76d00)
github.com/libp2p/go-libp2p@v0.26.3/p2p/transport/quic/virtuallistener.go:33 +0x28
github.com/libp2p/go-libp2p/p2p/net/swarm.(*Swarm).AddListenAddr.func2.1()
github.com/libp2p/go-libp2p@v0.26.3/p2p/net/swarm/swarm_listen.go:117 +0x14e
github.com/libp2p/go-libp2p/p2p/net/swarm.(*Swarm).AddListenAddr.func2()
github.com/libp2p/go-libp2p@v0.26.3/p2p/net/swarm/swarm_listen.go:130 +0x49c
created by github.com/libp2p/go-libp2p/p2p/net/swarm.(*Swarm).AddListenAddr
github.com/libp2p/go-libp2p@v0.26.3/p2p/net/swarm/swarm_listen.go:106 +0x271

@hsn10
Copy link

hsn10 commented Apr 16, 2023

Same problem on 0.19.1

panic: expected chan in accept muxer

goroutine 314 [running]:
github.com/libp2p/go-libp2p/p2p/transport/quic.(*acceptLoopRunner).RmAcceptForVersion(0xc0020009a8, 0x3103dd0?)
        github.com/libp2p/go-libp2p@v0.26.4/p2p/transport/quic/virtuallistener.go:73 +0x14a
github.com/libp2p/go-libp2p/p2p/transport/quic.(*virtualListener).Close(0xc001df7040)
        github.com/libp2p/go-libp2p@v0.26.4/p2p/transport/quic/virtuallistener.go:33 +0x28
github.com/libp2p/go-libp2p/p2p/net/swarm.(*Swarm).AddListenAddr.func2.1()
        github.com/libp2p/go-libp2p@v0.26.4/p2p/net/swarm/swarm_listen.go:117 +0x14e
github.com/libp2p/go-libp2p/p2p/net/swarm.(*Swarm).AddListenAddr.func2()
        github.com/libp2p/go-libp2p@v0.26.4/p2p/net/swarm/swarm_listen.go:130 +0x49c
created by github.com/libp2p/go-libp2p/p2p/net/swarm.(*Swarm).AddListenAddr
        github.com/libp2p/go-libp2p@v0.26.4/p2p/net/swarm/swarm_listen.go:106 +0x271

@valen320
Copy link

Installation of Windows Subsystem for Linux (WSL) solved this issue ipfs/ipfs-desktop#2463 (working several hours for now and not quitting). Also, no [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied. message shown as well

@EurekaChen
Copy link

Installation of Windows Subsystem for Linux (WSL) solved this issue ipfs/ipfs-desktop#2463 (working several hours for now and not quitting). Also, no [WARN] mdns: Failed to set multicast interface: setsockopt: An invalid argument was supplied. message shown as well

I have intall WSL and get error after several hours:
ERROR basichost basic/basic_host.go:349 failed to resolve local interface addresses {"error": "route ip+net: netlinkrib: function not implemented"}

@aschmahmann
Copy link
Contributor

The issue for this in go-libp2p is libp2p/go-libp2p#2259, once there's a fix + release there it'll get updated in kubo.

@MarcoPolo
Copy link
Contributor

We'll try to cut a patch release with this fix today

@valen320
Copy link

valen320 commented May 11, 2023

I have intall WSL and get error after several hours: ERROR basichost basic/basic_host.go:349 failed to resolve local interface addresses {"error": "route ip+net: netlinkrib: function not implemented"}

Actually, I also have similar message each 3-9 hours. But it seem not to influence the IPFS work.
ERROR autorelay autorelay/autorelay.go:84 failed to start relay finder {"error": "relayFinder already running"}

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) need/triage Needs initial labeling and prioritization
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

10 participants