aMule Forum

English => en_Bugs => Topic started by: chemical on January 02, 2008, 03:22:19 PM

Title: Erroneous
Post by: chemical on January 02, 2008, 03:22:19 PM
Hi,

I've been using amuled and remote amule gui for a very long time now. It happened to me sometimes that my disk ran full, so that amuled stops the downloads with the Status "Insufficient disk space".

I changed from build 2007-12-09 to 2008-01-01 yesterday and the disk ran full again - however, some downloads went to "Erroneous". This is the first time in my amule-life that this happens. They can't be resumed either. Nor paused. I didn't try cancel because I don't want to lose the 4,55GB of that 7,61GB file.

I tried with remote amule GUI (title says 2.2.0, so this one is pretty new) and with local amulecmd. While amuled says "Operation successful" for every command I use (pause, resume), the GUI doesn't change a thing also.

Do I really need a restart of amuled when this happens? I bring this in reference to the full disk space, because this happend last night and no files went to "Insufficient disk space".

My guess is, that something has changed in the codebase. Any hints?
Title: Re: Erroneous
Post by: chemical on January 02, 2008, 03:27:21 PM
A restart helped to change the Status of these files back to "Paused". However, please explain which conditions trigger this undefined status - which can't be changed at runtime.

THANKS
Title: Re: Erroneous
Post by: chemical on January 05, 2008, 03:50:54 PM
My disk ran full again, and 50% of my files are set to status "Erroneous". I am not able to resume the ones in this status. This is reproduceable with builds from at least 20080101 and the disks runs below the disk-free-limit (10 MB in my case) and did not happen with 20071201.

I have to restart amuled once my disk ran full.

Moderator: Please move this topic to en_Bugs. Thanks.
Title: Re: Erroneous
Post by: Festor on January 05, 2008, 04:03:41 PM
Moderator: Please move this topic to en_Bugs. Thanks.

Done :D
Title: Re: Erroneous
Post by: chemical on May 12, 2008, 11:00:04 AM
Has anybody yet an idea?

This problem first occured with SVN builds beginning 1 Jan 2008 (+/- a few days), and is still hitting me since.

I'm using amuled on a linux router and its reproducable. Some files, while hitting the CheckDiskspace=1 / MinFreeDiskSpace=10, switch to "Erroneous" instead of "Paused".

The ratio is about 50/50, I however don't have exact numbers. The rather unhappy thing is, that I can't resume those files with neither remote amulegui/amulecmd nor amuleweb.

I have to restart the daemon after I free'd up some space.

Any hints? I can't believe that I'm the only one triggering this condition.

Thanks!
Title: Re: Erroneous
Post by: wuischke on May 12, 2008, 11:29:13 AM
Can you please give some details on your operating system and file system?

Also, is there any log output? There should be one of the following messages in the log. (You may have to enable debug log)

Reasons for PS_ERROR:
Title: Re: Erroneous
Post by: chemical on May 14, 2008, 10:19:34 AM
Hi wuischke!

I compiled with --enable-debug and --disable-optimize, started amuled and waited until the disk ran below the specified 10MB limit.

80% of my files got Paused regularly, 20% of my files are Erroneous.

This is all I can get out of my log, the problem started 2:48 last night:

Code: [Select]
2008-05-14 02:48:46: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:48:46: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:48:46: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:48:46: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:48:46: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:48:46: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:48:46: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: Success
2008-05-14 02:48:46: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: Success
2008-05-14 02:49:02: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:02: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:02: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:02: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:02: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:02: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:02: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:02: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:02: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:02: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:02: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:02: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:02: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:02: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: Success
2008-05-14 02:49:05: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: Success
2008-05-14 02:49:11: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:11: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:11: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:11: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:11: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: Success
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: Success
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: Success
2008-05-14 02:49:14: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: Success
2008-05-14 02:49:35: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:35: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:36: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:36: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:36: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:36: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:36: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:36: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: Success
2008-05-14 02:49:40: PartFile.cpp(3094): PartFiles: Error while saving part-file: SafeIO::IOFailure: Error writing to file: No space left on device
2008-05-14 02:49:40: PartFile.cpp(3066): WARNING: Not enough free disk-space! Pausing file: A
2008-05-14 02:49:44: PartFile.cpp(3066): WARNING: Not enough free disk-space! Pausing file: B
2008-05-14 02:49:49: PartFile.cpp(3066): WARNING: Not enough free disk-space! Pausing file: C
2008-05-14 02:49:57: PartFile.cpp(3066): WARNING: Not enough free disk-space! Pausing file: D
2008-05-14 02:50:12: PartFile.cpp(3066): WARNING: Not enough free disk-space! Pausing file: E
2008-05-14 02:50:12: PartFile.cpp(3066): WARNING: Not enough free disk-space! Pausing file: F
2008-05-14 02:50:17: PartFile.cpp(3066): WARNING: Not enough free disk-space! Pausing file: G
2008-05-14 02:50:23: PartFile.cpp(3066): WARNING: Not enough free disk-space! Pausing file: H
[..]
2008-05-14 03:49:41: PartFile.cpp(3066): WARNING: Not enough free disk-space! Pausing file: A
2008-05-14 03:49:46: PartFile.cpp(3066): WARNING: Not enough free disk-space! Pausing file: B
2008-05-14 03:49:50: PartFile.cpp(3066): WARNING: Not enough free disk-space! Pausing file: C
2008-05-14 03:49:58: PartFile.cpp(3066): WARNING: Not enough free disk-space! Pausing file: D
2008-05-14 03:50:13: PartFile.cpp(3066): WARNING: Not enough free disk-space! Pausing file: E
2008-05-14 03:50:13: PartFile.cpp(3066): WARNING: Not enough free disk-space! Pausing file: F
2008-05-14 03:50:18: PartFile.cpp(3066): WARNING: Not enough free disk-space! Pausing file: G
2008-05-14 03:50:24: PartFile.cpp(3066): WARNING: Not enough free disk-space! Pausing file: H
2008-05-14 03:50:32: PartFile.cpp(3066): WARNING: Not enough free disk-space! Pausing file: I
[..]

Please note the curious "Success"-Partfile Error Messages in between.
The files listed as A-I are paused successfully, tho there are way more paused than listed in the log. The ones that are Erroneous do not appear in the log.

Does that help?
Title: Re: Erroneous
Post by: chemical on June 16, 2008, 03:06:58 PM
Its still present in 2.2.1, thus http://bugs.amule.org/view.php?id=1337
Title: Re: Erroneous
Post by: wuischke on June 16, 2008, 07:52:02 PM
Sorry, I was in Stockholm shortly after you wrote this and completely forgot about it.

Well, crap. There was a big redesign of file related functions in this period and I suspect the error was introduced there. Unfortunately this will require some time to investigate, which I currently lack. Maybe someone else has a look at it, if not, please remind me again this weekend.

Thanks again for your report and (eventually) making aMule better!
Title: Re: Erroneous
Post by: chemical on June 18, 2008, 07:41:43 PM
No problem. If there is anything I can help you with, don't hesitate to ask.
Title: Re: Erroneous
Post by: wuischke on June 19, 2008, 04:37:48 PM
Possibly related to http://forum.amule.org/index.php?topic=15299.0

Does reloading the list of shared files help as suggested there?
Title: Re: Erroneous
Post by: Stu Redman on June 20, 2008, 11:34:31 PM
Hmm - I think the free space detection has a problem:

Code: (CPartFile::FlushBuffer) [Select]
// Ensure file is big enough to write data to (the last item will be the furthest from the start)
uint32 newData = 0;

std::list<PartFileBufferedData*>::iterator it = m_BufferedData_list.begin();
for (; it != m_BufferedData_list.end(); ++it) {
PartFileBufferedData* item = *it;
wxASSERT((item->end - item->start) < 0xFFFFFFFF);
newData += (uint32) (item->end - item->start + 1);
}

if ( !CheckFreeDiskSpace( newData ) ) {
// Not enough free space to write the last item, bail
AddLogLineM(true, CFormat( _("WARNING: Not enough free disk-space! Pausing file: %s") ) % GetFileName());

PauseFile( true );
return;
}

It checks how much data is to be written, and if there is enough free space for it. This works (roughly) for file systems supporting sparse files. But for non sparse part files this method fails completely. Writing a few kilobytes at the end can blow up the part file to full size and consume gigabytes in a moment. This is not considered at all.

So the disk does run full (as can be seen in the log anyway). And most OS don't behave gracefully anymore when out of disc space. Failure of upload might be some consequence. A total crash (of aMule, or even the OS itself) might be another.

Chemical, what OS and file system are you using ? Are your part files on the same partition as your operating system and your amule config directory ?
Title: Re: Erroneous
Post by: chemical on June 21, 2008, 02:47:44 PM
So the disk does run full (as can be seen in the log anyway). And most OS don't behave gracefully anymore when out of disc space. Failure of upload might be some consequence. A total crash (of aMule, or even the OS itself) might be another.

Chemical, what OS and file system are you using ? Are your part files on the same partition as your operating system and your amule config directory ?

I'm using Linux (2.6.24.2) with ext3. The temp and incoming directories are on a dedicated partition - thus independent from homes, root or .aMule. Do you mean that amuled sometimes checks the disk space on the wrong partition?

The next thing is, that amuled is not always the only program adding data to that partition - this shouldn't be a problem tho.
Title: Re: Erroneous
Post by: Stu Redman on June 21, 2008, 03:36:55 PM
Ext3 does support sparse files, so the problem shouldn't apply to you. Or ist there some tunefs option to turn it off ?
Oh, I see disc space checking can be turned off. (Now why is that an option ?  ??? )
Please look into Preferences/Files, activate "Check disk space" and set "Min disc space" to, let's say, 20MB.
Title: Re: Erroneous
Post by: chemical on June 21, 2008, 03:39:23 PM
Code: [Select]
donkey@prime:~/.aMule> grep -i disk amule.conf
CheckDiskspace=1
MinFreeDiskSpace=10
[UserEvents/OutOfDiskSpace]
donkey@prime:~/.aMule>

This was never changed - its activated since day one.
Title: Re: Erroneous
Post by: Stu Redman on June 21, 2008, 03:56:31 PM
Try
Code: [Select]
$ sudo tune2fs -l /dev/YOUR_PARTITION
tune2fs 1.40.8 (13-Mar-2008)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          f500dddc-5c6f-41f8-9eb4-5bd81516df13
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_file
and see if the sparse_super flag is present. If not, turn it on and run a fsck.
Also check if there are reserved blocks - on a data partition there shouldn't be any.
Title: Re: Erroneous
Post by: chemical on June 21, 2008, 04:00:45 PM
Code: [Select]
prime:~ # tune2fs -l /dev/hdg1
tune2fs 1.40.5 (27-Jan-2008)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          14a96ea1-f0c0-4f91-aeae-4e87a78bd969
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal filetype needs_recovery sparse_super large_file
Default mount options:    (none)
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              4889248
Block count:              9770669
Reserved block count:     0
Free blocks:              2619994
Free inodes:              4888527
First block:              0
Block size:               4096
Fragment size:            4096
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         16352
Inode blocks per group:   511
Filesystem created:       Thu Feb  5 21:22:46 2004
Last mount time:          Thu May 15 17:36:05 2008
Last write time:          Thu May 15 17:36:05 2008
Mount count:              1
Maximum mount count:      25
Last checked:             Thu May 15 17:33:47 2008
Check interval:           15552000 (6 months)
Next check after:         Tue Nov 11 16:33:47 2008
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               128
Journal inode:            8
Default directory hash:   tea
Directory Hash Seed:      e5c2e1b8-ba5d-4041-a532-99357b9fe2b4
Journal backup:           inode blocks

Everything worked fine until SVN 2008-01-01 - wuischke mentioned there were changes in the I/O system.
Title: Re: Erroneous
Post by: Stu Redman on June 21, 2008, 04:14:52 PM
Wuischke, what changes were you referring to ?
Title: Re: Erroneous
Post by: wuischke on June 21, 2008, 04:58:26 PM
Stu, particularly 7848, but it might have been something which was added with MSVC compatibility.
Title: Re: Erroneous
Post by: Stu Redman on June 22, 2008, 03:48:35 PM
LOL, I think I have found it.
Your free disk space is 10. The UI says that's 10 MB, but I can't find the piece of code where the 10 becomes 10 MB. I'm afraid aMule actually checks if there are 10 bytes left.  :o Or where am I wrong ?
The erroneous state comes definitely from the change Wuischke mentioned, but the real problem is the failure of the free disk space check.

If someone agrees on my finding I can provide a patch.
Title: Re: Erroneous
Post by: chemical on June 22, 2008, 04:22:32 PM
Sounds interesting. Do you find that piece of code in a 2007-12-01 SVN?

I have a backup amule.conf dated 2007-11-18, and there its:

Code: [Select]
CheckDiskspace=1
MinFreeDiskSpace=20

.. and it worked ever since.
Title: Re: Erroneous
Post by: wuischke on June 22, 2008, 04:44:30 PM
No, this can't happen, because there's a check beforehand which will test for free < PARTSIZE and partsize is 9728000. So it will at least check for full part size.

The check is however actually using bytes as you say and should be fixed, Please have a look at it.
Title: Re: Erroneous
Post by: chemical on June 22, 2008, 04:50:34 PM
Ah, I see. This fits perfectly into my thoughts .. now as I read it. There was a time back then I wondered because amuled ignored my setting of "20 MB" and still stopped at ~10MB (which was the setting before I moved to 20).

If the diskspace will never fall below 9,7M - regardless of the setting, then this will explain the behaviour.

I'll check with the SVN revision from tomorrow and report back.
Title: Re: Erroneous
Post by: Stu Redman on June 22, 2008, 08:14:40 PM
OK. Here is the working free disk space. I also bumped it to 64bit, so you can leave 10000 MB free.  :D
Also there is the muuli patch to make it compile under Windows again.

Chemical, the free disk check has been broken for a longer time probably. The January change just made a disk overflow more serious than before. Please set the (now working) free disk space to something larger (50-100MB, if you have the space), and look at what actual free space it stops next time. It seems that the built-in 9MB are not enough.
Title: Re: Erroneous
Post by: Kry on June 22, 2008, 08:34:34 PM
Up.
Title: Re: Erroneous
Post by: chemical on June 28, 2008, 11:35:36 AM
I took 2008-06-23, verified that the patches are in, compiled and started.

Today my disk ran full again. Half of the files are status "Insufficient diskspace", the other half is "Erroneous".

CheckDiskspace=1
MinFreeDiskSpace=10

I'll change it to 30 and wait again, to be sure the limit is honored. Right now I'm not sure whether this is the emergency brake by the check with PARTSIZE.
Title: Re: Erroneous
Post by: chemical on June 28, 2008, 05:57:01 PM
After changing MinFreeDiskSpace to 30, it seem to work nicely now.

Is 10 the default? If so, it should be changed. With 10, there are sometimes files set to Erroneous if the disk space runs full (too close on PARTSIZE).
Title: Re: Erroneous
Post by: Stu Redman on June 29, 2008, 12:28:36 AM
There is a minimum free space of 9.5 MB (one part) which is obviously too little.

I'd suggest to raise the hard-coded limit to 30MB, and to remove the "check free disc space" selection option alltogether (just leave the space setting, which then doesn't go below 30). Why should anybody turn it off ?

Mind, free disc space checking only works with sparse files. Anybody have an idea how to check if a file system supports sparse ? My best idea would be to check free space before and after writing data near the end of a new download (when non-sparse really eats up space).
Title: Re: Erroneous
Post by: Kry on June 29, 2008, 01:04:14 AM
[...]and to remove the "check free disc space" selection option alltogether (just leave the space setting, which then doesn't go below 30). Why should anybody turn it off ?

That's very much not out policy about giving people options.
Title: Re: Erroneous
Post by: Stu Redman on June 29, 2008, 12:49:29 PM
You mean, everbody should have the option to let his disk run full and get strange side effects ? If so - why reserve 9MB in the first place ?
Mind, I also prefer to have everything configurable - I'm not one of the "clean up the cluttered option dialog so that it fits on my mac screen" guys. Just give me one reason why it could make sense not to check free disc space.
Title: Re: Erroneous
Post by: Kry on June 29, 2008, 01:04:00 PM
Magical filesystem that allocates new partition space when trying to allocate new data and it has no free space?
Title: Re: Erroneous
Post by: chemical on June 29, 2008, 02:11:09 PM
Anyway, I recommend changing the default to Enabled and raise the bar from 10 to 30 MB.
Title: Re: Erroneous
Post by: Kry on June 29, 2008, 02:22:09 PM
That I can agree with.
Title: Re: Erroneous
Post by: Stu Redman on June 30, 2008, 10:19:27 PM
Magical filesystem that allocates new partition space when trying to allocate new data and it has no free space?
Magical filesystems don't use partition space - haven't you read Harry Potter, with Hermione cramming all the equipment, the tent and half the Hogwarts library into her little handbag ?  ;D
Title: Re: Erroneous
Post by: chemical on July 03, 2008, 09:10:16 PM
I'm afraid the problem is not fixed.

My setting is now to Enabled/30MB (which is honored) but anyway - 50% of the files downloading while reaching this threshold are "Erroneous" again.

Build SVN Mon Jun 23 07:01:46 CEST 2008
Title: Re: Erroneous
Post by: GonoszTopi on July 04, 2008, 12:42:38 PM
Dunno. Yesterday used up all my disk space (~9MB left, == PARTSIZE), but all of the file went 'Insufficient disk space'. No 'Erroneous'.
Title: Re: Erroneous
Post by: chemical on July 04, 2008, 03:03:45 PM
Am I the only one having a different partition for temp/incoming and home-directory? Hm.. I have no ideas left.
Title: Re: Erroneous
Post by: Vollstrecker on July 04, 2008, 03:34:39 PM
When my Temp/Incoming-Dir runs out of space I get the same State of "Erroneous " with amuled. They are mounted via smb.
This state occurs only for files tatht are downloaded completely and just have to be moved to incoming-dir.
Title: Re: Erroneous
Post by: Stu Redman on July 04, 2008, 10:32:34 PM
Disc space for the incoming directory is not checked on completion afaik - so that could be it. Chemical, which of your partitions is full - incoming or temp ? Was a download finished that didn't fit in the incoming folder anymore ?
Title: Re: Erroneous
Post by: chemical on July 05, 2008, 12:27:32 AM
Incoming and Temp are on the same partition - the home/config-dir is on a different one.
Title: Re: Erroneous
Post by: Stu Redman on July 05, 2008, 04:58:50 PM
I think it's possible to reserve a certain amount of disc space on a file system so that only root can fill this up. This could also cause the problem.
Please su to the user running amuled and see how much you can still write to the partiotion. Also, run a fsck on it.
Title: Re: Erroneous
Post by: chemical on July 05, 2008, 09:40:30 PM
In the output of tune2fs -l /dev/hdg1 in my previous post ( http://forum.amule.org/index.php?topic=14140.msg80708#msg80708 ) you can see that the reserved block count is at 0. This is the case since the disk was formatted (Thu Feb  5 21:22:46 2004) and has worked ever since.

I already did a fsck on "Thu May 15 17:33:47 2008". The problem started to show up on in the build of 2008-01-01, so the fsck did not help.

Based on the facts I have I don't think the problem is on my side, but I'm perhaps one of the rare users that spot a bug introduced in the changed I/O layer (wuischke said there were changes in Dec 2007). Anyway, I'm out of ideas and as this already happens since half a year I got used to it. I would however like to see this fixed tho :-)

Have a nice weekend.
Title: Re: Erroneous
Post by: Stu Redman on July 05, 2008, 11:38:49 PM
Chemical, the change introduced in January simply makes downloads erroneous in the catch block (when I/O errors occur). So much is clear.
What I'd like to find out is why these errors occur in the first place.
Quote
Please su to the user running amuled and see how much you can still write to the partition.
Title: Re: Erroneous
Post by: chemical on July 06, 2008, 03:21:39 PM
Chemical, the change introduced in January simply makes downloads erroneous in the catch block (when I/O errors occur). So much is clear.
What I'd like to find out is why these errors occur in the first place.
Quote
Please su to the user running amuled and see how much you can still write to the partition.

Ok, I see. However, as my limit was before on 10MB and is now on 30MB - I would say that the amuled can write at least additional 20MB to the partition. The Erroneous-state continued to exist even after raising the limit by 20MB - this, for my understanding, moves the problem from the hardware/filesystem to the core itself.

The user itself should be able to fill up the disk - I will check this the next time it happens. Additionally to that, I'll raise up to 100MB to be sure it is not the filesystem/IO.
Title: Re: Erroneous
Post by: PacoBell on April 19, 2009, 04:03:49 AM
Huh, I've got a few downloads in this state now, too. My temp volume is on an external array connected via eSATA. I had accidentally tripped over the cable and yanked it out of my expresscard (oops!). I'm running OSX 10.5.6 and my volume is journaled HFS+. When I plugged it back in, most downloads and uploads continued normally except the few that were "erroneous". Not sure what kind of logs the devs are interested in, but I'm pretty sure this experience is repeatable (just yank the plug again ;)).
Title: Re: Erroneous
Post by: Stu Redman on April 19, 2009, 12:25:04 PM
the change introduced in January simply makes downloads erroneous in the catch block (when I/O errors occur).
That's a feature, not a bug.  :)
Can you resume the files ?
And I'd run a filesystem check on the disc, journaled or not.
Title: Re: Erroneous
Post by: PacoBell on April 22, 2009, 03:32:17 AM
the change introduced in January simply makes downloads erroneous in the catch block (when I/O errors occur).
That's a feature, not a bug.  :)
Extra cautious, I see.
Quote
Can you resume the files ?
Nope, at least not until aMule's restarted.
Quote
And I'd run a filesystem check on the disc, journaled or not.
That's not a bad idea.