Closed anjalirai-intel closed 5 months ago
I'm confused, where is the problem/error/failure in these logs? Both logs don't show any catastrophic errors and both end up with a "ctx":"initandlisten","msg":"mongod startup complete"
message.
Sorry, I have updated the logs for failed scenario, In first section, there are lot of error messages b/w /sys/block and server starting, whereas in the case of failure, there are no extra logs and also you can observe this line Startup from clean shutdown?":false
Hm, yeah, this requires some investigation. Did you look at Gramine logs? Does that give you any additional hints?
Yes, I have looked and attached trace logs as well, there was no error b/w this section
Ok, I finally found some hint in the failing log:
{"t":{"$date":"2024-01-29T08:24:28.701+00:00"},"s":"E", "c":"CONTROL", "id":20557,
"ctx":"initandlisten","msg":"DBException in initAndListen, terminating",
"attr":{"error":"JSInterpreterFailure: Failed to JS_Init()"}}
A bit before this line in the log I see this:
[P1:T1:mongod] trace: ---- mmap(0x2adbf6b48000, 0x7fc00000, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0x0) ...
[P1:T1:mongod] trace: ---- return from mmap(...) = -12
I.e., we can't allocate 2GB of memory. Can this be the reason?
Moreover, I see that ASLR (Address Space Layout Randomization) is enabled, based on this line in the log:
debug: ASLR top address adjusted to 0x89447000
TLDR:
loader.insecure__disable_aslr = true
@anjalirai-intel Can you try these (increasing enclave size; disabling ASLR)?
@dimakuv I tried by adding loader.insecure__disable_aslr = true
with and without EDMM, it is working fine. No issues there
Ok, closing this issue.
Sorry, I guess I wrongly closed this issue.
@anjalirai-intel So the action now is to increase the enclave size for our MongoDB example?
Note that we don't want to have loader.insecure__disable_aslr = true
(insecure options) in our manifest files.
@dimakuv We have already tried with enclave size as 8GB and with that issue is not seen without EDMM
@anjalirai-intel Do you want to submit such a PR, with increasing enclave size to 8G?
Raised #94 for the same
Summary: Mongodb workloads fails intermittently with unable to launch server, failing during _initAndListen
We tried to repro this issue on Ubuntu 22.04 and we were able to repro it 1 out of 10 times,
I have attached the debug logs for the server start.
Console logs for when Server Started:
Console log for when Server didn't start
mongodb_trace.log