aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: SVN 9752 - EncryptedStreamSocket.cpp(683): assert "wxAssertFailure" failed in Ne  (Read 8250 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

ASSERT INFO:
EncryptedStreamSocket.cpp(683): assert "wxAssertFailure" failed in Negotiate().

BACKTRACE:
[1] wxOnAssert(wchar_t const*, int, char const*, wchar_t const*, wchar_t const*)
[2] CEncryptedStreamSocket::Negotiate(unsigned char const*, unsigned int) /home/amule/trunk5/src/EncryptedStreamSocket.cpp:684
[3] CEncryptedStreamSocket::Read(void*, unsigned int) /home/amule/trunk5/src/EncryptedStreamSocket.cpp:303
[4] CEMSocket::OnReceive(int) /home/amule/trunk5/src/EMSocket.cpp:227
[5] CClientTCPSocket::OnReceive(int) /home/amule/trunk5/src/ClientTCPSocket.cpp:1965
[6] CClientTCPSocketHandler::ClientTCPSocketHandler(wxSocketEvent&) /home/amule/trunk5/src/ClientTCPSocket.cpp:101
[7] wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) cons)
[8] wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[9] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[10] wxEvtHandler::ProcessEvent(wxEvent&)
[11] wxEvtHandler::ProcessPendingEvents()
[12] wxAppConsole::ProcessPendingEvents()
[13] wxAppBase::ProcessIdle()
[14] g_main_context_dispatch()
[15] g_main_loop_run()
[16] gtk_main()
[17] wxEventLoop::Run()
[18] wxAppBase::MainLoop()


(gdb) bt
#0  0xffffe430 in __kernel_vsyscall ()
#1  0xb75df6a7 in poll () from /lib/libc.so.6
#2  0xb7b48146 in wxapp_poll_func (ufds=0x13883628, nfds=10, timeout=19) at ./src/gtk/app.cpp:259
#3  0xb6dd3f12 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0xb6dd45a2 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#5  0xb71cc755 in gtk_dialog_run () from /usr/lib/libgtk-x11-2.0.so.0
#6  0xb7b79370 in wxGUIAppTraits::ShowAssertDialog (this=0x8cc1ba8, msg=@0xbff50a88) at ./src/gtk/utilsgtk.cpp:387
#7  0xb7845826 in ShowAssertDialog (szFile=0x877a8f8, nLine=683, szFunc=0x1176f9cc, szCond=0x877a8b8, szMsg=0x0, traits=0x8cc1ba8)
    at ./src/common/appbase.cpp:836
#8  0xb7845bf4 in wxAppConsole::OnAssertFailure (this=0x8c9bac8, file=0x877a8f8, line=683, func=0x1176f9cc, cond=0x877a8b8, msg=0x0)
    at ./src/common/appbase.cpp:445
#9  0xb7b47495 in wxApp::OnAssertFailure (this=0x8c9bac8, file=0x877a8f8, line=683, func=0x1176f9cc, cond=0x877a8b8, msg=0x0)
    at ./src/gtk/app.cpp:556
total jobs = 100, too many jobstotal jobs = 100, too many jobs#10 0x0808761e in CamuleApp::OnAssertFailure (this=0x8c9bac8, file=0x877a8f8, line=683, func=0x1176f9cc, cond=0x877a8b8, msg=0x0) at amule.cpp:1391
#11 0xb784595e in wxOnAssert (szFile=0x877a8f8, nLine=683, szFunc=0x877b267 "Negotiate", szCond=0x877a8b8, szMsg=0x0)
    at ./src/common/appbase.cpp:711
#12 0x0816175e in CEncryptedStreamSocket::Negotiate (this=0x12d52d40, pBuffer=0x8a6a3a0 "\036\"M\031c�UB8$\026\006�R\021�\210E\223M�\210", nLen=20)
    at EncryptedStreamSocket.cpp:683
#13 0x081621ed in CEncryptedStreamSocket::Read (this=0x12d52d40, lpBuf=0x8a6a3a0, nBufLen=2000000) at EncryptedStreamSocket.cpp:303
#14 0x0815d31f in CEMSocket::OnReceive (this=0x12d52d40, nErrorCode=0) at EMSocket.cpp:227
#15 0x080ece90 in CClientTCPSocket::OnReceive (this=0x12d52d40, nErrorCode=0) at ClientTCPSocket.cpp:1963
#16 0x080f924d in CClientTCPSocketHandler::ClientTCPSocketHandler (this=0x8a6a320, event=@0x13537168) at ClientTCPSocket.cpp:101
#17 0xb78452fd in wxAppConsole::HandleEvent (this=0x8c9bac8, handler=0x8a6a320,
    func=0x80f902c <CClientTCPSocketHandler::ClientTCPSocketHandler(wxSocketEvent&)>, event=@0x13537168) at ./src/common/appbase.cpp:322
#18 0xb790c3e0 in wxEvtHandler::ProcessEventIfMatches (entry=@0x8a6a2e0, handler=0x8a6a320, event=@0x13537168) at ./src/common/event.cpp:1231
#19 0xb790e179 in wxEventHashTable::HandleEvent (this=0x8a6a2c0, event=@0x13537168, self=0x8a6a320) at ./src/common/event.cpp:906
#20 0xb790e2cd in wxEvtHandler::ProcessEvent (this=0x8a6a320, event=@0x13537168) at ./src/common/event.cpp:1293
#21 0xb790cc24 in wxEvtHandler::ProcessPendingEvents (this=0x8a6a320) at ./src/common/event.cpp:1191
#22 0xb7846673 in wxAppConsole::ProcessPendingEvents (this=0x8c9bac8) at ./src/common/appbase.cpp:294
#23 0xb7c17cde in wxAppBase::ProcessIdle (this=0x8c9bac8) at ./src/common/appcmn.cpp:435
#24 0xb7b48239 in wxapp_idle_callback () at ./src/gtk/app.cpp:206
#25 0xb6dcea91 in ?? () from /usr/lib/libglib-2.0.so.0
#26 0xb6dd09c8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#27 0xb6dd4083 in ?? () from /usr/lib/libglib-2.0.so.0
#28 0xb6dd45a2 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#29 0xb724a829 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#30 0xb7b683b0 in wxEventLoop::Run (this=0xa982f30) at ./src/gtk/evtloop.cpp:76
#31 0xb7c17719 in wxAppBase::MainLoop (this=0x8c9bac8) at ./src/common/appcmn.cpp:312
#32 0xb7c1742d in wxAppBase::OnRun (this=0x8c9bac8) at ./src/common/appcmn.cpp:367
#33 0xb78902cd in wxEntry (argc=@0xb79a966c, argv=0x8c8a480) at ./src/common/init.cpp:460
#34 0xb78904f3 in wxEntry (argc=@0xbff51430, argv=0xbff514b4) at ./src/common/init.cpp:472
#35 0x082bb414 in main (argc=Cannot access memory at address 0xa) at amule-gui.cpp:94
(gdb)
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see

(gdb) f 12
#12 0x0816175e in CEncryptedStreamSocket::Negotiate (this=0x12d52d40, pBuffer=0x8a6a3a0 "\036\"M\031c�UB8$\026\006�R\021�\210E\223M�\210", nLen=20)
    at EncryptedStreamSocket.cpp:683
683                     wxFAIL;
(gdb) l
678                     return nRead;
679             } catch(...){
680                     // can only be caused by a bug in negationhandling, not by the datastream
681                     //error->Delete();
682                     //printf("Bug on negotiation?\n");
683                     wxFAIL;
684                     OnError(ERR_ENCRYPTION);
685                     m_pfiReceiveBuffer.ResetData();
686                     return (-1);
687             }
(gdb)                                                                                                                               
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685

Scary. Haven't ever got this one.
Logged
concordia cum veritate

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming

CryptoPP 5.6.0 ?
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see

Hum, just got another one. They are rare, but they happen. I have:
Code: [Select]
configure: WARNING: unrecognized options: --enable-verbose


  Configure script has finished system check.

  Configured aMule SVN (rev. 9775) for 'i686-suse-linux-gnu'.

  aMule enabled options:

  **** aMule Core ****
  Prefix where aMule should be installed?                    /home/user/usr/amule
  Should aMule be compiled with i18n support?                yes
  Should aMule be compiled in debug mode?                    yes
  Should aMule be compiled with profiling?                   no
  Should aMule be compiled with optimizations?               no
  Should aMule be compiled with UPnP support?                yes
  Should aMule be compiled with IP2country support?          yes
  Should aMule monolithic application be built?              yes
  Should aMule daemon version be built?                      yes
  Should aMule remote gui be built? (EXPERIMENTAL)           yes
  Crypto++ library/headers style?                            installed

  **** aMule TextClient ****
  Should aMule Command Line Client be built?                 yes

  **** aMule WebServer ****
  Should aMule WebServer be built?                           yes

  **** aMule ED2K Links Handler ****
  Should aMule ED2K Links Handler be built?                  yes

  **** aMuleLinkCreator ****
  Should aMuleLinkCreator GUI version (alc) be built?        no
  Should aMuleLinkCreator for console (alcc) be built?       no

  **** aMule Statistics ****
  Should C aMule Statistics (CAS) be built?                  yes
  Should aMule GUI Statistics (wxCas) be built?              yes
  Should xas XChat2 plugin be installed?                     no

  **** General Libraries and Tools ****
  Should ccache support be enabled?                          yes
  Libraries aMule will use to build:
                                       wxWidgets             2.8.10 (gtk2,debug,shared)
                                       crypto++              5.5.2 (installed, in /home/user/usr/cryptopp)
                                       libupnp               1.6.7 (in /home/user/usr/libupnp)
                                       libintl               system
                                       libGeoIP              system
                                       libpng                1.2.31
                                       libgd                 2.0.36
                                       zlib                  1.2.3
Should I upgrade crypto++?
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685

Should I upgrade crypto++?
I don't think so. 5.5.2 seems to be more stable than 5.6.0, however, it may worth a try.
Logged
concordia cum veritate

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming

Phoenix, could you try to remove the try/catch so we can see where it throws?
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see

Sure, will do it now. The only problem is that the last time it took three days to throw. Other than that, I'll leave it running and report as soon as it throws.
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see

I am not sure if this is related, but since I took the try/catch I am getting lots of these, which looks more like a wx bug:
Code: [Select]
(gdb) bt
#0  0xffffe430 in __kernel_vsyscall ()
#1  0xb75336a7 in poll () from /lib/libc.so.6
#2  0xb7a9c146 in wxapp_poll_func (ufds=0xaba1d18, nfds=6, timeout=3) at ./src/gtk/app.cpp:259
#3  0xb6d27f12 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0xb6d285a2 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#5  0xb7120755 in gtk_dialog_run () from /usr/lib/libgtk-x11-2.0.so.0
#6  0xb7acd370 in wxGUIAppTraits::ShowAssertDialog (this=0x8cc1b50, msg=@0xbffbbd08) at ./src/gtk/utilsgtk.cpp:387
#7  0xb7799826 in ShowAssertDialog (szFile=0xb7c8ad5c, nLine=64, szFunc=0xabd6e4c, szCond=0xb7c8af68, szMsg=0xb7c8aee0, traits=0x8cc1b50)
    at ./src/common/appbase.cpp:836
#8  0xb7799bf4 in wxAppConsole::OnAssertFailure (this=0x8c9bac8, file=0xb7c8ad5c, line=64, func=0xabd6e4c, cond=0xb7c8af68, msg=0xb7c8aee0)
    at ./src/common/appbase.cpp:445
#9  0xb7a9b495 in wxApp::OnAssertFailure (this=0x8c9bac8, file=0xb7c8ad5c, line=64, func=0xabd6e4c, cond=0xb7c8af68, msg=0xb7c8aee0)
    at ./src/gtk/app.cpp:556
#10 0x0808761e in CamuleApp::OnAssertFailure (this=0x8c9bac8, file=0xb7c8ad5c, line=64, func=0xabd6e4c, cond=0xb7c8af68, msg=0xb7c8aee0)
    at amule.cpp:1391
#11 0xb779995e in wxOnAssert (szFile=0xb7c8ad5c, nLine=64, szFunc=0xb7c8af9a "~wxEventLoop", szCond=0xb7c8af68, szMsg=0xb7c8aee0)
    at ./src/common/appbase.cpp:711
#12 0xb7abc48c in ~wxEventLoop (this=0xa7dd860) at ./src/gtk/evtloop.cpp:64
#13 0xb7b6b1e5 in ~wxEventLoopPtr (this=0xbffbbea0) at ./src/common/appcmn.cpp:74
#14 0xb7b6c3a1 in ~wxEventLoopTiedPtr (this=0xbffbbea0) at ./src/common/appcmn.cpp:74
#15 0xb7b6b743 in wxAppBase::MainLoop (this=0x8c9bac8) at ./src/common/appcmn.cpp:312
#16 0xb7b6b42d in wxAppBase::OnRun (this=0x8c9bac8) at ./src/common/appcmn.cpp:367
#17 0xb77e42cd in wxEntry (argc=@0xb78fd66c, argv=0x8c8a480) at ./src/common/init.cpp:460
#18 0xb77e44f3 in wxEntry (argc=@0xbffbbf70, argv=0xbffbbff4) at ./src/common/init.cpp:472
#19 0x082bb540 in main (argc=Cannot access memory at address 0x6
) at amule-gui.cpp:94
(gdb) f 12
#12 0xb7abc48c in ~wxEventLoop (this=0xa7dd860) at ./src/gtk/evtloop.cpp:64
64          wxASSERT_MSG( !m_impl, _T("should have been deleted in Run()") );
(gdb) l
59      // wxEventLoop running and exiting
60      // ----------------------------------------------------------------------------
61
62      wxEventLoop::~wxEventLoop()
63      {
64          wxASSERT_MSG( !m_impl, _T("should have been deleted in Run()") );
65      }
66
67      int wxEventLoop::Run()
68      {
Is there a chance that the exception happens, gets silently caught somewhere else and something leaks?
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming

Probably.  :-\
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685

phoenix, please try the attached patch to at least see what exception is thrown. That might give a clue what's going on.
(I assume you're using gcc and have <cxxabi.h>)
Logged
concordia cum veritate

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see

Ok, applied, now compiling.
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see

Ok, that is what I got for the same assertion:
Code: [Select]
!2009-08-26 20:18:07: EncryptedStreamSocket.cpp(691): [Negotiate] Caught exception of type 'CEOFException'

Most probably unrelated, but anyway, I got those messages before:
Code: [Select]
2009-08-26 12:18:58: MuleUDPSocket.cpp(176): Unknown port receiving a UDP packet! Ignoring
 2009-08-26 12:20:47: MuleUDPSocket.cpp(176): Unknown port receiving a UDP packet! Ignoring
aMule is not running
: Success
aMule is not running
: Success
aMule is not running
: Success
aMule is not running
: Success
aMule is not running
: Success
aMule is not running
: Success
aMule is not running
: Success
 2009-08-26 15:40:24: SafeFile.cpp(475): Invalid Kad tag; type=0xf9 name=
Logged