Hashing thread doesn't halt immediately on shutdown

Bug #264342 reported by E_zombie on 2008-09-03
12
Affects Status Importance Assigned to Milestone
DC++
Medium
Unassigned
LinuxDC++
Medium
Steven Sheehy

Bug Description

1. close client use meny file -> exit
2. start linuxdcpp again and have Error
3.

# ps | grep linux
user 32233 41.4 3.8 785360 78788 ? SNsl 17:39 1:48 /usr/local/bin/linuxdcpp
root 32411 0.0 0.0 84304 828 pts/10 S+ 17:43 0:00 grep linux

4. # kill 32233
5. start client normal

# uname -a
Linux wp.san.ru 2.6.25.14-69.fc8 #1 SMP Mon Aug 4 14:00:45 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux

Steven Sheehy (steven-sheehy) wrote :

What LinuxDC++ version? How did you start it (command line or through some menu)? Are you sure the program didn't get just minimized to tray? What is the stdout output when you attempt to close it and it disappears but keeps running (may have to run from commandline or check LinuxDC++'s logs to get the output)?

Changed in linuxdcpp:
status: New → Incomplete
E_zombie (lv77) wrote :
Steven Sheehy (steven-sheehy) wrote :

E_zombie, you did not answer all of my questions.

Razzloss, can you reproduce this on your trunk?

Razzloss (razzloss) wrote :

Yes. No. Maybe.

Ok, can't really remember if this has happened with 070x, but I believe this isn't really specific to 705. As it has happened with 0698 also. It seems when there's really slow transfers or network problems when quitting the client sometimes the threads running the sockets won't terminate (or if they do it takes long enough for me to get tired of waiting and I usually just hit ctrl+c to terminate... I wait maybe 2-3 seconds for the threads to die after the GUI has disappeared).

I'll see if I can find specific steps to reproduce this, but it'll have to wait atleast 'til saturday when I get home.

--RZ

E_zombie (lv77) wrote :

I did not face the given problem after have informed on it.
It can be linked to that that I did upgrade shares by the size in 1.1 Tb at the moment of problem occurrence.

Razzloss (razzloss) wrote :

Ok, it probably wasn't about the network connections. At least I couldn't reproduce it with firewall tricks... But if the hashing is in progress it seems to wait it to finish, or atleast the file it is currently hashing (tried with 4GB file and it hasn't shutdown yet).

Confirmed with 0705-branch.

--RZ

Changed in linuxdcpp:
status: Incomplete → Confirmed
Steven Sheehy (steven-sheehy) wrote :

Guess we need to update the core to halt the hashing thread if the program is shutdown.

Changed in linuxdcpp:
importance: Undecided → Medium
Steven Sheehy (steven-sheehy) wrote :

Please try the following patch and let me know if it resolves the issue. It seems to work for me. Looks like the Windows code probably has the same issue (haven't tested).

Steven Sheehy (steven-sheehy) wrote :

Can someone using windows confirm this behavior on windows as well? It should only occur with fast hash enabled.

Changed in linuxdcpp:
assignee: nobody → Steven Sheehy (steven-sheehy)
eMTee (realprogger) wrote :

Tested on Windows with hashing a bunch of 30-40 GiB files and also with a 4GiB iso image. Closes properly in both cases, though it finishes hashing the current file before exit so with the large iso file closing the process took about a minute. I got Fast hash option switched on since it introduced and I've never experienced such kind of problem.

LoRenZo (lorenzo-mailbox) wrote :

Yes, it exists on Windows too. I started to hash a file with a size of almost 8gb, and about 5% of the hashing progress i quit the program, and it was still almost 3 mins long in the active process list after that. On the next start, the hased file was displayed in the share settings, also when i opened my list. (DC++ v0.750)

Steven Sheehy (steven-sheehy) wrote :

eMTee, what you described is exactly the problem: the program doesn't close immediately, it has to finish hashing the current file.

Changed in dcplusplus:
importance: Undecided → Medium
status: New → Confirmed
summary: - not close process after exit
+ Hashing thread doesn't halt immediately on shutdown
Steven Sheehy (steven-sheehy) wrote :

Here's a patch that should fix it for Windows and Linux on latest dcpp bzr. Please test.

eMTee (realprogger) wrote :

Ah, sorry, misunderstood, from the original bug description I thought that the reported problem is that it never closes in this particular case... I'll test the patch.

poy (poy) on 2009-05-03
Changed in dcplusplus:
status: Confirmed → Fix Committed
poy (poy) wrote :

Fixed in version 0.760.

Changed in dcplusplus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers