Skip to content

Changing DMTCP plugin API from v3 to v4#6

Open
gc00 wants to merge 2 commits into
mainfrom
dmtcp-plugin-api-v4
Open

Changing DMTCP plugin API from v3 to v4#6
gc00 wants to merge 2 commits into
mainfrom
dmtcp-plugin-api-v4

Conversation

@gc00

@gc00 gc00 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

The 'main' branch for DMTCP on github is now for the planned DMTCP-5.0. It has changed the plugin API to v4.
It is the 'main' branch for DMTCP that now has TSAN support.

If we accept this PR, we will have to start using the latest github version of DMTCP.
I think this is a no-brainer, if we want TSAN support and future compatibility with DMTCP.
If we care about DMTCP code being stable, we can choose the tsan-phased-init branch for TSAN support,
and later a new commit on its main branch, and eventually switch to the full DMTCP-5.0. The main branch is quite stable now.

Comments anyone?

gc00 and others added 2 commits June 30, 2026 11:56
The TSAN-supporting DMTCP branch (tsan-phased-init) bumped the plugin API
from v3 to v4, an ABI change (DmtcpPluginDescriptor_t / DmtcpUniqueProcessId,
new DmtcpCkptHeader etc.). DMTCP refused to load libmcmini.so:

  ASSERT pluginmanager.cpp:228: incompatible DMTCP plugin API version:
  plugin_api=3 expected=4

Sync the vendored include/dmtcp.h to DMTCP's v4 header (correct version
string and descriptor ABI), and carry forward the only McMini-specific
additions -- the mcmini_virtual_pid / mcmini_real_pid macros -- updated to
the v4 function names (dmtcp_{real_to_virtual,virtual_to_real}_pid became
dmtcp_pid_{real_to_virtual,virtual_to_real}). Also update the two direct
callers in multithreaded_fork.c. The unused dmtcp_restore_buf_* decls are
dropped (not referenced by libmcmini, and gone from v4).

Verified: libmcmini.so builds against v4 and DMTCP now loads it without the
version assert (mcmini record mode reaches RECORD-phase execution under
dmtcp_launch).

Known follow-up (out of scope here): checkpointing a -fsanitize=thread
target under deep-debug still crashes in RECORD mode with the TSan null-
ThreadState SEGV, because libmcmini creates threads via
libdmtcp_pthread_create (dlopen'd directly), bypassing libtsan's
pthread_create interceptor -- the same class of issue the classic-mode
RTLD_NEXT fix addresses, but on the DMTCP record path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gc00 gc00 requested review from aayushi363 and maxwellpirtle July 1, 2026 18:04
@gc00 gc00 added the enhancement New feature or request label Jul 1, 2026
@gc00 gc00 changed the title Changing DMTCP plugin api from v3 to v4 Changing DMTCP plugin API from v3 to v4 Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant