{
  "source_commit": "7d52673791834caa743907dde83a1949134ef2f0",
  "host": {
    "os": "Ubuntu 24.04.4 LTS",
    "kernel": "6.14.0-37-generic",
    "gpu": "NVIDIA GeForce RTX 4090",
    "nvidia_driver": "580.173.02",
    "libEGL_nvidia_sha256": "3b3f89a28f0d382e76dc2caf4282fe084d71d10d5cb979a52dcd48c53265a4f9"
  },
  "system_packages_installed_or_upgraded": [],
  "system_packages_used_as_found": {
    "g++": "13.3.0-6ubuntu2~24.04.1",
    "cmake": "3.28.3",
    "libc6": "2.39-0ubuntu8.9",
    "libfreetype-dev": "2.13.2+dfsg-1ubuntu0.2",
    "libgl-dev": "1.7.0-1build1",
    "libglvnd-dev": "1.7.0-1build1",
    "libgomp1": "14.2.0-4ubuntu2~24.04.1",
    "libx11-dev": "2:1.8.7-1build1",
    "libxext-dev": "2:1.3.4-1build2",
    "xvfb": "2:21.1.12-1ubuntu1.6",
    "python3": "3.12.3"
  },
  "why_not_apt": "A dry run of 'apt-get install libsdl2-dev libglm-dev' on the shared host would have upgraded 14 installed packages, Mesa among them. SDL2 and GLM are therefore built or unpacked under the task prefix.",
  "local_prefix": {
    "SDL2": {
      "version": "2.30.0",
      "url": "https://github.com/libsdl-org/SDL/releases/download/release-2.30.0/SDL2-2.30.0.tar.gz",
      "bytes": 7428037,
      "sha256": "36e2e41557e0fa4a1519315c0f5958a87ccb27e25c51776beb6f1239526447b0",
      "build": "CMake Release, shared, X11 video driver with GLX only; audio, Wayland, KMSDRM, Vulkan, GLES, haptic, sensor, HIDAPI, D-Bus and IBus off",
      "built_library_sha256": "9f9a151c9fbbf473ce6aa40aeb4a8d6e9fce913fc6af282c63d159a2676efd5c"
    },
    "GLM": {
      "version": "0.9.9.8",
      "url": "https://github.com/g-truc/glm/releases/download/0.9.9.8/glm-0.9.9.8.zip",
      "bytes": 5670692,
      "sha256": "37e2a3d62ea3322e43593c34bae29f57e3e251ea89f4067506c94043769ade4c",
      "build": "header-only; headers copied"
    },
    "VirtualGL": {
      "version": "3.1.3",
      "url": "https://github.com/VirtualGL/virtualgl/releases/download/3.1.3/virtualgl_3.1.3_amd64.deb",
      "bytes": 1618538,
      "sha256": "ca0f9ad6263f93ca9393dd55620835c2b042d6a825f21bf0ea9a39e61e67b16e",
      "build": "unpacked with dpkg -x, not installed",
      "libvglfaker_sha256": "6aa78784650b61f5b98473b016ed8f059a380aa1aece914fab6ab28817286e2b",
      "libdlfaker_sha256": "23f3ec5a11ca17b6dda7f8d9907e7b18f3f1e5229e5a345e83397f323761cb2d"
    }
  },
  "graphics": {
    "method": "Xvfb display :94 provides the X11 window only. VirtualGL's faker libraries are preloaded and VGL_DISPLAY=/dev/dri/card1 selects its EGL back end on the NVIDIA device, so the GLX calls made by SDL2 are served by an off-screen NVIDIA context. No X server runs on the GPU and no system configuration is changed.",
    "environment": {
      "DISPLAY": ":94",
      "VGL_DISPLAY": "/dev/dri/card1",
      "VGL_READBACK": "sync",
      "LD_PRELOAD": "<root>/vgl/usr/lib/libdlfaker.so:<root>/vgl/usr/lib/libvglfaker.so",
      "LD_LIBRARY_PATH": "<root>/prefix/lib:<root>/vgl/usr/lib",
      "OMP_NUM_THREADS": "1"
    },
    "probe": "VirtualGL glxinfo -B on :94: OpenGL core profile version string 4.6.0 NVIDIA 580.173.02, renderer NVIDIA GeForce RTX 4090/PCIe/SSE2, direct rendering yes",
    "context_created_by_stonefish": "4.3.0 NVIDIA 580.173.02, GLSL 4.30 NVIDIA via Cg compiler"
  },
  "stonefish_build": {
    "cmake": "-DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DCMAKE_PREFIX_PATH=<root>/prefix -DCMAKE_CXX_FLAGS=-I<root>/prefix/include",
    "effective_cxx_flags": "-Wno-stringop-overflow -O3 -DNDEBUG -std=gnu++20 -fPIC",
    "definitions": [
      "BT_EULER_DEFAULT_ZYX",
      "BT_USE_DOUBLE_PRECISION",
      "SHADER_DIR_PATH=<root>/verified-source/Library/shaders/",
      "DATA_DIR_PATH=<root>/verified-source/Tests/Data/"
    ],
    "openmp": "The pinned CMakeLists links libgomp but does not pass -fopenmp when compiling. The built library imports only omp_get_max_threads and omp_set_num_threads and no GOMP_* entry point, so its '#pragma omp' loops run serially in this build.",
    "bullet": "3.17, double precision, bundled in 3rdparty/",
    "binaries_on_reference_host": {
      "build/stonefish/libStonefish_test.so": "c127a719a712f60944245c0f08cdb81d091d8a9fb5f397df9972c1461d700947",
      "build/stonefish/Tests/UnderwaterTest": "75b524d6f1b1ef144d7569f3b281dc55ed675dc34a8f09c98d0f8367f7d0bd6d",
      "build/adapter/marine_trial": "349ff4a9e1162596cf1c671c13cac8b818b41846e44cc234ea0d412eca7e1611"
    },
    "note": "Binary hashes include absolute build paths and are not claimed reproducible on another prefix."
  },
  "media_tools": {
    "ffmpeg": "7.0.2 static build from imageio-ffmpeg, sha256 e7e7fb30477f717e6f55f9180a70386c62677ef8a4d4d1a5d948f4098aa3eb99",
    "numpy": "2.2.6"
  },
  "observed_faults": {
    "loading_thread": {
      "observed": "Before the adapter replaced the start-up console thread, 6 of 8 one-second runs under MALLOC_CHECK_=3 ended in a segmentation fault during scenario build or a heap-corruption abort, and 6 of the 10 runs of the first open-loop series did. An AddressSanitizer build of the library and adapter reported a SEGV read at 0x2b4 in libnvidia-eglcore.so.580.173.02, called from sf::GraphicalSimulationApp::RenderLoadingScreen (GraphicalSimulationApp.cpp:1078) on the thread SDL names loadingThread. A second ASan run that did not hit the fault completed with no report from Stonefish or adapter code.",
      "cause_as_far_as_established": "Two GL contexts on the same window used from two threads at once through the VirtualGL EGL back end. Whether a native GLX server shows the same fault was not tested.",
      "workaround": "native/marine_trial.cpp defines SDL_CreateThread and replaces the thread named loadingThread with one that returns at once. After the change 10 of 10 heap-checked runs, 11 of 11 open-loop runs, 8 of 8 closed-loop development runs, the capture and the replay exited with status 0.",
      "unchanged_upstream_binary": "Tests/UnderwaterTest was started 7 times without heap checking and reached the running simulation each time; it was stopped by timeout, so its behaviour at exit and under heap checking is not established."
    },
    "teardown": {
      "observed": "Leaving main normally faulted in sf::OpenGLOcean::~OpenGLOcean, reached from ~SimulationManager -> DestroyScenario -> ~Ocean after the application had released its GL context (gdb backtrace of the adapter process).",
      "workaround": "The adapter closes its journals, writes counts.json and ends the process with _Exit(0)."
    }
  }
}
