This document describes a project called ZoneIDAProc that aims to provide an interface for accessing internal process states. It discusses related work, the problem statement, design, implementation details, examples, and conclusions. The key points are that ZoneIDAProc will export a Linux proc-like interface to allow querying and manipulating a process's internal states through code instrumentation and a virtual file system without requiring debug symbols. It provides examples of basic read/write access, monitoring a main thread with a spy thread, exploring process symbols, and fully instrumenting and accessing a target program.
2. PyCon APAC 2015
Motivation
Course assignment of Operating System
everything is a file (descriptor)
QA engineer often checks process internal states
via checking debug logs
the log.. trustworthy?
2
3. PyCon APAC 2015
Related Works
Debugger (process trace-able utility)
variable monitoring / tampering
code instrumentation
3
=> debug symbols are required
=> accessing interface is domain-specific
4. PyCon APAC 2015
Problem Statement
4
We wish to deliver defect-less software to customers.
To verify behavior of our program is correct, QA engineer
often triggers state transition inside the process and checks
new state is as expected. However, most internal states are
available only in debug logs which may not trustworthy
enough.
We will use Instrumentation-based Dynamic Accessing Proc to
export an interface for accessing the internal states easily.
5. PyCon APAC 2015
Design
exporting interface
Aggregation for relevant states
structured addressing
Manipulation on specified state
fine-grained access
5
=> something like Linux proc[1]
=> directory, read-only file, read-write file
Example:
- endpoint
- ip
- port
- name
6. PyCon APAC 2015
Design
accessing internal state
Unawareness of aimed process
process trace
Freshness of internal states
on-demand access
dedicated (spy) thread
6
15. PyCon APAC 2015
Conclusion
Proc could be an alternative configuration interface
persistent configuration file is still needed
Share states between main thread and spy thread
beware of race condition
15