aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: amuleweb + gettext  (Read 2438 times)

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
amuleweb + gettext
« on: May 13, 2008, 12:55:09 AM »

Code: [Select]
(gdb) run --amule-config-file=/home/johkra/.aMule/amule.conf
Starting program: /usr/bin/amuleweb --amule-config-file=/home/johkra/.aMule/amule.conf
[Thread debugging using libthread_db enabled]
[New Thread 0x2b7060759c10 (LWP 12887)]
[New Thread 0x40800950 (LWP 12893)]
[New Thread 0x41001950 (LWP 12894)]
*** glibc detected *** /usr/bin/amuleweb: double free or corruption (fasttop): 0x00000000007bbf90 ***
======= Backtrace: =========
/lib/libc.so.6[0x2b7060018808]
/lib/libc.so.6(cfree+0x76)[0x2b706001a916]
/usr/bin/amuleweb[0x474e2f]
/usr/bin/amuleweb[0x47968f]
/usr/bin/amuleweb[0x48d1d2]
/usr/bin/amuleweb[0x48d427]
/usr/bin/amuleweb[0x411be1]
/usr/bin/amuleweb[0x41d857]
/usr/bin/amuleweb[0x44d17c]
/usr/bin/amuleweb[0x44da71]
/usr/lib/libwx_baseu-2.8.so.0(_ZN16wxThreadInternal12PthreadStartEP8wxThread+0xda)[0x2b705ef0fb2a]
/lib/libpthread.so.0[0x2b705e9cafc7]
/lib/libc.so.6(clone+0x6d)[0x2b7060073e0d]
======= Memory map: ========
00400000-00537000 r-xp 00000000 08:01 222733                             /usr/bin/amuleweb
00737000-00739000 rw-p 00137000 08:01 222733                             /usr/bin/amuleweb
00739000-007cf000 rw-p 00739000 00:00 0                                  [heap]
40000000-40001000 ---p 40000000 00:00 0
40001000-40801000 rw-p 40001000 00:00 0
40801000-40802000 ---p 40801000 00:00 0
40802000-41002000 rw-p 40802000 00:00 0
2aaaaaac2000-2aaaaaac6000 r-xp 00000000 08:01 487691                     /lib/libnss_dns-2.7.so
2aaaaaac6000-2aaaaacc5000 ---p 00004000 08:01 487691                     /lib/libnss_dns-2.7.so
2aaaaacc5000-2aaaaacc7000 rw-p 00003000 08:01 487691                     /lib/libnss_dns-2.7.so
2aaaaacc7000-2aaaaacd7000 r-xp 00000000 08:01 487706                     /lib/libresolv-2.7.so
2aaaaacd7000-2aaaaaed7000 ---p 00010000 08:01 487706                     /lib/libresolv-2.7.so
2aaaaaed7000-2aaaaaed9000 rw-p 00010000 08:01 487706                     /lib/libresolv-2.7.so
2aaaaaed9000-2aaaaaedb000 rw-p 2aaaaaed9000 00:00 0
2aaaac000000-2aaaac021000 rw-p 2aaaac000000 00:00 0
2aaaac021000-2aaab0000000 ---p 2aaaac021000 00:00 0
2b705e7a7000-2b705e7c3000 r-xp 00000000 08:01 487725                     /lib/ld-2.7.so
2b705e7c3000-2b705e7c4000 rw-p 2b705e7c3000 00:00 0
2b705e7d9000-2b705e7da000 rw-p 2b705e7d9000 00:00 0
2b705e7da000-2b705e914000 r--p 00000000 08:01 232428                     /usr/lib/locale/locale-archive
2b705e9c2000-2b705e9c4000 rw-p 0001b000 08:01 487725                     /lib/ld-2.7.so
2b705e9c4000-2b705e9da000 r-xp 00000000 08:01 487703                     /lib/libpthread-2.7.so
2b705e9da000-2b705ebda000 ---p 00016000 08:01 487703                     /lib/libpthread-2.7.so
2b705ebda000-2b705ebdc000 rw-p 00016000 08:01 487703                     /lib/libpthread-2.7.so
2b705ebdc000-2b705ebe0000 rw-p 2b705ebdc000 00:00 0
2b705ebe0000-2b705ec10000 r-xp 00000000 08:01 218264                     /usr/lib/libwx_baseu_net-2.8.so.0.4.0
2b705ec10000-2b705ee10000 ---p 00030000 08:01 218264                     /usr/lib/libwx_baseu_net-2.8.so.0.4.0
2b705ee10000-2b705ee13000 rw-p 00030000 08:01 218264                     /usr/lib/libwx_baseu_net-2.8.so.0.4.0
2b705ee13000-2b705ef6c000 r-xp 00000000 08:01 218257                     /usr/lib/libwx_baseu-2.8.so.0.4.0
2b705ef6c000-2b705f16b000 ---p 00159000 08:01 218257                     /usr/lib/libwx_baseu-2.8.so.0.4.0
2b705f16b000-2b705f177000 rw-p 00158000 08:01 218257                     /usr/lib/libwx_baseu-2.8.so.0.4.0
2b705f177000-2b705f182000 rw-p 2b705f177000 00:00 0
2b705f182000-2b705f1b8000 r-xp 00000000 08:01 487689                     /lib/libreadline.so.5.2
2b705f1b8000-2b705f3b8000 ---p 00036000 08:01 487689                     /lib/libreadline.so.5.2
2b705f3b8000-2b705f3c0000 rw-p 00036000 08:01 487689                     /lib/libreadline.so.5.2
2b705f3c0000-2b705f3c1000 rw-p 2b705f3c0000 00:00 0
2b705f3c1000-2b705f3e9000 r-xp 00000000 08:01 213544                     /usr/lib/libpng12.so.0.28.0
2b705f3e9000-2b705f5e8000 ---p 00028000 08:01 213544                     /usr/lib/libpng12.so.0.28.0
2b705f5e8000-2b705f5e9000 rw-p 00027000 08:01 213544                     /usr/lib/libpng12.so.0.28.0
2b705f5e9000-2b705f5fd000 r-xp 00000000 08:01 487822                     /lib/libz.so.1.2.3
2b705f5fd000-2b705f7fc000 ---p 00014000 08:01 487822                     /lib/libz.so.1.2.3
2b705f7fc000-2b705f7fd000 rw-p 00013000 08:01 487822                     /lib/libz.so.1.2.3
2b705f7fd000-2b705f7fe000 rw-p 2b705f7fd000 00:00 0
2b705f7fe000-2b705f8ee000 r-xp 00000000 08:01 213505                     /usr/lib/libstdc++.so.6.0.10
2b705f8ee000-2b705faee000 ---p 000f0000 08:01 213505                     /usr/lib/libstdc++.so.6.0.10
2b705faee000-2b705faf4000 r--p 000f0000 08:01 213505                     /usr/lib/libstdc++.so.6.0.10
2b705faf4000-2b705faf7000 rw-p 000f6000 08:01 213505                     /usr/lib/libstdc++.so.6.0.10
2b705faf7000-2b705fb0a000 rw-p 2b705faf7000 00:00 0
2b705fb0a000-2b705fb8c000 r-xp 00000000 08:01 487714                     /lib/libm-2.7.so
2b705fb8c000-2b705fd8b000 ---p 00082000 08:01 487714                     /lib/libm-2.7.so
2b705fd8b000-2b705fd8d000 rw-p 00081000 08:01 487714                     /lib/libm-2.7.so
2b705fd8d000-2b705fda3000 r-xp 00000000 08:01 213513                     /usr/lib/libgcc_s.so.1
2b705fda3000-2b705ffa3000 ---p 00016000 08:01 213513                     /usr/lib/libgcc_s.so.1
2b705ffa3000-2b705ffa4000 rw-p 00016000 08:01 213513                     /usr/lib/libgcc_s.so.1
2b705ffa4000-2b705ffa5000 rw-p 2b705ffa4000 00:00 0
2b705ffa5000-2b70600ee000 r-xp 00000000 08:01 487707                     /lib/libc-2.7.so
2b70600ee000-2b70602ee000 ---p 00149000 08:01 487707                     /lib/libc-2.7.so
2b70602ee000-2b70602f1000 r--p 00149000 08:01 487707                     /lib/libc-2.7.so
2b70602f1000-2b70602f3000 rw-p 0014c000 08:01 487707                     /lib/libc-2.7.so
2b70602f3000-2b70602f8000 rw-p 2b70602f3000 00:00 0
2b70602f8000-2b70602fa000 r-xp 00000000 08:01 487710                     /lib/libdl-2.7.so
2b70602fa000-2b70604fa000 ---p 00002000 08:01 487710                     /lib/libdl-2.7.so
2b70604fa000-2b70604fc000 rw-p 00002000 08:01 487710                     /lib/libdl-2.7.so
2b70604fc000-2b706054a000 r-xp 00000000 08:01 487685                     /lib/libncurses.so.5.6
2b706054a000-2b7060749000 ---p 0004e000 08:01 487685                     /lib/libncurses.so.5.6
2b7060749000-2b7060758000 rw-p 0004d000 08:01 487685                     /lib/libncurses.so.5.6
2b7060758000-2b706075b000 rw-p 2b7060758000 00:00 0
2b706075b000-2b706075d000 r-xp 00000000 08:01 228701                     /usr/lib/gconv/UTF-32.so
2b706075d000-2b706095c000 ---p 00002000 08:01 228701                     /usr/lib/gconv/UTF-32.so
2b706095c000-2b706095e000 rw-p 00001000 08:01 228701                     /usr/lib/gconv/UTF-32.so
2b7060973000-2b706097d000 r-xp 00000000 08:01 487731                     /lib/libnss_files-2.7.so
2b706097d000-2b7060b7d000 ---p 0000a000 08:01 487731                     /lib/libnss_files-2.7.so
2b7060b7d000-2b7060b7f000 rw-p 0000a000 08:01 487731                     /lib/libnss_files-2.7.so
2b7060b7f000-2b7060f57000 rw-p 2b7060b7f000 00:00 0
7fff4c2ed000-7fff4c302000 rw-p 7ffffffea000 00:00 0                      [stack]
7fff4c3fe000-7fff4c400000 r-xp 7fff4c3fe000 00:00 0                      [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x41001950 (LWP 12894)]
0x00002b705ffd6e35 in raise () from /lib/libc.so.6
Code: [Select]
(gdb) bt
#0  0x00002b705ffd6e35 in raise () from /lib/libc.so.6
#1  0x00002b705ffd8353 in abort () from /lib/libc.so.6
#2  0x00002b7060013268 in __libc_message () from /lib/libc.so.6
#3  0x00002b7060018808 in malloc_printerr () from /lib/libc.so.6
#4  0x00002b706001a916 in free () from /lib/libc.so.6
#5  0x0000000000474e2f in value_value_free (val=0x410004d0) at php_syntree.cpp:853
#6  0x000000000047968f in php_execute (node=0x7bb9d0, result=0x410005f0) at php_syntree.cpp:1826
#7  0x000000000048d1d2 in CPhPLibContext::Execute (this=0x7b4e80, buf=0x410006f0) at php_core_lib.cpp:507
#8  0x000000000048d427 in CPhpFilter (this=0x4100073f, server=0x7af080, sess=0x7b4368,
    file=0x7b47d0 "/usr/share/amule/webserver/litoral/login.php", buff=0x410006f0) at php_core_lib.cpp:584
#9  0x0000000000411be1 in CScriptWebServer::ProcessPhpRequest (this=0x7af080,
    filename=0x7b47d0 "/usr/share/amule/webserver/litoral/login.php", sess=0x7b4368, size=@0x410008b8)
    at WebServer.cpp:1775
#10 0x000000000041d857 in CScriptWebServer::ProcessURL (this=0x7af080, Data=
      {parsedURL = {m_path = {<wxStringBase> = {static npos = 18446744073709551615, m_pchData = 0x41000de0}, <No data fields>}, m_file = {<wxStringBase> = {static npos = 18446744073709551615, m_pchData = 0x7af080}, <No data fields>}, m_params = {<std::__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 = {<std::binary_function<wxString, wxString, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = 1090521472, _M_parent = 0x0, _M_left = 0x2b705e7b05be, _M_right = 0x2b705ef32b78}, _M_node_count = 47761654645472}}}, <__gnu_debug::_Safe_sequence<std::__debug::map<wxString, wxString, std::less<wxString>, std::allocator<std::pair<const wxString, wxString> > > >> = {<__gnu_debug::_Safe_sequence_base> = {_M_iterators = 0x7b46f8, _M_const_iterators = 0x0, _M_version = 8078488}, <No data fields>}, <No data fields>}}, sURL = {<wxStringBase> = {static npos = 18446744073709551615, m_pchData = 0x2b705e7afebc}, <No data fields>}, SessionID = 8073473, pSocket = 0x7af090}) at WebServer.cpp:1896
#11 0x000000000044d17c in CWebSocket::OnRequestReceived (this=0x7b2eb0,
    pHeader=0x7b3156 "HTTP/1.1\r\nHost: localhost:4711\r\nUser-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9b5) Gecko/2008041501 Minefield/3.0b5\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0."..., pData=0x0, dwDataLen=0) at WebSocket.cpp:378
#12 0x000000000044da71 in CWCThread::Entry (this=0x7b2e90) at WebSocket.cpp:240
#13 0x00002b705ef0fb2a in wxThreadInternal::PthreadStart () from /usr/lib/libwx_baseu-2.8.so.0
#14 0x00002b705e9cafc7 in start_thread () from /lib/libpthread.so.0
#15 0x00002b7060073e0d in clone () from /lib/libc.so.6
#16 0x0000000000000000 in ?? ()
Code: [Select]
(gdb) bt full
#0  0x00002b705ffd6e35 in raise () from /lib/libc.so.6
No symbol table info available.
#1  0x00002b705ffd8353 in abort () from /lib/libc.so.6
No symbol table info available.
#2  0x00002b7060013268 in __libc_message () from /lib/libc.so.6
No symbol table info available.
#3  0x00002b7060018808 in malloc_printerr () from /lib/libc.so.6
No symbol table info available.
#4  0x00002b706001a916 in free () from /lib/libc.so.6
No symbol table info available.
#5  0x0000000000474e2f in value_value_free (val=0x410004d0) at php_syntree.cpp:853
No locals.
#6  0x000000000047968f in php_execute (node=0x7bb9d0, result=0x410005f0) at php_syntree.cpp:1826
curr = (PHP_EXP_NODE *) 0x7bb990
cond_result = {type = PHP_VAL_STRING, {int_val = 8109968, float_val = 4.0068565776718426e-317,
    str_val = 0x7bbf90 "", ptr_val = 0x7bbf90, obj_val = {inst_ptr = 0x7bbf90, class_name = 0x7b4380 ""}}}
curr_exec_result = 0
#7  0x000000000048d1d2 in CPhPLibContext::Execute (this=0x7b4e80, buf=0x410006f0) at php_core_lib.cpp:507
val = {type = 8108816, {int_val = 8109616, float_val = 4.0066826665645064e-317,
    str_val = 0x7bbe30 "\003", ptr_val = 0x7bbe30, obj_val = {inst_ptr = 0x7bbe30, class_name = 0x0}}}
#8  0x000000000048d427 in CPhpFilter (this=0x4100073f, server=0x7af080, sess=0x7b4368,
    file=0x7b47d0 "/usr/share/amule/webserver/litoral/login.php", buff=0x410006f0) at php_core_lib.cpp:584
No locals.
#9  0x0000000000411be1 in CScriptWebServer::ProcessPhpRequest (this=0x7af080,
    filename=0x7b47d0 "/usr/share/amule/webserver/litoral/login.php", sess=0x7b4368, size=@0x410008b8)
    at WebServer.cpp:1775
f = (FILE *) 0x7b4810
buffer = {
  m_buf_list = {<std::__norm::list<char*, std::allocator<char*> >> = {<std::__norm::_List_base<char*, std::allocator<char*> >> = {
        _M_impl = {<std::allocator<std::__norm::_List_node<char*> >> = {<__gnu_cxx::new_allocator<std::__norm::_List_node<char*> >> = {<No data fields>}, <No data fields>}, _M_node = {_M_next = 0x7b42b0,
            _M_prev = 0x7b4e60}}}, <No data fields>}, <__gnu_debug::_Safe_sequence<std::__debug::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 = 2639, m_alloc_size = 1024,
  m_curr_buf = 0x7b6090 "> \n      <table width=\"70%\" height=\"90%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#000000\">\n        <tr> \n          <td><table width=\"100%\" height=\"100%\" border=\"0\" align=\"ce"..., m_buf_ptr = 0x7b62df "", m_curr_buf_left = 433}
buf = 0x4353d7 "H\211ØH\211ØH\203Ä\b[ÉÃUH\211åH\203ìPH\211}ØH\211uÐH\211UÈÆE·"
#10 0x000000000041d857 in CScriptWebServer::ProcessURL (this=0x7af080, Data=
      {parsedURL = {m_path = {<wxStringBase> = {static npos = 18446744073709551615, m_pchData = 0x41000de0}, <No d---Type <return> to continue, or q <return> to quit---
ata fields>}, m_file = {<wxStringBase> = {static npos = 18446744073709551615, m_pchData = 0x7af080}, <No data fields>}, m_params = {<std::__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 = {<std::binary_function<wxString, wxString, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = 1090521472, _M_parent = 0x0, _M_left = 0x2b705e7b05be, _M_right = 0x2b705ef32b78}, _M_node_count = 47761654645472}}}, <__gnu_debug::_Safe_sequence<std::__debug::map<wxString, wxString, std::less<wxString>, std::allocator<std::pair<const wxString, wxString> > > >> = {<__gnu_debug::_Safe_sequence_base> = {_M_iterators = 0x7b46f8, _M_const_iterators = 0x0, _M_version = 8078488}, <No data fields>}, <No data fields>}}, sURL = {<wxStringBase> = {static npos = 18446744073709551615, m_pchData = 0x2b705e7afebc}, <No data fields>}, SessionID = 8073473, pSocket = 0x7af090}) at WebServer.cpp:1896
lock = {m_isOk = true, m_mutex = @0x7af090}
httpOutLen = 47761621450428
httpOut = 0x0
filename = {<wxStringBase> = {static npos = 18446744073709551615,
    m_pchData = 0x7b4498}, <No data fields>}
session = (CSession *) 0x7b4368
req_file = {<wxStringBase> = {static npos = 18446744073709551615,
    m_pchData = 0x7b46f8}, <No data fields>}
isUseGzip = false
#11 0x000000000044d17c in CWebSocket::OnRequestReceived (this=0x7b2eb0,
    pHeader=0x7b3156 "HTTP/1.1\r\nHost: localhost:4711\r\nUser-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9b5) Gecko/2008041501 Minefield/3.0b5\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0."..., pData=0x0, dwDataLen=0) at WebSocket.cpp:378
is_post = false
path = 0x7b3154 "/"
sURL = {<wxStringBase> = {static npos = 18446744073709551615, m_pchData = 0x7b42e8}, <No data fields>}
sessid = 1804289383
current_cookie = 0x7b32c2 "amuleweb_session_id=1804289383\r\nCache-Control: max-age=0\r\n\r\n"
Data = {parsedURL = {m_path = {<wxStringBase> = {static npos = 18446744073709551615,
        m_pchData = 0x2b705ef32b78}, <No data fields>}, m_file = {<wxStringBase> = {
        static npos = 18446744073709551615, m_pchData = 0x2b705ef32b78}, <No data fields>},
    m_params = {<std::__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 = {<std::binary_function<wxString, wxString, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = std::_S_red, _M_parent = 0x0, _M_left = 0x41000c18, _M_right = 0x41000c18},
            _M_node_count = 0}}}, <__gnu_debug::_Safe_sequence<std::__debug::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>}},
---Type <return> to continue, or q <return> to quit---
  sURL = {<wxStringBase> = {static npos = 18446744073709551615, m_pchData = 0x7b42e8}, <No data fields>},
  SessionID = 1804289383, pSocket = 0x7b2eb0}
sFile = {<wxStringBase> = {static npos = 18446744073709551615,
    m_pchData = 0x2b705ef32b78}, <No data fields>}
#12 0x000000000044da71 in CWCThread::Entry (this=0x7b2e90) at WebSocket.cpp:240
IsGet = true
IsPost = false
lock = {m_isOk = false, m_mutex = @0x2b7060758808}
#13 0x00002b705ef0fb2a in wxThreadInternal::PthreadStart () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#14 0x00002b705e9cafc7 in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#15 0x00002b7060073e0d in clone () from /lib/libc.so.6
No symbol table info available.
#16 0x0000000000000000 in ?? ()
No symbol table info available.
Logged

lfroen

  • Guest
Re: amuleweb + gettext
« Reply #1 on: May 13, 2008, 11:51:11 AM »

Yea, I see. Next time I will actually test my code. Now to the point - what code (I mean in php page) trigger this?
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: amuleweb + gettext
« Reply #2 on: May 13, 2008, 11:54:56 AM »

I inserted the following code into login.php for litoral just before the "Enter password" text.
Code: [Select]
<?php echo _("Greek"); ?>
Logged