Sometimes, aMuleWeb server gives the following error and dies:
amuleweb: ../../../src/libs/ec/cpp/ECTag.h:164:CMD4Hash CECTag::GetMD4Data() const: assertion “(m_dataType == EC_TAGTYPE_HASH16) || (m_dataType == EC_TAGTYPE_UNKNOWN)” fails (Translated from Chinese).
Here is the backtrace:
#0 0x00000036dc62f765 in raise () from /lib64/libc.so.6
#1 0x00000036dc631050 in abort () from /lib64/libc.so.6
#2 0x00000036dc628ed6 in __assert_fail () from /lib64/libc.so.6
#3 0x000000000043d093 in CECTag::GetMD4Data (this=0x8b2c30) at ../../../src/libs/ec/cpp/ECTag.h:164
#4 0x000000000043d150 in CEC_PartFile_Tag::ID (this=0x8b2c30) at ../../../src/libs/ec/cpp/ECSpecialTags.h:194
#5 0x0000000000440403 in UpdatableItemsContainer<DownloadFile, CEC_PartFile_Tag, CMD4Hash>::ProcessUpdate (this=0x8097b0, reply=0x8b2bc0,
full_req=0x41400100, req_type=768) at WebServer.h:255
#6 0x0000000000442cee in UpdatableItemsContainer<DownloadFile, CEC_PartFile_Tag, CMD4Hash>::DoRequery (this=0x8097b0, cmd=13, tag=768) at WebServer.h:313
#7 0x000000000041ca9d in DownloadFileInfo::ReQuery (this=0x8097b0) at WebServer.cpp:740
#8 0x000000000048895b in amule_obj_array_create<DownloadFileInfo, DownloadFile> (class_name=0x4dc154 "AmuleDownloadFile", result=0x8b1220)
at php_core_lib.cpp:1002
#9 0x000000000047cfae in amule_load_downloads (result=0x8b1220) at php_core_lib.cpp:1017
#10 0x000000000047d083 in php_native_load_amule_vars (result=0x8b1220) at php_core_lib.cpp:1157
#11 0x000000000046fbcb in php_run_func_call (node=0x8b1510, result=0x8b1220) at php_syntree.cpp:1758
#12 0x000000000046ff0e in php_expr_eval (expr=0x8b1510, result=0x8b1220) at php_syntree.cpp:1324
#13 0x000000000046fd2b in php_expr_eval (expr=0x8b15b0, result=0x0) at php_syntree.cpp:1271
#14 0x00000000004705df in php_execute (node=0x8b15f0, result=0x414007c0) at php_syntree.cpp:1791
#15 0x0000000000479f82 in CPhPLibContext::Execute (this=0x8ae7f0, buf=0x414008c0) at php_core_lib.cpp:1703
#16 0x000000000047a1cf in CPhpFilter (this=0x4140090f, server=0x8096e0, sess=0x8af7a8,
file=0x80aac0 "/usr/local/share/amule/webserver/default/downloads.php", buff=0x414008c0) at php_core_lib.cpp:1781
#17 0x0000000000410857 in CScriptWebServer::ProcessPhpRequest (this=0x8096e0, filename=0x80aac0 "/usr/local/share/amule/webserver/default/downloads.php",
sess=0x8af7a8, size=@0x414009c8) at WebServer.cpp:1773
#18 0x000000000041903c in CScriptWebServer::ProcessURL (this=0x8096e0, Data=@0x41400e80) at WebServer.cpp:1894
#19 0x0000000000447d40 in CWebSocket::OnRequestReceived (this=0x2aaaae901a80,
pHeader=0x2aaaae901cf3 "HTTP/1.1\r\nHost: localhost:32001\r\nUser-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11\r\nAccept: text/xml,application/xml,application/xhtml+xml,text/h"..., pData=0x0, dwDataLen=0) at WebSocket.cpp:375
#20 0x000000000044857f in CWCThread::Entry (this=0x2aaaae901a60) at WebSocket.cpp:240
#21 0x00000036dd3f931d in wxThreadInternal::PthreadStart () from /usr/lib64/libwx_baseu-2.8.so.0
#22 0x00000036dcf062ea in start_thread () from /lib64/libpthread.so.0
#23 0x00000036dc6cb73d in clone () from /lib64/libc.so.6
#24 0x0000000000000000 in ?? ()
Here is the full back trace:
#0 0x00000036dc62f765 in raise () from /lib64/libc.so.6
No symbol table info available.
#1 0x00000036dc631050 in abort () from /lib64/libc.so.6
No symbol table info available.
#2 0x00000036dc628ed6 in __assert_fail () from /lib64/libc.so.6
No symbol table info available.
#3 0x000000000043d093 in CECTag::GetMD4Data (this=0x8b2c30) at ../../../src/libs/ec/cpp/ECTag.h:164
__PRETTY_FUNCTION__ = "CMD4Hash CECTag::GetMD4Data() const"
#4 0x000000000043d150 in CEC_PartFile_Tag::ID (this=0x8b2c30) at ../../../src/libs/ec/cpp/ECSpecialTags.h:194
No locals.
#5 0x0000000000440403 in UpdatableItemsContainer<DownloadFile, CEC_PartFile_Tag, CMD4Hash>::ProcessUpdate (this=0x8097b0, reply=0x8b2bc0,
full_req=0x41400100, req_type=768) at WebServer.h:255
tag = (CEC_PartFile_Tag *) 0x8b2c30
core_files = {<__gnu_norm::set<CMD4Hash,std::less<CMD4Hash>,std::allocator<CMD4Hash> >> = {_M_t = {
_M_impl = {<std::allocator<std::_Rb_tree_node<CMD4Hash> >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<CMD4Hash> >> = {<No data fields>}, <No data fields>}, _M_key_compare = {<> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = std::_S_red, _M_parent = 0x0, _M_left = 0x413ffd28,
_M_right = 0x413ffd28},
_M_node_count = 0}}}, <__gnu_debug::_Safe_sequence<__gnu_debug_def::set<CMD4Hash, std::less<CMD4Hash>, std::allocator<CMD4Hash> > >> = {<__gnu_debug::_Safe_sequence_base> = {_M_iterators = 0x0, _M_const_iterators = 0x0, _M_version = 1}, <No data fields>}, <No data fields>}
del_ids = {<__gnu_norm::list<CMD4Hash,std::allocator<CMD4Hash> >> = {<__gnu_norm::_List_base<CMD4Hash,std::allocator<CMD4Hash> >> = {
_M_impl = {<std::allocator<__gnu_norm::_List_node<CMD4Hash> >> = {<__gnu_cxx::new_allocator<__gnu_norm::_List_node<CMD4Hash> >> = {<No data fields>}, <No data fields>}, _M_node = {_M_next = 0x0,
_M_prev = 0x89afa0}}}, <No data fields>}, <__gnu_debug::_Safe_sequence<__gnu_debug_def::list<CMD4Hash, std::allocator<CMD4Hash> > >> = {<__gnu_debug::_Safe_sequence_base> = {_M_iterators = 0x413ffe18, _M_const_iterators = 0x413ffe40, _M_version = 1094712864}, <No data fields>}, <No data fields>}
#6 0x0000000000442cee in UpdatableItemsContainer<DownloadFile, CEC_PartFile_Tag, CMD4Hash>::DoRequery (this=0x8097b0, cmd=13, tag=768) at WebServer.h:313
req_sts = {<CECEmptyTag> = {<CECTag> = {m_error = 0, m_tagData = 0x0, m_state = 1084231680, m_tagName = 0, m_dataLen = 0, m_dataType = 1 '\001',
m_dynamic = false, m_tagList = {<__gnu_norm::vector<CECTag,std::allocator<CECTag> >> = {<__gnu_norm::_Vector_base<CECTag,std::allocator<CECTag> >> = {
_M_impl = {<std::allocator<CECTag>> = {<__gnu_cxx::new_allocator<CECTag>> = {<No data fields>}, <No data fields>}, _M_start = 0x8b22d0,
_M_finish = 0x8b2330,
_M_end_of_storage = 0x8b2330}}, <No data fields>}, <__gnu_debug::_Safe_sequence<__gnu_debug_def::vector<CECTag, std::allocator<CECTag> > >> = {<__gnu_debug::_Safe_sequence_base> = {_M_iterators = 0x0, _M_const_iterators = 0x0, _M_version = 2}, <No data fields>}, _M_guaranteed_capacity = 1},
m_haschildren = false, static s_theNullTag = {m_error = 0, m_tagData = 0x4e1ce0, m_state = CECTag::bsName, m_tagName = 0, m_dataLen = 0,
m_dataType = 0 '\0', m_dynamic = false,
m_tagList = {<__gnu_norm::vector<CECTag,std::allocator<CECTag> >> = {<__gnu_norm::_Vector_base<CECTag,std::allocator<CECTag> >> = {
_M_impl = {<std::allocator<CECTag>> = {<__gnu_cxx::new_allocator<CECTag>> = {<No data fields>}, <No data fields>}, _M_start = 0x0,
_M_finish = 0x0,
_M_end_of_storage = 0x0}}, <No data fields>}, <__gnu_debug::_Safe_sequence<__gnu_debug_def::vector<CECTag, std::allocator<CECTag> > >> = {<__gnu_debug::_Safe_sequence_base> = {_M_iterators = 0x0, _M_const_iterators = 0x0, _M_version = 1}, <No data fields>}, _M_guaranteed_capacity = 0},
m_haschildren = false, static s_theNullTag = <same as static member of an already seen type>, static s_theNullTagData = {0, 0, 0, 0}},
static s_theNullTagData = {0, 0, 0, 0}}, <No data fields>}, m_opCode = 13 '\r'}
reply = (const CECPacket *) 0x8b2bc0
req_full = {<CECEmptyTag> = {<CECTag> = {m_error = 0, m_tagData = 0x0, m_state = 1084231680, m_tagName = 0, m_dataLen = 0, m_dataType = 1 '\001',
m_dynamic = false, m_tagList = {<__gnu_norm::vector<CECTag,std::allocator<CECTag> >> = {<__gnu_norm::_Vector_base<CECTag,std::allocator<CECTag> >> = {
_M_impl = {<std::allocator<CECTag>> = {<__gnu_cxx::new_allocator<CECTag>> = {<No data fields>}, <No data fields>}, _M_start = 0x0,
_M_finish = 0x0,
_M_end_of_storage = 0x0}}, <No data fields>}, <__gnu_debug::_Safe_sequence<__gnu_debug_def::vector<CECTag, std::allocator<CECTag> > >> = {<__gnu_debug::_Safe_sequence_base> = {_M_iterators = 0x0, _M_const_iterators = 0x0, _M_version = 1}, <No data fields>}, _M_guaranteed_capacity = 0},
m_haschildren = false, static s_theNullTag = {m_error = 0, m_tagData = 0x4e1ce0, m_state = CECTag::bsName, m_tagName = 0, m_dataLen = 0,
m_dataType = 0 '\0', m_dynamic = false,
m_tagList = {<__gnu_norm::vector<CECTag,std::allocator<CECTag> >> = {<__gnu_norm::_Vector_base<CECTag,std::allocator<CECTag> >> = {
_M_impl = {<std::allocator<CECTag>> = {<__gnu_cxx::new_allocator<CECTag>> = {<No data fields>}, <No data fields>}, _M_start = 0x0,
_M_finish = 0x0,
_M_end_of_storage = 0x0}}, <No data fields>}, <__gnu_debug::_Safe_sequence<__gnu_debug_def::vector<CECTag, std::allocator<CECTag> > >> = {<__gnu_debug::_Safe_sequence_base> = {_M_iterators = 0x0, _M_const_iterators = 0x0, _M_version = 1}, <No data fields>}, _M_guaranteed_capacity = 0},
m_haschildren = false, static s_theNullTag = <same as static member of an already seen type>, static s_theNullTagData = {0, 0, 0, 0}},
static s_theNullTagData = {0, 0, 0, 0}}, <No data fields>}, m_opCode = 13 '\r'}
#7 0x000000000041ca9d in DownloadFileInfo::ReQuery (this=0x8097b0) at WebServer.cpp:740
No locals.
#8 0x000000000048895b in amule_obj_array_create<DownloadFileInfo, DownloadFile> (class_name=0x4dc154 "AmuleDownloadFile", result=0x8b1220)
at php_core_lib.cpp:1002
container = (class DownloadFileInfo *) 0x8097b0
it = {<__gnu_debug::_Safe_iterator_base> = {_M_sequence = 0x41400260, _M_version = 4664614, _M_prior = 0x414002e7, _M_next = 0x8b2258},
_M_current = {_M_node = 0x41400270}}
#9 0x000000000047cfae in amule_load_downloads (result=0x8b1220) at php_core_lib.cpp:1017
No locals.
#10 0x000000000047d083 in php_native_load_amule_vars (result=0x8b1220) at php_core_lib.cpp:1157
si_str = (PHP_SCOPE_ITEM *) 0x8d35d0
str = (PHP_VALUE_NODE *) 0x8b2020
varname = 0x8b2110 "downloads"
#11 0x000000000046fbcb in php_run_func_call (node=0x8b1510, result=0x8b1220) at php_syntree.cpp:1758
l_node = (PHP_EXP_NODE *) 0x8b1550
r_node = (PHP_EXP_NODE *) 0x8b1410
si = (PHP_SCOPE_ITEM *) 0x8d3660
func = (PHP_SYN_NODE *) 0x8d34f0
func_decl = (PHP_SYN_FUNC_DECL_NODE *) 0x8d3530
saved_vars = {<__gnu_norm::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >,PHP_VAR_NODE*,std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >,std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, PHP_VAR_NODE*> > >> = {_M_t = {
_M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, PHP_VAR_NODE*> > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, PHP_VAR_NODE*> > >> = {<No data fields>}, <No data fields>}, _M_key_compare = {<> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = std::_S_red,
_M_parent = 0x8b2090, _M_left = 0x8b2050, _M_right = 0x8b20d0},
_M_node_count = 3}}}, <__gnu_debug::_Safe_sequence<__gnu_debug_def::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, PHP_VAR_NODE*, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, PHP_VAR_NODE*> > > >> = {<__gnu_debug::_Safe_sequence_base> = {_M_iterators = 0x0, _M_const_iterators = 0x0,
_M_version = 1}, <No data fields>}, <No data fields>}
#12 0x000000000046ff0e in php_expr_eval (expr=0x8b1510, result=0x8b1220) at php_syntree.cpp:1324
result_val_right = {type = PHP_VAL_NONE, {int_val = 1094714773, float_val = 5.408609613341986e-315, str_val = 0x41400595 "", ptr_val = 0x41400595,
obj_val = {inst_ptr = 0x41400595, class_name = 0x8b1220 "\005"}}}
result_val_left = {type = PHP_VAL_NONE, {int_val = 9117552, float_val = 4.5046692173711491e-317, str_val = 0x8b1f70 "\003", ptr_val = 0x8b1f70,
obj_val = {inst_ptr = 0x8b1f70, class_name = 0x41400595 ""}}}
lval_node = (PHP_VAR_NODE *) 0x0
si = (PHP_SCOPE_ITEM *) 0x0
#13 0x000000000046fd2b in php_expr_eval (expr=0x8b15b0, result=0x0) at php_syntree.cpp:1271
result_val_right = {type = PHP_VAL_NONE, {int_val = 1094714911, float_val = 5.4086102951525773e-315, str_val = 0x4140061f "", ptr_val = 0x4140061f,
obj_val = {inst_ptr = 0x4140061f, class_name = 0x8 <Address 0x8 out of bounds>}}}
result_val_left = {type = PHP_VAL_NONE, {int_val = 0, float_val = 0, str_val = 0x0, ptr_val = 0x0, obj_val = {inst_ptr = 0x0,
class_name = 0x414006d0 "▒\a@A"}}}
lval_node = (PHP_VAR_NODE *) 0x8b1220
si = (PHP_SCOPE_ITEM *) 0x0
#14 0x00000000004705df in php_execute (node=0x8b15f0, result=0x414007c0) at php_syntree.cpp:1791
cond_result = {type = PHP_VAL_NONE, {int_val = 1094715136, float_val = 5.4086114068002805e-315, str_val = 0x41400700 "", ptr_val = 0x41400700,
obj_val = {inst_ptr = 0x41400700, class_name = 0x414006d0 "▒\a@A"}}}
curr_exec_result = 0
#15 0x0000000000479f82 in CPhPLibContext::Execute (this=0x8ae7f0, buf=0x414008c0) at php_core_lib.cpp:1703
val = {type = 9116576, {int_val = 9117552, float_val = 4.5046692173711491e-317, str_val = 0x8b1f70 "\003", ptr_val = 0x8b1f70, obj_val = {
inst_ptr = 0x8b1f70, class_name = 0x8096e0 "▒\203L"}}}
#16 0x000000000047a1cf in CPhpFilter (this=0x4140090f, server=0x8096e0, sess=0x8af7a8,
file=0x80aac0 "/usr/local/share/amule/webserver/default/downloads.php", buff=0x414008c0) at php_core_lib.cpp:1781
No locals.
#17 0x0000000000410857 in CScriptWebServer::ProcessPhpRequest (this=0x8096e0, filename=0x80aac0 "/usr/local/share/amule/webserver/default/downloads.php",
sess=0x8af7a8, size=@0x414009c8) at WebServer.cpp:1773
f = (FILE *) 0x8cee70
buffer = {m_buf_list = {<__gnu_norm::list<char*,std::allocator<char*> >> = {<__gnu_norm::_List_base<char*,std::allocator<char*> >> = {
_M_impl = {<std::allocator<__gnu_norm::_List_node<char*> >> = {<__gnu_cxx::new_allocator<__gnu_norm::_List_node<char*> >> = {<No data fields>}, <No data fields>}, _M_node = {_M_next = 0x8b0da0,
_M_prev = 0x8d21c0}}}, <No data fields>}, <__gnu_debug::_Safe_sequence<__gnu_debug_def::list<char*, std::allocator<char*> > >> = {<__gnu_debug::_Safe_sequence_base> = {_M_iterators = 0x0, _M_const_iterators = 0x0, _M_version = 1}, <No data fields>}, <No data fields>}, m_total_length = 6064,
m_alloc_size = 1024,
m_curr_buf = 0x8d21e0 "utes() < 10 ? \"0\" : \"\") + d.getMinutes() + \":\" + (d.getSeconds() < 10 ? \"0\" : \"\") + d.getSeconds() + \" ]\";\n\tdocument.write(s);\n</script>\n </font>\n </td>\n <td align=right class=tabs>\n <form>\n <input"..., m_buf_ptr = 0x8d2590 "▒'\215", m_curr_buf_left = 80}
buf = 0x43117d "H\211▒H\203▒\b[▒▒\220UH\211▒H\203▒PH\211}▒H\211u▒H\211U▒▒E▒"
#18 0x000000000041903c in CScriptWebServer::ProcessURL (this=0x8096e0, Data=@0x41400e80) at WebServer.cpp:1894
lock = {m_isOk = true, m_mutex = @0x8096f0}
httpOutLen = 46912561487090
httpOut = 0x0
filename = {<wxStringBase> = {static npos = 18446744073709551615, m_pchData = 0x80b048}, <No data fields>}
session = (CSession *) 0x8af7a8
req_file = {<wxStringBase> = {static npos = 18446744073709551615, m_pchData = 0x7981b8}, <No data fields>}
isUseGzip = false
#19 0x0000000000447d40 in CWebSocket::OnRequestReceived (this=0x2aaaae901a80,
pHeader=0x2aaaae901cf3 "HTTP/1.1\r\nHost: localhost:32001\r\nUser-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11\r\nAccept: text/xml,application/xml,application/xhtml+xml,text/h"..., pData=0x0, dwDataLen=0) at WebSocket.cpp:375
url_ext = {<wxStringBase> = {static npos = 18446744073709551615, m_pchData = 0x789278}, <No data fields>}
is_post = false
path = 0x2aaaae901ce4 "/downloads.php"
sURL = {<wxStringBase> = {static npos = 18446744073709551615, m_pchData = 0x8af648}, <No data fields>}
sessid = 1714636915
current_cookie = 0x2aaaae901e8b "amuleweb_session_id=1714636915; __utma=4551841.19821.1188536251.1195784153.1199074753.4; __utmz=4551841.1188536251.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)\r\nMax-Forwards: 10\r\nX-Forwarded-For:"...
Data = {parsedURL = {m_path = {<wxStringBase> = {static npos = 18446744073709551615, m_pchData = 0x36dd41b9f8}, <No data fields>},
m_file = {<wxStringBase> = {static npos = 18446744073709551615, m_pchData = 0x8af868}, <No data fields>},
m_params = {<__gnu_norm::map<wxString,wxString,std::less<wxString>,std::allocator<std::pair<const wxString, wxString> > >> = {_M_t = {
_M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<const wxString, wxString> > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<const wxString, wxString> > >> = {<No data fields>}, <No data fields>}, _M_key_compare = {<> = {<No data fields>}, <No data fields>}, _M_header = {
_M_color = std::_S_red, _M_parent = 0x0, _M_left = 0x41400d28, _M_right = 0x41400d28},
_M_node_count = 0}}}, <__gnu_debug::_Safe_sequence<__gnu_debug_def::map<wxString, wxString, std::less<wxString>, std::allocator<std::pair<const wxString, wxString> > > >> = {<__gnu_debug::_Safe_sequence_base> = {_M_iterators = 0x0, _M_const_iterators = 0x0,
_M_version = 1}, <No data fields>}, <No data fields>}}, sURL = {<wxStringBase> = {static npos = 18446744073709551615,
m_pchData = 0x8af648}, <No data fields>}, SessionID = 1714636915, pSocket = 0x2aaaae901a80}
sFile = {<wxStringBase> = {static npos = 18446744073709551615, m_pchData = 0x8af868}, <No data fields>}
#20 0x000000000044857f in CWCThread::Entry (this=0x2aaaae901a60) at WebSocket.cpp:240
IsGet = true
IsPost = false
lock = {m_isOk = false, m_mutex = @0x0}
#21 0x00000036dd3f931d in wxThreadInternal::PthreadStart () from /usr/lib64/libwx_baseu-2.8.so.0
No symbol table info available.
#22 0x00000036dcf062ea in start_thread () from /lib64/libpthread.so.0
No symbol table info available.
#23 0x00000036dc6cb73d in clone () from /lib64/libc.so.6
No symbol table info available.
#24 0x0000000000000000 in ?? ()
No symbol table info available.
Anybody can look into this? It seems the returned EC type is sometimes incorrect for hashes. I did print m_dataType in gdb, it shows:
(gdb) print m_dataType
$1 = 2 '\002'
According to ECTagType.h, 2 means UInt8. I have no idea how this happens.