aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: finished files not properly shared  (Read 5924 times)

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
finished files not properly shared
« on: December 12, 2008, 04:21:57 AM »

Hi!

I have my amule set to have temp and incoming folders in different partitions. This is on a Fedora 10 system. However, I noticed that when finishing a file, the file seems to be shared normally, and everything seems OK, but if I click the button to rescan shared files, it will rehash the files it has finished in this session. The following log explains it better (I renamed the file and hid part of the hashes to protect the innocent :D):

Code: [Select]
2008-12-11 22:06:41: Found 313 known shared files
2008-12-11 22:06:41: ThreadScheduler: Completed task 'AICH Syncronizing', 0 tasks remaining.
2008-12-11 22:07:54: Hasher: Starting to create MD4 and AICH hash for file: 271.part
2008-12-11 22:08:07: ThreadScheduler: Completed task 'Hashing - /home/gpulido/amule/Temp/271.part', 0 tasks remaining.
2008-12-11 22:08:07: Suspending upload of file: FAFD18027590E8977E5D8398********
2008-12-11 22:08:10: Resuming uploads of file: FAFD18027590E8977E5D8398********
2008-12-11 22:08:10: Finished downloading: myfile.rar
2008-12-11 22:08:10: ThreadScheduler: Completed task 'Completing - /home/gpulido/amule/Temp/271.part.met', 1 tasks remaining.
2008-12-11 22:08:10: ThreadScheduler: Completed task 'AICH Syncronizing', 0 tasks remaining.
2008-12-11 22:08:21: Hasher: Starting to create MD4 and AICH hash for file: myfile.rar
2008-12-11 22:08:21: Found 312 known shared files, 1 unknown
2008-12-11 22:08:25: ThreadScheduler: Completed task 'Hashing - /mnt/warehouse/a/myfile.rar', 0 tasks remaining.
2008-12-11 22:08:25: ThreadScheduler: Completed task 'AICH Syncronizing', 0 tasks remaining.

Notice that I first scan shared files, and it says there are 313 files. Then, the file "myfile.rar" finishes downloading at 22:07:54 and starts hashing. At 22:08:10 the file is complete in the incoming folder. But then at 22:08:21 I click on rescan shared files, and now I have only 312 shared files (1 less than before) and an unknown file, which happens to be the recently finished file. Just in case it matters, the folder where my file is moved, is not the main incoming folder, is another folder, and is moved there by using categories.

Regards.
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: finished files not properly shared
« Reply #1 on: December 14, 2008, 05:44:23 PM »

I made a tracker issue.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: finished files not properly shared
« Reply #2 on: December 14, 2008, 06:12:49 PM »

Thanks Stu. I hope this bug gets squashed soon.

Regards.
Logged

wires

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 83
Re: finished files not properly shared
« Reply #3 on: December 17, 2008, 02:17:34 AM »

Just in case it matters, the folder where my file is moved, is not the main incoming folder, is another folder, and is moved there by using categories.

Same for me. Using categories on different partitions than incoming folder. Not sure about downloads in general cat. I'll try to check it.

Regards

Edit: confirmed. It works ok for general cat (incoming folder).
« Last Edit: December 17, 2008, 09:15:08 AM by wires »
Logged

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: finished files not properly shared
« Reply #4 on: December 27, 2008, 05:19:10 PM »

Stu: Which is the tracker issue number for this bug? I searched the mantis on bugs.amule.org but could not find it.

Thanks!
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: finished files not properly shared
« Reply #5 on: December 27, 2008, 06:13:58 PM »

1456
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: finished files not properly shared
« Reply #6 on: December 27, 2008, 07:01:48 PM »

Can't reproduce it on Ubuntu (with the SVN version).

What file system are you using for your cat dir ? Could it be a glitch like an inaccurate file date, changing time zone, special character, case problem ?
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: finished files not properly shared
« Reply #7 on: December 28, 2008, 08:53:40 PM »

Hi Stu

All the system is ext3 only, no changing time zone (we don't have seasons, always GMT-5), it happens always, wether there are special characters in the filename or not, but no clue about the inaccurate file date. I would say no, since my PC doesn't have NTP configured. However, it will invariably happen with files that are moved on completion to a folder other than the default, since I have two categories whose files are moved to different folders on completion and they both show this behavior. Files in the default folder (whether on a category or not) are always properly shared. Also, notice that this seems to happen if the destination folder is in a different partition than the temp folder. In the same partition seems to go OK. However, I'll check this.

Regards.
« Last Edit: December 28, 2008, 08:56:49 PM by skolnick »
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: finished files not properly shared
« Reply #8 on: December 28, 2008, 10:37:41 PM »

Please try this patch and tell me if it nails the little buggie.  8)

Date of the file was set after completion and before hashing only. If the file remains on the same partition it gets moved, date stays the same and everything is fine. On a different partition it gets copied, and date is slightly higher (unless it's tiny, that's why I couldn't reproduce it first). So it gets rehashed.
« Last Edit: December 28, 2008, 10:43:06 PM by Stu Redman »
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: finished files not properly shared
« Reply #9 on: December 29, 2008, 04:11:50 AM »

Hi Stu

Yes, it's confirmed that the bug will only happen when the partitions are different. In the same partition everything goes as expected. I'll try your patch. Can it be applied against aMule 2.2.3?

Regards.

Edit: silly question, Stu. I already checked and applied the patch on 2.2.3. Compiling it as I type.
« Last Edit: December 29, 2008, 04:20:28 AM by skolnick »
Logged

wires

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 83
Re: finished files not properly shared
« Reply #10 on: December 29, 2008, 09:18:59 AM »

It works! I applied the patch to rev. 9304.

Let's wait for skolnick to confirm.

Thanks!
Logged

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: finished files not properly shared
« Reply #11 on: December 30, 2008, 12:39:32 AM »

The patch works partly. The files get complete, and they do not appear in the shared files tab. However, as soon as I click on rescan files, the shared files appear and are not rehashed. So the patch effectively works avoiding the rehash, but it seems it didn't help making the files kepping their shares status.

Regards.

Edit: Tested with another file and this time it worked fine. Pretty strange. I'll do some more tests and report back.
« Last Edit: December 30, 2008, 03:55:50 AM by skolnick »
Logged

wires

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 83
Re: finished files not properly shared
« Reply #12 on: December 30, 2008, 02:28:27 PM »

The patch works partly. The files get complete, and they do not appear in the shared files tab. However, as soon as I click on rescan files, the shared files appear and are not rehashed. So the patch effectively works avoiding the rehash, but it seems it didn't help making the files kepping their shares status.

Regards.

Edit: Tested with another file and this time it worked fine. Pretty strange. I'll do some more tests and report back.

It works fine for me. Several finished downloads have appeared in the shared files tab with no rescan. I'm using fedora 9 x86_64 and the target filesystem for the category directory is ext3. I have another category without downloads (by now  ;)) targeting a JFS FS I can test it if you need it.

Regards!
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: finished files not properly shared
« Reply #13 on: December 30, 2008, 03:36:54 PM »

The files get complete, and they do not appear in the shared files tab.

Hmm - that would be a new problem. Just checked it, I get it shown right away even if I have the shared files tab already open.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: finished files not properly shared
« Reply #14 on: December 31, 2008, 09:16:37 PM »

yep Stu, the patch does in fact fix the problem, strange that the first time it happened what I reported, but all the other files get properly shared after completing, with no need for rescan. I think this is solved.

Thanks again.
Logged