Linux / Advanced: boundaries, security, and recovery / Lesson 21
Open files and descriptor lifecycle
Investigate file descriptors, removed names, and resource limits with bounded diagnostic steps.
On this page
Lesson goals
- Distinguish paths from open file descriptors.
- Connect process evidence to capacity and limits without unjustified changes.
- Trace the lifetime of a name, descriptor, and open object through unlink and close.
- Interpret descriptor trends and limits with process identity and time.
Paths and open files
A path is a name used to locate an object; an open file descriptor is a process-local reference to an open file description. A process can retain access after a name is removed, so a directory listing alone cannot establish which storage is still in use. Conversely, a descriptor number is not a permanent identity: a process may close it and reuse the number. Record the process and observation time, and work with a synthetic file in a disposable lab when practicing this distinction.
Inspect a process view
On Linux, /proc exposes process information through a virtual filesystem. The fd directory for a process contains entries representing its open file descriptors; access can be restricted by identity and system policy. The following commands inspect the current shell in an authorized lab. The exact descriptors and targets vary with the environment and may change while they are listed. Treat a missing or inaccessible entry as a clue to investigate, not as evidence that a resource never existed.
printf "shell pid=%s\n" "$$"
ls -l "/proc/$$/fd"
$$ expands to the shell PID; output depends on lab state and access policy.
Understand removed names
Removing a directory entry is not the same as forcing every process to close an already open file. If the last link is removed while a process still has the file open, the underlying storage remains associated with that open file until its references are closed. This explains one possible reason free space may not immediately increase after deletion. It is only a hypothesis: inspect the affected filesystem and process evidence before attributing an actual capacity problem to an open deleted file.
Interpret limits and errors
A process can fail to open another file when it reaches an applicable descriptor limit; other system limits and causes can produce related symptoms. Preserve the exact diagnostic and inspect the affected process context rather than assuming that raising a limit is the fix. An application that leaks descriptors may continue to grow after a limit increase. In a controlled test, compare descriptor counts over time and relate them to workload, expected connections, and normal closure behavior before proposing a change.
cat "/proc/$$/limits"
This reads the process limits; it changes no limit and does not establish another application’s failure cause.
Choose a bounded response
Do not kill an unknown process merely to reclaim space or free descriptors. Identify its owner and service, assess user impact, and use the documented rotation or restart procedure only when authorized. Preserve relevant evidence before changing the process, and arrange recovery if the service does not return. After the change, repeat the original capacity or application check and observe whether consumption remains stable. Correct the producer or retention behavior so the incident does not recur immediately.
Separate names, descriptors, and open descriptions
A pathname is a lookup instruction through directory entries; a file descriptor is a number local to a process that refers to an open file description. Opening the same pathname twice can create separate open descriptions with independent offsets, while duplicated descriptors can refer to the same description and share an offset. A descriptor number such as 3 is not a durable file identity: after close, the process can reuse that number for another object. Record the process identity, descriptor, target, and time together.
A path can be renamed or removed while an already open reference remains valid. Conversely, a name can later be recreated and point to a new object, while an older descriptor still refers to the original open object. Directory listings describe names reachable at that moment, not every object held open by processes. The synthetic cases below model these distinctions; they do not inspect or alter another user’s process or files.
Trace unlink and storage lifetime
Removing a directory entry with unlink removes a name, not an instruction forcing processes to close their references. If the last link is removed while the file remains open, the object and its allocated storage remain until the remaining open references are closed. A process can continue writing through its descriptor, so an unlinked log may keep consuming space. If another hard link remains, the file still has a reachable name even after one link is removed. These conditions must be distinguished before predicting reclamation.
An unchanged free-space reading after a deletion is a clue, not proof of this particular mechanism. Confirm the affected filesystem, the relevant process and open object, and other possible allocation or quota factors. A directory walk and filesystem-wide allocation report measure different scopes. Do not kill an unknown process to reclaim space; identify its owner and service, preserve evidence, and follow an authorized rotation or restart procedure with a recovery plan.
Read process evidence as a changing snapshot
On Linux, `/proc/PID/fd` exposes entries for descriptors of a process subject to access checks and the proc mount’s context. Entries can represent regular files, pipes, sockets, and other objects; a socket target is not a pathname to a normal disk file. The process can open or close descriptors while an observer lists them, so a missing entry may reflect timing or permission rather than proof that it never existed. Limit inspection to an authorized process and avoid publishing unrelated file paths or socket details.
Pair each capture with the process lifetime, namespace and timestamp. A PID can be reused after exit, just as a descriptor number can be reused after close. Comparing counts from two different process lifetimes can fabricate a trend. If a descriptor target is inaccessible, preserve the error and context instead of treating an empty listing as a complete inventory. Use a disposable synthetic process when practicing and never signal another workload merely to make an observation easier.
Diagnose limits and leaks with a time series
An open failure can arise from a per-process descriptor limit, a system-wide limit, permissions, a missing path, or other causes. Preserve the exact error and the affected process’s applicable limits before deciding which hypothesis fits. A shell’s own limit does not automatically describe a separate service. Compare counts and descriptor types over time with workload and expected connection closure; a high count during a surge may be normal if it falls when the work finishes.
A count that continues to rise across repeated load-and-idle cycles can support a leak hypothesis, but it does not identify which code path failed to close a resource. Correlate object types, process lifetime, request volume, and application logs, then reproduce with synthetic load in an isolated environment. Raising a limit can postpone failure while a leak continues. Define a bounded test and rollback before any authorized policy change, and verify whether consumption stabilizes afterward.
Preserve evidence and verify the response
A bounded response begins with impact, filesystem, process identity, first error, and the evidence for the proposed cause. If an unlinked open log is confirmed, use the service’s documented and authorized rotation or restart procedure rather than terminating an unknown process. Consider whether the service will reopen the intended path, whether other open references remain, and how to recover if it fails to return. Preserve the diagnostic snapshot before changing the process.
After an authorized intervention, repeat the original capacity and application checks and observe a sufficient interval to see whether consumption remains stable. A one-time improvement does not repair a producer that continues to leak descriptors or write unbounded logs. Document the observation, hypothesis, action, result, and remaining uncertainty. The worked records are fictional and all commands, where shown, are study-only; no production cleanup or process termination is performed.
20 worked examples
1. Descriptor reuse
Problem: Analyze the synthetic lab record and determine the supported conclusion and next check. Record: process: worker A fd 3 at 10:00: report fd 3 at 10:05: socket
- Worker A’s fd 3 points to a report at 10:00 and a socket at 10:05.
- The descriptor could have been closed and reused, so treat the captures as different targets.
process: worker A
fd 3 at 10:00: report
fd 3 at 10:05: socket
A synthetic, nonexecuting record. The same descriptor number can refer to a different object after close and reuse.
Expected result: The same descriptor number can refer to a different object after close and reuse.
Why this result follows: A descriptor number is a reusable process-local table index, not a durable object identity.
2. Different processes
Problem: Analyze the synthetic lab record and determine the supported conclusion and next check. Record: process A fd 4: report process B fd 4: socket
- Process A’s fd 4 is a report, while process B’s fd 4 is a socket.
- The same number refers to different objects because the observations belong to different processes.
process A fd 4: report
process B fd 4: socket
A synthetic, nonexecuting record. Descriptor numbers are process-local and need not name the same object across processes.
Expected result: Descriptor numbers are process-local and need not name the same object across processes.
Why this result follows: Each process has its own descriptor table. Process A’s fd 4 is a report, while process B’s fd 4 is a socket.
3. Independent opens
Problem: Analyze the synthetic lab record and determine the supported conclusion and next check. Record: open A: report, offset 0 open B: report, offset 0 reads through A: 5 bytes
- The two opens have separate descriptions and offsets initially at zero.
- Reading five bytes through A advances A’s offset; B’s independent offset need not change.
open A: report, offset 0
open B: report, offset 0
reads through A: 5 bytes
A synthetic, nonexecuting record. Separate opens can have independent open descriptions and offsets.
Expected result: Separate opens can have independent open descriptions and offsets.
Why this result follows: A separate open file description maintains its own file offset. The two opens have separate descriptions and offsets initially at zero.
4. Duplicated descriptor
Problem: Analyze the synthetic lab record and determine the supported conclusion and next check. Record: fd 3 and fd 4: same open description read via fd 3: advances offset
- Fd 3 and fd 4 refer to the same open file description.
- Reading through fd 3 advances the offset that fd 4 also observes.
fd 3 and fd 4: same open description
read via fd 3: advances offset
A synthetic, nonexecuting record. Duplicated descriptors referring to one open description share its offset.
Expected result: Duplicated descriptors referring to one open description share its offset.
Why this result follows: Duplicated descriptors sharing an open file description share its offset. Fd 3 and fd 4 refer to the same open file description.
5. Rename while open
Problem: Analyze the synthetic lab record and determine the supported conclusion and next check. Record: open descriptor: old report object name renamed: report -> archive
- The process opened the report object before its name changed from report to archive.
- The existing descriptor can still reference that object after the rename.
open descriptor: old report object
name renamed: report -> archive
A synthetic, nonexecuting record. Renaming a pathname does not automatically close an existing descriptor.
Expected result: Renaming a pathname does not automatically close an existing descriptor.
Why this result follows: A descriptor refers to an open description rather than repeatedly resolving the original pathname.
6. Unlinked open log
Problem: Analyze the synthetic lab record and determine the supported conclusion and next check. Record: last link: removed writer descriptor: open allocated blocks: retained
- The last link was removed, but the writer still holds an open descriptor.
- The open reference can retain the object and its allocated blocks until it closes.
last link: removed
writer descriptor: open
allocated blocks: retained
A synthetic, nonexecuting record. The open reference can keep the unlinked file’s storage allocated.
Expected result: The open reference can keep the unlinked file’s storage allocated.
Why this result follows: Unlink removes a directory name; it does not force existing open references to close.
7. Last reference closed
Problem: Analyze the synthetic lab record and determine the supported conclusion and next check. Record: last link: removed last open reference: closed
- Both the last directory link and the last open reference are gone.
- The unlinked object can now be reclaimed; check the affected filesystem after authorized closure.
last link: removed
last open reference: closed
A synthetic, nonexecuting record. The object can be reclaimed after its last link and open references are gone.
Expected result: The object can be reclaimed after its last link and open references are gone.
Why this result follows: An unlinked object remains until its remaining open references are released. Both the last directory link and the last open reference are gone.
8. Hard link remains
Problem: Analyze the synthetic lab record and determine the supported conclusion and next check. Record: name A: removed name B: hard link to same object open references: none
- Name A was removed, but hard link B still points to the same object.
- The object remains reachable through B, so A was not its last link.
name A: removed
name B: hard link to same object
open references: none
A synthetic, nonexecuting record. The file still has name B, so removing A was not removal of its last link.
Expected result: The file still has name B, so removing A was not removal of its last link.
Why this result follows: Each hard link is a directory entry referring to the same underlying file.
9. Name recreated
Problem: Analyze the synthetic lab record and determine the supported conclusion and next check. Record: old log: unlinked but open new log: created at same pathname
- The old log remains open after unlink, and a new file is created at the same pathname.
- The old descriptor can still refer to the old object while the pathname names the new object.
old log: unlinked but open
new log: created at same pathname
A synthetic, nonexecuting record. The old descriptor can reference the old object while the pathname names a new one.
Expected result: The old descriptor can reference the old object while the pathname names a new one.
Why this result follows: Open references survive unlink and are not automatically redirected when a name is recreated.
10. Deleted-open hypothesis
Problem: Analyze the synthetic lab record and determine the supported conclusion and next check. Record: free space: unchanged after deletion open file evidence: not collected
- Free space did not visibly increase, but no open-file evidence was collected.
- Treat an unlinked open file as one hypothesis and inspect the filesystem and process before attribution.
free space: unchanged after deletion
open file evidence: not collected
A synthetic, nonexecuting record. Unchanged free space is a clue but does not prove an unlinked open file.
Expected result: Unchanged free space is a clue but does not prove an unlinked open file.
Why this result follows: Several allocation, mount, quota, or timing factors can produce the same capacity observation.
11. Socket descriptor
Problem: Analyze the synthetic lab record and determine the supported conclusion and next check. Record: /proc/PID/fd/5 target: socket:[12345] process: synthetic worker
- The proc fd target is socket:[12345] for the synthetic worker.
- Classify it as a socket descriptor and investigate the connection context rather than a disk path.
/proc/PID/fd/5 target: socket:[12345]
process: synthetic worker
A synthetic, nonexecuting record. The descriptor refers to a socket, not a regular disk pathname.
Expected result: The descriptor refers to a socket, not a regular disk pathname.
Why this result follows: Proc renders socket descriptors with a socket identifier, not a regular pathname.
12. Pipe descriptor
Problem: Analyze the synthetic lab record and determine the supported conclusion and next check. Record: /proc/PID/fd/6 target: pipe:[456] process: synthetic worker
- The proc fd target is pipe:[456] in the synthetic worker.
- It represents a pipe; correlate authorized producer and consumer observations if needed.
/proc/PID/fd/6 target: pipe:[456]
process: synthetic worker
A synthetic, nonexecuting record. The descriptor refers to a pipe object in the observed process.
Expected result: The descriptor refers to a pipe object in the observed process.
Why this result follows: A pipe descriptor refers to an IPC object rather than a regular file.
13. Vanished descriptor
Problem: Analyze the synthetic lab record and determine the supported conclusion and next check. Record: listing started: fd 7 present readlink later: entry missing
- Fd 7 appeared during listing but disappeared before readlink.
- The process may have closed it between captures; repeat with identity and timing.
listing started: fd 7 present
readlink later: entry missing
A synthetic, nonexecuting record. The process may have closed the descriptor between observations.
Expected result: The process may have closed the descriptor between observations.
Why this result follows: A live descriptor table can change while an observer reads proc. Fd 7 appeared during listing but disappeared before readlink.
14. Permission-limited proc
Problem: Analyze the synthetic lab record and determine the supported conclusion and next check. Record: fd listing: permission denied entries displayed: none
- The proc listing was denied and returned no visible entries.
- The empty display is incomplete evidence because the observer lacked access.
fd listing: permission denied
entries displayed: none
A synthetic, nonexecuting record. An access error prevents treating the empty display as a complete inventory.
Expected result: An access error prevents treating the empty display as a complete inventory.
Why this result follows: Permission failure prevents a reliable inventory of inaccessible descriptors. The proc listing was denied and returned no visible entries.
15. PID reuse
Problem: Analyze the synthetic lab record and determine the supported conclusion and next check. Record: 10:00 PID 2200: worker A 11:00 PID 2200: worker B
- PID 2200 refers to worker A at 10:00 and worker B at 11:00.
- Do not join their descriptor counts into one process trend without verifying the lifetime.
10:00 PID 2200: worker A
11:00 PID 2200: worker B
A synthetic, nonexecuting record. The same PID number can identify different process lifetimes.
Expected result: The same PID number can identify different process lifetimes.
Why this result follows: PID numbers can be reused after a process exits. PID 2200 refers to worker A at 10:00 and worker B at 11:00.
16. Different shell limit
Problem: Analyze the synthetic lab record and determine the supported conclusion and next check. Record: diagnostic shell limit: 1024 service process limit: not inspected
- The diagnostic shell limit is 1024, while the service limit was not inspected.
- Obtain the affected service’s limit before attributing its open failure to 1024.
diagnostic shell limit: 1024
service process limit: not inspected
A synthetic, nonexecuting record. The shell’s limit does not establish the service’s applicable limit.
Expected result: The shell’s limit does not establish the service’s applicable limit.
Why this result follows: Process resource limits are associated with the process context being measured. The diagnostic shell limit is 1024, while the service limit was not inspected.
17. Load follows count
Problem: Analyze the synthetic lab record and determine the supported conclusion and next check. Record: load starts: fd count rises load ends: fd count returns to baseline
- The fd count rises during load and returns to baseline after load ends.
- That pattern is consistent with temporary connections closing; repeat controlled cycles before calling it a leak.
load starts: fd count rises
load ends: fd count returns to baseline
A synthetic, nonexecuting record. A count that falls after load can reflect expected temporary connections.
Expected result: A count that falls after load can reflect expected temporary connections.
Why this result follows: Expected workload can temporarily increase open descriptors. The fd count rises during load and returns to baseline after load ends.
18. Persistent growth
Problem: Analyze the synthetic lab record and determine the supported conclusion and next check. Record: idle baseline 1: 40 idle baseline 2: 60 idle baseline 3: 80
- Idle baselines increase from 40 to 60 to 80 across equal cycles.
- Investigate persistent retention, but correlate descriptor types and operations before naming a code defect.
idle baseline 1: 40
idle baseline 2: 60
idle baseline 3: 80
A synthetic, nonexecuting record. Rising idle baselines support investigating a leak but do not identify its code path.
Expected result: Rising idle baselines support investigating a leak but do not identify its code path.
Why this result follows: A rising baseline is a trend supporting a hypothesis, not a direct code-path diagnosis.
19. Limit increase only
Problem: Analyze the synthetic lab record and determine the supported conclusion and next check. Record: descriptor count: rising limit: raised closure behavior: unchanged
- The count continues rising after the limit is raised and closure behavior is unchanged.
- The higher threshold may delay exhaustion while the underlying retention persists.
descriptor count: rising
limit: raised
closure behavior: unchanged
A synthetic, nonexecuting record. Raising a limit can delay failure while the underlying leak continues.
Expected result: Raising a limit can delay failure while the underlying leak continues.
Why this result follows: A limit change does not close descriptors or repair application lifecycle behavior.
20. Authorized recovery
Problem: Analyze the synthetic lab record and determine the supported conclusion and next check. Record: open deleted log: confirmed service: identified rotation procedure: approved
- The deleted open log and its owning service are confirmed, and a rotation procedure is approved.
- Preserve the evidence, follow that authorized procedure, then recheck capacity and service behavior.
open deleted log: confirmed
service: identified
rotation procedure: approved
A synthetic, nonexecuting record. A documented service procedure is a bounded response to the confirmed object.
Expected result: A documented service procedure is a bounded response to the confirmed object.
Why this result follows: A bounded service-specific intervention avoids acting on an unidentified process and verifies its effect.
Common errors and fixes
Space does not return after a file is removed
- Why it happens
- A process may still hold the removed file open.
- How to fix it
- Inspect the filesystem and process, then use the authorized service procedure.
- Prevent it next time
- Test log rotation and monitor consumption.
Opening another file fails
- Why it happens
- The application may reach a descriptor limit or encounter another cause.
- How to fix it
- Preserve the error and inspect process limits and descriptor trends.
- Prevent it next time
- Monitor resources and fix leaks rather than automatically increasing limits.
Treating a descriptor number as a permanent identity
- Why it happens
- A descriptor can be closed and its number reused.
- How to fix it
- Repeat the observation with process identity, time, and context.
- Prevent it next time
- Associate evidence with a specific capture window.
20 practice exercises
1. Why might free capacity not immediately change after removing a large log?
Show hint
Distinguish removing the name from closing the last open reference.
Show worked solution
A process may still hold the file open after its name is removed. Verify filesystem and process evidence before an authorized intervention; other explanations are possible.
A process may keep the file open after its last name is removed, retaining blocks until references close. Verify the filesystem, process, and alternative causes before an authorized intervention.
Check your solution
- Identify the possible remaining open reference.
- Verify filesystem and process evidence before intervention.
2. A service descriptor count grows with load and does not fall after load stops. What next?
Show hint
Compare load and idle cycles for the same process lifetime.
Show worked solution
Compare measurements over a controlled interval and inspect connections, closure behavior, and process limits. Preserve evidence and investigate a possible leak before increasing a limit.
Collect time-aligned counts, types, and connections after load stops, and inspect the process limits and closure behavior. Persistent growth supports a leak hypothesis but does not identify the code path alone.
Check your solution
- Compare counts and types after load ends.
- Inspect closure and limits before raising a limit.
3. A process closes fd 3 and later opens a socket as fd 3. What must a diagnostic record distinguish?
Show hint
Identify the process, descriptor, time, and object described by the evidence.
Show worked solution
Record the process lifetime, target, and capture time for each observation. Descriptor numbers are reusable process-local references, so the later fd 3 does not necessarily identify the earlier file. Record the observation context and identity before testing the result in an authorized lab.
Check your solution
- Record both target and capture time.
- Do not treat fd 3 as a permanent object identity.
4. Two processes each have fd 4, one a file and one a socket. Why is there no contradiction?
Show hint
Identify the process, descriptor, time, and object described by the evidence.
Show worked solution
Descriptor numbers are local to each process’s descriptor table. The same number can refer to different objects in separate processes, so include process identity when interpreting an observation. Record the observation context and identity before testing the result in an authorized lab.
Check your solution
- Identify the two different processes.
- Explain that fd numbers are process-local.
5. A file is opened twice independently. Does reading through one descriptor necessarily advance the other offset?
Show hint
Identify the process, descriptor, time, and object described by the evidence.
Show worked solution
No. Separate opens can create separate open file descriptions with independent offsets. This differs from duplicated descriptors referring to one description, which share its offset. Record the observation context and identity before testing the result in an authorized lab.
Check your solution
- Identify independent open descriptions.
- Contrast duplicated descriptors sharing an offset.
6. A file is renamed while a process has it open. Does the rename force that descriptor closed?
Show hint
Identify the process, descriptor, time, and object described by the evidence.
Show worked solution
No. The descriptor refers to an open object independently of the directory name. Track the process and object after the rename rather than assuming the name change ended access. Record the observation context and identity before testing the result in an authorized lab.
Check your solution
- State that the open descriptor can remain valid.
- Track the object separately from its pathname.
7. A log’s last name is removed but a writer keeps it open. Why might capacity not return immediately?
Show hint
Identify the process, descriptor, time, and object described by the evidence.
Show worked solution
The remaining open reference can keep the unlinked object and its blocks allocated until references close. Confirm the affected filesystem and process before using an authorized service procedure. Record the observation context and identity before testing the result in an authorized lab.
Check your solution
- Identify the remaining open reference.
- Verify the affected filesystem and process.
8. Name A is removed, but name B is a hard link to the same file. Why is the object still named?
Show hint
Identify the process, descriptor, time, and object described by the evidence.
Show worked solution
Removing A removes one directory entry, while B remains another link to the same object. The object has not lost its last name merely because A disappeared. Record the observation context and identity before testing the result in an authorized lab.
Check your solution
- Identify B as a remaining hard link.
- Do not call A the last link.
9. An unlinked file remains open and a new file is created at the same path. What can the old descriptor reference?
Show hint
Identify the process, descriptor, time, and object described by the evidence.
Show worked solution
The old descriptor can still reference the old open object, while the recreated pathname refers to the new object. Compare object and process evidence rather than the pathname spelling alone.
Check your solution
- Distinguish old open object from new pathname object.
- Inspect process and object identity separately.
10. A deletion does not visibly increase free space. Why is an open deleted file only a hypothesis?
Show hint
Identify the process, descriptor, time, and object described by the evidence.
Show worked solution
Other allocation, mount, quota, or timing factors can produce the observation. Confirm the affected filesystem and authorized process references before attributing the space to a specific open object. Record the observation context and identity before testing the result in an authorized lab.
Check your solution
- List another plausible capacity factor.
- Seek process and filesystem evidence before attribution.
11. A `/proc/PID/fd` entry resolves to `socket:[12345]`. Why is it not a disk path to delete?
Show hint
Identify the process, descriptor, time, and object described by the evidence.
Show worked solution
The target identifies a socket object associated with the descriptor, not a normal filesystem pathname. Investigate the process and connection context under authorization rather than attempting path cleanup. Record the observation context and identity before testing the result in an authorized lab.
Check your solution
- Classify the target as a socket.
- Investigate its process and connection context.
12. An fd entry disappears between listing and readlink. What timing explanation should be considered?
Show hint
Identify the process, descriptor, time, and object described by the evidence.
Show worked solution
The process may have closed the descriptor between the two observations. Capture the process identity and time and repeat a bounded observation; do not claim the resource never existed. Record the observation context and identity before testing the result in an authorized lab.
Check your solution
- Consider a close between observations.
- Repeat with process identity and timestamp.
13. A proc descriptor listing returns permission denied and no entries. Is that a complete inventory?
Show hint
Identify the process, descriptor, time, and object described by the evidence.
Show worked solution
No. The error means the observer could not obtain the intended information. Preserve the diagnostic and use the authorized access process instead of interpreting empty output as no descriptors. Record the observation context and identity before testing the result in an authorized lab.
Check your solution
- Record the permission error.
- Do not treat the empty display as complete.
14. PID 2200 is reused by a new worker between two captures. Can their fd counts form one process trend?
Show hint
Identify the process, descriptor, time, and object described by the evidence.
Show worked solution
No. The captures refer to different process lifetimes even though the number matches. Compare identity and start time, then collect a consistent series for the affected lifetime. Record the observation context and identity before testing the result in an authorized lab.
Check your solution
- Identify the different process lifetimes.
- Collect a consistent time series for one lifetime.
15. A diagnostic shell has limit 1024, but a service fails to open files. What limit evidence is needed?
Show hint
Identify the process, descriptor, time, and object described by the evidence.
Show worked solution
Inspect the affected service process’s applicable limits and manager configuration, along with its exact error. The diagnostic shell’s own limit does not automatically apply to the service. Record the observation context and identity before testing the result in an authorized lab.
Check your solution
- Inspect the service process limit.
- Preserve the exact open failure.
16. A descriptor count rises during traffic and returns to baseline afterward. Does that prove a leak?
Show hint
Identify the process, descriptor, time, and object described by the evidence.
Show worked solution
No. Temporary connections can explain a rise that closes normally after load. Repeat controlled load and idle cycles and compare object types before reaching a conclusion. Record the observation context and identity before testing the result in an authorized lab.
Check your solution
- Note the return to baseline.
- Repeat controlled cycles and inspect descriptor types.
17. Idle descriptor baselines rise from 40 to 60 to 80 over equal cycles. What is supported and what is not?
Show hint
Identify the process, descriptor, time, and object described by the evidence.
Show worked solution
The trend supports investigating persistent retention or a leak, but it does not identify the faulty code path. Correlate descriptor types, operations, and logs over the same cycles. Record the observation context and identity before testing the result in an authorized lab.
Check your solution
- Identify the rising idle baselines.
- Do not claim a specific faulty code path without evidence.
18. Why might raising a descriptor limit fail to solve a service that never closes completed connections?
Show hint
Identify the process, descriptor, time, and object described by the evidence.
Show worked solution
A higher limit can postpone exhaustion while the leak continues. Investigate closure behavior, reproduce with synthetic load, and verify that counts stabilize after a targeted fix. Record the observation context and identity before testing the result in an authorized lab.
Check your solution
- Explain that the leak can continue under a higher limit.
- Verify stable counts after correcting closure.
19. An open deleted log is confirmed for an identified service. Why avoid killing an unknown process for space?
Show hint
Identify the process, descriptor, time, and object described by the evidence.
Show worked solution
An unknown process can serve unrelated work and termination can cause damage or lose evidence. Preserve the snapshot and use the identified service’s documented authorized rotation or restart with recovery prepared.
Check your solution
- Identify the owning service and preserve evidence.
- Use an authorized procedure with recovery prepared.
20. After an authorized log rotation, free space improves once. What further verification is needed?
Show hint
Identify the process, descriptor, time, and object described by the evidence.
Show worked solution
Repeat the original filesystem and application checks and observe whether consumption remains stable. A one-time improvement does not prove that the producer or retention issue has been corrected. Record the observation context and identity before testing the result in an authorized lab.
Check your solution
- Repeat capacity and application checks.
- Observe the consumption trend for recurrence.
Key takeaways
- An open file can remain after its name is removed.
- Tie descriptor evidence to process, time, and an authorized response.
- Removing a name does not close open references.
- A descriptor number is process-local and reusable.
- Inspect load and closure trends before raising limits or terminating a process.