Page 1 of 1

Bug: hang with 100% CPU use

PostPosted: 12 Feb 2010 09:25
by grey-hame
This is a new one.

For a while I've noticed occasional freezes with 100% CPU use that resolve on their own after a few minutes, NOT caused by adding a security rule. Then tonight it hung and stayed that way for at least 15 minutes. I killed and restarted it, but the splash screen got to "Starting GUI" and then it hung again with 100% CPU use.

Looks like I'll have to do a clean reinstall to undo this, which is a big pain since I have several incomplete downloads and other stuff I'd prefer not to lose.

What caused this and how can it be avoided in the future? It was idle at the time that it initially hung, open in the background without any user input for the past forty-odd minutes. Unfortunately, that suggests that the trigger was a network event of some kind, rather than a cack-handed user input, and that, in turn, means it's vulnerable to a denial-of-service attack. Oh, I'm sure in this instance the triggering was accidental, but if a particularly-structured bit of network traffic can cause this, then sooner or later someone will start doing it deliberately (likely agents of the RIAA).

Re: Bug: hang with 100% CPU use

PostPosted: 12 Feb 2010 09:41
by grey-hame
This is doubly weird.

First, as soon as I posted the above your forum logged me out and started that logging-me-out-every-couple-of-minutes crap again. Not when I submitted the post but right after it posted successfully.

Second, Shareaza spontaneously recovered from the hang-during-startup and told me there was a new version, 3.1.2.0. I started downloading that but it hung at 99.99%. I tried pause/resume, but then it just sat queued even though it had over 400 sources and wouldn't actually resume, so I shut down Shareaza and restarted it.

Oops. It shut down normally, but hung on startup again, this time on "Starting Shareaza database". Progress meter got to maybe the 1/20 mark and then stopped and CPU use shot up to 100%.

Perhaps a nifty new feature for 3.1.3.0 would be for Shareaza to actually keep its house in order and not go corrupting its own files on disk and then having to be reinstalled because it starts misbehaving on startup?

Re: Bug: hang with 100% CPU use

PostPosted: 12 Feb 2010 09:49
by grey-hame
Make that triply weird. I killed it again after it had made no progress in 10 minutes, then downloaded the update from the web site and installed it, hoping it fixed the bug causing the hang at "Starting Shareaza database". Apparently, it did; the startup paused briefly there for some reason but after a few seconds resumed making progress.

And then hung, with 100% CPU use, at "Starting GUI".

Sigh.

Re: Bug: hang with 100% CPU use

PostPosted: 12 Feb 2010 10:05
by grey-hame
Chapter 4 of the saga.

The "Starting GUI" hang recovered spontaneously, as it did last time. I canceled the incomplete download of the new version (obsolete now). Now I have a new problem -- besides that it now won't start up at all without a ten-minute freeze while "starting GUI".

One of my search result tabs shows two results, each with only one source. So it had had 2/2 in its heading before. But now, and ever since I had to kill 2.5.1.0 earlier because it froze for over 15 minutes and wouldn't recover, it shows 205/934, though there are still only two results.

Why not clear it? There's a problem with that, too: I need to keep one of those two results around. You see, that one is one of those files with push sources that keep having to have the source re-added manually every so often until it eventually downloads. In fact it's the only one; I had three like that at the start of this week but with perseverance, keeping the search results around and re-clicking them periodically, two of them downloaded, leaving just the one.

If I clear the result tab that your latest irritating bug has screwed up, I may not be able to get that third file. I'd have to take my chances with finding it via search again. That might take weeks, depending.

How do I fix this *without* losing the one result I want to keep? Is there some way to clear all but some subset of results? I tried adding a filter on that tab that matched both results but nothing else, but it didn't work; it still showed 205/934. There was also a long, 100% CPU use pause when I did (and again when I removed the useless filter), probably because it used your favorite algorithm, bubble sort, on that list of 934 phantom hits both times.

Obviously until I fix this wonky tab, any adding of security rules is going to take like half an hour or more per rule -- unacceptable. Plus I suspect it has something to do with the thing's sudden tendency to hang for ages at startup.

So how do I do it, WITHOUT giving up on perhaps ever getting that one stubborn file?

Re: Bug: hang with 100% CPU use

PostPosted: 12 Feb 2010 13:53
by cyko_01
*moving thread to bug discussion section of forum*

Re: Bug: hang with 100% CPU use

PostPosted: 12 Feb 2010 18:14
by grey-hame

Re: Bug: hang with 100% CPU use

PostPosted: 13 Feb 2010 01:07
by cyko_01

Re: Bug: hang with 100% CPU use

PostPosted: 13 Feb 2010 02:58
by grey-hame
I'm pretty sure all of the stuff I mentioned in this thread IS interrelated. The initial hang and force-quit seemed to cause the abnormal result numbers in that search tab, and either it or the abnormal numbers surely are related to the subsequent hangs.

Re: Bug: hang with 100% CPU use

PostPosted: 13 Feb 2010 15:32
by ailurophobe
Is there actually a Shareaza version 3.1.2.0? Highest release version available from SourceForge is 2.5.2.0. Sounds like a worm that tricked you into installing a trojan masquerading as a Shareaza version.

Re: Bug: hang with 100% CPU use

PostPosted: 13 Feb 2010 16:11
by cyko_01
where are you downloading shareaza from?! the latest version is 2.5.2.0 and it does not display any upgrade messages. You should ONLY download shareaza from http://shareaza.sourceforge.net. If that does not work then post here and we can direct you to another legitimate place where you can download it.

Re: Bug: hang with 100% CPU use

PostPosted: 13 Feb 2010 16:34
by ailurophobe
That's not the main issue. The main issue is that getting rid of a worm infection like that might require reinstalling Windows and all applications (after making sure the installer is trustworthy).

Re: Bug: hang with 100% CPU use

PostPosted: 13 Feb 2010 20:03
by grey-hame
No, it is 2.5.2.0. I couldn't exactly click the About box to check the version number when the damn thing was "not responding", so I was going by vague memory. :P

It was 2.5.1.0 that notified me that there was a new version -- 2.5.2.0 -- and then got stuck at 99.99% downloading it.

The really weird thing is that the bogus-extra-numbers thing spontaneously resolved. I think maybe because I did a "more" search on that tab. It's back to 2/2 instead of over 900.

Re: Bug: hang with 100% CPU use

PostPosted: 13 Feb 2010 22:34
by ailurophobe
Incidentally, you asked about removing search results. You can do it with the security manager by making a hash based security rule for the file you wish to remove. When you add it, search hits for that hash should be removed. Then you just remove the security rule. Or just give it an expiry time to begin with. I doubt this is actually worth doing, but it should work.

Re: Bug: hang with 100% CPU use

PostPosted: 15 Feb 2010 22:17
by grey-hame
I was looking to keep 1 result and remove 900, most of which were invisible to me -- not the other way around. But thanks. :)

Re: Bug: hang with 100% CPU use

PostPosted: 19 Feb 2010 19:37
by grey-hame
I'm still getting screwy behavior on startup:

1. A lengthy hang with high CPU use at "Starting Shareaza database"
2. That one particular search tab shows bogus numbers (e.g. 800/1000 instead of 2/2) despite only showing two (unfiltered) results.
3. When "Search" is clicked in that search tab, and "No" to the "want to clear previous results?" pop-up, there's another lengthy hang with high CPU use.
4. Then the numbers return to 2/2 (this particular search rarely finds anything new) and Shareaza seems to behave itself for the rest of the session.

But all of this repeats on the next restart. What's causing it?

Re: Bug: hang with 100% CPU use

PostPosted: 19 Feb 2010 20:49
by old_death
Have you tried closing the search window completely and restarting Shareaza before opening the window again (and starting the search)?

Re: Bug: hang with 100% CPU use

PostPosted: 20 Feb 2010 12:24
by brov

Re: Bug: hang with 100% CPU use

PostPosted: 20 Feb 2010 17:46
by mojo85
If you fear it's sql lite then as brov hinted to, erase the journal files "Shareaza.db3", also you might want to erase files that may have become corrupt, such as "Library1.dat", "Library2.dat", and "TigerTree.dat". Be warned though, this will result in a rehashing of your library.

Before the dat files are erased though, begin by erasing the db3 file and starting Shareaza. If things work, you can then avoid having to rehash your library.

Re: Bug: hang with 100% CPU use

PostPosted: 20 Feb 2010 21:01
by grey-hame
Will doing that preserve the search result in that tab that I want to keep around?

Re: Bug: hang with 100% CPU use

PostPosted: 20 Feb 2010 23:24
by mojo85
It should perserve it, the searches should be saved in Searches.dat. If you feel uneasy trying this, save a copy of the files to another directory and erase them from the Shareaza\Data directory.

Re: Bug: hang with 100% CPU use

PostPosted: 04 Mar 2010 15:09
by grey-hame
[quote="mojo85"]If you fear it's sql lite then as brov hinted to, erase the journal files "Shareaza.db3"

Didn't work.