Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dynamorio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,467
    • Issues 1,467
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • DynamoRIO
  • dynamorio
  • Merge requests
  • !5375

i#4928: Isolate libc write to avoid hangs

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Derek Bruening requested to merge i4928-pipe-write into master Feb 18, 2022
  • Overview 1
  • Commits 1
  • Pipelines 0
  • Changes 2

Adds private loader redirection of open, close, read, and write to DR's syscall-wrapper versions (plus file descriptor isolation, for open and close). The libc write invokes pthread code for cancel features, and we are not able to create a private libpthread or isolate pthread resources (#956) which leads to poor interactions with application pthread uses and observed hangs.

Tested on the AArch64 Jenkins machine where these tests all hung every 5 to 10 runs in release build before and now they succeed 20,000 times in a row:

--------------------------------------------------
derek@dynamorio:~/dr/build_rel$ for i in sim.threads\$ sim.TLB-threads sim.coherence sim.threads-with; do echo $i; ctest --repeat-until-fail 20000 -R $i > RUN-$i 2>&1; done
sim.threads$
sim.TLB-threads
sim.coherence
sim.threads-with
derek@dynamorio:~/dr/build_rel$ grep -c Passed RUN-*
RUN-sim.coherence:20000
RUN-sim.threads$:20000
RUN-sim.threads-with:20000
RUN-sim.TLB-threads:20000
derek@dynamorio:~/dr/build_rel$ grep failed RUN-*
RUN-sim.coherence:100% tests passed, 0 tests failed out of 1
RUN-sim.threads$:100% tests passed, 0 tests failed out of 1
RUN-sim.threads-with:100% tests passed, 0 tests failed out of 1
RUN-sim.TLB-threads:100% tests passed, 0 tests failed out of 1
--------------------------------------------------

While at it, removes drcachesim.invariants which was tested as well and has no failures.

Issue: #4928 (closed), #4954 (closed), #2417, #956 Fixes #4928 (closed) Fixes #4954 (closed) Fixes #2892 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: i4928-pipe-write