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]

Author Topic: crash under OS X  (Read 13167 times)

sssnake

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 69
  • Don't eat the yellow snow (F. Zappa)
Re: crash under OS X
« Reply #15 on: December 30, 2004, 12:56:40 PM »

Hi Ken,
I will try that and post the outcome in the OS X forum. Sadly, amule crashed just a minute ago. Here we go:
Code: [Select]
...
*** malloc[4863]: Deallocation of a pointer not malloced: 0x55555555; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug

Program received signal EXC_BAD_ACCESS, Could not access memory.
0x9000239c in szone_calloc ()
bt gives:
Code: [Select]
#0  0x9000239c in szone_calloc ()
#1  0x90002ce4 in malloc_zone_calloc ()
#2  0x900036ac in calloc ()
#3  0x9361388c in deviceStateCreate ()
#4  0x935fa080 in CGGStateDeviceReset ()
#5  0x935e46f4 in CGGStateReset ()
#6  0x9360a174 in CGGStateCreate ()
#7  0x9360a0d4 in CGGStackCreate ()
#8  0x91b8a99c in ripc_BeginContent ()
#9  0x91b86474 in ripc_GetPattern ()
#10 0x91b82fd0 in ripc_GetColor ()
#11 0x91b84514 in ripc_Render ()
#12 0x91b87a0c in ripc_DrawRects ()
#13 0x935f016c in __CGContextDrawRects ()
#14 0x93602e70 in CGContextFillRects ()
#15 0x93607764 in CGContextFillRect ()
#16 0x927d9990 in TilePixMapListCG ()
#17 0x927db764 in DrawPartCG(TTheme*, CGRect const&, CGRect const&, ThemePart*, ThemeStateData*, ThemeStateData*, float, CGContext*) ()
#18 0x927db3a4 in DrawLayoutCG(TTheme*, LayoutCache*, long, CGRect const&, unsigned short, unsigned long, CGRect const&, unsigned long const*, unsigned long const*, float, CGContext*) ()
#19 0x927e6dac in LayoutEngine::DrawLayoutWithClipComposited(TTheme*, long, CGRect const&, unsigned short, long const*, unsigned long, short, unsigned long const*, unsigned long const*, float, CGContext*, short) ()
#20 0x927faf60 in LayoutEngine::DrawLayoutWithClip(TTheme*, long, CGRect const&, unsigned short, long const*, unsigned long, short, unsigned long const*, CGContext*, short) ()
#21 0x927faf14 in LayoutEngine::DrawLayout(TTheme*, long, CGRect const&, unsigned short, long const*, unsigned long, unsigned long const*, CGContext*, short) ()
#22 0x927eb488 in DataEngine::DrawThemeTrack(HIThemeTrackDrawInfo const*, CGRect const*, ThemeEraseXUPP*, unsigned long, CGContext*) ()
#23 0x92808a10 in _HIThemeDrawTrack(HIThemeTrackDrawInfo const*, CGRect const*, ThemeEraseXUPP*, unsigned long, CGContext*, unsigned long) ()
#24 0x9280f5e8 in HIScrollBar::DrawSelf(short, OpaqueRgnHandle*, CGContext*) ()
#25 0x927f5a94 in HIView::DrawCacheOrSelf(short, OpaqueRgnHandle*, CGContext*) ()
#26 0x927d54d8 in HIView::EventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) ()
#27 0x927d1fa0 in DispatchEventToHandlers ()
#28 0x927d2214 in SendEventToEventTargetInternal ()
#29 0x92828ac8 in CallNextEventHandler ()
#30 0x03dd95a8 in wxWindow::MacDoRedraw(void*, long) ()
#31 0x03dd3720 in wxMacWindowControlEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) ()
#32 0x03dd3fb8 in wxMacWindowEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) ()
#33 0x927d1fa0 in DispatchEventToHandlers ()
#34 0x927d2214 in SendEventToEventTargetInternal ()
#35 0x927d6694 in SendEventToEventTargetWithOptions ()
#36 0x927ddd34 in SendControlDefDraw(HIView*, short, OpaqueGrafPtr*, OpaqueRgnHandle*, CGContext*) ()
#37 0x927d7e54 in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
#38 0x927d7f5c in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
#39 0x927d7f5c in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
#40 0x927d7f5c in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
#41 0x927d7f5c in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
#42 0x927d7f5c in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
#43 0x927d7f5c in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
#44 0x927d7f5c in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
#45 0x927dcb5c in HIView::Draw(short, OpaqueGrafPtr*, OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
#46 0x9280aa70 in _HIViewRender ()
#47 0x927d1a70 in _FlushWindow ()
#48 0x927d2ad0 in FlushAllWindows ()
#49 0x927d3f10 in FlushAllBuffers(__CFRunLoopObserver*, CFRunLoopActivity, void*) ()
#50 0x90191ca0 in __CFRunLoopDoObservers ()
#51 0x90195e74 in CFRunLoopRunSpecific ()
#52 0x927d5f60 in RunCurrentEventLoopInMode ()
#53 0x927dc640 in ReceiveNextEventCommon ()
#54 0x9284d7d4 in ReceiveNextEventInMode ()
#55 0x03d8f8b0 in wxApp::MacDoOneEvent() ()
#56 0x03d8f544 in wxApp::MainLoop() ()
#57 0x03a98728 in wxEntry(int&, char**) ()
#58 0x0014fbd4 in main (argc=1, argv=0xbffffc0c) at amule-gui.cpp:161
bt full gives:
Code: [Select]
#0  0x9000239c in szone_calloc ()
#1  0x90002ce4 in malloc_zone_calloc ()
#2  0x900036ac in calloc ()
#3  0x9361388c in deviceStateCreate ()
#4  0x935fa080 in CGGStateDeviceReset ()
#5  0x935e46f4 in CGGStateReset ()
#6  0x9360a174 in CGGStateCreate ()
#7  0x9360a0d4 in CGGStackCreate ()
#8  0x91b8a99c in ripc_BeginContent ()
#9  0x91b86474 in ripc_GetPattern ()
#10 0x91b82fd0 in ripc_GetColor ()
#11 0x91b84514 in ripc_Render ()
#12 0x91b87a0c in ripc_DrawRects ()
#13 0x935f016c in __CGContextDrawRects ()
#14 0x93602e70 in CGContextFillRects ()
#15 0x93607764 in CGContextFillRect ()
#16 0x927d9990 in TilePixMapListCG ()
#17 0x927db764 in DrawPartCG(TTheme*, CGRect const&, CGRect const&, ThemePart*, ThemeStateData*, ThemeStateData*, float, CGContext*) ()
#18 0x927db3a4 in DrawLayoutCG(TTheme*, LayoutCache*, long, CGRect const&, unsigned short, unsigned long, CGRect const&, unsigned long const*, unsigned long const*, float, CGContext*) ()
#19 0x927e6dac in LayoutEngine::DrawLayoutWithClipComposited(TTheme*, long, CGRect const&, unsigned short, long const*, unsigned long, short, unsigned long const*, unsigned long const*, float, CGContext*, short) ()
#20 0x927faf60 in LayoutEngine::DrawLayoutWithClip(TTheme*, long, CGRect const&, unsigned short, long const*, unsigned long, short, unsigned long const*, CGContext*, short) ()
#21 0x927faf14 in LayoutEngine::DrawLayout(TTheme*, long, CGRect const&, unsigned short, long const*, unsigned long, unsigned long const*, CGContext*, short) ()
#22 0x927eb488 in DataEngine::DrawThemeTrack(HIThemeTrackDrawInfo const*, CGRect const*, ThemeEraseXUPP*, unsigned long, CGContext*) ()
#23 0x92808a10 in _HIThemeDrawTrack(HIThemeTrackDrawInfo const*, CGRect const*, ThemeEraseXUPP*, unsigned long, CGContext*, unsigned long) ()
#24 0x9280f5e8 in HIScrollBar::DrawSelf(short, OpaqueRgnHandle*, CGContext*) ()
#25 0x927f5a94 in HIView::DrawCacheOrSelf(short, OpaqueRgnHandle*, CGContext*) ()
#26 0x927d54d8 in HIView::EventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) ()
#27 0x927d1fa0 in DispatchEventToHandlers ()
#28 0x927d2214 in SendEventToEventTargetInternal ()
#29 0x92828ac8 in CallNextEventHandler ()
#30 0x03dd95a8 in wxWindow::MacDoRedraw(void*, long) ()
#31 0x03dd3720 in wxMacWindowControlEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) ()
#32 0x03dd3fb8 in wxMacWindowEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) ()
#33 0x927d1fa0 in DispatchEventToHandlers ()
#34 0x927d2214 in SendEventToEventTargetInternal ()
#35 0x927d6694 in SendEventToEventTargetWithOptions ()
#36 0x927ddd34 in SendControlDefDraw(HIView*, short, OpaqueGrafPtr*, OpaqueRgnHandle*, CGContext*) ()
#37 0x927d7e54 in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
#38 0x927d7f5c in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
#39 0x927d7f5c in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
#40 0x927d7f5c in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
#41 0x927d7f5c in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
#42 0x927d7f5c in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
#43 0x927d7f5c in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
#44 0x927d7f5c in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
#45 0x927dcb5c in HIView::Draw(short, OpaqueGrafPtr*, OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
#46 0x9280aa70 in _HIViewRender ()
#47 0x927d1a70 in _FlushWindow ()
#48 0x927d2ad0 in FlushAllWindows ()
#49 0x927d3f10 in FlushAllBuffers(__CFRunLoopObserver*, CFRunLoopActivity, void*) ()
#50 0x90191ca0 in __CFRunLoopDoObservers ()
#51 0x90195e74 in CFRunLoopRunSpecific ()
#52 0x927d5f60 in RunCurrentEventLoopInMode ()
#53 0x927dc640 in ReceiveNextEventCommon ()
#54 0x9284d7d4 in ReceiveNextEventInMode ()
#55 0x03d8f8b0 in wxApp::MacDoOneEvent() ()
#56 0x03d8f544 in wxApp::MainLoop() ()
#57 0x03a98728 in wxEntry(int&, char**) ()
#58 0x0014fbd4 in main (argc=1, argv=0xbffffc0c) at amule-gui.cpp:161
(gdb) bt full
#0  0x9000239c in szone_calloc ()
No symbol table info available.
#1  0x90002ce4 in malloc_zone_calloc ()
No symbol table info available.
#2  0x900036ac in calloc ()
No symbol table info available.
#3  0x9361388c in deviceStateCreate ()
No symbol table info available.
#4  0x935fa080 in CGGStateDeviceReset ()
No symbol table info available.
#5  0x935e46f4 in CGGStateReset ()
No symbol table info available.
#6  0x9360a174 in CGGStateCreate ()
No symbol table info available.
#7  0x9360a0d4 in CGGStackCreate ()
No symbol table info available.
#8  0x91b8a99c in ripc_BeginContent ()
No symbol table info available.
#9  0x91b86474 in ripc_GetPattern ()
No symbol table info available.
#10 0x91b82fd0 in ripc_GetColor ()
No symbol table info available.
#11 0x91b84514 in ripc_Render ()
No symbol table info available.
#12 0x91b87a0c in ripc_DrawRects ()
No symbol table info available.
#13 0x935f016c in __CGContextDrawRects ()
No symbol table info available.
#14 0x93602e70 in CGContextFillRects ()
No symbol table info available.
#15 0x93607764 in CGContextFillRect ()
No symbol table info available.
#16 0x927d9990 in TilePixMapListCG ()
No symbol table info available.
#17 0x927db764 in DrawPartCG(TTheme*, CGRect const&, CGRect const&, ThemePart*, ThemeStateData*, ThemeStateData*, float, CGContext*) ()
No symbol table info available.
#18 0x927db3a4 in DrawLayoutCG(TTheme*, LayoutCache*, long, CGRect const&, unsigned short, unsigned long, CGRect const&, unsigned long const*, unsigned long const*, float, CGContext*) ()
No symbol table info available.
#19 0x927e6dac in LayoutEngine::DrawLayoutWithClipComposited(TTheme*, long, CGRect const&, unsigned short, long const*, unsigned long, short, unsigned long const*, unsigned long const*, float, CGContext*, short) ()
No symbol table info available.
#20 0x927faf60 in LayoutEngine::DrawLayoutWithClip(TTheme*, long, CGRect const&, unsigned short, long const*, unsigned long, short, unsigned long const*, CGContext*, short) ()
No symbol table info available.
#21 0x927faf14 in LayoutEngine::DrawLayout(TTheme*, long, CGRect const&, unsigned short, long const*, unsigned long, unsigned long const*, CGContext*, short) ()
No symbol table info available.
#22 0x927eb488 in DataEngine::DrawThemeTrack(HIThemeTrackDrawInfo const*, CGRect const*, ThemeEraseXUPP*, unsigned long, CGContext*) ()
No symbol table info available.
#23 0x92808a10 in _HIThemeDrawTrack(HIThemeTrackDrawInfo const*, CGRect const*, ThemeEraseXUPP*, unsigned long, CGContext*, unsigned long) ()
No symbol table info available.
#24 0x9280f5e8 in HIScrollBar::DrawSelf(short, OpaqueRgnHandle*, CGContext*) ()
No symbol table info available.
#25 0x927f5a94 in HIView::DrawCacheOrSelf(short, OpaqueRgnHandle*, CGContext*) ()
No symbol table info available.
#26 0x927d54d8 in HIView::EventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) ()
No symbol table info available.
#27 0x927d1fa0 in DispatchEventToHandlers ()
No symbol table info available.
#28 0x927d2214 in SendEventToEventTargetInternal ()
No symbol table info available.
#29 0x92828ac8 in CallNextEventHandler ()
No symbol table info available.
#30 0x03dd95a8 in wxWindow::MacDoRedraw(void*, long) ()
No symbol table info available.
#31 0x03dd3720 in wxMacWindowControlEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) ()
No symbol table info available.
#32 0x03dd3fb8 in wxMacWindowEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) ()
No symbol table info available.
#33 0x927d1fa0 in DispatchEventToHandlers ()
No symbol table info available.
#34 0x927d2214 in SendEventToEventTargetInternal ()
No symbol table info available.
#35 0x927d6694 in SendEventToEventTargetWithOptions ()
No symbol table info available.
#36 0x927ddd34 in SendControlDefDraw(HIView*, short, OpaqueGrafPtr*, OpaqueRgnHandle*, CGContext*) ()
No symbol table info available.
#37 0x927d7e54 in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
No symbol table info available.
#38 0x927d7f5c in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
No symbol table info available.
#39 0x927d7f5c in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
No symbol table info available.
#40 0x927d7f5c in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
No symbol table info available.
#41 0x927d7f5c in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
No symbol table info available.
#42 0x927d7f5c in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
No symbol table info available.
#43 0x927d7f5c in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
No symbol table info available.
#44 0x927d7f5c in HIView::DrawComposited(OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
No symbol table info available.
#45 0x927dcb5c in HIView::Draw(short, OpaqueGrafPtr*, OpaqueRgnHandle*, unsigned long, HIView*, CGContext*) ()
No symbol table info available.
#46 0x9280aa70 in _HIViewRender ()
No symbol table info available.
#47 0x927d1a70 in _FlushWindow ()
No symbol table info available.
#48 0x927d2ad0 in FlushAllWindows ()
No symbol table info available.
#49 0x927d3f10 in FlushAllBuffers(__CFRunLoopObserver*, CFRunLoopActivity, void*) ()
No symbol table info available.
#50 0x90191ca0 in __CFRunLoopDoObservers ()
No symbol table info available.
#51 0x90195e74 in CFRunLoopRunSpecific ()
No symbol table info available.
#52 0x927d5f60 in RunCurrentEventLoopInMode ()
No symbol table info available.
#53 0x927dc640 in ReceiveNextEventCommon ()
No symbol table info available.
#54 0x9284d7d4 in ReceiveNextEventInMode ()
No symbol table info available.
#55 0x03d8f8b0 in wxApp::MacDoOneEvent() ()
No symbol table info available.
#56 0x03d8f544 in wxApp::MainLoop() ()
No symbol table info available.
#57 0x03a98728 in wxEntry(int&, char**) ()
No symbol table info available.
#58 0x0014fbd4 in main (argc=1, argv=0xbffffc0c) at amule-gui.cpp:161
No locals.
Hope it helps.
thanx sssnake
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: crash under OS X
« Reply #16 on: December 31, 2004, 08:23:19 AM »

Thanks for keeping with it sssnake.

Unfortunately, that last crash again looks like the result of something trashing random memory.  It crashed deep inside the Mac OS X libraries.  The value 0x55555555 in the message just before the crash is somewhat revealing.  That's the value that MallocScribble causes to be written into freed blocks.  So, to see it come up here means a block was freed, overwritten with 0x55555555, but then some code was still referring to its contents and using the data as a pointer.

At this point, I'm hoping that tracking down the source(s) of the "Deallocation" messages may be our best bet at finding what is trashing memory.

Or, if you are willing to give the really slow libgmalloc technique a try (if you are leaving your machine unattended and not doing anything else for several days), you could try that.
« Last Edit: December 31, 2004, 08:25:49 AM by ken »
Logged

sssnake

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 69
  • Don't eat the yellow snow (F. Zappa)
Re: crash under OS X
« Reply #17 on: December 31, 2004, 11:51:14 AM »

Ah, I understand the scribble-stuff now. I tried your gdb script (didn't knew that gdb was scriptable!), I hope I found the relevant part in the output. First before any normal output of amule, I got
Code: [Select]
Starting program: /Applications/aMule.app/Contents/MacOS/amule
malloc[6061]: protecting edges
malloc[6061]: enabling scribbling to detect mods to free blocks
...
#0  0x9009e258 in malloc_printf ()
No symbol table info available.
#1  0x9009e6c8 in set_flags_from_environment ()
No symbol table info available.
#2  0x9001f67c in malloc_create_zone ()
No symbol table info available.
#3  0x9002bda4 in _malloc_initialize ()
No symbol table info available.
#4  0x90003694 in calloc ()
No symbol table info available.
#5  0x90012838 in dwarf2_unwind_dyld_add_image_hook ()
No symbol table info available.
#6  0x8fe18148 in __dyld_register_func_for_add_image ()
No symbol table info available.
#7  0x8fe1359c in __dyld__dyld_register_func_for_add_image ()
No symbol table info available.
#8  0x9002b7f4 in _dyld_register_func_for_add_image ()
No symbol table info available.
#9  0x9002ed04 in __keymgr_dwarf2_register_sections ()
No symbol table info available.
#10 0x0000a698 in _start (argc=1, argv=0xbffffc0c, envp=0xbffffc14) at /SourceCache/Csu/Csu-46/crt.c:202
        i = -1610597156
        p = 0xbffffc14 "¿ÿüå¿ÿý=¿ÿýY¿ÿýj¿ÿýz¿ÿý\212¿ÿý\233¿ÿý²¿ÿýÏ¿ÿýâ¿ÿý÷¿ÿþ\037¿ÿþ'¿ÿþ5¿ÿþW¿ÿþÛ¿ÿÿ\001¿ÿÿ\017¿ÿÿ,¿ÿÿG¿ÿÿO¿ÿÿ^¿ÿÿk¿ÿÿ¦¿ÿÿ±¿ÿÿâ"
        q = (char **) 0x8fe5322c
        term = (void (*)(void)) 0
#11 0x0000a618 in start ()
No locals.
then later
Code: [Select]
malloc[6061]: enabling scribbling to detect mods to free blocks
Initialising aMule
...
AICH Thread: Thread terminated.
#0  0x9009e258 in malloc_printf ()
No symbol table info available.
#1  0x90000f8c in free ()
No symbol table info available.
#2  0x02fa68b0 in GAddress_destroy ()
No symbol table info available.
#3  0x02fa4f48 in GSocket::~GSocket() ()
No symbol table info available.
#4  0x02fa5588 in GSocket::WaitConnection() ()
No symbol table info available.
#5  0x02fa331c in wxSocketServer::AcceptWith(wxSocketBase&, bool) ()
No symbol table info available.
#6  0x00018738 in CListenSocket::OnAccept(int) (this=0x7da4530, nErrorCode=0) at ListenSocket.cpp:2362
        newclient = (CClientReqSocket *) 0x7f34610
#7  0x00150254 in CamuleGuiApp::ListenSocketHandler(wxSocketEvent&) (this=0x3c19a50, event=@0x7f375c0) at amule-gui.cpp:351
        socket = (CListenSocket *) 0x7da4530
#8  0x03ad0260 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) ()
No symbol table info available.
#9  0x03acf9ec in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) ()
No symbol table info available.
#10 0x03ad040c in wxEvtHandler::ProcessEvent(wxEvent&) ()
No symbol table info available.
#11 0x03ad0154 in wxEvtHandler::ProcessPendingEvents() ()
No symbol table info available.
#12 0x03a67f1c in wxAppConsole::ProcessPendingEvents() ()
No symbol table info available.
#13 0x03d8f98c in wxApp::MacHandleOneEvent(void*) ()
No symbol table info available.
#14 0x03d8f900 in wxApp::MacDoOneEvent() ()
No symbol table info available.
#15 0x03d8f544 in wxApp::MainLoop() ()
No symbol table info available.
#16 0x03a98728 in wxEntry(int&, char**) ()
No symbol table info available.
#17 0x0014fbd4 in main (argc=1, argv=0xbffffc0c) at amule-gui.cpp:161
No locals.
*** malloc[6061]: Deallocation of a pointer not malloced: 0x7d8c80b; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
#0  0x9009e258 in malloc_printf ()
No symbol table info available.
#1  0x90001aac in szone_free ()
No symbol table info available.
#2  0x02fa4f48 in GSocket::~GSocket() ()
No symbol table info available.
#3  0x02fa5588 in GSocket::WaitConnection() ()
No symbol table info available.
#4  0x02fa331c in wxSocketServer::AcceptWith(wxSocketBase&, bool) ()
No symbol table info available.
#5  0x00018738 in CListenSocket::OnAccept(int) (this=0x7da4530, nErrorCode=0) at ListenSocket.cpp:2362
        newclient = (CClientReqSocket *) 0x7f34610
#6  0x00150254 in CamuleGuiApp::ListenSocketHandler(wxSocketEvent&) (this=0x3c19a50, event=@0x7f375c0) at amule-gui.cpp:351
        socket = (CListenSocket *) 0x7da4530
#7  0x03ad0260 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) ()
No symbol table info available.
#8  0x03acf9ec in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) ()
No symbol table info available.
#9  0x03ad040c in wxEvtHandler::ProcessEvent(wxEvent&) ()
No symbol table info available.
#10 0x03ad0154 in wxEvtHandler::ProcessPendingEvents() ()
No symbol table info available.
#11 0x03a67f1c in wxAppConsole::ProcessPendingEvents() ()
No symbol table info available.
#12 0x03d8f98c in wxApp::MacHandleOneEvent(void*) ()
No symbol table info available.
#13 0x03d8f900 in wxApp::MacDoOneEvent() ()
No symbol table info available.
#14 0x03d8f544 in wxApp::MainLoop() ()
No symbol table info available.
#15 0x03a98728 in wxEntry(int&, char**) ()
No symbol table info available.
#16 0x0014fbd4 in main (argc=1, argv=0xbffffc0c) at amule-gui.cpp:161
No locals.
*** malloc[6061]: error for object 0x7f00640: Double free
#0  0x9009e258 in malloc_printf ()
No symbol table info available.
#1  0x90000f8c in free ()
No symbol table info available.
#2  0x02fa68b0 in GAddress_destroy ()
No symbol table info available.
#3  0x02fa4f48 in GSocket::~GSocket() ()
No symbol table info available.
#4  0x02fa5588 in GSocket::WaitConnection() ()
No symbol table info available.
#5  0x02fa331c in wxSocketServer::AcceptWith(wxSocketBase&, bool) ()
No symbol table info available.
#6  0x00018738 in CListenSocket::OnAccept(int) (this=0x7da4530, nErrorCode=0) at ListenSocket.cpp:2362
        newclient = (CClientReqSocket *) 0x7f10930
#7  0x00150254 in CamuleGuiApp::ListenSocketHandler(wxSocketEvent&) (this=0x3c19a50, event=@0x7dfdea0) at amule-gui.cpp:351
        socket = (CListenSocket *) 0x7da4530
#8  0x03ad0260 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) ()
No symbol table info available.
#9  0x03acf9ec in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) ()
No symbol table info available.
#10 0x03ad040c in wxEvtHandler::ProcessEvent(wxEvent&) ()
No symbol table info available.
#11 0x03ad0154 in wxEvtHandler::ProcessPendingEvents() ()
No symbol table info available.
#12 0x03a67f1c in wxAppConsole::ProcessPendingEvents() ()
No symbol table info available.
#13 0x03d8f98c in wxApp::MacHandleOneEvent(void*) ()
No symbol table info available.
#14 0x03d8f900 in wxApp::MacDoOneEvent() ()
No symbol table info available.
#15 0x03d8f544 in wxApp::MainLoop() ()
No symbol table info available.
#16 0x03a98728 in wxEntry(int&, char**) ()
No symbol table info available.
#17 0x0014fbd4 in main (argc=1, argv=0xbffffc0c) at amule-gui.cpp:161
No locals.
The rest is the normal
Code: [Select]
*** malloc[6061]: Deallocation of a pointer not malloced: 0x7f1783b; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debugwithout further output.
I will try the libgmalloc now, this is very educateing for me hehe.
cheers sssnake
Logged

sssnake

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 69
  • Don't eat the yellow snow (F. Zappa)
Re: crash under OS X
« Reply #18 on: December 31, 2004, 12:17:45 PM »

Unfortunately, I did not have libgmalloc on my mac. Googleing around, I found, that: "Guard Malloc (aka. libgmalloc)" ... and ... "Guard Malloc is part of
Xcode 1.5, so you'll want to install that first if you haven't already.  
You can download it from <http://connect.apple.com/>", OS X 10.3 is needed. Had to make a Apple Developer Connection Membership to download... argh!, and am currently downloading the  372.4 MB disk image!!
In a year or so: sssnake
Logged

sssnake

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 69
  • Don't eat the yellow snow (F. Zappa)
Re: crash under OS X
« Reply #19 on: December 31, 2004, 03:54:53 PM »

And here is the really slow libgmalloc tecnique:
Code: [Select]
(gdb) set env DYLD_INSERT_LIBRARIES /usr/lib/libgmalloc.dylib
(gdb) set env DYLD_FORCE_FLAT_NAMESPACE 1
(gdb) set env MALLOC_FILL_SPACE 1
(gdb) run
Starting program: /Applications/aMule.app/Contents/MacOS/amule
...
AICH Thread: Thread terminated.

Program received signal EXC_BAD_ACCESS, Could not access memory.
0x02fa68a0 in GAddress_destroy ()
bt gives
Code: [Select]
#0  0x02fa68a0 in GAddress_destroy ()
#1  0x02fa4f48 in GSocket::~GSocket() ()
#2  0x02fa5588 in GSocket::WaitConnection() ()
#3  0x02fa331c in wxSocketServer::AcceptWith(wxSocketBase&, bool) ()
#4  0x00018738 in CListenSocket::OnAccept(int) (this=0x5f7d8f48, nErrorCode=0) at ListenSocket.cpp:2362
#5  0x00150254 in CamuleGuiApp::ListenSocketHandler(wxSocketEvent&) (this=0xb263ce90, event=@0xc0dcfd0) at amule-gui.cpp:351
#6  0x03c27260 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) ()
#7  0x03c269ec in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) ()
#8  0x03c2740c in wxEvtHandler::ProcessEvent(wxEvent&) ()
#9  0x03c27154 in wxEvtHandler::ProcessPendingEvents() ()
#10 0x03bbef1c in wxAppConsole::ProcessPendingEvents() ()
#11 0x0481398c in wxApp::MacHandleOneEvent(void*) ()
#12 0x04813900 in wxApp::MacDoOneEvent() ()
#13 0x04813544 in wxApp::MainLoop() ()
#14 0x03bef728 in wxEntry(int&, char**) ()
#15 0x0014fbd4 in main (argc=1, argv=0xbffffbcc) at amule-gui.cpp:161
bt full gives
Code: [Select]
#0  0x02fa68a0 in GAddress_destroy ()
No symbol table info available.
#1  0x02fa4f48 in GSocket::~GSocket() ()
No symbol table info available.
#2  0x02fa5588 in GSocket::WaitConnection() ()
No symbol table info available.
#3  0x02fa331c in wxSocketServer::AcceptWith(wxSocketBase&, bool) ()
No symbol table info available.
#4  0x00018738 in CListenSocket::OnAccept(int) (this=0x5f7d8f48, nErrorCode=0) at ListenSocket.cpp:2362
        newclient = (CClientReqSocket *) 0xc13ef18
#5  0x00150254 in CamuleGuiApp::ListenSocketHandler(wxSocketEvent&) (this=0xb263ce90, event=@0xc0dcfd0) at amule-gui.cpp:351
        socket = (CListenSocket *) 0x5f7d8f48
#6  0x03c27260 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) ()
No symbol table info available.
#7  0x03c269ec in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) ()
No symbol table info available.
#8  0x03c2740c in wxEvtHandler::ProcessEvent(wxEvent&) ()
No symbol table info available.
#9  0x03c27154 in wxEvtHandler::ProcessPendingEvents() ()
No symbol table info available.
#10 0x03bbef1c in wxAppConsole::ProcessPendingEvents() ()
No symbol table info available.
#11 0x0481398c in wxApp::MacHandleOneEvent(void*) ()
No symbol table info available.
#12 0x04813900 in wxApp::MacDoOneEvent() ()
No symbol table info available.
#13 0x04813544 in wxApp::MainLoop() ()
No symbol table info available.
#14 0x03bef728 in wxEntry(int&, char**) ()
No symbol table info available.
#15 0x0014fbd4 in main (argc=1, argv=0xbffffbcc) at amule-gui.cpp:161
No locals.
This just happens after short time, although with this tecnique, I'm glad it's like that. I guess, this looks like the report with the other tecnique...
sssnake
PS: It looks like the bug you have with wxWidget 2.3.5, but its useing wx from CVS, I swear :-)!
« Last Edit: December 31, 2004, 03:59:17 PM by sssnake »
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: crash under OS X
« Reply #20 on: December 31, 2004, 05:55:52 PM »

Oh, I didn't realize that you would have to download a new version of Xcode.  Sorry about the hassle, but glad you did it.  Thanks.  :)

Yes, it crashes right away.  That's the purpose and benefit of libgmalloc.  Which is good, as you say, because it is so slow.

OK, I found the double-free in wxWidgets.  In src/unix/gsocket.cpp, line 583 is the following:
Code: [Select]
   GAddress_destroy(connection->m_peer);
    delete connection;
Since connection->m_peer is part of connection, it is cleaned up by the destructor as part of the delete statement.  But it was already cleaned up by GAddress_destroy statement immediately above.  So, double-free.

So, sssnake, to test this fix you can comment out the GAddress_destroy line.  Add "//" at the beginning so it becomes:
Code: [Select]
   // GAddress_destroy(connection->m_peer);
    delete connection;
Rebuild wxMac and amule.  You may need to delete the amule executable (/src/amule) to force it to be relinked because make won't know that the library has changed.

Unfortunately, this error is mostly benign and is probably not the source of the crashes.  It is a source (probably not the only one) of the "Deallocation of a pointer not malloced" message.  It is enough to cause libgmalloc to crash the program, so solving it will allow the program to get further and hopefully find the real source of the crashes.  You may have to endure a bit more of this stop-and-go debugging before we get to the real bug.  Thanks for being so patient.
Logged

sssnake

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 69
  • Don't eat the yellow snow (F. Zappa)
Re: crash under OS X
« Reply #21 on: January 01, 2005, 07:50:25 PM »

Hi Ken, happy new year!

I hope you will commit your fix to wxWidgets :-)

I let amule run with the libgmalloc tecnique, until now no results after the changes. that certanly means, you corrected the first bug this way. My problem is, that I have with libgmalloc no high-id and no download and an upload with maximum of 0.1 kb/s. that means, my computer is just too slow for this. as i recall, you haven't had my errors (OS X) and you have low id, because your behind a firewall. that means to me, that the error probably only occures with high id :-(. so: is there a way to start amule with gdb "normally" and later to initiate a break after having a high id to insert libgmalloc?

what i do now is run the app with gdb and "set env MallocGuardEdges 1" and "set env MallocScribble 1" because i want to see, if the double free bug is still here. until, i haven't seen it on the output... I'll keep you informed if the error is really gone or not.

cheers sssnake
Logged

sssnake

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 69
  • Don't eat the yellow snow (F. Zappa)
Re: crash under OS X
« Reply #22 on: January 02, 2005, 06:41:16 AM »

That did it. The "Deallocation of a pointer not malloced" is gone with your fix! amule runs for 12 hours and no similar message until now! Thank you:  :baby:
sssnake
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: crash under OS X
« Reply #23 on: January 02, 2005, 09:37:20 PM »

Wow, I'm pleasantly surprised that my fix for the double-free fixed your crashing problem altogether.  I'm glad it's working for you now. :D

I submitted the patch to wxWidgets shortly after suggesting it to you, but it has to be reviewed by one of their developers before it is accepted.  Understandably, they seem to be taking time off for the holidays.  So, it may be a while before the patch is reviewed and accepted.

As to your question
Quote
is there a way to start amule with gdb "normally" and later to initiate a break after having a high id to insert libgmalloc?
Unfortunately, no.  Or at least, not any reasonable way.  But, I see what you mean: if the bug is high-id only and libgmalloc prevents you from getting high-id, then libgmalloc can't be used to diagnose the bug.  Well, in any case, we seem to have gotten far enough. :)

Thanks again for your work and your patience in helping to track this down.  You deserve to share the credit for this fix.
Logged

Truzzone

  • Hero Member
  • *****
  • Karma: 2
  • Offline Offline
  • Posts: 1236
Re: crash under OS X
« Reply #24 on: April 10, 2006, 12:54:34 PM »

Hi,
One Italian Mac user have this problems:
Quote
amule(184,0x244f800) malloc: *** Deallocation of a pointer not malloced: 0xf007f71d; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
amule(184,0x244f800) malloc: *** Deallocation of a pointer not malloced: 0xf007f719; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
The thread is this, the problem is on aMule or the permission settings?  ?(

Best regards,

Truzzone  :)
Logged
"Tanta gente crede che dal momento che ha l'ADSL a 4Mega, deve scaricare a 4Mega altrimenti qualcosa non va. O è colpa dell'ISP o di aMule. La questione è invece ben diversa"

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: crash under OS X
« Reply #25 on: April 10, 2006, 03:39:29 PM »

Problem is on aMule or wx. We'll need more diagnose...
Logged

Truzzone

  • Hero Member
  • *****
  • Karma: 2
  • Offline Offline
  • Posts: 1236
Re: crash under OS X
« Reply #26 on: April 10, 2006, 08:29:46 PM »

Hi,
thanks for your reply.
Another Italian user with the same problem?  ?(
Quote
amule(330,0x202ae00) malloc: *** Deallocation of a pointer not malloced: 0xf007f75d; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
amule(330,0x202ae00) malloc: *** Deallocation of a pointer not malloced: 0xf007f759; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
It's available gdb for Mac OS X?
What is the method of debugging on Mac OS X, I know little Mac OS X  :)) ?  ?(

Best regards,

Truzzone  :)
Logged
"Tanta gente crede che dal momento che ha l'ADSL a 4Mega, deve scaricare a 4Mega altrimenti qualcosa non va. O è colpa dell'ISP o di aMule. La questione è invece ben diversa"

lionel77

  • Provider of Mac builds, Forum Mod
  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 1107
  • Mac OS X 10.4 (Power Mac G5)
Re: crash under OS X
« Reply #27 on: April 13, 2006, 07:04:57 AM »

I was seeing those malloc errors, too. But the issue seems to have been fixed in CVS now, as I don't get them anymore.

If you are interested in debugging on OS X, I wrote up some instructions here.
Logged
Current aMule CVS builds for OS X can be found here.

Truzzone

  • Hero Member
  • *****
  • Karma: 2
  • Offline Offline
  • Posts: 1236
Re: crash under OS X
« Reply #28 on: April 13, 2006, 01:17:31 PM »

Quote
Originally posted by lionel77
I was seeing those malloc errors, too. But the issue seems to have been fixed in CVS now, as I don't get them anymore.
Thanks for the work  :D.
Have you planned an update of aMule CVS Binaries?  ?(
Quote
Originally posted by lionel77
If you are interested in debugging on OS X, I wrote up some instructions here.
Sorry I haven't see the sticky on Mac Section  :))

Best regards,

Truzzone  :)
Logged
"Tanta gente crede che dal momento che ha l'ADSL a 4Mega, deve scaricare a 4Mega altrimenti qualcosa non va. O è colpa dell'ISP o di aMule. La questione è invece ben diversa"

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: crash under OS X
« Reply #29 on: April 16, 2006, 07:45:45 PM »

And see this post earlier in the thread for a way to diagnose the "Deallocation of a pointer not malloced" messages using gdb.
Logged
Pages: 1 [2]