aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: 1 [2] 3

Author Topic: amuled crashes after short time on Mac OS X  (Read 12127 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
Re: amuled crashes after short time on Mac OS X
« Reply #15 on: January 25, 2005, 05:14:40 PM »

Code: [Select]
(gdb) p *m_socket
$2 = {
  _vptr$GSocket = 0x2239660,
  m_ok = true,
  m_fd = 1345, <<<------*****
  m_local = 0x0,
  m_peer = 0x27589e0,
  m_error = GSOCK_WOULDBLOCK,
  m_non_blocking = false,
  m_server = false,
  m_stream = true,
  m_establishing = false,
  m_reusable = false,
  m_timeout = 0,
  m_detected = 8,
  m_cbacks = {0x2214408 , 0x2214408 , 0x2214408 , 0x2214408 },
  m_data = {0x27591e0 "", 0x27591e0 "", 0x27591e0 "", 0x27591e0 ""},
  m_gui_dependent = 0x0
}
Ken, looks like you were right. m_fd is bigger than 1000. Who is the guilty one? I can't look at wx code now, will do that at home.
Logged

lfroen

  • Guest
Re: amuled crashes after short time on Mac OS X
« Reply #16 on: January 25, 2005, 06:17:11 PM »

Quote
Who is the guilty one?

The guilty is amule (if socket limit is set correctly) which doesn't close sockets on time. As a result, amule creates more then 1024 fd's, while only some of them are in use. So, when socket > 1024 entering one of Wait functions - segfault
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: amuled crashes after short time on Mac OS X
« Reply #17 on: January 25, 2005, 07:06:03 PM »

1345!  8o

Selected quotes from man select:
Quote
FD_SETSIZE [...] is normally at least equal to the maximum number of descriptors supported by the system

BUGS

     The default size FD_SETSIZE (currently 1024) is somewhat smaller than the current kernel limit to the number of open files.  However, in order to accommodate programs which might potentially use a larger number of open files with select, it is possible to increase this size within a program by providing a larger definition of FD_SETSIZE before the inclusion of .

Supposedly, ulimit -n (under bash) or limit descriptors (under tcsh) displays the maximum number of open file descriptors.  I get 256.  However, these may only apply to the shell and programs it starts.  May not apply to programs started from the Finder or from gdb.

On the other hand, I can do this:
(gdb) print (int) getdtablesize()  # get descriptor table size
$1 = 10240

This seems to correspond to:

% sysctl kern.maxfilesperproc
kern.maxfilesperproc = 10240

Here's another line of inquiry:
(gdb) call (rlimit*)malloc(sizeof(rlimit))
$1 = (rlimit *) 0x2b0e100
(gdb) call (int) getrlimit(8, $1) # RLIMIT_NOFILE == 8
$2 = 0
(gdb) print *$1
$3 = {
  rlim_cur = 10240,
  rlim_max = 10240
}
(gdb) call (void)free($1)


I'm not entirely sure whose responsibility it is to avoid this problem.  I suppose wxWidgets could do:
Code: [Select]
struct rlimit foo;
getrlimit(RLIMIT_NOFILE, &foo);
if (foo.rlim_max > FD_SETSIZE)
{
    foo.rlim_cur = FD_SETSIZE;
    foo.rlim_max = FD_SETSIZE;
    setrlimit(RLIMIT_NOFILE, &foo);
}
at initialization to make sure that socket descriptors don't exceed FD_SETSIZE;


HipHop, here's something for you to test:

$ gdb /Path/to/amuled
(gdb) break main
(gdb) run
(gdb) call (rlimit*)malloc(sizeof(rlimit))
(gdb) call (int) getrlimit(8, $1) # RLIMIT_NOFILE == 8
(gdb) print *$1  # I'm curious if the output from this matches what I got
(gdb) set *$1 = { 1024, 1024 }
(gdb) call (int) setrlimit(8, $1)
(gdb) call (void) free($1)
(gdb) cont

If I'm right, then amuled will run just fine without crashing.  Of course, this is a test by absence of evidence, but your crashes are so reliable that I think we can consider the mystery solved if amuled runs a good long while.
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: amuled crashes after short time on Mac OS X
« Reply #18 on: January 25, 2005, 07:15:53 PM »

Just saw lfroen's post.  (I really should learn not to multi-task while I'm composing posts. :) )

To see if amuled is failing to close connections, you might try:

$ netstat -nptcp

from another Terminal window while amuled is running.  To count the number of connections, use:

$ netstat -nptcp | wc -l

You can do these repeatedly over time to track how many connections are in use.
Logged

HipHopPunkSuperStar

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 31
Re: amuled crashes after short time on Mac OS X
« Reply #19 on: January 26, 2005, 12:57:43 PM »

Quote
Originally posted by ken

HipHop, here's something for you to test:

$ gdb /Path/to/amuled
(gdb) break main
(gdb) run
(gdb) call (rlimit*)malloc(sizeof(rlimit))
(gdb) call (int) getrlimit(8, $1) # RLIMIT_NOFILE == 8
(gdb) print *$1  # I'm curious if the output from this matches what I got
(gdb) set *$1 = { 1024, 1024 }
(gdb) call (int) setrlimit(8, $1)
(gdb) call (void) free($1)
(gdb) cont

If I'm right, then amuled will run just fine without crashing.  Of course, this is a test by absence of evidence, but your crashes are so reliable that I think we can consider the mystery solved if amuled runs a good long while.
Well, let's see if I got this right, everything after
(gdb) run
comes after the crash, right?
so here we go:
(gdb) break main
Code: [Select]
Breakpoint 1 at 0xa957c: file ../include/wx/mac/carbon/private.h, line 199.
(gdb)run
...
Crash
Code: [Select]
Program received signal EXC_BAD_ACCESS, Could not access memory.
[Switching to process 1147 thread 0x2d43]
0x022186ec in GSocket::Read(char*, int) (this=0x0, buffer=0x0, size=0) at ../src/unix/gsocket.cpp:821
821         if (m_stream)

(gdb) call (rlimit*)malloc(sizeof(rlimit))
Code: [Select]
(gdb) call (rlimit*)malloc(sizeof(rlimit))
CClientReqSocketHandler: thread 59447296 for 0x2744370 exited
$1 = (rlimit *) 0x27a9500

(gdb) call (int) getrlimit(8, $1)
Code: [Select]
(gdb) call (int) getrlimit(8, $1)                    
$2 = 0
(gdb) print *$1
Code: [Select]
(gdb) print *$1
$3 = {
  rlim_cur = 10240,
  rlim_max = 10240
}
(gdb) set *$1 = { 1024, 1024 } #didn't give any output... (?)
(gdb) call (int) setrlimit(8, $1)
Code: [Select]
(gdb) call (int) setrlimit(8, $1)
$4 = 0
(gdb) call (void) free($1) # didn't give any output... (?)
(gdb) cont
Code: [Select]
(gdb) cont
Continuing.

Program received signal EXC_BAD_ACCESS, Could not access memory.
0x022186ec in GSocket::Read(char*, int) (this=0x0, buffer=0x0, size=0) at ../src/unix/gsocket.cpp:821
821         if (m_stream)

And for the sake of completness:
bt
Code: [Select]
(gdb) bt
#0  0x022186ec in GSocket::Read(char*, int) (this=0x0, buffer=0x0, size=0) at ../src/unix/gsocket.cpp:821
#1  0x022132d0 in wxSocketBase::_Read(void*, unsigned) (this=0x27a7040, buffer=0xf0407c58, nbytes=1) at ../src/common/socket.cpp:365
#2  0x022130d4 in wxSocketBase::Read(void*, unsigned) (this=0x27a7040, buffer=0xf0407c58, nbytes=1) at ../src/common/socket.cpp:308
#3  0x00013770 in ECSocket::ReadBuffer(wxSocketBase*, void*, unsigned) (this=0x240e930, sock=0x27a7040, buffer=0xf0407c58, len=1) at ECSocket.cpp:136
#4  0x00013628 in ECSocket::ReadNumber(wxSocketBase*, void*, unsigned) (this=0x240e930, sock=0x27a7040, buffer=0xf0407c58, len=1) at ECSocket.cpp:92
#5  0x00013b14 in ECSocket::ReadFlags(wxSocketBase*) (this=0x240e930, sock=0x27a7040) at ECSocket.cpp:212
#6  0x00013bb8 in ECSocket::ReadPacket(wxSocketBase*) (this=0x240e930, sock=0x27a7040) at ECSocket.cpp:234
#7  0x0004fb4c in ExternalConnClientThread::Entry() (this=0x2795550) at ExternalConn.cpp:1755
#8  0x02afa7f4 in wxThreadInternal::MacThreadStart(void*) (parameter=0x2795550) at ../src/mac/carbon/thread.cpp:1042
#9  0x902c6d88 in PrivateMPEntryPoint ()
#10 0x900246e8 in _pthread_body ()

bt full
Code: [Select]
(gdb) bt full
#0  0x022186ec in GSocket::Read(char*, int) (this=0x0, buffer=0x0, size=0) at ../src/unix/gsocket.cpp:821
        ret = 0
#1  0x022132d0 in wxSocketBase::_Read(void*, unsigned) (this=0x27a7040, buffer=0xf0407c58, nbytes=1) at ../src/common/socket.cpp:365
        more = true
        total = 0
        ret = 1
#2  0x022130d4 in wxSocketBase::Read(void*, unsigned) (this=0x27a7040, buffer=0xf0407c58, nbytes=1) at ../src/common/socket.cpp:308
No locals.
#3  0x00013770 in ECSocket::ReadBuffer(wxSocketBase*, void*, unsigned) (this=0x240e930, sock=0x27a7040, buffer=0xf0407c58, len=1) at ECSocket.cpp:136
        msgRemain = 1
        LastIO = 0
        iobuf = 0xf0407c58 ""
        error = false
#4  0x00013628 in ECSocket::ReadNumber(wxSocketBase*, void*, unsigned) (this=0x240e930, sock=0x27a7040, buffer=0xf0407c58, len=1) at ECSocket.cpp:92
No locals.
#5  0x00013b14 in ECSocket::ReadFlags(wxSocketBase*) (this=0x240e930, sock=0x27a7040) at ECSocket.cpp:212
        i = 0
        flags = 0
        b = 0 '\0'
#6  0x00013bb8 in ECSocket::ReadPacket(wxSocketBase*) (this=0x240e930, sock=0x27a7040) at ECSocket.cpp:234
        flags = 1819239275
        p = (CECPacket *) 0x274ea20
#7  0x0004fb4c in ExternalConnClientThread::Entry() (this=0x2795550) at ExternalConn.cpp:1755
        request = (CECPacket *) 0xf0407d70
        response = (CECPacket *) 0x0
#8  0x02afa7f4 in wxThreadInternal::MacThreadStart(void*) (parameter=0x2795550) at ../src/mac/carbon/thread.cpp:1042
        thread = (wxThread *) 0x2795550
        pthread = (wxThreadInternal *) 0x27966c0
        dontRunAtAll = false
#9  0x902c6d88 in PrivateMPEntryPoint ()
No symbol table info available.
#10 0x900246e8 in _pthread_body ()
No symbol table info available.

Didn't check the netstat part though cause I had running bittorrent at the same time, I'll check on that later...
Logged

HipHopPunkSuperStar

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 31
Re: amuled crashes after short time on Mac OS X
« Reply #20 on: January 26, 2005, 01:08:45 PM »

Question:
When I try again now,
(gdb) break
gives me:
Code: [Select]
No default breakpoint address now.
What's that about?
Should I keep running amuled with all the gdb stuff anyway or do I have to do something else to get back to "normal"?
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: amuled crashes after short time on Mac OS X
« Reply #21 on: January 26, 2005, 04:02:04 PM »

"cont"
Logged

HipHopPunkSuperStar

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 31
Re: amuled crashes after short time on Mac OS X
« Reply #22 on: January 27, 2005, 01:53:47 PM »

Crash
Code: [Select]
Program received signal EXC_BAD_ACCESS, Could not access memory.
[Switching to process 942 thread 0x2f03]
0x02213e14 in wxSocketBase::_Wait(long, long, int) (this=???, seconds=???, milliseconds=???, flags=???) at ../src/common/socket.cpp:719
719         result = m_socket->Select(flags | GSOCK_LOST_FLAG);
call (rlimit*)malloc(sizeof(rlimit))
Code: [Select]
(gdb) call (rlimit*)malloc(sizeof(rlimit))
$1 = (rlimit *) 0x2759ee0
call (int) getrlimit(8, $1)
Code: [Select]
(gdb) call (int) getrlimit(8, $1)                    
$2 = 0
print *$1
Code: [Select]
(gdb)  print *$1
$3 = {
  rlim_cur = 10240,
  rlim_max = 10240
}
set *$1 = { 1024, 1024 }
call (int) setrlimit(8, $1)
Code: [Select]
(gdb) call (int) setrlimit(8, $1)
$4 = 0
(gdb) call (void) free($1)
cont
Code: [Select]
(gdb) cont
Continuing.

Program received signal EXC_BAD_ACCESS, Could not access memory.
0x02213e14 in wxSocketBase::_Wait(long, long, int) (this=???, seconds=???, milliseconds=???, flags=???) at ../src/common/socket.cpp:719
719         result = m_socket->Select(flags | GSOCK_LOST_FLAG);
bt
Code: [Select]
(gdb) bt
#0  0x02213e14 in wxSocketBase::_Wait(long, long, int) (this=???, seconds=???, milliseconds=???, flags=???) at ../src/common/socket.cpp:719
#1  0x02214084 in wxSocketBase::WaitForLost(long, long) (this=0x27cc030, seconds=0, milliseconds=0) at ../src/common/socket.cpp:784
#2  0x00011db8 in CSocketGlobalThread::Entry() (this=0x2753d58) at ListenSocket.cpp:2567
#3  0x02afa7f4 in wxThreadInternal::MacThreadStart(void*) (parameter=0x2753d58) at ../src/mac/carbon/thread.cpp:1042
#4  0x902c6d88 in PrivateMPEntryPoint ()
#5  0x900246e8 in _pthread_body ()
bt full
Code: [Select]
(gdb) bt full
#0  0x02213e14 in wxSocketBase::_Wait(long, long, int) (this=???, seconds=???, milliseconds=???, flags=???) at ../src/common/socket.cpp:719
        result = Cannot access memory at address 0x40

$ netstat -nptcp | wc -l
was always between 223 and 260.
... ?(
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: amuled crashes after short time on Mac OS X
« Reply #23 on: January 27, 2005, 03:02:28 PM »

I'm providing a new precompiled one very soon.
Logged

HipHopPunkSuperStar

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 31
Re: amuled crashes after short time on Mac OS X
« Reply #24 on: January 27, 2005, 03:35:44 PM »

Don't know if this is of any help, but checking:
$ netstat -nptcp | wc -l
on aMule a couple of times only gives me values between 120 and 150 which is 100 less than the always crashing amuled... ?(
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: amuled crashes after short time on Mac OS X
« Reply #25 on: January 28, 2005, 05:06:46 AM »

Quote
Originally posted by HipHopPunkSuperStar
Well, let's see if I got this right, everything after
(gdb) run
comes after the crash, right?
Well, not quite.  My intent was for the "break main" to cause gdb to stop the program almost immediately after it began so that we could change a setting which controls how it will run (disallow more than 1024 open file descriptors).  ("break main" sets a breakpoint on function "main", which is normally the entry point of a program.  gdb should stop at the breakpoint and let us issue some gdb commands.  We can tell gdb to let the program proceed with the "cont" command.)

Unfortunately, this didn't work quite as I intended...
Quote
(gdb) break main
Code: [Select]
Breakpoint 1 at 0xa957c: file ../include/wx/mac/carbon/private.h, line 199.
This isn't where I expected that breakpoint to be set.  Apparently, since amuled ran until a crash instead of hitting the breakpoint, it isn't the right breakpoint to stop the program just as it is starting.  Try, in addition to "break main", "break wxEntry" before the run.  When gdb stops at one of these breakpoints the first time, issue the rest of the commands.  If it also stops at the other breakpoint, just use "cont" to continue -- no need to issue all those commands twice in one session.  If it runs until a crash, then don't bother issuing the rest of the commands -- by that point, it's too late for them to be useful or interesting.

Unfortunately, this means that the experiment you performed didn't test what I was hoping to test.  Sorry for the hassle.

In the meantime, I had a thought.  The socket file descriptors could have very high numbers even if you don't have very many of them open if you have a lot of disk file descriptors open as well.  So, that leads to some questions:
  • How many part.met files do you have?  Do "ls ~/.aMule/Temp/*.part.met | wc -l" to find out.
  • What is the highest-numbered part.met file you have?  Do "(cd ~/.aMule/Temp/; ls *.part.met | tail -1)" to find out.
  • How many files are you sharing?  This is displayed in aMule, in the Shared Files Window, above the list.
Another thing to try is the "lsof" (list open files) command on amuled while it is running.  To use it, first find out the process ID (pid) of amuled:

ps -xcopid,command | grep amuled

The number in the left-hand column of the output is amuled's pid.  Then run:

lsof -p amuled_pid >amuled_lsof.txt

to list the files that amuled has open and write the result into a new file called "amuled_lsof.txt".  If there's anything private in there, you might want to edit it out.  Then make a posting here and attach the file.
Logged

HipHopPunkSuperStar

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 31
Re: amuled crashes after short time on Mac OS X
« Reply #26 on: January 28, 2005, 07:07:37 PM »

Okay so I understand that when gdb stops amuled I would recognize this somehow or at least it wouldn't show me the usual Crash error like this:
Code: [Select]
Program received signal EXC_BAD_ACCESS, Could not access memory.
[Switching to process 1936 thread 0x2f03]
0x02213e14 in wxSocketBase::_Wait(long, long, int) (this=???, seconds=???, milliseconds=???, flags=???) at ../src/common/socket.cpp:719
719         result = m_socket->Select(flags | GSOCK_LOST_FLAG);
(gdb)
and that it give you much info if I use and post the output of all the commands after it has already crashed, so I won't.
It crashes before anything that I recognize as anything else than a crash happens...
for the sake of completeness I post you the bt and bt full anyway:
bt
Code: [Select]
#0  0x02213e14 in wxSocketBase::_Wait(long, long, int) (this=???, seconds=???, milliseconds=???, flags=???) at ../src/common/socket.cpp:719
#1  0x02214084 in wxSocketBase::WaitForLost(long, long) (this=0x27cc4d0, seconds=0, milliseconds=0) at ../src/common/socket.cpp:784
#2  0x00011db8 in CSocketGlobalThread::Entry() (this=0x276a0f8) at ListenSocket.cpp:2567
#3  0x02afa7f4 in wxThreadInternal::MacThreadStart(void*) (parameter=0x276a0f8) at ../src/mac/carbon/thread.cpp:1042
#4  0x902c6d88 in PrivateMPEntryPoint ()
#5  0x900246e8 in _pthread_body ()
bt full
Code: [Select]
(gdb) bt full
#0  0x02213e14 in wxSocketBase::_Wait(long, long, int) (this=???, seconds=???, milliseconds=???, flags=???) at ../src/common/socket.cpp:719
        result = Cannot access memory at address 0x40

I have 7 *.*part.met files with the highest beeing 007.part.met.
I'm sharing 35 files, all in my Incoming Dir extept thos 7 I'm downloading right now.

There seems to be nothing private, not even my own public IP in the "amuled_lsof.txt" so I   can attach it here, but as there are the IPs/DNSs listed of the people I'm connecting to I would apreciate if someone could remove it form the post after all the Developers interested got it, or tell me that I can remove it, although I'm not quite sure if anyone could find out something with these IPs..
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: amuled crashes after short time on Mac OS X
« Reply #27 on: January 31, 2005, 03:34:03 AM »

Hmm.  I'm surprised that the breakpoint at main and wxEntry isn't working (it works here for me).  From your backtraces, I see that the CSocketGlobalThread is running.  I've attempted to trace through the code to see how that thread gets started, and I'm pretty certain that it gets started ultimately from CamuleApp::OnInit.  So, in theory, a breakpoint there must be hit before we can get to the crash you're experiencing.  (Right?  [plaintive]Right?[/plaintive])

So, use this instead of (or in addition to) "break main" and "break wxEntry":

break CamuleApp::OnInit

By the way, several of the commands I asked you to run previously were just to check that things on your system were similar to mine.  They really only needed to be run once for me to see the results.  So, I can reduce the routine a bit, to:

$ gdb /Path/to/amuled
(gdb) break CamuleApp::OnInit
(gdb) run
#
# gdb should stop at a breakpoint here, not on a signal such as EXC_BAD_ACCESS.
#
(gdb) call (rlimit*)malloc(sizeof(rlimit))
(gdb) set *$1 = { 1024, 1024 }
(gdb) call (int) setrlimit(8, $1)
(gdb) call (void) free($1)
(gdb) cont

If you again get to a crash before stopping at this breakpoint, then we should just put the damn code directly into the program.  To do that, download the attached patch file.  In your aMule source directory (the one from which you "make"), issue the command:

patch -p0
and, then:

cd src
make amuled

to rebuild amuled (this sequence avoids rebuilding the graphical amule app).  Run the newly built executable (./amuled) under gdb.  This time, no need to issue any special commands to gdb.  Just "run".
Logged

HipHopPunkSuperStar

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 31
Re: amuled crashes after short time on Mac OS X
« Reply #28 on: January 31, 2005, 04:37:00 PM »

Okay, now the unpatched version stopped again with teh EXC_BAD_ACCESS but the patched gave something more...
So I got this message:
Code: [Select]
Program received signal SIGTRAP, Trace/breakpoint trap.
0x90016f48 in semaphore_wait_signal_trap ()
so I issued: (gdb) call (rlimit*)malloc(sizeof(rlimit)) which gave me:
Code: [Select]
(gdb) call (rlimit*)malloc(sizeof(rlimit))
15:20:18: Debug: ClientCredits.cpp(526): assert "false" failed. [in child thread]
ClientCredits.cpp(526): assert "false" failed. [in child thread]
BaseClient.cpp(1827): assert "false" failed. [in child thread]
15:20:18: Debug: BaseClient.cpp(1827): assert "false" failed. [in child thread]
BaseClient.cpp(1827): assert "false" failed. [in child thread]

Program received signal SIGTRAP, Trace/breakpoint trap.
0x90001e00 in malloc ()
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on"
Evaluation of the expression containing the function (malloc) will be abandoned.
set *$1 = { 1024, 1024 }
Code: [Select]
(gdb) set *$1 = { 1024, 1024 }
History has not yet reached $1.
call (int) setrlimit(8, $1)
Code: [Select]
(gdb) call (int) setrlimit(8, $1)
History has not yet reached $1.
call (void) free($1)
again:
Code: [Select]
(gdb) call (void) free($1)
History has not yet reached $1.
and cont just gave me:
Code: [Select]
(gdb) cont
Continuing.
so it seems that there is not much of valuable Info in this...
anyhow here is the bt
Code: [Select]
(gdb) bt
#0  0x90016f48 in semaphore_wait_signal_trap ()
#1  0x9000e790 in _pthread_cond_wait ()
#2  0x90283d68 in MPEnterCriticalRegion ()
#3  0x02af9d78 in wxMutexInternal::Lock() (this=???) at ../src/mac/carbon/thread.cpp:461
#4  0x02afcbb8 in wxMutex::Lock() (this=0x240e8e0) at ../include/wx/thrimpl.cpp:44
#5  0x0012fcc8 in wxMutexLocker::wxMutexLocker(wxMutex&) (this=0xbffffba0, mutex=@0x240e8e0) at /usr/local/include/wx-2.5/wx/thread.h:181
#6  0x0012bd28 in wxMutexLocker::wxMutexLocker(wxMutex&) (this=0xbffffba0, mutex=@0x240e8e0) at /usr/local/include/wx-2.5/wx/thread.h:181
#7  0x000a98ac in CamuleDaemonApp::OnRun() (this=0x240e7b0) at amuled.cpp:154
#8  0x02ab1b14 in wxEntry(int&, char**) (argc=@0xbffffcb8, argv=0xbffffd54) at ../src/common/init.cpp:411
#9  0x000a954c in main (argc=1, argv=0xbffffd54) at amuled.cpp:128
and the bt full
Code: [Select]
(gdb) bt full
#0  0x90016f48 in semaphore_wait_signal_trap ()
No symbol table info available.
#1  0x9000e790 in _pthread_cond_wait ()
No symbol table info available.
#2  0x90283d68 in MPEnterCriticalRegion ()
No symbol table info available.
#3  0x02af9d78 in wxMutexInternal::Lock() (this=???) at ../src/mac/carbon/thread.cpp:461
        err = Cannot access memory at address 0x40
No idea if this helps you in any way...

BTW: I installed Ubuntu-Linux on my TiBook and am running aMule from there now which gives me LOT better speeds. The same files I tried downloading with aMule and amuled on Mac OS X and which came down with a Max. Overall Speed of say 2kB/s now come down with 20-30kB/s (all the other prefs are the same, I just copied my .aMule folder from one machine to the other...)
I'm willing to keep testing amuled in Mac OS X though...  :))
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: amuled crashes after short time on Mac OS X
« Reply #29 on: January 31, 2005, 10:27:18 PM »

I think that the SIGTRAP signal is one of those benign signals that gdb is stopping on, but which aMule would cope with if gdb passed it along.  So, add this to your .gdbinit like the others:

handle SIGTRAP nostop noprint pass

Also, since you're running the patched aMule, you don't need to issue the commands for setting the new limit on file descriptors (that's what the patch does).  So, if it crashes, just the backtraces are needed -- none of the other stuff (calling malloc, setting $1, calling setrlimit, calling free, or continuing).

Thanks for your willingness to help!
Logged
Pages: 1 [2] 3