Fix `clone_share_vm` test
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.7k
- Forks
- 662
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 2
Description
This test is trickier than I thought.
The problem is the handling of cloned_file_data_fd_child when we restore captured state in Task::copy_state. For correct replay, that fd must refer to the opened cloned-data file for this task. But consider the case where this task has been cloned from a group-leader task holding its address space, but during recording this task had a different file descriptor table to that group-leader task (e.g. because this task was cloned with CLONE_VM but not CLONE_FILES); this task's cloned_file_data_fd_child and the group-leader's cloned_file_data_fd_child could be equal. During replay this task and the group-leader task currently always share file-descriptor tables so we can't have that same file descriptor value assigned to the two different files.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the clone_share_vm test and the Task::copy_state path mentioned in the issue, tracing how cloned_file_data_fd_child is restored during replay. Done means replay assigns each task's descriptor to its own opened cloned-data file, including when the task and group leader had different descriptor tables during recording.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux
- Domain
- operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100