WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: ab2tce using 100% CPU  (Read 10531 times)

Offline althalus

  • Sr. Member
  • ****
  • Posts: 351
ab2tce using 100% CPU
« on: May 10, 2010, 05:41:31 AM »
Hey guys,

As topic says, ab2tce is chewing up 100% of one of the available CPUs on my laptop if the app browser doesn't get closed cleanly (ctrl+alt+backspace with app browser running).

EDIT: TC 2.11
« Last Edit: May 10, 2010, 05:43:36 AM by althalus »

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: ab2tce using 100% CPU
« Reply #1 on: May 10, 2010, 07:57:38 AM »
Yep also saw this (start appbrowser, then use xkill). Only, I didn't think to file a bug report. Duh. :P

Offline althalus

  • Sr. Member
  • ****
  • Posts: 351
Re: ab2tce using 100% CPU
« Reply #2 on: May 13, 2010, 01:57:04 AM »
Simple fix would seem to be to add a check for an empty string as well as checking for quit in ab2tce.sh:
Code: [Select]
while [ "${command}" != "quit" ] && [ "${command}X" != "X" ]; doIf the appbrowser dies unexpectedly, ab2tce.sh knows to quit.


Also, if ab2tce.sh gets killed before one is finished with the appbrowser, the appbrowser has a heart attack (In other words: the appbrowser needs to check if ab2tce.sh is still running and if not, restart it, or at least needs a more graceful way to handle the case where ab2tce.sh dies) - Admittedly, one should not come up against this scenario very often if at all, but it's better to prepare for all possibilities.

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: ab2tce using 100% CPU
« Reply #3 on: May 13, 2010, 02:19:26 AM »
I have never seen 100%. Even if I kill appbrowser, the most ab2tce.sh shows is 25%. But then I don't usually kill appbrowser. Even adding in your suggsted mod, does nothing to change the observed behaviour upon killing appbrowser. May I know operationally what you must be doing differently? Are killing an in-process download? Starting multiple appbrowsers? Or just limit testing?
10+ Years Contributing to Linux Open Source Projects.

Offline althalus

  • Sr. Member
  • ****
  • Posts: 351
Re: ab2tce using 100% CPU
« Reply #4 on: May 13, 2010, 03:09:27 AM »
I have never seen 100%. Even if I kill appbrowser, the most ab2tce.sh shows is 25%. But then I don't usually kill appbrowser. Even adding in your suggsted mod, does nothing to change the observed behaviour upon killing appbrowser. May I know operationally what you must be doing differently? Are killing an in-process download? Starting multiple appbrowsers? Or just limit testing?
When I first noticed the problem, I'd upset my X session, and killed X using ctrl+alt+backspace - I'd installed something with the appbrowser, but at that point it was sitting idle. Only one app browser started. Using xkill seems to have the same effect as killing the entire X session.

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: ab2tce using 100% CPU
« Reply #5 on: May 13, 2010, 05:35:17 AM »
I have seen it when my internet connection spits the dummy (I have a cable that gets wet in the rain). Appbrowser sits forever trying to continue the download but won't listen to the close window button (AppsAudit also won't close when doing long operations). So to close it, I have to use xkill, and that's when I see the 100%.

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: ab2tce using 100% CPU
« Reply #6 on: May 16, 2010, 09:08:16 PM »
I observed this problem also yesterday. There were 2 ab2tc processes running, each well over 50% CPU, close to 80% each. I don't remember doing anything savage to AppBrowser. I was just toying around with the setup. I had downloaded gnome-desktop-base and had started it up. I noticed sluggish behaviour from the OS, and on checking found the cpu was bogged down with the 2 ab2tc processes.

[edit] Just realised I went through ctrl-alt-bksp to restart X.
« Last Edit: May 16, 2010, 09:11:29 PM by jur »

Offline florian

  • Full Member
  • ***
  • Posts: 116
    • Home Page
Re: ab2tce using 100% CPU
« Reply #7 on: May 17, 2010, 03:10:02 PM »
sorry to ask, but what's ab2tce.sh? what does it do?

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: ab2tce using 100% CPU
« Reply #8 on: May 17, 2010, 03:49:57 PM »
It is a pipe created by appbrowser to pass messges between tce-load and appbrowser. It only exists while appbrowser is running.

Since such reported problems only occur with user initiated extraordinary circumstances, i.e, killing X server while appbrowser is still open, it is not high on my priority list to try to address.

Under normal, albeit heavy usage, i.e, my constant testing of during other development endeavors has not produced such or any problems.
10+ Years Contributing to Linux Open Source Projects.

Offline grisxa

  • Newbie
  • *
  • Posts: 27
Re: ab2tce using 100% CPU
« Reply #9 on: August 11, 2010, 09:43:58 AM »
How to reproduce this issue:
1. Setup TinyCore Linux host (I use 3.0)
2. Start dropbear daemon
3. Connect without X11 forwarding
4. Try to start appbrowser. It will say
Quote
Can't open display:
And ab2tce.sh will start eating CPU.

And this hint really helps, thank you:
Simple fix would seem to be to add a check for an empty string as well as checking for quit in ab2tce.sh:
Code: [Select]
while [ "${command}" != "quit" ] && [ "${command}X" != "X" ]; doIf the appbrowser dies unexpectedly, ab2tce.sh knows to quit.

Offline caminati

  • Full Member
  • ***
  • Posts: 184
    • Homepage
Re: ab2tce using 100% CPU
« Reply #10 on: November 23, 2010, 11:44:57 AM »
Same annoying issue here with version 3.3. Not using appbrowser anymore. Could appbrowser-cli cause the same issue? And what about ab?
Thanks.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: ab2tce using 100% CPU
« Reply #11 on: November 23, 2010, 01:35:43 PM »
Same annoying issue here with version 3.3. Not using appbrowser anymore. Could appbrowser-cli cause the same issue? And what about ab?
Thanks.

ab, tce-load, and appbrowser-cli don't use that helper app.
The only barriers that can stop you are the ones you create yourself.

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: ab2tce using 100% CPU
« Reply #12 on: November 23, 2010, 02:33:10 PM »
I am unable to reproduce this, however I have made some adjustments for 3.4rc1.
if any of the regulars can reproduce it and wish to test a preview , pm me.
10+ Years Contributing to Linux Open Source Projects.

Offline caminati

  • Full Member
  • ***
  • Posts: 184
    • Homepage
Re: ab2tce using 100% CPU
« Reply #13 on: November 23, 2010, 06:33:49 PM »
Step by step:

boot microcore 3.3 + all three Xlibs, Xprogs, Xvesa with base norestore cheatcodes.
tce-load -i fluxbox.tcz (from official repository, though previously downloaded).
run startx from a console as user "tc"
Click with mouse right button and select "System Tools/AppBrowser"
Kill Xvesa with Ctrl+Alt+Backspace.
run top from a console and see ab2tce.sh at 90-100% CPU.

Note that:
1) ls /tmp/tcloop yields:
Xorg-7.5-lib/
fluxbox/

2) I am always offline (have no ethernet, and wireless modules were unloaded)

Hope it helps.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: ab2tce using 100% CPU
« Reply #14 on: November 23, 2010, 07:10:24 PM »
Hmm, the same can be observed with even fewer steps:

Boot to a "plain" TC 3.3 system (e.g. from CD-ROM without any persistence), start 'appbroser', and "crash" the X server (i.e. via 'Ctrl-Alt-Backspace').

I guess that's a bit an "unfair" test of the ability of 'appbrowser' to signal an end to it's child processes.

EDIT: Tested in a QEMU VM and on "real" hardware as well.
« Last Edit: November 23, 2010, 07:15:33 PM by maro »