Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Daemon dies with segfaults and Bus error: 10 (also unequal MACs earlier) #878

Closed
JohnAllen opened this issue Jun 10, 2017 · 6 comments
Closed
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@JohnAllen
Copy link

JohnAllen commented Jun 10, 2017

I got the above errors when running jsipfs add -r . (add single file works). Prior seemingly all jsipfs command responded with nothing or worked improperly.

I'll try to help if possible.

  • MacOS: 10.12.4
  • "_id": "ipfs@0.24.1"
  • Node v6.10.1
  • npm 3.10.0

Let me know how I can help fix this!

The directory is somewhat large, MBs. It's a large js repo. I tried . and cd ..; jsipfs add -r dirName with same behavior.

@JohnAllen
Copy link
Author

Ok a small dir of three empty .txt files works. Is it possible to serve a large JS bundle? Shouldn't I be able to do this from command line? Appreciate the help.

@daviddias daviddias added the kind/bug A bug in existing code (including security flaws) label Jun 10, 2017
@daviddias
Copy link
Member

daviddias commented Jun 10, 2017

Hi @JohnAllen, thanks for reporting this bug!

I believe I know what is the bug, it is not related with adding files but with using WebRTC. I've been noticing that the WRTC module is now more unstable (than ever) and since we added WebRTC as a default transport in Node.js (and browser), it is crashing the jsipfs daemon.

I believe I will disable WebRTC as default in Node.js in the next version, although it makes me incredibly sad as I wanted the users to be able to use it out of the box.

wrtc: https://www.npmjs.com/package/wrtc

The simple solution for your issue is to remove the libp2p-webrtc-star multiaddr from your config file.

@JohnAllen
Copy link
Author

Thanks for the help solving this! Can I ask what are the benefits of use WRTC over other alternatives? Are there not other real-time communications transports? Just curious and want to learn more.

@JohnAllen
Copy link
Author

I can report that this does prevent the daemon from crashing but it seems the files are not added to IPFS (but can confirm adding on smaller directories does work). I will look for some more JS bundle app examples. Perhaps we can build our app in a way that is more suitable to JS-IPFS

@daviddias
Copy link
Member

WRTC is the WebRTC implementation available for Node.js, we use multiple transports in IPFS to support it working in different environments (i.e desktop, browser, etc)

when you are adding large directories, does the process end or does it get stale? It might be the case that it is still adding, js-ipfs currently doesn't have progress bar support. If you would like to take a stab at it, see: ipfs-inactive/js-ipfs-unixfs-engine#123

@JohnAllen
Copy link
Author

JohnAllen commented Jun 10, 2017 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

No branches or pull requests

2 participants