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 cannot write to datastore #4710

Closed
Falsen opened this issue Feb 15, 2018 · 9 comments
Closed

IPFS cannot write to datastore #4710

Falsen opened this issue Feb 15, 2018 · 9 comments
Labels
need/author-input Needs input from the original author

Comments

@Falsen
Copy link

Falsen commented Feb 15, 2018

Version information:

go-ipfs version: 0.4.14-dev-28acec2ad
Repo version: 6
System version: amd64/windows
Golang version: go1.9.4

Type: Bug

Description:

I just built ipfs from github without doing any changes. When I started the daemon it began displaying tons of errors:

←[0;37m22:24:18.598 ←[31mERROR ←[0;34m bitswap: ←[0mError writing block to dat
astore: Åtkomst nekad. ←[0;37mbitswap.go:317←[0m
←[0;37m22:24:34.839 ←[31mERROR ←[0;34m bitswap: ←[0mError writing block to dat
astore: Åtkomst nekad. ←[0;37mbitswap.go:317←[0m
←[0;37m22:24:35.006 ←[31mERROR ←[0;34m bitswap: ←[0mError writing block to dat
astore: Åtkomst nekad. ←[0;37mbitswap.go:317←[0m
←[0;37m22:24:42.264 ←[31mERROR ←[0;34m bitswap: ←[0mError writing block to dat
astore: Åtkomst nekad. ←[0;37mbitswap.go:317←[0m
←[0;37m22:24:42.264 ←[31mERROR ←[0;34m bitswap: ←[0mError writing block to dat
astore: Åtkomst nekad. ←[0;37mbitswap.go:317←[0m
←[0;37m22:24:42.276 ←[31mERROR ←[0;34m bitswap: ←[0mError writing block to dat
astore: Åtkomst nekad. ←[0;37mbitswap.go:317←[0m
←[0;37m22:24:42.277 ←[31mERROR ←[0;34m bitswap: ←[0mError writing block to dat
astore: Åtkomst nekad. ←[0;37mbitswap.go:317←[0m
←[0;37m22:24:54.613 ←[31mERROR ←[0;34m cmds/http: ←[0munrecognized node type ←[0
;37mresponseemitter.go:140←[0m
←[0;37m22:25:09.846 ←[31mERROR ←[0;34m cmds/http: ←[0munrecognized node type ←[0
;37mresponseemitter.go:140←[0m
←[0;37m22:25:25.563 ←[31mERROR ←[0;34m bitswap: ←[0mError writing block to dat
astore: Åtkomst nekad. ←[0;37mbitswap.go:317←[0m
←[0;37m22:25:28.937 ←[31mERROR ←[0;34m bitswap: ←[0mError writing block to dat
astore: Åtkomst nekad. ←[0;37mbitswap.go:317←[0m
←[0;37m22:25:28.938 ←[31mERROR ←[0;34m bitswap: ←[0mError writing block to dat
astore: Åtkomst nekad. ←[0;37mbitswap.go:317←[0m
←[0;37m22:25:30.203 ←[31mERROR ←[0;34m bitswap: ←[0mError writing block to dat
astore: Åtkomst nekad. ←[0;37mbitswap.go:317←[0m
←[0;37m22:25:31.770 ←[31mERROR ←[0;34m bitswap: ←[0mError writing block to dat
astore: Åtkomst nekad. ←[0;37mbitswap.go:317←[0m
←[0;37m22:26:33.297 ←[31mERROR ←[0;34m bitswap: ←[0mError writing block to dat
astore: Åtkomst nekad. ←[0;37mbitswap.go:317←[0m
←[0;37m22:26:33.297 ←[31mERROR ←[0;34m bitswap: ←[0mError writing block to dat
astore: Åtkomst nekad. ←[0;37mbitswap.go:317←[0m
←[0;37m22:26:33.809 ←[31mERROR ←[0;34m bitswap: ←[0mError writing block to dat
astore: Åtkomst nekad. ←[0;37mbitswap.go:317←[0m

The error looks very much like the errors #3971 & #4528.

However, when I checked my C:\ path (the location from where I ran the deamon) a bunch of random files had been generated

The contents of the files varied, but all of them contained a bunch of random characters and then some JSON. The json data were lists with coordinates, geonames and countries, which I suppose is from the webui...?

I tried running the daemon as an administrator, on another disc, etc... without any difference. However ipfs add, worked just fine. I also tried downloading the exe from ipfs.io and running it and got the same results (version 0.4.13).

@whyrusleeping
Copy link
Member

@Stebalien its our favorite Heisenbug again

@whyrusleeping
Copy link
Member

@Falsen A few questions:

  • which version of windows?
  • What was your IPFS_PATH set to? (if anything)
  • Did you pass any special parameters to ipfs init or ipfs daemon?

@Falsen
Copy link
Author

Falsen commented Feb 15, 2018

OS: Windows 8
Initially I hadn't set the IPFS_PATH, but I also tried setting it to my external disk as D:\ipfs
No I didn't pass any parameters to any of the commands.

@magik6k
Copy link
Member

magik6k commented Feb 16, 2018

There was similar thing happening in #4527 which doesn't look like it was really fixed / investigated properly.

Random thought: if this is reproducible, can you try initializing new repo, disabling MDNS (set Discovery.MDNS.Enabled to false in config) and seeing if this happens again?

@Falsen
Copy link
Author

Falsen commented Feb 17, 2018

@magik6k I just tried it, with the same results. Do you have any clue about the bug? I'm pretty sure I installed ipfs one or two years ago without any problems... I compared the files with #4527 and they seem to contain the same data.
{"type":"Node","mins":[1340388608,1340777728,1341104640,1341528320,1341967360,1342331904,1342806016,1344057088,1344508416,1345869312,1346396807,1347295937,1348380160,1348958464,1349866496,1350194184,1350742016,1351072256,1351412480,1351807232,1353096448,1353624064,1354184064,1354835712,1355322624,1356145408,1356522240,1357072640,1358107392,1359085568,1360231168,1361149184]}

Maybe it tells you something about it's source? However I'm not able to replicate the bug now, the permission issue is still there thought.

@leerspace
Copy link
Contributor

leerspace commented Feb 20, 2018

Re: error writing block to datastore on windows, this sounds like the issue documented in #3971.

TL;DR: At least one of the problems is the Windows Indexer. Another might be related to Windows Defender interfering with files in the datastore. But that doesn't seem to account for all of why this issue happens on Windows. This of course assumes that there's not a permission issue or something like that.

edit: sorry, I just realized that you already acknowledged in your first post that this issue you created looks related to existing issue #3971. Have you tried any of the suggested mitigation steps?

@leerspace
Copy link
Contributor

I wasn't able to get any procmon for #4527 before the OP closed it, but if you're able to get a procmon capture of this issue happening (maybe filtered to the ipfs process) it would be interesting to me to see what the process is doing before and while it's writing to these weird files.

FYI I just spent a little chunk of time trying to reproduce this on a Windows 10 computer without success - trying various IPFS_PATH configurations and ipfs.exe executable locations.

@ivan386
Copy link
Contributor

ivan386 commented Feb 20, 2018

@Falsen
Write in console: chcp
What number is in result?

@kevina kevina mentioned this issue Mar 8, 2018
9 tasks
@magik6k magik6k added the need/author-input Needs input from the original author label May 14, 2019
@magik6k
Copy link
Member

magik6k commented May 14, 2019

Closing due to inactivity, feel free to reopen

@magik6k magik6k closed this as completed May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/author-input Needs input from the original author
Projects
None yet
Development

No branches or pull requests

5 participants