#744 closed defect (fixed)
Spawning tasks leaks memory
Reported by: | Jakub Jermář | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 0.8.0 |
Component: | helenos/kernel/generic | Version: | mainline |
Keywords: | Cc: | ||
Blocker for: | Depends on: | ||
See also: |
Description
Each spawned task (apparently independent of any particular task, but for example tester) will leak a little bit of memory, as can be observed in the top utility. Repeated spawning of such a task will eventually reach the point when it is no more possible to spawn new tasks.
Attachments (4)
Change History (9)
comment:1 by , 6 years ago
by , 6 years ago
by , 6 years ago
comment:2 by , 6 years ago
Further investigation shows that there might be some as_t structure lying around (as well as some malloc-256 size buffers). See kmem-before and kmem-after attachments.
by , 6 years ago
Attachment: | kmem-before added |
---|
by , 6 years ago
Attachment: | kmem-after added |
---|
comment:3 by , 6 years ago
Git bisect reveals that:
78de83de52a9115dc77b09bb7029403dad8c2fb0 is the first bad commit commit 78de83de52a9115dc77b09bb7029403dad8c2fb0 Author: Jiří Zárevúcky <jiri.zarevucky@nic.cz> Date: Fri Sep 7 17:41:29 2018 +0200 Improve kernel spinlock and AS refcount.
comment:4 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in commit ac9e79d3a90877ce1c23d880e260120e23f9deaf.
comment:5 by , 6 years ago
Component: | helenos/unspecified → helenos/kernel/generic |
---|
Note:
See TracTickets
for help on using tickets.
The leak is probably in the kernel because comparing the output of the stats command after 40 executions does not reveal any leak in the virtual memory allocated by the running tasks, including servers. (In my setup, running stats command 47 tasks depletes the available memory). See the attached stats1 and stats40 commands for comparison.