Git Product home page Git Product logo

Comments (14)

penberg avatar penberg commented on September 25, 2024

@sjwhitworth I think at least MAP_32BIT is only supported on Linux/x86-64 so that looks like a go-mmap project problem. It assumes that all the mmap flags are supported on all architectures on Linux.

from golearn.

Sentimentron avatar Sentimentron commented on September 25, 2024

I quite want to remove the go-mmap dependency and do the mapping ourselves, because I don't think go-mmap even has mremap support yet. Unfortunately I only have x86-64 to test against.

from golearn.

sjwhitworth avatar sjwhitworth commented on September 25, 2024

Do you think that we should revert?

from golearn.

Sentimentron avatar Sentimentron commented on September 25, 2024

Problem is, the new instances storage format relies on edf/, and EDF relies on mmap. I think maybe the best thing to do is to fork the mmap dependency, fix the problem with an mmap_linux_arm.go file which doesn't rely on those flags, change the import path to that temporarily and send a pull to the original author.

from golearn.

Sentimentron avatar Sentimentron commented on September 25, 2024

OK, if you change the mmap import at the the top of base/edf/map.go to github.com/Sentimentron/go-mmap, does it work?

from golearn.

sjwhitworth avatar sjwhitworth commented on September 25, 2024

Unfortunately not. :(

# github.com/Sentimentron/go-mmap
../../../Sentimentron/go-mmap/mmap_linux_arm.go:8: MAP_ANONYMOUS redeclared in this block
    previous declaration at ../../../Sentimentron/go-mmap/mmap_linux.go:9
../../../Sentimentron/go-mmap/mmap_linux_arm.go:9: MAP_DENYWRITE redeclared in this block
    previous declaration at ../../../Sentimentron/go-mmap/mmap_linux.go:10
../../../Sentimentron/go-mmap/mmap_linux_arm.go:10: MAP_NORESERVE redeclared in this block
    previous declaration at ../../../Sentimentron/go-mmap/mmap_linux.go:11
../../../Sentimentron/go-mmap/mmap_linux_arm.go:11: MAP_GROWSDOWN redeclared in this block
    previous declaration at ../../../Sentimentron/go-mmap/mmap_linux.go:12
../../../Sentimentron/go-mmap/mmap_linux_arm.go:12: MAP_EXECUTABLE redeclared in this block
    previous declaration at ../../../Sentimentron/go-mmap/mmap_linux.go:13
../../../Sentimentron/go-mmap/mmap_linux_arm.go:13: MAP_LOCKED redeclared in this block
    previous declaration at ../../../Sentimentron/go-mmap/mmap_linux.go:14
../../../Sentimentron/go-mmap/mmap_linux_arm.go:14: MAP_NONBLOCK redeclared in this block
    previous declaration at ../../../Sentimentron/go-mmap/mmap_linux.go:15
../../../Sentimentron/go-mmap/mmap_linux_arm.go:15: MAP_POPULATE redeclared in this block
    previous declaration at ../../../Sentimentron/go-mmap/mmap_linux.go:16
../../../Sentimentron/go-mmap/mmap_linux_arm.go:16: MAP_UNINITIALIZED redeclared in this block
    previous declaration at ../../../Sentimentron/go-mmap/mmap_linux.go:19
../../../Sentimentron/go-mmap/mmap_linux_arm.go:20: MADV_REMOVE redeclared in this block
    previous declaration at ../../../Sentimentron/go-mmap/mmap_linux.go:23
../../../Sentimentron/go-mmap/mmap_linux_arm.go:20: too many errors

from golearn.

Sentimentron avatar Sentimentron commented on September 25, 2024

OK, so renamed the existing linux one to linux_amd64.go, hopefully that will avoid some errors.

from golearn.

sjwhitworth avatar sjwhitworth commented on September 25, 2024

All good in the hood. I'll make the changes and send a PR.

from golearn.

Sentimentron avatar Sentimentron commented on September 25, 2024

Alrighty, I'll need to test it on my Linux box.

from golearn.

Sentimentron avatar Sentimentron commented on September 25, 2024

OK, nothing's obviously wrong. Now I just need to find an x86 box to test on...

from golearn.

Sentimentron avatar Sentimentron commented on September 25, 2024

Wait a second, Travis isn't happy...

from golearn.

Sentimentron avatar Sentimentron commented on September 25, 2024

Yet it passed the previous README.md commit. Weird...

from golearn.

penberg avatar penberg commented on September 25, 2024

@Sentimentron It's saying that the unmap part failed on Go 1.2...

Failures:
  * /home/travis/gopath/src/github.com/sjwhitworth/golearn/base/edf/map_test.go 
  Line 47:
  Expected: '<nil>'
  Actual:   'invalid argument'
  (Should be equal)

Full log here:

https://travis-ci.org/sjwhitworth/golearn/jobs/32179498

I am not sure how unmap can fail there. Perhaps we're unmapping the same mapping twice?

from golearn.

Sentimentron avatar Sentimentron commented on September 25, 2024

I'm not precisely sure what's going on, but removing an extraneous Sync seems to get it passing on my machine.

from golearn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.