Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal Working Example Errors #13

Open
mwhittaker opened this issue Apr 24, 2018 · 4 comments
Open

Minimal Working Example Errors #13

mwhittaker opened this issue Apr 24, 2018 · 4 comments

Comments

@mwhittaker
Copy link

Hello! I've written a very simple echo server in Python and am trying to replicate the server using crane. I've read through the instructions in the README which led me to read new-run.sh, worker-run.py, worker-build.py, master.py, etc. I couldn't run those scripts out of the box, so I tried to write the simplest script I could to replicate the server without them.

I want to run with three servers (running on 127.0.0.1:7000-7002) and three proxies (running on 127.0.0.1:9000-9002). For simplicity, I want to run all three servers and all three proxies on the same machine with Parrot but without LXC. I have the following two config files, which (I hope) set this up properly:

I run this command three times to run the three proxies. This command succeeds.

libevent_paxos/target/server.out -n $i -r -m s -c nodes.local.cfg -l ./proxy_logs

Then, I ran this to start the servers:

xtern/scripts/wrap-xtern.sh python server.py 700$i

Unfortunately, this does not work. Running this prints

terminate called after throwing an instance of 'boost::interprocess::interprocess_exception'
  what():  No such file or directory

I read through the code and found that the first second line of code in paxq_open_shared_mem inside of paxos-op-queue.cpp is throwing the exception. It looks like there are some files that it expects to exist inside of /dev/shm that don't exist. Do I have to make some files first before running my server? I noticed the paxq_create_shared_mem function above, but it is never called in the code. I added a call to it myself and then the server runs! But, unfortunately when I try to connect a client to a proxy, the messages are not being delivered.

Long story short, I want to replicate a simple server with crane as simply as possible and am running into some troubles. Any help or guidance would be greatly appreciated!

@hemingcui
Copy link
Contributor

hemingcui commented Apr 24, 2018 via email

@cwang9208
Copy link
Collaborator

cwang9208 commented Apr 24, 2018

Hi @mwhittaker, the /dev/shm is used for the timebubble technique in Crane. Specifically, /dev/shm is used for the communication between the proxy and DMT. For your second question, paxq_create_shared_mem will only invoked by proxy when you have specified sched_with_dmt in the configuration file.

In a word, as mentioned by Dr.Heming, we recommend you to use our automatic scripts, otherwise there might be some weird problems that are difficult to debug.

@mwhittaker
Copy link
Author

Hi @mwhittaker, the /dev/shm is used for the timebubble technique in Crane. Specifically, /dev/shm is used for the communication between the proxy and DMT. For your second question, paxq_create_shared_mem will only invoked by proxy when you have specified sched_with_dmt in the configuration file.

Ah, I see.

In a word, as mentioned by Dr.Heming, we recommend you to use our automatic scripts, otherwise there might be some weird problems that are difficult to debug.

Okay, I'll give that a shot! Thanks for the quick help @hemingcui and @wangchenghku!

@mwhittaker
Copy link
Author

I've set everything up to run on three EC2 servers with user name ubuntu. I'm running the following command:

USER=ubuntu ./new-run.sh configs/echo.sh no_build joint_sched 1

where echo.sh is this file. When worker-run.py is called on one of the servers, it calls this command:

/home/ubuntu/crane/xtern/scripts/wrap-xtern.sh 'python /home/ubuntu/crane/apps/echo/server.py'

which returns the following error message:

terminate called after throwing an instance of 'boost::interprocess::interprocess_exception'
  what():  No such file or directory
/home/ubuntu/crane/xtern/scripts/wrap-xtern.sh: line 6: 27350 Aborted                 (core dumped) python /home/ubuntu/crane/apps/echo/server.py

which is the same one I was experiencing before. @wangchenghku, how should I go about fixing this? You said earlier "paxq_create_shared_mem will only invoked by proxy when you have specified sched_with_dmt in the configuration file", but I do have sch_dmt=1 in my config file, so I think I have that option specified?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants