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

Could not build arguments for function "reflect".makeFuncStub #6467

Closed
NatoBoram opened this issue Jun 25, 2019 · 7 comments · Fixed by #6480
Closed

Could not build arguments for function "reflect".makeFuncStub #6467

NatoBoram opened this issue Jun 25, 2019 · 7 comments · Fixed by #6480
Assignees
Labels
kind/bug A bug in existing code (including security flaws) P1 High: Likely tackled by core team if no one steps up
Milestone

Comments

@NatoBoram
Copy link
Contributor

Version information:

OS: Windows 10 Pro Insider Preview x86_64
Resolution: 1920x1080
DE: Aero
WM: Explorer
CPU: Intel i5-3570K (4) @ 3.468GHz
GPU: NVIDIA GeForce GTX 660 Ti
Memory: 8135MiB
go-ipfs version: 0.4.22-dev-
Repo version: 7
System version: amd64/windows
Golang version: go1.12.6

Description:

When running ipfs daemon, I get the following error :

Initializing daemon...
go-ipfs version: 0.4.22-dev-
Repo version: 7
System version: amd64/windows
Golang version: go1.12.6
23:18:09.434 ERROR cmd/ipfs: error from node construction: could not build arguments for function "reflect".makeFuncStub (C:/ProgramData/scoop/apps/go/current/src/reflect/asm_amd64.s:12): failed to build provider.System: could not build arguments for function "github.com/ipfs/go-ipfs/core/node".SimpleProviderSys.func1 (C:/Users/natob/Go/src/github.com/ipfs/go-ipfs/core/node/provider.go:40): failed to build provider.Provider: could not build arguments for function "github.com/ipfs/go-ipfs/core/node".SimpleProvider (C:/Users/natob/Go/src/github.com/ipfs/go-ipfs/core/node/provider.go:27): failed to build *queue.Queue: function "github.com/ipfs/go-ipfs/core/node".ProviderQueue (C:/Users/natob/Go/src/github.com/ipfs/go-ipfs/core/node/provider.go:22) returned a non-nil error: strconv.ParseUint: parsing "": invalid syntax daemon.go:337

Error: could not build arguments for function "reflect".makeFuncStub (C:/ProgramData/scoop/apps/go/current/src/reflect/asm_amd64.s:12): failed to build provider.System: could not build arguments for function "github.com/ipfs/go-ipfs/core/node".SimpleProviderSys.func1 (C:/Users/natob/Go/src/github.com/ipfs/go-ipfs/core/node/provider.go:40): failed to build provider.Provider: could not build arguments for function "github.com/ipfs/go-ipfs/core/node".SimpleProvider (C:/Users/natob/Go/src/github.com/ipfs/go-ipfs/core/node/provider.go:27): failed to build *queue.Queue: function "github.com/ipfs/go-ipfs/core/node".ProviderQueue (C:/Users/natob/Go/src/github.com/ipfs/go-ipfs/core/node/provider.go:22) returned a non-nil error: strconv.ParseUint: parsing "": invalid syntax

I have no idea what caused it to do that. I was running the node from IPFS Desktop, when suddenly, I noticed IPFS wasn't running and that it had errored. I tried to manually run ipfs daemon, but then I got those errors. I hope I won't have to delete my storage, I have some important stuff in there for once...

@Stebalien Stebalien added the kind/bug A bug in existing code (including security flaws) label Jun 27, 2019
@Stebalien
Copy link
Member

This is recoverable but I'm not sure how it got in this state. cc @michaelavila?

@Stebalien Stebalien added the P1 High: Likely tackled by core team if no one steps up label Jun 28, 2019
@Stebalien Stebalien added this to the v0.4.22 milestone Jun 28, 2019
@michaelavila
Copy link
Contributor

@NatoBoram very sorry to hear this! The data in your node is not at risk.

I believe the line that is erroring is this one:

https://github.com/ipfs/go-ipfs/blob/master/provider/queue/queue.go#L206

From my reading of the surrounding code, it looks like your datastore has a value associated with the key "/provider-v1/queue/", but you should only have keys of the form "/provider-v1/queue/0", "/provider-v1/queue/1", "/provider-v1/queue/2", ... etc.

I'm not sure yet how that could have happened, but I'd like to verify it. Are you able to update the go-ipfs source code and run it?

@michaelavila
Copy link
Contributor

@Stebalien I'm going to move forward with a modified version of #6260 as a fix, by not running these queries as part of node construction. Also, I think we can avoid a data migration since the actual key format could remain the same. Anything that currently exists in the queue will just be worked through first, since those keys will be read as very low nanosecond counts.

@Stebalien
Copy link
Member

SGTM. But I'm still confused how this happened. I've looked through the code and it looks like this should be impossible.

@michaelavila
Copy link
Contributor

@Stebalien I'm unsure as well. I've implemented what should be a fix in #6480. Can you take a look?

@michaelavila
Copy link
Contributor

@NatoBoram are you able to run the latest ipfs master branch? If so, can you try it and let me know if this resolves the issue you're seeing. Thanks!

If you're unable to run the latest ipfs master branch, then I think we'll need to wait for the next release.

@NatoBoram
Copy link
Contributor Author

NatoBoram commented Jul 4, 2019

It works!

$ ipfs daemon
Initializing daemon...
go-ipfs version: 0.4.22-dev-
Repo version: 7
System version: amd64/windows
Golang version: go1.12.6
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/192.168.1.2/tcp/4001
Swarm listening on /ip6/2001:0:2877:7aa:2808:3f54:78e8:3cba/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
Swarm listening on /ip6/fd16:8b3a:8f57:0:b900:2e7:64a8:4ccd/tcp/4001
Swarm listening on /ip6/fd16:8b3a:8f57:0:c0bf:7ba7:a474:f0ce/tcp/4001
Swarm listening on /ip6/fd16:8b3a:8f57::2/tcp/4001
Swarm listening on /p2p-circuit
Swarm announcing /ip4/127.0.0.1/tcp/4001
Swarm announcing /ip4/192.168.1.2/tcp/4001
Swarm announcing /ip6/2001:0:2877:7aa:2808:3f54:78e8:3cba/tcp/4001
Swarm announcing /ip6/::1/tcp/4001
Swarm announcing /ip6/fd16:8b3a:8f57:0:b900:2e7:64a8:4ccd/tcp/4001
Swarm announcing /ip6/fd16:8b3a:8f57:0:c0bf:7ba7:a474:f0ce/tcp/4001
Swarm announcing /ip6/fd16:8b3a:8f57::2/tcp/4001
API server listening on /ip4/127.0.0.1/tcp/5001
WebUI: http://127.0.0.1:5001/webui
Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080
Daemon is ready

But there's a new problem with the ipfs add command. Once it finishes, it doesn't exit. The final hash is outputted, the progress is at 100%, but the program doesn't exit.

Also, I don't see any of my files in the Files tab.

$ ipfs files stat /
QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn
Size: 0
CumulativeSize: 4
ChildBlocks: 0
Type: directory

I also got this while adding some files.

$ ipfs add -wrt --chunker=rabin .
Error: failed to get block for QmQM2fuBkpPX1MpLxfXdjziW2ipJ595Ut1Q4edYH5ZUUzu: Invalid value pointer offset: 56458515 greater than current offset: 971995

$ ipfs pin add QmReaybbrKbq23Hdfs89BzPiwCdkFDYp3ftQhYtewyHzbW --progress
Error: pin: failed to get block for QmReaybbrKbq23Hdfs89BzPiwCdkFDYp3ftQhYtewyHzbW: Invalid value pointer offset: 293675638 greater than current offset: 1130075

It seems like files included in the hash QmReaybbrKbq23Hdfs89BzPiwCdkFDYp3ftQhYtewyHzbW are causing this error. I can't even ipfs add them. I'm on commit 70e499a.

Adding files to ipfs files then restarting the daemon deletes everything.

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) P1 High: Likely tackled by core team if no one steps up
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants