aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: cvs 2004-06-10: weird bug  (Read 1978 times)

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
cvs 2004-06-10: weird bug
« on: June 10, 2004, 06:04:51 PM »

This is a debug session of the last weird bug i had when doing changes to PartFile.cpp. I'm thinking about committing, because it seems that the problem is not with m_downloadingSourcesList, i think the problem is with what we have put inside it. I have printed the contents of the bogus client so that you can appreciate.

Mismatching hashes!
        this: D98395570C6E294299A26476553E47BD
        cur_src: D98395570C6E294299A26476553E47BD
        for_clt: B056621B1A6131AD51DF8B5FAC476AF0
Filenames are:
        this: **********************.mpg
        cur_src: *********************.mpg
        for_clt: **********************.mpg
==27442== Invalid read of size 1
==27442==    at 0x8154636: CUpDownClient::GetDownloadState() const (updownclient.h:291)
==27442==    by 0x81991C3: CDownloadQueue::Process() (DownloadQueue.cpp:376)
==27442==    by 0x82A5CBE: CamuleApp::OnCoreTimer(wxTimerEvent&) (amule.cpp:1710)
==27442==    by 0x76FE61: wxEvtHandler::SearchEventTable(wxEventTable&, wxEvent&) (in /usr/lib/libwx_gtk-2.4.so.0.1.1)
==27442==    by 0x76FC8E: wxEvtHandler::ProcessEvent(wxEvent&) (in /usr/lib/libwx_gtk-2.4.so.0.1.1)
==27442==    by 0x7FB866: wxTimerBase::Notify() (in /usr/lib/libwx_gtk-2.4.so.0.1.1)
==27442==    by 0x71896B: timeout_callback (in /usr/lib/libwx_gtk-2.4.so.0.1.1)
==27442==    by 0x15B3A4: (within /usr/lib/libglib-1.2.so.0.0.10)
==27442==    by 0x15A35A: (within /usr/lib/libglib-1.2.so.0.0.10)
==27442==    by 0x15A845: (within /usr/lib/libglib-1.2.so.0.0.10)
==27442==    Address 0x47E is not stack'd, malloc'd or free'd
==27442==
==27442== ---- Attach to GDB ? --- [Return/N/n/Y/y/C/c] ---- y
==27442== starting GDB with cmd: /usr/bin/gdb -nw /proc/27442/exe 27442
vg_do_syscall3 (syscallno=4294966784, arg1=27524, arg2=0, arg3=0)
    at vg_mylibc.c:92
92      vg_mylibc.c: No such file or directory.
        in vg_mylibc.c
Code: [Select]
(gdb) bt
#0  vg_do_syscall3 (syscallno=4294966784, arg1=27524, arg2=0, arg3=0)
    at vg_mylibc.c:92
#1  0x001fe9fd in vgPlain_system (cmd=0x0) at vg_mylibc.c:1277
#2  0x001f9e00 in vgPlain_start_GDB_whilst_on_client_stack () at vg_main.c:1816
#3  0x002022ac in vgPlain_swizzle_esp_then_start_GDB ()
   from /usr/lib/valgrind/valgrind.so
#4  0x08154636 in CUpDownClient::GetDownloadState() const (this=0xbfe7d468)
    at updownclient.h:291
#5  0x08154636 in CUpDownClient::GetDownloadState() const (this=0x41e4b660)
    at updownclient.h:291
#6  0x081991c4 in CDownloadQueue::Process() (this=0x957d4e0)
    at DownloadQueue.cpp:376
#7  0x082a5cbf in CamuleApp::OnCoreTimer(wxTimerEvent&) (this=0x4d8989c)
    at amule.cpp:1710
#8  0x0076fe62 in wxEvtHandler::SearchEventTable(wxEventTable&, wxEvent&) ()
   from /usr/lib/libwx_gtk-2.4.so.0
#9  0x0076fc8f in wxEvtHandler::ProcessEvent(wxEvent&) ()
   from /usr/lib/libwx_gtk-2.4.so.0
#10 0x007fb867 in wxTimerBase::Notify() () from /usr/lib/libwx_gtk-2.4.so.0
#11 0x0071896c in timeout_callback () from /usr/lib/libwx_gtk-2.4.so.0
#12 0x0015b3a5 in g_main_set_poll_func () from /usr/lib/libglib-1.2.so.0
#13 0x0015a35b in g_get_current_time () from /usr/lib/libglib-1.2.so.0
#14 0x0015a846 in g_get_current_time () from /usr/lib/libglib-1.2.so.0
#15 0x0015aaf4 in g_main_run () from /usr/lib/libglib-1.2.so.0
#16 0x00a056af in gtk_main () from /usr/lib/libgtk-1.2.so.0
#17 0x006eec21 in wxDialog::ShowModal() () from /usr/lib/libwx_gtk-2.4.so.0
#18 0x00803cb7 in wxMessageBox(wxString const&, wxString const&, long, wxWindow*, int, int) () from /usr/lib/libwx_gtk-2.4.so.0
#19 0x0068e446 in wxLogGui::Flush() () from /usr/lib/libwx_gtk-2.4.so.0
#20 0x006d40b8 in wxapp_pending_callback () from /usr/lib/libwx_gtk-2.4.so.0
#21 0x0015b4ef in g_timeout_add () from /usr/lib/libglib-1.2.so.0
#22 0x0015a35b in g_get_current_time () from /usr/lib/libglib-1.2.so.0
#23 0x0015a846 in g_get_current_time () from /usr/lib/libglib-1.2.so.0
#24 0x0015aaf4 in g_main_run () from /usr/lib/libglib-1.2.so.0
#25 0x00a056af in gtk_main () from /usr/lib/libgtk-1.2.so.0
#26 0x006d49f2 in wxApp::MainLoop() () from /usr/lib/libwx_gtk-2.4.so.0
#27 0x00726610 in wxAppBase::OnRun() () from /usr/lib/libwx_gtk-2.4.so.0
#28 0x006d50cd in wxEntry(int, char**) () from /usr/lib/libwx_gtk-2.4.so.0
#29 0x0829f930 in main (argc=2, argv=0xbfe7de94) at amule.cpp:152
Current language:  auto; currently c
(gdb) bt full
#0  vg_do_syscall3 (syscallno=4294966784, arg1=27524, arg2=0, arg3=0)
    at vg_mylibc.c:92
        __res = 4294966784
#1  0x001fe9fd in vgPlain_system (cmd=0x0) at vg_mylibc.c:1277
        pid = 27524
        res = -512
        environ = {0x0}
#2  0x001f9e00 in vgPlain_start_GDB_whilst_on_client_stack () at vg_main.c:1816
        res = -512
        buf = "/usr/bin/gdb -nw /proc/27442/exe 27442\000CPòØ\001\004\000\000\000Ió>\bIó>\b\211\003\000\000\026\004\000\000\210Óç¿<õ#\b0Ôç¿üËÜA¨Óç¿f\\#\b\\¤ÊAÓäè\016¨Óç¿"
#3  0x002022ac in vgPlain_swizzle_esp_then_start_GDB ()
   from /usr/lib/valgrind/valgrind.so
No symbol table info available.
#4  0x08154636 in CUpDownClient::GetDownloadState() const (this=0xbfe7d468)
    at updownclient.h:291
No locals.
#5  0x08154636 in CUpDownClient::GetDownloadState() const (this=0x41e4b660)
    at updownclient.h:291
No locals.
#6  0x081991c4 in CDownloadQueue::Process() (this=0x957d4e0)
    at DownloadQueue.cpp:376
        cur_file = (class CPartFile *) 0x41e4b660
        i = 47
        size = 223
        downspeed = 200
#7  0x082a5cbf in CamuleApp::OnCoreTimer(wxTimerEvent&) (this=0x4d8989c)
    at amule.cpp:1710
        msPrev1 = 2244874
        msPrev5 = 2240231
        msPrevSave = 2208372
        msCur = 2245894
#8  0x0076fe62 in wxEvtHandler::SearchEventTable(wxEventTable&, wxEvent&) ()
   from /usr/lib/libwx_gtk-2.4.so.0
No symbol table info available.
#9  0x0076fc8f in wxEvtHandler::ProcessEvent(wxEvent&) ()
   from /usr/lib/libwx_gtk-2.4.so.0
No symbol table info available.
#10 0x007fb867 in wxTimerBase::Notify() () from /usr/lib/libwx_gtk-2.4.so.0
No symbol table info available.
#11 0x0071896c in timeout_callback () from /usr/lib/libwx_gtk-2.4.so.0
No symbol table info available.
#12 0x0015b3a5 in g_main_set_poll_func () from /usr/lib/libglib-1.2.so.0
No symbol table info available.
#13 0x0015a35b in g_get_current_time () from /usr/lib/libglib-1.2.so.0
No symbol table info available.
#14 0x0015a846 in g_get_current_time () from /usr/lib/libglib-1.2.so.0
No symbol table info available.
#15 0x0015aaf4 in g_main_run () from /usr/lib/libglib-1.2.so.0
No symbol table info available.
#16 0x00a056af in gtk_main () from /usr/lib/libgtk-1.2.so.0
No symbol table info available.
#17 0x006eec21 in wxDialog::ShowModal() () from /usr/lib/libwx_gtk-2.4.so.0
No symbol table info available.
#18 0x00803cb7 in wxMessageBox(wxString const&, wxString const&, long, wxWindow*, int, int) () from /usr/lib/libwx_gtk-2.4.so.0
No symbol table info available.
#19 0x0068e446 in wxLogGui::Flush() () from /usr/lib/libwx_gtk-2.4.so.0
No symbol table info available.
#20 0x006d40b8 in wxapp_pending_callback () from /usr/lib/libwx_gtk-2.4.so.0
No symbol table info available.
#21 0x0015b4ef in g_timeout_add () from /usr/lib/libglib-1.2.so.0
No symbol table info available.
#22 0x0015a35b in g_get_current_time () from /usr/lib/libglib-1.2.so.0
No symbol table info available.
#23 0x0015a846 in g_get_current_time () from /usr/lib/libglib-1.2.so.0
No symbol table info available.
#24 0x0015aaf4 in g_main_run () from /usr/lib/libglib-1.2.so.0
No symbol table info available.
#25 0x00a056af in gtk_main () from /usr/lib/libgtk-1.2.so.0
No symbol table info available.
#26 0x006d49f2 in wxApp::MainLoop() () from /usr/lib/libwx_gtk-2.4.so.0
No symbol table info available.
#27 0x00726610 in wxAppBase::OnRun() () from /usr/lib/libwx_gtk-2.4.so.0
No symbol table info available.
#28 0x006d50cd in wxEntry(int, char**) () from /usr/lib/libwx_gtk-2.4.so.0
No symbol table info available.
#29 0x0829f930 in main (argc=2, argv=0xbfe7de94) at amule.cpp:152
No locals.
(gdb) up 5
#5  0x08154636 in CUpDownClient::GetDownloadState() const (this=0x41e4b660)
    at updownclient.h:291
291             uint8           GetDownloadState() const        { return m_nDownloadState; }
Current language:  auto; currently c++
(gdb) p *this
$2 = {socket = 0x834d528, credits = 0x418c2eec, m_Friend = 0x4614bcfe,
  compressiongain = 2634921005, notcompressed = 755729137,
  m_bAddNextConnect = 60, sourcesslot = 115523760, reqfile = 0x4370bff8,
  m_bIsBotuser = false, m_dwUserIP = 1086874687, m_dwServerIP = 1105507936,
  m_nUserID = 0, m_nUserPort = 0, m_nServerPort = 0, m_nClientVersion = 0,
  m_cSendblock = 0, m_byEmuleVersion = 0 '\0', m_byDataCompVer = 0 '\0',
  m_SoftLen = 0 '\0', m_bEmuleProtocol = false,
  m_Username = , m_FullUserIP = ,
  m_UserHash = {
    m_hash = "\000\000\000\000\034kÈ@\002\000\002\000\002\000\000"},
  m_HasValidHash = 76, m_nUDPPort = 17250, m_byUDPVer = 76 'L',
  m_bySourceExchangeVer = 113 'q', m_byAcceptCommentVer = 98 'b',
  m_byExtendedRequestsVer = 67 'C', m_cFailed = 1 '\001',
  m_clientSoft = 0 '\0', m_dwLastSourceRequest = 0, m_dwLastSourceAnswer = 0,
  m_dwLastAskedForSources = 0, m_iFileListRequested = 16, m_bFriendSlot = 12,
  m_bCommentDirty = false, m_bIsHybrid = false, m_bIsNewMLD = false,
  m_bIsML = 80, m_bGPLEvildoer = 184, m_bSupportsPreview = 228,
  m_bPreviewReqPending = 65, m_bPreviewAnsPending = 16, m_nKadPort = 0,
  m_bMultiPacket = 3, m_SecureIdentState = 1105315716,
  m_byInfopacketsReceived = 20 '\024', m_dwLastSignatureIP = 786433,
  m_bySupportSecIdent = 12 '\f', m_byCompatibleClient = 65538,
  m_WaitingPackets_list = {> = {head = 0x1, tail = 0x0,
      count = 1086876024}, },
  m_DontSwap_list = {<_List_base >> = {<_List_alloc_base,true>> = {
        _M_node = 0x0}, }, },
  m_lastRefreshedDLDisplay = 137529288, kBpsUp = 1.97583083e-43,
  msSentPrev = 0, m_bBanned = 100, m_nTransferedUp = 0,
  m_nUploadState = 248 'ø', m_dwWaitTime = 1128971464, m_dwUploadTime = 12,
  m_nMaxSendAllowed = 0, m_cAsked = 1086874660, m_dwLastUpRequest = 26,
  m_dwBanTime = 0, m_bUsedComprUp = false, m_nCurSessionUp = 0,
  m_nUpPartCount = 0, m_requpfileid = {
    m_hash = "\000\000\000\000\000\000\000\000\000\000\001\000\000\000&/"},
  m_nUpCompleteSourcesCount = 15, m_abyUpPartStatus = 0x0,
  m_lastPartAsked = 0, m_dwEnteredConnectedState = 21739,
  m_strModVersion = ,
  m_BlockSend_queue = {> = {head = 0x0,
      tail = 0x3e6ca8a6, count = 1105065124}, },
  m_BlockRequests_queue = {> = {head = 0x418c2e28, tail = 0xeda3b, count = 0}, },
  m_DoneBlocks_list = {> = {head = 0x10101, tail = 0xee17755, count = 0}, },
  m_RequestedFiles_list = {> = {head = 0x41c019f8, tail = 0x41e4bbc8, count = 5}, },
  m_bRemoteQueueFull = false, usedcompressiondown = false,
  m_nDownloadState = 0 '\0', m_nPartCount = 0, m_cDownAsked = 0,
  m_dwLastAskedTime = 12, ClientFilename = ,
  m_nTransferedDown = 33263624, m_bTransferredDownMini = 12,
  m_dwDownStartTime = 0, m_nLastBlockOffset = 0, m_cShowDR = 0,
  m_dwLastBlockReceived = 12, m_nRemoteQueueRank = 65139,
  m_nOldRemoteQueueRank = 3806, m_bCompleteSource = false,
  m_bReaskPending = false, m_bUDPPending = false, m_bHashsetRequested = false,
  m_PendingBlocks_list = {> = {head = 0x0, tail = 0xee8e0d7, count = 0}, },
  m_DownloadBlocks_list = {> = {head = 0x0, tail = 0x418ecf1c, count = 1144690872}, },
  kBpsDown = 1.12103877e-44, fDownAvgFilter = 5.73971851e-42,
  msReceivedPrev = 250106433, bytesReceivedCycle = 0, m_byChatstate = 11 '\v',
  m_strComment = , m_iRate = 68 'D',
  m_fHashsetRequesting = 0, m_fNoViewSharedFiles = 1, m_fSupportsPreview = 0,
  m_fSentCancelTransfer = 0, m_fSharedDirectories = 1,
  m_bHelloAnswerPending = 76, Extended_aMule_SO = 67 'C',
  m_abyPartStatus = 0x18a
,
  m_OtherRequests_list = {> = {head = 0x1,
      tail = 0x0, count = 0}, },
  m_OtherNoNeeded_list = {> = {head = 0x1,
      tail = 0x0, count = 0}, }, m_ValidSource = false,
  m_clientVerString = , SecIdentSupRec = 0, thief = false,
  leechertype = 0}
(gdb)
Logged