By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 898 - tsak process taking 90-100% of CPU
Summary: tsak process taking 90-100% of CPU
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: tdebase (show other bugs)
Version: R14.0.0 [Trinity]
Hardware: All Linux
: P5 blocker
Assignee: Timothy Pearson
URL:
Depends on:
Blocks: 906 925
  Show dependency treegraph
 
Reported: 2012-03-06 13:09 CST by David C. Rankin
Modified: 2012-04-26 14:59 CDT (History)
3 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David C. Rankin 2012-03-06 13:09:43 CST
On Archlinux (3/5/12 build of TDE from GIT), tsak is demanding 90-100% of CPU. Initially after the fix to prevent tdm.log from filling, tsak appeared to behave well on startup. However, after running for a while (overnight), the fans were pegged on my laptop and investigation showed it was tsak. Screenshot here:

http://www.3111skyline.com/dl/dt/trinity/ss/tsak-hog.jpg

This install is on archlinux as a virtualbox guest (vbox 4.1-4.1.8) using vbox default setup for x86_64 linux.
Comment 1 David C. Rankin 2012-03-06 13:25:20 CST
Potentially related to bug: 884
Comment 2 Darrell 2012-03-24 15:45:12 CDT
The following likely all are related:

884 tdmctl: Cannot connect socket '/var/run/xdmctl/dmctl-:0/socket'
898 tsak process taking 90-100% of CPU
906 SAK realization is mostly buggy for KDM
925 [kdesktop] SAK driven secure dialog is not available for use
Comment 3 David C. Rankin 2012-03-30 11:08:36 CDT
Just to update. This problem still exists in R14 code as of 3/29. Using TDM, tsak & tdmtsak will consume 100% of cpu. Launching with startx does not exhibit this problem.

When launching from TDM, and after killing tsak "sudo killall tsak", tdmtsak continues to run and consumes ~20% of cpu by itself. Killing tdmtsak "sudo killall tdmtsak" stops the cpu consumption completely. Updated screenshot:

http://www.3111skyline.com/dl/dt/trinity/ss/tsak-96-cpu.jpg
Comment 4 Darrell 2012-03-30 11:17:25 CDT
tsak does not run outside of TDM and therefore won't run when X is started from the command line with startx.

Regarding trying to kill tsak, tsak and TDM do not perform any housekeeping. The pipe/socket files created by tsak remain in /tmp. The next reboot or X server restart tsak ignores the tdmrc setting, uses the existing pipe/socket files, and just keeps running, even when explicitly disabled in tdmrc.

I will amend bug report 906 to address these issues.

BTW, killing tsak probably should not succeed because the goal is to ensure nobody can spoof the login screen. I am not surprised that tsak resurrects itself after killing.
Comment 5 Timothy Pearson 2012-04-18 00:23:46 CDT
I have made some progress on the tsak bugs in GIT hash 3f90a9b; can you please recompile tdebase from GIT and see if this bug still exists?

Thanks!
Comment 6 Timothy Pearson 2012-04-18 00:23:46 CDT
I have made some progress on the tsak bugs in GIT hash 3f90a9b; can you please recompile tdebase from GIT and see if this bug still exists?

Thanks!
Comment 7 Timothy Pearson 2012-04-18 14:23:44 CDT
Cleanup of tsak FIFOs when tsak becomes unusable (e.g. keyboard removed) after it was successfully initialized at least once has been committed in GIT hash 632eda3/
Comment 8 Timothy Pearson 2012-04-18 14:39:15 CDT
Failure to clean up FIFO file when tsak disabled fixed in GIT hash a63606b.
Comment 9 Darrell 2012-04-18 15:02:14 CDT
If I correctly understand the two patches, we should be testing the following:

* That Ctrl-Alt-Del works with both UseSAK=false/UseSAK=true

* That pipe/socket files are purged/ignored correctly:
  1) during a reboot/halt (when TDM terminates)
  2) X server restart (which TDM allows)
  3) when a user disables tsak in KControl (tdmrc:UseSAK=false)

* Watch for high CPU usage

A note about a related bug mentioned in bug report 906 comments:

Ownership of /tmp/tdesocket-global is assigned to the system's primary login account. Ownership of that directory is determined by the account UID listed in the tdmrc MinShowUID key and then that account number is grabbed from /etc/passwd.

Also related are bug reports 884 and 925.

Not trying to "pile on." :) Just noting there are several related bug reports, each a little different, each a little similar. :)
Comment 10 Timothy Pearson 2012-04-18 15:07:03 CDT
> Not trying to "pile on." :) Just noting there are several related bug reports,
> each a little different, each a little similar. :)

No problem!  We need all the tsak bugs resolved soon and I am trying to fix as many as I can.

What would help of course is to have either a master list of issues, or to have separate bug reports for each problem.  Right now we seem to have multiple intertwined issues in each bug report, which is not easy for a developer to untangle. ;-)

That being said, can you (or someone else for that matter) who has experienced problems with tsak compile from the latest GIT sources and see how many issues have already been resolved (and which ones still remain)?  The sooner we can start unsnarling these four related reports the faster the remaining problems can be prioritized and hopefully resolved.

Thanks!
Comment 11 Darrell 2012-04-18 15:25:31 CDT
Actually, I started to collate such a list. :) I will post soon.

I just now started rebuilding my package set. To test properly I prefer to reboot to my alternate set of Trinity partitions. I don't like testing these specific types of issues in a VM because VMs are not good for testing hardware related issues. Will be a couple of hours before I can report. :)

Thanks!
Comment 12 Slávek Banko 2012-04-18 16:28:47 CDT
(Odpověď na komentář #6)
> I have made some progress on the tsak bugs in GIT hash 3f90a9b; can you please
> recompile tdebase from GIT and see if this bug still exists?
> 
> Thanks!

I tested commit 3f90a9b8 x PS2 keyboard and after NumLock / CapsLock she is still alive! Good news, thank you.
Comment 13 Timothy Pearson 2012-04-21 14:58:00 CDT
tsak housekeeping implemented in GIT hash 6cfb160.
Comment 14 Darrell 2012-04-21 19:38:10 CDT
(In reply to comment #13)
> tsak housekeeping implemented in GIT hash 6cfb160.

What should I test?

With uinput not loaded I see a text message inside the group box. When I load uinput then the message disappears?

Anything else to test?
Comment 15 Timothy Pearson 2012-04-21 19:53:02 CDT
(In reply to comment #14)
> (In reply to comment #13)
> > tsak housekeeping implemented in GIT hash 6cfb160.
> 
> What should I test?
> 
> With uinput not loaded I see a text message inside the group box. When I load
> uinput then the message disappears?
> 
> Anything else to test?

tsak now cleans up after itself, so you should see the pipe and lock files when tsak is active, and not see them when tsak has been deactivated.

Also, is the text message clear enough?  If not feel free to edit it. :-)
Comment 16 Darrell 2012-04-21 20:11:40 CDT
Ok. First test was in a VM. I'll test next in real hardware.

No gripes about the KControl warning string. Very nice that the check box is disabled too.

One note: in my recent updating of the TDM help book, I wrote udev and uinput. In the KControl warning message you have evdev. I presume the latter is more technically correct. To be consistent, I presume I should update the help book to evdev?
Comment 17 Timothy Pearson 2012-04-21 21:33:11 CDT
evdev is more precise as far as I can tell: http://en.wikipedia.org/wiki/Evdev
Comment 18 Darrell 2012-04-21 21:41:49 CDT
I'll update the help file. Easy.

Check the mail list for my latest report of GIT hash 6cfb160.
Comment 19 Timothy Pearson 2012-04-26 14:59:21 CDT
As I have not been able to reproduce this bug on latest GIT sources, and no one has provided feedback to the contrary, I am closing this bug RESOLVED FIXED.

As always, if this bug reappears on latest GIT sources, please reopen this report!