You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bound Component input size and active compilation resources #440
Runtime should bound the resources used to compile an admitted Component and recover capacity after a refused or stopped compilation.
#416 limits the wait for its one compile slot to 30 seconds. At head 2defb2fb, elastos/crates/elastos-compute/src/providers/component.rs:167–195 then runs Component::from_file in spawn_blocking without an input-size check or active compilation deadline. Guest fuel and Store memory limits apply to execution, not this compilation. Cancelling the caller leaves the compiler holding the slot until it ends.
Done means:
Choose and enforce an admitted input-size limit and an effective active compilation time/resource bound. State the measured limits and supported targets.
A timeout or cancellation establishes that compilation has stopped before capacity is reused. Preserve the single active compiler rule and Runtime responsiveness.
Test oversized input, a compilation over its bound, caller cancellation and a valid compile afterward. Assert resource/permit recovery; reverting a bound makes its test fail.
Add a test-only gate inside the admitted compile job: acknowledge worker start, cancel the caller, hold the job unfinished, and require a later load to return its own queue-timeout error before releasing and draining the worker and proving recovery. The control must compile, drop the permit at worker start, and fail that ownership assertion; the restored candidate must pass. Keep this coverage separate from Keep Component compilation off async workers and limit slot waits #416's existing pre-worker queue/cancellation proof and 30-second queue wait; Bound Component input size and active compilation resources #440 still owns active compilation time, input-size and resource bounds.
Preserve signed-byte admission, denied-import checks and Bus-only effects. Coordinate with Compile the Component bytes that Runtime admitted #431 so size checks and compilation consume the same immutable admitted bytes.
Follow-up to #416. #431 owns byte identity; this issue owns compilation resource limits.
Activity