OpenDCDiag is an open-source project designed to identify defects and bugs in CPUs.

Overview

OpenDCDiag

OpenDCDiag is an open-source project designed to identify defects and bugs in CPUs. It consists of a set of tests built around a sophisticated CPU testing framework. OpenDCDiag is primarily intended for, but not limited to, Data Center CPUs.

License

OpenDCDiag is released under the Apache 2.0 license. The OpenDCDiag framework includes some source code from other projects, released under different licenses. See LICENSE.3rdparty for more details.

Building OpenDCDiag

Prerequisites

Ubuntu

OpenDCDiag has been built and tested on Ubuntu 21.04 and 21.10. Before building, the following prerequisites must be installed.

sudo apt-get install gcc g++ cmake libeigen3-dev libboost-all-dev libzstd-dev zlib1g-dev libgtest-dev meson

Fedora

OpenDCDiag has been built and tested on Fedora 33 and 34. Before building, the following prerequisites must be installed.

sudo dnf install -y boost-devel eigen3-devel gcc gcc-c++ git gtest-devel meson zlib-devel libzstd-devel

Building

OpenDCDiag is built with the Meson Build System. For example, a release build can be easily created as follows.

meson builddir --buildtype=release
ninja -C builddir

Contributions

The OpenDCDiag project welcomes contributions and pull requests. Please see Contributing to OpenDCDiag for more details.

Code of Conduct

The OpenDCDiag project has adopted the Contributor's Covenant as its Code of Conduct. The project requires contributors and users to follow our Code of Conduct, both in letter and in spirit.

Writing Tests

The OpenDCDiag framework is designed to make the creation of new CPU tests as simple as possible. It takes care of much of the boiler plate code CPU tests need, e.g., test life cycle, threading model, CPU feature identification, random number generation, etc. This allows test authors to concentrate on the specific test functionality that interests them. A detailed guide to writing new OpenDCDiag tests is presented in A Guide to Writing OpenDCDiag tests.

Intel® Data Center Diagnostic Tool

Intel provides a tool called the Intel® Data Center Diagnostic Tool for verifying the functionality of all cores within an Intel® Xeon® processor. Intel Data Center Diagnostic Tool is built using the OpenDCDiag framework and is freely downloadable. It is not however open-source and it is designed for use with Intel Xeon processors only. The Intel Data Center Diagnostic Tool contains additional tests that are not part of the OpenDCDiag project.

Comments
  • Fixed random test selection issue with --1sec/2min/5min options

    Fixed random test selection issue with --1sec/2min/5min options

    Test selection for some options like --1sec/--2min/--5min was happening in a non-random order. This will restore the randomness to the tests chosen to execute when using these options.

    opened by brad-kelly 10
  • Fix the behavior of --test-delay option.

    Fix the behavior of --test-delay option.

    Unlike background scan mode, --test-delay is an interactive option. If a test is skipped, the framework will constantly attempt to restart it without any delay. Consider the following command-line:

    $ opendcdiag -vv -T 24h -e ifs --test-delay 30000

    Instead of attempting to run the test every 5 minutes, the above will be constantly trying to restart the test (if it was skipped the first time or when it will be skipped later).

    opened by busykai 7
  • Adding background scan to OpenDCDiag.

    Adding background scan to OpenDCDiag.

    This is WIP for now. Opening PR to get initial feedback - we also need some modifications aroun l18n logs so do not merge it before we have them.

    Background scan is run by calling the application with argument --service. The tests are run in smaller number (max 24 tests a day) and the application can run in the background to monitor CPU utilization to run tests when the system meets idle criteria. When all tests from the test list are executed then the testing process starts from the beginning of the list. Also new a new way to run delays between tests is introduced. When needed a delay with some deviation can be introduced so the application will not wait the same amount of time when running such delay.

    Signed-off-by: dawid-sabat [email protected]

    opened by dawid-sabat 7
  • Adding support for native building on Windows using MSYS.

    Adding support for native building on Windows using MSYS.

    • Use of "cygwin" build target in meson If user uses meson package provided with python from MSYS repo (not MINGW64) for configuration Python's sys.platform is set to "cygwin". Meson declares to support Cygwin as a target and makes project configuration frictionless under MSYS environment. This unfortunetly means we have to check for "cygwin" target during meson configuration when we check for "windows" targets, but makes configuration much easier.
    opened by pwlazlyn 6
  • Silencing false positive warnings from writev

    Silencing false positive warnings from writev

    GCC 12 incorrectly reports reads outside boundry of an object when we call writev with IoVec wrapper. We get warning as if it was a single object and not an array:

    ../opendcdiag/framework/sandstone_iovec.h:39:18: warning: ‘ssize_t writev(int, const iovec*, int)’ reading 48 bytes from a region of size 16 [-Wstringop-overread]
       39 |     return writev(fd, vec, std::size(vec));
          |            ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
    ../opendcdiag/framework/sandstone_iovec.h:16:8: note: source object ‘{anonymous}::IoVec::<anonymous>’ of size 16
       16 | struct IoVec : iovec
          |        ^~~~~
    In file included from ../opendcdiag/framework/sandstone_p.h:24,
                     from ../opendcdiag/framework/sandstone.cpp:64:
    /usr/include/sys/uio.h:52:16: note: in a call to function ‘ssize_t writev(int, const iovec*, int)’ declared with attribute ‘access (read_only, 2, 3)’
       52 | extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count)
          |                ^~~~~~
    

    This commit provides a simple wrapper that ensures there is enough space by using size deduction from builtin arrays and silences the warning on the glibc boundary call.

    Signed-off-by: Wlazlyn, Patryk [email protected]

    opened by pwlazlyn 4
  • ifs: suppress modprobe's error if it can't find the module

    ifs: suppress modprobe's error if it can't find the module

    It is either telling us that the module doesn't exist or that we don't have permissions to load it. Neither is a fatal issue so we shouldn't let this be shown in logging verbosity 1.

    According to kernel developers, the module should be auto-loaded on machines that have IFS support, so the modprobe shouldn't even be needed. However, on the machines we tested, that autoloading was somehow broken, so we're choosing to leave it in.

    Signed-off-by: Thiago Macieira [email protected]

    opened by thiagomacieira 4
  • meson: generate sandstone_config.h

    meson: generate sandstone_config.h

    Series uses the existing sandstone_config.h as a template/.in file (familiar pattern if you've used autotools in recent memory). This brings some "sneaky" preprocessor checks out of the header and into the framework's meson build file.

    In the future I/we may find it useful to generate other headers, but we'll start with sandstone_config.h.

    The heaviest change was to SANDSTONE_DEBUG handling. Meson's release build type sets b_ndebug (automagically adds -DNDEBUG). This shifts the -D burden to meson, rather than us. SANDSTONE_DEBUG is set unless the "release" build type is configured. If folks have strong feelings against this, it's trivial for me to change it back to prior behavior.

    When reviewing the meson files, you'll see the set10() method called. Easiest to read it as "set macro to 1 or 0".

    opened by thac0 3
  • Use `native` files to reduce hard-coding (arbitrary) options

    Use `native` files to reduce hard-coding (arbitrary) options

    Meson supports native configurations, which are analogous to CMake presets. We could have one per desired buildtype, where we could set built-in values-- e.g. optimization level, [C,CPP]FLAGS.

    This could reduce the number of manually-appended flags in our .build files.

    opened by thac0 3
  • meson: add 'meson test' functionality

    meson: add 'meson test' functionality

    Nothing fancy. Just enables the "meson test" wrapper in case folks want to use it.

    Side effect: unittests target is always built. If that's undesirable, we can do without this.

    opened by thac0 3
  • FW/CPUID: add support for Linux 5.16 state saving requests

    FW/CPUID: add support for Linux 5.16 state saving requests

    With this implementation, we will only issue the new system call if CPUID indicates AMX support, in which case we ignore XCR0. This is designed for the likely scenario of AMX-capable kernels being used for AMX-capable hardware. If, instead, we're running on a system that fails to enable all CPU features, they won't begrudge us a few more CPU cycles to find out.

    We should also support the case in which the 5.16+ Linux kernel does support AMX but refuses to offer it to us. For that case, we expect the ARCH_GET_XCOMP_SUPP call to tell us "no AMX".

    opened by thiagomacieira 3
  • FW/Win32: find a directory for our temporary files other than

    FW/Win32: find a directory for our temporary files other than "."

    When the tool is installed system-wide (e.g., C:\Program Files), it will not have write access to its current-working directory. So we try, in order:

    • GetTempPath()
    • %TEMP% environment variable
    • %TMP% environment variable
    • C:\Temp
    • the current working directory

    We do a similar search in sysdeps/unix/tmpfile.c.

    Signed-off-by: Thiago Macieira [email protected]

    opened by thiagomacieira 2
  • Windows: Move temp files to Temp directory.

    Windows: Move temp files to Temp directory.

    For Windows compilations of OpenDCDiag, temp files were created in directory where the .exe is placed. The application doesn't always have access rights to do that.

    Changes here move all temp files to Windows designated area: C:\Users%username\AppData\Local\Temp

    Signed-off-by: dawid-sabat [email protected]

    opened by dawid-sabat 8
  • Adding system_idle_load implementation for Windows

    Adding system_idle_load implementation for Windows

    On Linux we are using 5 minute counter from /proc/loadavg to determine if the system was in idle state for the last 5 minutes. This patch implements similar counter but for Windows.

    Signed-off-by: Wlazlyn, Patryk [email protected]

    opened by pwlazlyn 0
  • FW: sandstone_ssl add more APIs for x509, PEM and BIO support

    FW: sandstone_ssl add more APIs for x509, PEM and BIO support

    Add 3 common used openssl groups of APIs:

    • X509: Pubkeys certificates standard routines
    • PEM: Format specific routines
    • BIO: IO stream abstraction routines

    Signed-off-by: Athenas Jimenez [email protected]

    opened by AthenasJimenez 0
  • Allow instrumenting TEST_LOOP

    Allow instrumenting TEST_LOOP

    This adds test_loop_start and test_loop_end symbols so one can extract the looping of a given OpenDCDiag-driven test. They complement test_start and test_end, but only work for tests that use TEST_LOOP.

    All four functions now mark their existence by way of an expensive no-op of CMPXCHG EAX, EAX. The RAX register will contain the main type "TESTLOOP" or "TESTMAIN" string, and the EDX one will have the state ("STRT" or "END\0"). Both the instruction and the constants are very distinctive. Doing this was inspired on <valgrind.h>, which communicates with the Valgrind by an expensive NOP of rotating RDI left four times, adding up to 64 bits.

    opened by thiagomacieira 2
  • Switch to C++20 mode for C++ code

    Switch to C++20 mode for C++ code

    This asks the C++ compiler to use C++20 for our code and it uses std::span replacing our home-grown copy.

    libstdc++ got std::span for the GCC 10 release and libc++ got it for LLVM 7, though I cannot speak for the quality of those early implementations, prior to the 2020 edition to the standard was even published. This change was only tested with GCC 12.

    opened by thiagomacieira 2
Owner
OpenDCDiag
OpenDCDiag
Identify I2C devices from a database of the most popular I2C sensors and other devices

I2C Detective Identify I2C devices from a database of the most popular I2C sensors and other devices. For more information see http://www.technoblogy.

David Johnson-Davies 21 Nov 29, 2022
A video input (V4L2) to NDI converter that works with Raspberry Pi (32-bit and 64-bit), and Intel/AMD CPUs

V4L2 to NDI V4L2 to NDI is an application that connects to attached V4L2 devices and encodes the video signal into NDI It uses the NDI library, allowi

Luke Plassman 52 Dec 30, 2022
An implementation of the SZZ algorithm, i.e., an approach to identify bug-introducing commits.

SZZ Unleashed SZZ Unleashed is an implementation of the SZZ algorithm, i.e. an approach to identify bug-introducing commits, introduced by Śliwerski e

Oscar Svensson 86 Nov 12, 2022
Open Source Cheat for Apex Legends, designed for ease of use. Made to understand reversing of Apex Legends and respawn's modified source engine as well as their Easy Anti Cheat Implementation.

Apex-Legends-SDK Open Source Cheat for Apex Legends, designed for ease of use. Made to understand reversing of Apex Legends and respawn's modified sou

null 111 Jan 8, 2023
Not related to software bugs and exploits; this repo contains snippets of code that demonstrate some interesting functionality or a handy trick.

Proof-of-Concept Not related to software bugs and exploits; this repo contains snippets of code that demonstrate some interesting functionality or a h

Alisa Esage 32 Nov 19, 2022
Vulkan and other GPU API bugs I found.

GPU-my-list-of-bugs what is it - list of bugs I found writing shaders, mostly shader bugs. Maybe this is my code bug or/and shader bugs, but this code

Danil 14 Dec 26, 2022
PoC that fixes two GTA Online bugs and drastically improves load times for CPU-bound systems

Project status Officially fixed by R* 2021-03-16 :) PoC that fixes two GTA Online bugs and drastically improves load times for CPU-bound systems All a

null 2.8k Jan 5, 2023
GraphicsFuzz provides tools for automatically finding and simplifying bugs in graphics drivers, specifically graphics shader compilers.

GraphicsFuzz GraphicsFuzz is a set of tools for testing shader compilers GraphicsFuzz provides tools for automatically finding and simplifying bugs in

Google 516 Dec 15, 2022
Type safe - Zero overhead utilities for preventing bugs at compile time

type_safe type_safe provides zero overhead abstractions that use the C++ type system to prevent bugs. Zero overhead abstractions here and in following

Jonathan Müller 1.2k Jan 8, 2023
An interpreter for finding subtle bugs in programs written in standard C

tis-interpreter This is tis-interpreter, an interpreter of C for detecting undefined behavior. tis-interpreter detects subtle bugs in C programs that

TrustInSoft 546 Dec 21, 2022
Unix pager (with very rich functionality) designed for work with tables. Designed for PostgreSQL, but MySQL is supported too. Works well with pgcli too. Can be used as CSV or TSV viewer too. It supports searching, selecting rows, columns, or block and export selected area to clipboard.

Unix pager (with very rich functionality) designed for work with tables. Designed for PostgreSQL, but MySQL is supported too. Works well with pgcli too. Can be used as CSV or TSV viewer too. It supports searching, selecting rows, columns, or block and export selected area to clipboard.

Pavel Stehule 1.9k Jan 4, 2023
OpenMLDB is an open-source database particularly designed to efficiently provide consistent data for machine learning driven applications.

English version | 中文版 1. Introduction OpenMLDB is an open-source database particularly designed to efficiently provide consistent data for machine lea

4Paradigm 1.2k Jan 8, 2023
Single source file ASTC texture decompression in C++ (derived from Google's open source Android project)

astc_dec astc_dec is a single source file ASTC texture decompressor with the Apache 2.0 license, derived from Google's open source Android sources. Th

Rich Geldreich 29 Dec 5, 2022
Open-source and open-hardware scientific RPN calculator

OpenRPNCalc Open-source and open-hardware scientific RPN calculator Introduction OpenRPNCalc is a scientific calculator based on STM32 microcontroller

Anton Poluektov 152 Dec 23, 2022
A fully-functional open source and open hardware mechanical USB computer keyboard with only three keys!

threeboard threeboard is a fully-functional open source and open hardware mechanical USB computer keyboard with only three keys. It supports multiple

Conor Taylor 98 Dec 9, 2022
An open-source C and C++ project series where beginners can contribute and practice coding.

C C++ mini project A collection of easy C and C++ small projects to help you improve your programming skills. Steps To Follow for contribute Star this

Alexander Monterrosa 2 Jan 1, 2022
OpenTibiaBR - Canary Project is a free and open-source MMORPG server emulator written in C++.

OpenTibiaBR - Canary Project is a free and open-source MMORPG server emulator written in C++. It is a fork of the OTServBR-Global project. To connect to the server and to take a stable experience, you can use our own client or tibia client and if you want to edit something, check our customized tools.

OpenTibiaBR 104 Dec 28, 2022
VinyGo is an open hardawe, meca, and source project to make a vinyl recorder.

The goal of this project is to refresh the gramophone concept to build a vinyl recorder, easier, more accessible, and affordable. Is made for artists, vinyl stores, recording studios, or music lovers.

null 10 Dec 16, 2022