improve stateful re-exec downgrade scenario
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
upstart |
New
|
Wishlist
|
Unassigned |
Bug Description
Upstart doesn't yet fully support the stateful re-exec downgrade scenario. One area that needs to be investigated is deserialising arrays (such as class->normalexit, job->fds, job->pid). Currently, if on downgrade the number elements is greater than that expected for the lower numbered version of upstart, the deserialisation code will re-allocate the array so that it is big enough. This is safe, but does mean that extraneous (and strictly inaccessible) data is maintained until the next boot.
It would be cleaner if Upstart truncated such arrays to the expected size on deserialisation.
Function state_deseriali
Stateful downgrading is not a significant use case for upstart and we should not spend any major effort on optimizing it. A minor memory leak when downgrading is a negligible problem.