Giter VIP home page Giter VIP logo

Comments (7)

aphyr avatar aphyr commented on August 11, 2024

I'm not sure! I'm assuming you're running maelstrom itself as johndoe. Is it possible that 1_echo isn't executable? What happens when you try to run 1_echo by itself?

from maelstrom.

matthiasr avatar matthiasr commented on August 11, 2024

What is the output of ls -la /home/johndoe/path/to/fly-dist-sys/1_echo?

I am also intrigued by the (in directory /tmp) message. Could it be that your /tmp is mounted with the noexec option, and something about your setup means the actual executable is somewhere in /tmp?

from maelstrom.

philippgille avatar philippgille commented on August 11, 2024

I'm assuming you're running maelstrom itself as johndoe

Yes exactly.

Is it possible that 1_echo isn't executable?

I compiled the code with go build, which results in an executable file:

$ ll ~/path/to/fly-dist-sys/1_echo/
total 2408
-rwxr-xr-x. 1 johndoe johndoe 2450246 Feb 25 14:55 1_echo
-rw-r--r--. 1 johndoe johndoe     143 Feb 25 14:35 go.mod
-rw-r--r--. 1 johndoe johndoe     251 Feb 25 14:35 go.sum
-rw-r--r--. 1 johndoe johndoe     586 Feb 25 14:34 main.go

What happens when you try to run 1_echo by itself?

It starts to run and (I assume) waits for the echo message. Here I'm waiting a bit and then entering "foo" followed by Enter:

$ ./1_echo 
foo
2023/02/27 20:09:54 unmarshal message: invalid character 'o' in literal false (expecting 'a')

What is the output of ls -la /home/johndoe/path/to/fly-dist-sys/1_echo?

$ ls -la ~/path/to/fly-dist-sys/1_echo/1_echo 
-rwxr-xr-x. 1 johndoe johndoe 2450246 Feb 27 20:08 /home/johndoe/path/to/fly-dist-sys/1_echo/1_echo

I am also intrigued by the (in directory /tmp) message. Could it be that your /tmp is mounted with the noexec option, and something about your setup means the actual executable is somewhere in /tmp?

I was wondering about the /tmp as well. I assumed that maybe maelstrom moves files around before executing them. From my side the code is in my regular home directory, and the executable (compiled with go build) as well.


Additional info:

  • I'm using maelstrom 0.2.2 as advised here.
  • Java version is OpenJDK 17:
$ java --version
openjdk 17.0.6 2023-01-17
OpenJDK Runtime Environment (Red_Hat-17.0.6.0.10-1.fc36) (build 17.0.6+10)
OpenJDK 64-Bit Server VM (Red_Hat-17.0.6.0.10-1.fc36) (build 17.0.6+10, mixed mode, sharing)

from maelstrom.

philippgille avatar philippgille commented on August 11, 2024

OK sorry guys, found the issue: me 🙈

After seeing #37 and it being a mistake of what's executable and what not, I questioned if I ran everything correctly.

From my first ⬆️ post:

I'm running maelstrom like this: ./maelstrom test -w echo --bin ~/path/to/fly-dist-sys/1_echo --node-count 1 --time-limit 10

=> Problem is ~/path/to/fly-dist-sys/1_echo is the directory, I mixed it up because the binary has the same name: ~/path/to/fly-dist-sys/1_echo/1_echo.

Sorry for wasting your time! 🙇

from maelstrom.

aphyr avatar aphyr commented on August 11, 2024

Hmm. Well that all seems to be in order. Maelstrom doesn't move anything around; it tries to invoke your executable without arguments, in place, using the full path to whatever --bin you provided. When it runs your program it does use the default temporary directory as cwd (specifically, whatever java.io.tmpdir is set to). I suppose if it's... trying to write files and you don't have write access to /tmp that might explode...

from maelstrom.

philippgille avatar philippgille commented on August 11, 2024

One idea to improve this (to prevent other people from running into this): One confusing thing was all the log output before running into the "permission denied", and the /tmp directory logs. Maybe this made it look less like a clear user-side error. Proposal: Would it work to check if the --bin argument points to an executable file, and if not, only print that?

from maelstrom.

aphyr avatar aphyr commented on August 11, 2024

I don't mind a more specific error message here ("permission denied" is slightly misleading; perhaps "is not a file" would be more helpful), but I'd advise against trying to predict and detect this error before actually getting there.

from maelstrom.

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.