Hi Jakub, changeset 1812 should be a proper way how to release resources for orphaned windows. There were two problems with the simple patch you proposed. First of all, it did not work with normal window closing because the function comp_window_close would be called twice leading to a double deallocation. Secondly, it did not take care of the window input fibril which is most of the time blocked within comp_window_get_event. Note that in a normal protocol-driven window closing, input fibril is already terminated when the output fibril deallocates the window resources (including the queue on which the input fibril is usually blocked).
I did not investigate the root causes of the behaviour you described in much detail, but there were definitely some orphaned fibrils within the compositor that would work with deallocated memory if woken up. The reason for the locked up launcher was that after you tried to spawn a new vterm, the compositor was unable to properly establish new connections. Therefore the vterm was blocked within its own initialization and vlaunch was blocked on task_wait. When I killed the half-initialized vterm in kernel console, the launcher would unblock and continue normally. Petr > -----Original Message----- > From: HelenOS-devel [mailto:[email protected]] On Behalf > Of Jakub Jermar > Sent: Sunday, April 21, 2013 10:53 AM > To: HelenOS development mailing list > Subject: [HelenOS-devel] GUI: proper way of destroying a window after a task > is killed > > Hi (Petr), > > in the attached patch there is a super-simple mechanism for destroying > orphaned windows left over after their task was killed. It seems to do > its job well, but after several iterations of spawning a new vterm and > killing it, either the entire GUI or the launcher app hangs. This may be > some unrelated issue, but I wanted to check with you whether this is the > right approach of getting rid of the orphaned windows. > > Jakub _______________________________________________ HelenOS-devel mailing list [email protected] http://lists.modry.cz/cgi-bin/listinfo/helenos-devel
