linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #05348
[Bug 930247] Re: Crash when hashing a bad file with the new filereader (r2781 and newer)
Externad HDD when unplugged caused a crash while hashing
http://pastebin.com/RWrYpL73
--
You received this bug notification because you are a member of
Dcplusplus-team, which is subscribed to DC++.
https://bugs.launchpad.net/bugs/930247
Title:
Crash when hashing a bad file with the new filereader (r2781 and
newer)
Status in DC++:
New
Bug description:
[16:35:19] <Night> when hashing files it tries to use overlapped read by default and if it fails then it uses mapped read.
[16:35:53] <Night> but mapped read doesnt seem to be able to handle errors like ERROR_CRC and such data invalid errors
[16:36:06] <Night> so it will crash when hashing such a file.
[16:37:08] <eMTee> well we've heard about crashes during hashing so as you may found out the cause, this could go to the bug tracker right away
[16:37:42] <eMTee> any details on why would the mapped reader crash on this error?
[16:37:51] <Night> it just reads and reads
[16:38:03] <Night> until the pointer gets false
[16:38:02] <eMTee> what error is this? low level error reading the disk or what
[16:38:25] <Night> at my case it seemed to be a bad file
[16:38:34] <Night> the file cannot be read
[16:38:58] <eMTee> because of hardware error or logical error on the filesystem?
[16:39:00] <Night> the user couldnt even upload the file
[16:39:18] <Night> hardware is still under checks
[16:39:34] <Night> but was only that one file
[16:39:43] <Night> everytime
[16:39:52] <eMTee> is it in your system?
[16:39:56] <Night> no
[16:40:14] <Night> the error the read gives is ERROR_CRC
[16:41:07] <Night> if skip mapped read when hashing it will work since it will throw on the error and hash just fails
[16:42:05] <Night>
AirDC.exe!DCUnhandledExceptionFilter(_EXCEPTION_POINTERS * e) Line 171 + 0x21 bytes C++
kernel32.dll!0000000076f7cb7f()
ntdll.dll!0000000077063318()
ntdll.dll!0000000077029334()
ntdll.dll!00000000770258dd()
ntdll.dll!00000000770296d7()
ntdll.dll!0000000077036e08()
AirDC.exe!memcpy() Line 119 Asm
AirDC.exe!dcpp::TigerHash::update(const void * data, unsigned __int64 length) Line 174 C++
AirDC.exe!dcpp::MerkleTree<dcpp::TigerHash,1024>::update(const void * data, unsigned __int64 len) Line 111 C++
> AirDC.exe!std::tr1::_Impl_no_alloc2<std::tr1::_Callable_obj<dcpp::`anonymous namespace'::<lambda1>,0>,bool,void const * __ptr64,unsigned __int64>::_Do_call(const void * _Ax0, unsigned __int64 _Ax1) Line 65 + 0xae bytes C++
AirDC.exe!dcpp::FileReader::readMapped(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & file, const std::tr1::function<bool __cdecl(void const *,unsigned __int64)> & callback) Line 214 + 0x17 bytes C++
AirDC.exe!dcpp::FileReader::read(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & file, const std::tr1::function<bool __cdecl(void const *,unsigned __int64)> & callback) Line 28 C++
[16:44:08] <Night> i fixed it by skipping mapped read with direct read, as i dont know if mapped read can do any good anyway if direct failed
[16:45:39] <Night> i think arne should be able to understand the issue with the ERROR_CRC handling
...
[17:19:17] <Night> he cant reproduce it with DC++ anymore
[17:19:46] <Night> figured it might be if its not the first overlapped read that fails
[17:21:47] <Night> if its a disk error or a filesystem error what so ever it might get thru to the second one and it just reports that it cant read the file
[17:24:11] <Night> Datafeil (sirkulerende overflødighetskontroll, CRC) if that makes any sense to you, its the ERROR_CRC that's what it should report
[17:24:45] <Night> but if it fails on the first overlapped read it will try mapped read and that means crash
To manage notifications about this bug go to:
https://bugs.launchpad.net/dcplusplus/+bug/930247/+subscriptions
References