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

EDMM 特性测试不太符合预期,似乎没有生效? #30

Open
bronzeMe opened this issue Dec 31, 2024 · 0 comments
Open

EDMM 特性测试不太符合预期,似乎没有生效? #30

bronzeMe opened this issue Dec 31, 2024 · 0 comments
Assignees
Labels
question Further information is requested

Comments

@bronzeMe
Copy link

bronzeMe commented Dec 31, 2024

Your Question

测试服务器是:Hygon CSV服务器
hyperenclave/hyperencalve-dirver是最新版本的代码
根据官方README ,hyperencalve-driver默认是启动EDMM的,
start_hyperenclave.sh中的feature_mask=0x202

Additional context

Occlum.json的配置,其中"enable_edmm": true,

{
    "resource_limits": {
      "kernel_space_heap_size": "100MB",
      "kernel_space_stack_size": "1MB",
      "user_space_size": "6GB",
      "max_num_of_threads": 1024,
      "user_space_max_size": "6GB",
      "init_num_of_threads": 10,
      "kernel_space_heap_max_size": "200MB"
    },
    "process": {
      "default_stack_size": "4MB",
      "default_heap_size": "64MB",
      "default_mmap_size": "64MB"
    },
    "entry_points": [
      "/usr/lib/jvm/java-8-openjdk-amd64/bin",
      "/bin"
    ],
    "env": {
      "default": [
        "OCCLUM=yes",
        "PYTHONHOME=/opt/python-occlum",
        "OMP_NUM_THREADS=1",
        "PYTHONPATH=$PYTHONPATH:/opt/spark/python/lib:/opt/spark/python/lib/py4j-0.10.9-src.zip",
        "LD_LIBRARY_PATH=/usr/lib/jvm/java-8-openjdk-amd64/lib/server:/usr/lib/jvm/java-8-openjdk-amd64/lib:/usr/lib/jvm/java-8-openjdk-amd64/../lib:/lib:/usr/lib/jvm/java-8-openjdk-am
d64/lib/amd64/jli:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/jli",
        "SPARK_CONF_DIR=/opt/spark/conf",
        "SPARK_ENV_LOADED=1",
        "PYTHONHASHSEED=0",
        "SPARK_HOME=/opt/spark",
        "SPARK_SCALA_VERSION=2.12",
        "SPARK_JARS_DIR=/opt/spark/jars",
        "LAUNCH_CLASSPATH=/bin/jars/*"
      ],
      "untrusted": [
        "EXAMPLE",
        "KUBECONFIG",
        "MALLOC_ARENA_MAX",
        "ATTESTATION_DEBUG",
        "DMLC_TRACKER_URI",
        "SPARK_DRIVER_URL",
        "SPARK_TESTING",
        "_SPARK_AUTH_SECRET",
        "CLIENT_CERT_FILE",
        "TRUSTED_CA_FILE",
        "CLIENT_PRIVATE_KEY_FILE"
      ]
    },
    "metadata": {
      "product_id": 1200,
      "version_number": 0,
      "debuggable": false,
      "enable_kss": false,
      "family_id": {
        "high": "0x0",
        "low": "0x0"
      },
      "ext_prod_id": {
        "high": "0x0",
        "low": "0x0"
      },
      "pkru": 0
    },
    "feature": {
      "amx": 0,
      "pkru": 0,
      "enable_edmm": true,
      "enable_posix_shm": false
    },
    "mount": [
      {
        "target": "/",
        "type": "unionfs",
        "options": {
          "layers": [
            {
              "target": "/",
              "type": "sefs",
              "source": "./build/mount/__ROOT",
              "options": {
                "MAC": ""
              }
            },
            {
              "target": "/",
              "type": "sefs",
              "source": "./run/mount/__ROOT"
            }
          ]
        }
      },
      {
        "target": "/host",
        "type": "hostfs",
        "source": "."
      },
      {
        "target": "/proc",
        "type": "procfs"
      },
      {
        "target": "/dev",
        "type": "devfs"
      }
    ]
  }
  • 运行一个Java进程,启动spark submit程序
Launch command: /usr/lib/jvm/java-8-openjdk-amd64/bin/java,-XX:-UseCompressedOops,-XX:ActiveProcessorCount=8,-Divy.home=/tmp/.ivy,-Dos.name=Linux,-Djdk.lang.Process.launchMechanism=vfork,-cp,/opt/spark/conf/:/opt/spark/jars/HikariCP-2.5.1.jar:/opt/spark/jars/zstd-jni-1.4.8-1.jar,-Xmx4g,org.apache.spark.deploy.SparkSubmit,/sql_exec_s_pyspark.py /home/teeapp/task/task_config.json
  • 执行报错显示内存不足
###### @ SparkSubmit: sgxLogLevel None
Exception in thread "main" java.io.IOException: Cannot run program "python3": error=12, Cannot allocate memory
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
        at org.apache.spark.deploy.PythonRunner$.main(PythonRunner.scala:97)
        at org.apache.spark.deploy.PythonRunner.main(PythonRunner.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
        at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:981)
        at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:180)
        at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:203)
        at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:90)
        at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1069)
        at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1078)
        at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: java.io.IOException: error=12, Cannot allocate memory
        at java.lang.UNIXProcess.forkAndExec(Native Method)
        at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
        at java.lang.ProcessImpl.start(ProcessImpl.java:134)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
        ... 14 more

[symbolize_elf.inc : 980] RAW: /proc/self/task/2/maps: errno=2

预期结果

  • 预期结果,应该是在开启了EDMM后,自动扩充内存
  • 这里有个问题是
  • Q1:Java进程是有父进程Fork出来的,子进程是否还能使用EDMM的特性呢?
@bronzeMe bronzeMe added the question Further information is requested label Dec 31, 2024
@bronzeMe bronzeMe changed the title EDMM 特性测试不符合预期 EDMM 特性测试不太符合预期 Dec 31, 2024
@bronzeMe bronzeMe changed the title EDMM 特性测试不太符合预期 EDMM 特性测试不太符合预期,似乎没有生效? Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants