aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: amulegui fails to connect on localhost  (Read 1899 times)

Nodsu

  • Jr. Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 62
amulegui fails to connect on localhost
« on: September 08, 2005, 02:33:43 PM »

NetBSD 2.0, wxGTK 2.6.1, aMule CVS 20050908

amulegui fails to connect to amuled. After prompting form password etc the dialog is closed and "Going for main loop while we wait for events" messages is printed. After that the amulegui process is either idle or polling. Backtrace shows the same: when interrupting the program it is in libc poll()

amulegui from other hosts (Linux, Cygwin) connects as do amuleweb and amulecmd from localhost.

When running amuled in gdb the following occurs after amulegui tries to connect:

Quote
15:36:53: Debug: amuled.cpp(167): assert "(fd > 2) && (fd < FD_SETSIZE)" failed. amuled.cpp(167): assert "(fd > 2) && (fd < FD_SETSIZE)" failed.

Backtrace:
Quote
#0  0x4847dfbb in kill () from /usr/lib/libc.so.12
#1  0x4849c488 in raise () from /usr/lib/libc.so.12
#2  0x482f9766 in wxTrap() () from /usr/pkg/lib/libwx_baseud-2.6.so
#3  0x482f9b2d in wxOnAssert(wchar_t const*, int, wchar_t const*, wchar_t const*) () from /usr/pkg/lib/libwx_baseud-2.6.so
#4  0x482f96c2 in wxAppTraitsBase::ShowAssertDialog(wxString const&) ()
   from /usr/pkg/lib/libwx_baseud-2.6.so
#5  0x482f9672 in wxConsoleAppTraitsBase::ShowAssertDialog(wxString const&) ()
   from /usr/pkg/lib/libwx_baseud-2.6.so
#6  0x482f9c8b in wxOnAssert(wchar_t const*, int, wchar_t const*, wchar_t const*) () from /usr/pkg/lib/libwx_baseud-2.6.so
#7  0x0805f6f9 in CamuleApp::OnAssert(wchar_t const*, int, wchar_t const*, wchar_t const*) (this=0x84c0b00, file=0x8216ce0, line=167, cond=0x8216d20, msg=0x0)
    at amule.cpp:1428
#8  0x482f97f4 in wxOnAssert(wchar_t const*, int, wchar_t const*, wchar_t const*) () from /usr/pkg/lib/libwx_baseud-2.6.so
#9  0x482f97a1 in wxAssert(int, wchar_t const*, int, wchar_t const*, wchar_t const*) () from /usr/pkg/lib/libwx_baseud-2.6.so
#10 0x08065e14 in CSocketSet::AddSocket(GSocket*) (this=0x84c2000,
    socket=0x9ff8900) at amuled.cpp:167
#11 0x080662d8 in CAmuledGSocketFuncTable::AddSocket(GSocket*, GSocketEvent) (
    this=0x84b5550, socket=0x9ff8900, event=GSOCK_INPUT) at amuled.cpp:239
#12 0x0806650f in CAmuledGSocketFuncTable::Install_Callback(GSocket*, GSocketEve---Type to continue, or q to quit---
nt) (this=0x84b5550, sock=0x9ff8900, e=GSOCK_INPUT) at amuled.cpp:310
#13 0x0806654d in CAmuledGSocketFuncTable::Enable_Events(GSocket*) (
    this=0x84b5550, socket=0x9ff8900) at amuled.cpp:320
#14 0x484499c8 in GSocket::WaitConnection() ()
   from /usr/pkg/lib/libwx_baseud_net-2.6.so
#15 0x48446a29 in wxSocketServer::AcceptWith(wxSocketBase&, bool) ()
   from /usr/pkg/lib/libwx_baseud_net-2.6.so
#16 0x0810a5c2 in CListenSocket::OnA#19 0x483a5de4 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/pkg/lib/libwx_baseud-2.6.so
#20 0x483a523e in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) ()
   from /usr/pkg/lib/libwx_baseud-2.6.so
#21 0x483a5f96 in wxEvtHandler::ProcessEvent(wxEvent&) ()
   from /usr/pkg/lib/libwx_baseud-2.6.so
#22 0x483a5d37 in wxEvtHandler::ProcessPendingEvents() ()
   from /usr/pkg/lib/libwx_baseud-2.6.so
#23 0x482f90bc in wxAppConsole::ProcessPendingEvents() ()
   from /usr/pkg/lib/libwx_baseud-2.6.so
---Type to continue, or q to quit---
#24 0x08066ed4 in CamuleDaemonApp::OnRun() (this=0x84c0b00) at amuled.cpp:400
#25 0x4833fb33 in wxEntry(int&, wchar_t**) ()
   from /usr/pkg/lib/libwx_baseud-2.6.so
#26 0x4833fbef in wxEntry(int&, char**) ()
   from /usr/pkg/lib/libwx_baseud-2.6.so
#27 0x08065ce1 in main (argc=1, argv=0xbfbff74c) at amuled.cpp:124
#28 0x080533a2 in ___start ()
ccept(int) (this=0x8823300, nErrorCode=0)
    at ListenSocket.cpp:2015
« Last Edit: September 08, 2005, 02:35:35 PM by Nodsu »
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: amulegui fails to connect on localhost
« Reply #1 on: September 09, 2005, 03:03:19 PM »

Hmm.  I wonder if that assert is obsolete.  If I recall correctly, if you run amuled in full daemon mode, it closes stdin and stdout.  Therefore, it is likely that fds less than or equal to 2 will in fact be used for sockets or the like.  However, I don't think it explains the failure of amulegui to connect.
Logged

lfroen

  • Guest
Re: amulegui fails to connect on localhost
« Reply #2 on: September 10, 2005, 02:23:55 PM »

Not exactly. It closes stdin/out, and then opens /dev/null 2 times. This way descriptors 0 and 1 should be valid.
Generally speaking, you can't make it other way: all stdio functions talk to fds 0,1 so it will be just very strange if your printf will put data in some network socket that happens to be fd number 1 :)
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: amulegui fails to connect on localhost
« Reply #3 on: September 11, 2005, 05:53:02 AM »

Ah, true.  I should have figured.
Logged