aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: GeoIP-related crash on startup if GeoIP.dat missing  (Read 4068 times)

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
GeoIP-related crash on startup if GeoIP.dat missing
« on: April 07, 2008, 02:49:24 PM »

If aMule has been compiled with --enable-geoip, and GeoIP.dat is missing, the application segfaults on startup while downloading the server list or connecting to a server. The backtrace is:
Code: [Select]
(gdb) run
Starting program: /home/user/bin/amule
[Thread debugging using libthread_db enabled]
[New Thread 0xb6c676d0 (LWP 5304)]
Initialising aMule
Checking if there is an instance already running...
No other instances are running.
[New Thread 0xb688eb90 (LWP 5311)]
HTTP download thread started
Host: amule.sourceforge.net:80
URL: http://amule.sourceforge.net/lastversion
Response: 200 (Error: 0)
Download size: 6
HTTP download thread ended
[Thread 0xb688eb90 (LWP 5311) exited]
ListenSocket: Ok.
Error Opening file /usr/share/GeoIP/GeoIP.dat
[New Thread 0xb688eb90 (LWP 5317)]
Loading temp files from /home/user/.aMule/Temp.

All PartFiles Loaded.
No shareable files found in directory: /home/user/.aMule/Incoming

[New Thread 0xb297bb90 (LWP 5318)]
HTTP download thread started
[New Thread 0xb217ab90 (LWP 5319)]
[New Thread 0xb1979b90 (LWP 5320)]
[Thread 0xb217ab90 (LWP 5319) exited]
Host: gruk.org:80
URL: http://gruk.org/server.met.gz
Response: 200 (Error: 0)
Download size: 3529
HTTP download thread ended
[Thread 0xb297bb90 (LWP 5318) exited]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6c676d0 (LWP 5304)]
0xb7919cef in GeoIP_id_by_addr () from /usr/lib/libGeoIP.so.1
(gdb) bt
#0  0xb7919cef in GeoIP_id_by_addr () from /usr/lib/libGeoIP.so.1
#1  0xb7919e34 in GeoIP_country_code_by_addr () from /usr/lib/libGeoIP.so.1
#2  0x082d2ef9 in CIP2Country::GetCountryData (this=0x8ca8510, ip=@0x8994948)
    at IP2Country.cpp:85
#3  0x082be390 in CServerListCtrl::RefreshServer (this=0x8c651b8,
    server=0x8994910) at ServerListCtrl.cpp:191
#4  0x082bf830 in CServerListCtrl::AddServer (this=0x8c651b8, toadd=0x8994910)
    at ServerListCtrl.cpp:118
#5  0x082f0b7f in MuleNotify::ServerAdd (server=0x8994910) at GuiEvents.cpp:318
#6  0x08084b85 in MuleNotify::CMuleNotifier1<CServer*>::Notify (
    this=0xbf976344) at GuiEvents.h:222
#7  0x082f1298 in MuleNotify::HandleNotification (ntf=@0xbf976344)
    at GuiEvents.cpp:44
#8  0x0808573b in MuleNotify::DoNotify<CServer*, CServer*> (
    func=0x82f0b23 <MuleNotify::ServerAdd(CServer*)>, arg1=0x8994910)
    at GuiEvents.h:373
#9  0x080771e8 in CamuleApp::AddServer (this=0x8964b58, srv=0x8994910,
    fromUser=false) at amule.cpp:1672
#10 0x08198614 in CServerList::LoadServerMet (this=0x8c28fc0, path=@0xbf9764f8)
    at ServerList.cpp:149
#11 0x08198ee7 in CServerList::DownloadFinished (this=0x8c28fc0, result=1)
    at ServerList.cpp:798
#12 0x08076934 in CamuleApp::OnFinishedHTTPDownload (this=0x8964b58,
    event=@0x8c4a948) at amule.cpp:1799
#13 0xb799ffc1 in wxAppConsole::HandleEvent ()
   from /usr/lib/libwx_baseu-2.8.so.0
#14 0xb7a471c8 in wxEvtHandler::ProcessEventIfMatches ()
   from /usr/lib/libwx_baseu-2.8.so.0
#15 0xb7a47328 in wxEventHashTable::HandleEvent ()
   from /usr/lib/libwx_baseu-2.8.so.0
#16 0xb7a4748f in wxEvtHandler::ProcessEvent ()
   from /usr/lib/libwx_baseu-2.8.so.0
#17 0xb7a479c0 in wxEvtHandler::ProcessPendingEvents ()
   from /usr/lib/libwx_baseu-2.8.so.0
#18 0xb79a095f in wxAppConsole::ProcessPendingEvents ()
   from /usr/lib/libwx_baseu-2.8.so.0
#19 0xb7cbad52 in wxAppBase::OnIdle () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#20 0xb799ffc1 in wxAppConsole::HandleEvent ()
   from /usr/lib/libwx_baseu-2.8.so.0
#21 0xb7a471c8 in wxEvtHandler::ProcessEventIfMatches ()
   from /usr/lib/libwx_baseu-2.8.so.0
#22 0xb7a47328 in wxEventHashTable::HandleEvent ()
   from /usr/lib/libwx_baseu-2.8.so.0
#23 0xb7a4748f in wxEvtHandler::ProcessEvent ()
   from /usr/lib/libwx_baseu-2.8.so.0
#24 0xb7cbb01e in wxAppBase::ProcessIdle ()
   from /usr/lib/libwx_gtk2u_core-2.8.so.0
#25 0xb7bffc91 in ?? () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#26 0xb7194a31 in ?? () from /usr/lib/libglib-2.0.so.0
#27 0x00000000 in ?? ()
(gdb) bt full
#0  0xb7919cef in GeoIP_id_by_addr () from /usr/lib/libGeoIP.so.1
No symbol table info available.
#1  0xb7919e34 in GeoIP_country_code_by_addr () from /usr/lib/libGeoIP.so.1
No symbol table info available.
#2  0x082d2ef9 in CIP2Country::GetCountryData (this=0x8ca8510, ip=@0x8994948)
    at IP2Country.cpp:85
        CCode = {<wxStringBase> = {static npos = 4294967295,
    m_pchData = 0x899493c}, <No data fields>}
        it = {<__gnu_debug::_Safe_iterator_base> = {_M_sequence = 0xb7a68f8c,
    _M_version = 144067416, _M_prior = 0xbf976158, _M_next = 0x80859ae},
  _M_current = {_M_node = 0xbf9761f0}}
#3  0x082be390 in CServerListCtrl::RefreshServer (this=0x8c651b8,
    server=0x8994910) at ServerListCtrl.cpp:191
        ptr = 144263440
        itemnr = 0
        serverName = {<wxStringBase> = {static npos = 4294967295,
    m_pchData = 0xb7a68f98}, <No data fields>}
        countrydata = (const <anonymous struct> &) @0x8197b4d: {
  Name = {<wxStringBase> = {static npos = 4294967295,
      m_pchData = 0xff74bd80}, <No data fields>}, Flag = <incomplete type>}
        flags = {<wxStringBase> = {static npos = 4294967295,
    m_pchData = 0x1388}, <No data fields>}
#4  0x082bf830 in CServerListCtrl::AddServer (this=0x8c651b8, toadd=0x8994910)
    at ServerListCtrl.cpp:118
No locals.
#5  0x082f0b7f in MuleNotify::ServerAdd (server=0x8994910) at GuiEvents.cpp:318
No locals.
#6  0x08084b85 in MuleNotify::CMuleNotifier1<CServer*>::Notify (
    this=0xbf976344) at GuiEvents.h:222
No locals.
#7  0x082f1298 in MuleNotify::HandleNotification (ntf=@0xbf976344)
    at GuiEvents.cpp:44
No locals.
#8  0x0808573b in MuleNotify::DoNotify<CServer*, CServer*> (
    func=0x82f0b23 <MuleNotify::ServerAdd(CServer*)>, arg1=0x8994910)
    at GuiEvents.h:373
No locals.
#9  0x080771e8 in CamuleApp::AddServer (this=0x8964b58, srv=0x8994910,
    fromUser=false) at amule.cpp:1672
No locals.
#10 0x08198614 in CServerList::LoadServerMet (this=0x8c28fc0, path=@0xbf9764f8)
    at ServerList.cpp:149
        newserver = (CServer *) 0x8994910
        priority = 0
        j = 0
        version = 14 '\016'
        fservercount = 17
        sbuffer = {ip = 3862792661, port = 5000, tagcount = 16}
        iAddCount = 0
        merge = false
        mets = {0x8528f90, 0x0}
        servermet = {<CFileDataIO> = {_vptr.CFileDataIO = 0x85e7808},
  m_fd = 15, m_filePath = {<CPrintable> = {_vptr.CPrintable = 0x85ec420},
    m_printable = {<wxStringBase> = {static npos = 4294967295,
        m_pchData = 0x8de6764}, <No data fields>},
    m_filesystem = {<wxStringBase> = {static npos = 4294967295,
        m_pchData = 0x8d8a744}, <No data fields>}}}
#11 0x08198ee7 in CServerList::DownloadFinished (this=0x8c28fc0, result=1)
    at ServerList.cpp:798
        tempFilename = {<CPrintable> = {_vptr.CPrintable = 0x85ec420},
  m_printable = {<wxStringBase> = {static npos = 4294967295,
      m_pchData = 0x8d2926c}, <No data fields>},
  m_filesystem = {<wxStringBase> = {static npos = 4294967295,
      m_pchData = 0x8c7ad74}, <No data fields>}}
#12 0x08076934 in CamuleApp::OnFinishedHTTPDownload (this=0x8964b58,
    event=@0x8c4a948) at amule.cpp:1799
No locals.
#13 0xb799ffc1 in wxAppConsole::HandleEvent ()
   from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#14 0xb7a471c8 in wxEvtHandler::ProcessEventIfMatches ()
   from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#15 0xb7a47328 in wxEventHashTable::HandleEvent ()
   from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#16 0xb7a4748f in wxEvtHandler::ProcessEvent ()
   from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#17 0xb7a479c0 in wxEvtHandler::ProcessPendingEvents ()
   from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#18 0xb79a095f in wxAppConsole::ProcessPendingEvents ()
   from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#19 0xb7cbad52 in wxAppBase::OnIdle () from /usr/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#20 0xb799ffc1 in wxAppConsole::HandleEvent ()
   from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#21 0xb7a471c8 in wxEvtHandler::ProcessEventIfMatches ()
   from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#22 0xb7a47328 in wxEventHashTable::HandleEvent ()
   from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#23 0xb7a4748f in wxEvtHandler::ProcessEvent ()
   from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#24 0xb7cbb01e in wxAppBase::ProcessIdle ()
   from /usr/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#25 0xb7bffc91 in ?? () from /usr/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#26 0xb7194a31 in ?? () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#27 0x00000000 in ?? ()
No symbol table info available.
(gdb) thread apply all bt

Thread 6 (Thread 0xb1979b90 (LWP 5320)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7f217ec in pthread_cond_timedwait@@GLIBC_2.3.2 ()
   from /lib/libpthread.so.0
#2  0xb7a446cc in wxConditionInternal::WaitTimeout ()
   from /usr/lib/libwx_baseu-2.8.so.0
#3  0xb7a4472f in wxCondition::WaitTimeout ()
   from /usr/lib/libwx_baseu-2.8.so.0
#4  0xb7a453e5 in wxSemaphoreInternal::WaitTimeout ()
   from /usr/lib/libwx_baseu-2.8.so.0
#5  0xb7a4546f in wxSemaphore::WaitTimeout ()
   from /usr/lib/libwx_baseu-2.8.so.0
#6  0x08382b6c in CTimerThread::Entry (this=0x8d9f5d8) at Timer.cpp:64
#7  0xb7a45a38 in wxThreadInternal::PthreadStart ()
   from /usr/lib/libwx_baseu-2.8.so.0
#8  0xb7a45aad in wxPthreadStart () from /usr/lib/libwx_baseu-2.8.so.0
#9  0xb7f1d192 in start_thread () from /lib/libpthread.so.0
#10 0xb778402e in clone () from /lib/libc.so.6

Thread 3 (Thread 0xb688eb90 (LWP 5317)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7f24846 in nanosleep () from /lib/libpthread.so.0
#2  0xb7a4b218 in wxMicroSleep () from /usr/lib/libwx_baseu-2.8.so.0
#3  0xb7a4b241 in wxMilliSleep () from /usr/lib/libwx_baseu-2.8.so.0
#4  0xb7a43e2d in wxThread::Sleep () from /usr/lib/libwx_baseu-2.8.so.0
#5  0x081cc119 in UploadBandwidthThrottler::Entry (this=0x8d7f800)
    at UploadBandwidthThrottler.cpp:324
#6  0xb7a45a38 in wxThreadInternal::PthreadStart ()
   from /usr/lib/libwx_baseu-2.8.so.0
#7  0xb7a45aad in wxPthreadStart () from /usr/lib/libwx_baseu-2.8.so.0
#8  0xb7f1d192 in start_thread () from /lib/libpthread.so.0
#9  0xb778402e in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb6c676d0 (LWP 5304)):
#0  0xb7919cef in GeoIP_id_by_addr () from /usr/lib/libGeoIP.so.1
#1  0xb7919e34 in GeoIP_country_code_by_addr () from /usr/lib/libGeoIP.so.1
#2  0x082d2ef9 in CIP2Country::GetCountryData (this=0x8ca8510, ip=@0x8994948)
    at IP2Country.cpp:85
#3  0x082be390 in CServerListCtrl::RefreshServer (this=0x8c651b8,
    server=0x8994910) at ServerListCtrl.cpp:191
#4  0x082bf830 in CServerListCtrl::AddServer (this=0x8c651b8, toadd=0x8994910)
    at ServerListCtrl.cpp:118
#5  0x082f0b7f in MuleNotify::ServerAdd (server=0x8994910) at GuiEvents.cpp:318
#6  0x08084b85 in MuleNotify::CMuleNotifier1<CServer*>::Notify (
    this=0xbf976344) at GuiEvents.h:222
#7  0x082f1298 in MuleNotify::HandleNotification (ntf=@0xbf976344)
    at GuiEvents.cpp:44
#8  0x0808573b in MuleNotify::DoNotify<CServer*, CServer*> (
    func=0x82f0b23 <MuleNotify::ServerAdd(CServer*)>, arg1=0x8994910)
    at GuiEvents.h:373
#9  0x080771e8 in CamuleApp::AddServer (this=0x8964b58, srv=0x8994910,
    fromUser=false) at amule.cpp:1672
#10 0x08198614 in CServerList::LoadServerMet (this=0x8c28fc0, path=@0xbf9764f8)
    at ServerList.cpp:149
#11 0x08198ee7 in CServerList::DownloadFinished (this=0x8c28fc0, result=1)
    at ServerList.cpp:798
#12 0x08076934 in CamuleApp::OnFinishedHTTPDownload (this=0x8964b58,
    event=@0x8c4a948) at amule.cpp:1799
#13 0xb799ffc1 in wxAppConsole::HandleEvent ()
   from /usr/lib/libwx_baseu-2.8.so.0
#14 0xb7a471c8 in wxEvtHandler::ProcessEventIfMatches ()
   from /usr/lib/libwx_baseu-2.8.so.0
#15 0xb7a47328 in wxEventHashTable::HandleEvent ()
   from /usr/lib/libwx_baseu-2.8.so.0
#16 0xb7a4748f in wxEvtHandler::ProcessEvent ()
   from /usr/lib/libwx_baseu-2.8.so.0
#17 0xb7a479c0 in wxEvtHandler::ProcessPendingEvents ()
   from /usr/lib/libwx_baseu-2.8.so.0
#18 0xb79a095f in wxAppConsole::ProcessPendingEvents ()
   from /usr/lib/libwx_baseu-2.8.so.0
#19 0xb7cbad52 in wxAppBase::OnIdle () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#20 0xb799ffc1 in wxAppConsole::HandleEvent ()
   from /usr/lib/libwx_baseu-2.8.so.0
#21 0xb7a471c8 in wxEvtHandler::ProcessEventIfMatches ()
   from /usr/lib/libwx_baseu-2.8.so.0
#22 0xb7a47328 in wxEventHashTable::HandleEvent ()
   from /usr/lib/libwx_baseu-2.8.so.0
#23 0xb7a4748f in wxEvtHandler::ProcessEvent ()
   from /usr/lib/libwx_baseu-2.8.so.0
#24 0xb7cbb01e in wxAppBase::ProcessIdle ()
   from /usr/lib/libwx_gtk2u_core-2.8.so.0
#25 0xb7bffc91 in ?? () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#26 0xb7194a31 in ?? () from /usr/lib/libglib-2.0.so.0
#27 0x00000000 in ?? ()
Logged