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
  • Issues
  • #2400
Closed
Open
Issue created May 01, 2017 by Derek Bruening@derekbrueningContributor

ASSERT on detach: core/unix/os.c:9825 thread_takeover_records != NULL

Running an app that runs some code snippets under native_exec:

<Starting application myapp>
<Attached to 5 threads in application myapp>
<entered at least one module natively>
<returned from at least one native module>
<Detaching from application myapp>
<Application myapp.  Internal Error: DynamoRIO debug check failure: core/unix/os.c:9825 thread_takeover_records != NULL

Looks like it's this code at the top of master_signal_handler_C:

        } else if (sig == SUSPEND_SIGNAL && dcontext == NULL) {
            /* We sent SUSPEND_SIGNAL to a thread we don't control (no
             * dcontext), which means we want to take over.
             */
            sig_take_over(ucxt);  /* no return */
            ASSERT_NOT_REACHED();

If we put "!doing_detach" there we'll just hit the exit bailout at the end, though.

There is code in detach_on_permanent_stack() to handle native threads, but it assumes we can suspend them. #2089 (closed)'s big change to have no dcontext while temporarily native is the problem: it never updated native thread handling during a synch such as detach.

Assignee
Assign to
Time tracking