Opened 14 years ago

Closed 12 years ago

#279 closed enhancement (fixed)

Sleeping task does not get killed immediately

Reported by: Jiri Svoboda Owned by:
Priority: minor Milestone: 0.6.0
Component: helenos/unspecified Version:
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

When I kill a task that is sleeping (say, Tetris in the menu, waiting for a key press) either using the shell command kill or the kconsole command kill, the task does not go away immediately. Instead nothing seems to happen until I send it some IPC message by pressing keys on the console. Only then does the task disappear from the task listing and only then does control of the console return to the shell.

I would expect the task to be terminated without any significant delay after issuing the kill command.

Change History (6)

comment:1 by Jakub Jermář, 14 years ago

The task is already dead, it is just waiting for all the unanswered calls in ipc_cleanup().

comment:2 by Jiri Svoboda, 14 years ago

I discussed this with Jakub. We are obviously seeing here several different problems. One is that when a task is terminated and has some unanswered calls, the kernel cannot remove it entirely until those calls are answered (the task is waiting in ipc_cleanup()). This is not necessarily a bug but could be considered a property of the system. (It is not entirely clear how easy or difficult it would be to solve this).

What we would expect, however is at least that:

  • It should be clear from task listing that the process is in such zombie state
  • Control should return to the shell immediately

As for the control not returning to the shell, this seems to have more to do with the I/O subsystem. For some reason it would apppear that bdsh cannot write to the console while tetris is blocked in getchar(), but our attempts to track this down have been inconclusive so far.

comment:3 by Jakub Jermář, 14 years ago

Milestone: 0.5.00.5.1

comment:4 by Jakub Jermář, 14 years ago

Type: defectenhancement

comment:5 by Jakub Jermář, 13 years ago

Milestone: 0.5.00.5.1

comment:6 by Jakub Jermář, 12 years ago

Resolution: fixed
Status: newclosed

The task-does-not-disappear-until-after-a-keypress problem was fixed in mainline,1665. The shell still continues to wait for a keypress though and so there appears to be some different problem.

Note: See TracTickets for help on using tickets.