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
How to solve lib/enclave.cc:404(8388) CHECK FAILED: ctl_fd_ >= 0 [-1 > 0] problem ? #8
Comments
I am using Ubuntu 20.04, and my version of ghost-kernel is 5.11.0+ |
It seems that the call to |
looks like ghostfs isn't mounted for some reason. what do you get from this:
|
Thanks, @brho |
try running the agent now. if it doesn't work, run it with strace -f
so we can see what is wrong.
the agent should attempt to mount ghostfs on its own. your original
error looked like ghostfs wasn't mounted, so i was wondering if
something went wrong there.
if the agent works, unmount ghostfs and try again, in an attempt to
recreate the original issue.
ultimately, we'll probably need to see strace -f (and -o /tmp/some-file
to get a cleaner trace).
|
Good Morning @brho, I am sorry for my silence. When I umount ghostfs and running the agent by using this commande: bazel run fifo_agent --run_under='strace -f -o /home/armel/Desktop/ghost/output_ghostfs_umount.txt' Now I don't know why the agent is not able to mount ghostfs itself. |
It looks like the strace output for the second case does not include a call to |
Hello @jackhumphries, |
Hi @jackhumphries, |
I just want to say that I have reach to make threads migration by using Fifo scheduler using the same .word_count-pthread application of phoenix map reduce. |
For the mount issue, can you look at why For Shinjuku, you are seeing the segfault because the application needs to set up a PrioTable before moving its threads to ghOSt. This is also necessary for the EDF scheduler. I would stick with the SOL scheduler and the two FIFO schedulers for anything else since they work with applications out of the box, i.e., they do not require a PrioTable. |
Ok about GhostIsMountedAt() now I want to check it now. but how I suppose to set up a Prio Table of my application before to make migration please? |
And the error that I got when I run EDF scheduler is different. I want firstly to finish with shinjuku scheduler before that we talk about the EDF scheduler please. |
You should check out the RocksDB and antagonist apps in |
Ok. Please let me a few minutes to check firstly GhostIsMountedAt(). |
Hello @jackhumphries, |
In my computer this code work perfectly. |
And I don't need to mount manually the ghostfs. |
The ghostfs mount code is present in |
Please but in my code I don't see Ghost::GetSupportedVersions() function. |
The function that I have is Ghost::GetVersion, but this function is never call on lib/enclave.cc |
The int Ghost::GetVersion(uint64_t& version) call bool Ghost::GhostIsMountedAt(const char* path) but int Ghost::GetVersion(uint64_t& version) function is never call on lib/enclave.cc |
Sorry, made a typo. See my updated comment. As I said, If you add print statements in, do you not see anything printed out on agent startup? |
Please excuse but I have forgot for why reason I have comment that line of code in lib/agent.cc. but my problem is that I am not see the definition of Ghost::CheckVersion(); function in my code. the lib/agent.cc just used it but I don't know where is it define |
When I uncomment that line when I try to run fifo scheduller I got the following error: |
The version of ghost kernel is may be lower than the version of ghost userspace. |
How I suppose now to solve that issue? |
The userspace code and ghOSt code share the ghOSt UAPI header file in To fix this, you need to make sure the two versions match, generally by just pulling in the most recent commits in both repos and then compiling and installing the updated kernel. The most recent version number is 55 (see |
Please excuse me. This is just an error I have never close the issue |
Ok let me see. |
In my repo the kernel have version 45. |
Yes, and make sure you also pull the latest version of the code in the userspace repo, too. You'll notice that |
Ok. I try it now. |
Hi @jackhumphries, |
Specifically the bug is that we are depending on the initialization of GHOST_TID_SEQNUM_BITS (in base.cc) during the initialization of another global Agent::kVersionCheck (in agent.cc). Since there is no ordering across compilation units this can result in accessing GHOST_TID_SEQNUM_BITS before it has been initialized. READ of size 4 at 0x7ff981751180 thread T0 #0 0x7ff98134368f in ghost::gtid(long) third_party/ghost/lib/base.cc:122:19 #1 0x7ff98134196d in GetGtid third_party/ghost/lib/base.cc:212:28 #2 0x7ff98134196d in Current third_party/ghost/lib/base.h:164:40 #3 0x7ff98134196d in ghost::Exit(int) third_party/ghost/lib/base.cc:285:28 #4 0x7ff981b93db4 in ghost::Ghost::MountGhostfs() third_party/ghost/lib/ghost.cc:147:5 #5 0x7ff981b93fe5 in ghost::Ghost::GetSupportedVersions(std::__u::vector<unsigned int, std::__u::allocator<unsigned int> >&) third_party/ghost/lib/ghost.cc:155:5 #6 0x7ff982102744 in ghost::Ghost::CheckVersion() third_party/ghost/lib/ghost.h:274:5 #7 0x7ff98217c564 in __cxx_global_var_init third_party/ghost/lib/agent.cc:102:35 #8 0x7ff98217c564 in _GLOBAL__sub_I_agent.cc third_party/ghost/lib/agent.cc #9 0x7ff9cc37b4cc in call_init (/usr/grte/v5/lib64/ld-linux-x86-64.so.2+0x1c4cc) #10 0x7ff9cc37b329 in _dl_init (/usr/grte/v5/lib64/ld-linux-x86-64.so.2+0x1c329) Fix this by caching the result in a function-local static variable in get_tid_seqnum_bits() which is guaranteed to be initialized the first time it is accessed, and this initialization will happen before any other access. TESTED=all units tests pass in virtme
Hello,
Please excuse me to reopen this issue but I have meet a similar error when I had try to run the command bazel run agent_shinjuku in a root mode. this is the error that I obtain:
I think that it because I don't have a right to write into /sys/fs/ghost/ folder.
Please I don't know how I can change the permission of that folder, since when I try to run the command: sudo chmod -R 777 /sys/fs/ghost/ I just obtain Operation is not permitted as result.
Please I need your help.
Originally posted by @NGUETOUM in #2 (comment)
The text was updated successfully, but these errors were encountered: