Closed philippgille closed 1 year ago
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?
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
?
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:
OK sorry guys, found the issue: me :see_no_evil:
After seeing https://github.com/jepsen-io/maelstrom/issues/37 and it being a mistake of what's executable and what not, I questioned if I ran everything correctly.
From my first :arrow_up: 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! :bow:
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...
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?
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.
Hello :wave: ,
I'm checking out the Fly distributed systems challenges, and for the "Echo" demo, after compiling the Go code and trying to run the maelstrom tests, I get this error:
The compiled Go binary, as well as maelstrom belong to
johndoe
user and group.I'm running maelstrom like this:
./maelstrom test -w echo --bin ~/path/to/fly-dist-sys/1_echo --node-count 1 --time-limit 10
I'm on Linux (Fedora).
Am I doing anything wrong? Should permissions be set differently?