automerge / hypermerge

Build p2p collaborative applications without any server infrastructure in Node.js
MIT License
1.28k stars 66 forks source link

Bus error on BeagleBone Black #27

Closed jwverzijden closed 4 years ago

jwverzijden commented 5 years ago

Hi, I tried to use this module on a network of beaglebone blacks but it appears that even my simplest tests are not going to work due to a "Bus error". My test code can be found in this gist, also added a strace of what happened. the expected output:

$ node simple-hypermerge-test.js
>   start
>>  change { numbers: [] }
>   started
>>  state: { numbers: [] }
>   done
$

the output I get on any beaglebone I have tried on is as follows:

$ node simple-hypermerge-test.js
>   start
>>  starting
Bus error
$ 

the strace shows on the last lines that something tried to mmap a region of memory which then failed due to incorrect alignment.

The Beaglebone Black has a 1GHz ARM processor with 500MB RAM. The same code on my laptop (2.8GHz Intel 4 core+hyperthreading and 16GB RAM) doesn't seem to have any problems with this piece of code at all.

I'm pretty sure it can't be something in my code but on the other hand I'm not sure how to properly figure out what caused this...

pvh commented 5 years ago

Well, that's cool! I've never seen an error like that with hypermerge. I might guess it's a compilation issue in a binary dependency like utp-native or libsodium. One way to isolate that would be to see if the dat CLI tool works. That has most of the same dependencies and if it hits the same error message would help to zero in. You could also see if you can run the tests for utp-native or (further up the stack) discovery-swarm.