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] 4 5

Author Topic: aMule SVN 9385 crash on 64bit Debian  (Read 35996 times)

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: aMule SVN 9385 crash on 64bit Debian
« Reply #30 on: February 19, 2009, 09:33:19 AM »

Ah, thank you. It should be easily reproducible then, I hope.

You might have a look at http://www.amule.org/wiki/index.php/Backtraces to create us more extensive backtraces. This will make it easier to understand what's happening.
Logged

wires

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 83
Re: aMule SVN 9385 crash on 64bit Debian
« Reply #31 on: February 20, 2009, 12:29:42 AM »

There are some backtraces here http://www.amule.org/amule/index.php?topic=16214.0 and you can find a new one attached

Taken from aMule 2.2.2 compiled with --with-wxdebug

Regards
Logged

wires

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 83
Re: aMule SVN 9385 crash on 64bit Debian
« Reply #32 on: February 20, 2009, 01:34:54 AM »

Ok I've got new data. I've included 2 uint64 fences (same size as void*) around m_wndTaskbarNotifier in amuleDlg.h (aMule 2.2.2)

Code: [Select]
m_fence1( 0L ),
m_wndTaskbarNotifier(NULL),
m_fence2 ( 0L ),

and then added a check on them in ShowTransferRate
Code: [Select]
        if (m_fence1 || m_fence2) {
                AddLogLine(true , CFormat( _("BROKEN FENCE: %x,%x" )) % m_fence1 % m_fence2);
        }
        wxASSERT((m_wndTaskbarNotifier != NULL) == thePrefs::UseTrayIcon());
        if (m_wndTaskbarNotifier) {
                // set trayicon-icon
                int percentDown = (int)ceil((kBpsDown*100) / thePrefs::GetMaxGraphDownloadRate());
                UpdateTrayIcon( ( percentDown > 100 ) ? 100 : percentDown);

                wxString buffer2;
                if ( theApp->IsConnected() ) {
                        buffer2 = CFormat(_("aMule (%s | Connected)")) % buffer;
                } else {
                        buffer2 = CFormat(_("aMule (%s | Disconnected)")) % buffer;
                }
                m_wndTaskbarNotifier->SetTrayToolTip(buffer2);
        }

I was really surprised as I was unable to repeat the crash for a while, finally I selected the transfers window and send another message, and this is the result:
Code: [Select]
2009-02-20 01:12:07: BaseClient.cpp(2140): ED2k Client: 'http://emule-project.net' has passed the secure identification, V2 State: 0
2009-02-20 01:12:08: ClientTCPSocket.cpp(803): New message from 'wires' (IP:192.168.1.33)
2009-02-20 01:12:08: BROKEN FENCE: 0,10000000000

m_fence2 has that nasty 0x10000000000, so is it possible that CamuleDlg::SetActiveDialog is causing the crash?
grep SetActiveDialog *cpp
amuleDlg.cpp:   SetActiveDialog(DT_TRANSFER_WND, m_transferwnd);
amuleDlg.cpp:void CamuleDlg::SetActiveDialog(DialogType type, wxWindow* dlg)
amuleDlg.cpp:               SetActiveDialog(DT_NETWORKS_WND, m_serverwnd);
amuleDlg.cpp:               SetActiveDialog(DT_SEARCH_WND, m_searchwnd);
amuleDlg.cpp:               SetActiveDialog(DT_TRANSFER_WND, m_transferwnd);
amuleDlg.cpp:               SetActiveDialog(DT_SHARED_WND, m_sharedfileswnd);
amuleDlg.cpp:               SetActiveDialog(DT_CHAT_WND, m_chatwnd);
amuleDlg.cpp:               SetActiveDialog(DT_STATS_WND, m_statisticswnd);
ChatWnd.cpp:         theApp->amuledlg->SetActiveDialog(CamuleDlg::DT_CHAT_WND, this);

ChatWnd has the only invocation of this function outside amuleDlg.

Regards
Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: aMule SVN 9385 crash on 64bit Debian A
« Reply #33 on: February 20, 2009, 03:04:44 AM »

Be careful,  it seems there are more 64 bit related bugs in libxcb/libx11. See the following gem in _XSend (xcb_io.c):

Code: [Select]
        if(dpy->xcb->event_owner != XlibOwnsEventQueue || dpy->async_handlers)
        {
                unsigned int sequence;
                for(sequence = dpy->xcb->last_flushed; sequence < dpy->request; ++sequence)
                {

Here we go again. dpy->request is declared as long (8 bytes in amd64) but int is 32. Oh, so sequence will never stop as dpy->request is always bigger.

This one causes aMule to eat all the available memory! See the funny backtrace (aMule interrupted while it's busy)
Code: [Select]
#0  0x00007fcd3d650f22 in _int_malloc () from /lib/libc.so.6
#1  0x00007fcd3d652658 in malloc () from /lib/libc.so.6
#2  0x00007fcd3d316d3a in _XSend (dpy=0x1f67c00, data=0x0, size=0) at ../../src/xcb_io.c:306
#3  0x00007fcd3d316f81 in _XReply (dpy=0x0, rep=0x7fff481b4990, extra=0, discard=0)
    at ../../src/xcb_io.c:450
#4  0x00007fcd3d2f4246 in XGetWindowProperty (dpy=0x1f67c00, w=80782988, property=254, offset=0,
    length=9223372036854775807, delete=0, req_type=4, actual_type=0x7fff481b4a98,
    actual_format=0x7fff481b4aa0, nitems=0x7fff481b4a90, bytesafter=0x7fff481b4a88, prop=0x7fff481b4a80)
    at ../../src/GetProp.c:64
#5  0x00007fcd3c89088d in gdk_event_translate (display=0x1f77060, event=0x5565550, xevent=0x7fff481b4d30,
    return_exposes=0) at /build/buildd/gtk+2.0-2.14.4/gdk/x11/gdkevents-x11.c:533
#6  0x00007fcd3c890c47 in _gdk_events_queue (display=0x1f77060)
    at /build/buildd/gtk+2.0-2.14.4/gdk/x11/gdkevents-x11.c:2299
#7  0x00007fcd3c89106e in gdk_event_dispatch (source=<value optimized out>,
    callback=0x7fcd3d941a80 <main_arena+128>, user_data=0x0)
    at /build/buildd/gtk+2.0-2.14.4/gdk/x11/gdkevents-x11.c:2359
#8  0x00007fcd3ad7dd3b in IA__g_main_context_dispatch (context=0x1f44950)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2144
#9  0x00007fcd3ad8150d in g_main_context_iterate (context=0x1f44950, block=1, dispatch=1,
    self=<value optimized out>) at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2778
#10 0x00007fcd3ad81a3d in IA__g_main_loop_run (loop=0x82a5040)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2986
#11 0x00007fcd3cc0e727 in IA__gtk_main () at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:1200
#12 0x00007fcd3ea86d18 in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#13 0x00007fcd3eadbe15 in wxDialog::ShowModal () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#14 0x00000000005627eb in CDownloadListCtrl::OnViewFileInfo ()
#15 0x00007fcd3e404ca9 in wxEvtHandler::ProcessEventIfMatches () from /usr/lib/libwx_baseu-2.8.so.0
#16 0x00007fcd3e405e84 in wxEventHashTable::HandleEvent () from /usr/lib/libwx_baseu-2.8.so.0
#17 0x00007fcd3e405f77 in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.8.so.0
#18 0x00007fcd3eb8e639 in wxWindowBase::TryParent () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#19 0x00007fcd3e405f00 in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.8.so.0
#20 0x00007fcd3ebbc2e5 in wxScrollHelperEvtHandler::ProcessEvent () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#21 0x00007fcd3eb68640 in wxMenuBase::SendEvent () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#22 0x00007fcd3eaf6623 in ?? () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#23 0x00007fcd3b62825d in IA__g_closure_invoke (closure=0x7b11e70, return_value=0x0, n_param_values=1,
    param_values=0xb14d0a0, invocation_hint=0x7fff481b57d0)
    at /build/buildd/glib2.0-2.18.2/gobject/gclosure.c:767
#24 0x00007fcd3b63df5d in signal_emit_unlocked_R (node=0x444d710, detail=0, instance=0xa9b4970,
    emission_return=0x0, instance_and_params=0xb14d0a0)
    at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:3244
#25 0x00007fcd3b63f608 in IA__g_signal_emit_valist (instance=0xa9b4970, signal_id=<value optimized out>,
    detail=0, var_args=0x7fff481b59b0) at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:2977
#26 0x00007fcd3b63fb33 in IA__g_signal_emit (instance=0x0, signal_id=1033116288, detail=0)
    at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:3034
#27 0x00007fcd3cd1cfab in IA__gtk_widget_activate (widget=0xa9b4970)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkwidget.c:4776
#28 0x00007fcd3cc2196d in IA__gtk_menu_shell_activate_item (menu_shell=0x7c5fa80, menu_item=0xa9b4970,
    force_deactivate=<value optimized out>) at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmenushell.c:1139
#29 0x00007fcd3cc233b5 in gtk_menu_shell_button_release (widget=0x7c5fa80, event=0x5565400)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmenushell.c:678
#30 0x00007fcd3cc14888 in _gtk_marshal_BOOLEAN__BOXED (closure=0x43f52a0, return_value=0x7fff481b5ce0,
    n_param_values=<value optimized out>, param_values=0x74810a0, invocation_hint=<value optimized out>,
    marshal_data=0x7fcd3cc1a590) at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmarshalers.c:84
#31 0x00007fcd3b62825d in IA__g_closure_invoke (closure=0x43f52a0, return_value=0x7fff481b5ce0,
    n_param_values=2, param_values=0x74810a0, invocation_hint=0x7fff481b5ca0)
    at /build/buildd/glib2.0-2.18.2/gobject/gclosure.c:767
#32 0x00007fcd3b63dc3b in signal_emit_unlocked_R (node=0x43f5310, detail=0, instance=0x7c5fa80,
    emission_return=0x7fff481b5e20, instance_and_params=0x74810a0)
    at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:3282
#33 0x00007fcd3b63f48a in IA__g_signal_emit_valist (instance=0x7c5fa80, signal_id=<value optimized out>,
    detail=0, var_args=0x7fff481b5e80) at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:2987
---Type <return> to continue, or q <return> to quit---
#34 0x00007fcd3b63fb33 in IA__g_signal_emit (instance=0x0, signal_id=1033116288, detail=0)
    at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:3034
#35 0x00007fcd3cd176be in gtk_widget_event_internal (widget=0x7c5fa80, event=0x5565400)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkwidget.c:4745
#36 0x00007fcd3cc0d1f3 in IA__gtk_propagate_event (widget=0x7c5fa80, event=0x5565400)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:2391
#37 0x00007fcd3cc0e313 in IA__gtk_main_do_event (event=0x5565400)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:1596
#38 0x00007fcd3c89109c in gdk_event_dispatch (source=<value optimized out>, callback=<value optimized out>,
    user_data=<value optimized out>) at /build/buildd/gtk+2.0-2.14.4/gdk/x11/gdkevents-x11.c:2365
#39 0x00007fcd3ad7dd3b in IA__g_main_context_dispatch (context=0x1f44950)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2144
#40 0x00007fcd3ad8150d in g_main_context_iterate (context=0x1f44950, block=1, dispatch=1,
    self=<value optimized out>) at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2778
#41 0x00007fcd3ad816cb in IA__g_main_context_iteration (context=0x1f44950, may_block=1)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2841
#42 0x00007fcd3cc0e5d1 in IA__gtk_main_iteration () at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:1288
#43 0x00007fcd3eaf52fd in wxWindow::DoPopupMenu () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#44 0x000000000056d023 in CDownloadListCtrl::OnMouseRightClick ()
#45 0x00007fcd3e404ca9 in wxEvtHandler::ProcessEventIfMatches () from /usr/lib/libwx_baseu-2.8.so.0
#46 0x00007fcd3e405e84 in wxEventHashTable::HandleEvent () from /usr/lib/libwx_baseu-2.8.so.0
#47 0x00007fcd3e405f77 in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.8.so.0
#48 0x0000000000637192 in MuleExtern::wxListMainWindow::SendNotify ()
#49 0x000000000063a883 in MuleExtern::wxListMainWindow::OnMouse ()
#50 0x00007fcd3e404ca9 in wxEvtHandler::ProcessEventIfMatches () from /usr/lib/libwx_baseu-2.8.so.0
#51 0x00007fcd3e405e84 in wxEventHashTable::HandleEvent () from /usr/lib/libwx_baseu-2.8.so.0
#52 0x00007fcd3e405f77 in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.8.so.0
#53 0x00007fcd3e405f00 in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.8.so.0
#54 0x00007fcd3ebbc2e5 in wxScrollHelperEvtHandler::ProcessEvent () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#55 0x00007fcd3ea99d1f in ?? () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#56 0x00007fcd3cc14888 in _gtk_marshal_BOOLEAN__BOXED (closure=0x4a62190, return_value=0x7fff481b6fe0,
    n_param_values=<value optimized out>, param_values=0x4931c90, invocation_hint=<value optimized out>,
    marshal_data=0x7fcd3ea99ba0) at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmarshalers.c:84
#57 0x00007fcd3b62825d in IA__g_closure_invoke (closure=0x4a62190, return_value=0x7fff481b6fe0,
    n_param_values=2, param_values=0x4931c90, invocation_hint=0x7fff481b6fa0)
    at /build/buildd/glib2.0-2.18.2/gobject/gclosure.c:767
#58 0x00007fcd3b63df5d in signal_emit_unlocked_R (node=0x43f4e80, detail=0, instance=0x49b64c0,
    emission_return=0x7fff481b7120, instance_and_params=0x4931c90)
    at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:3244
#59 0x00007fcd3b63f48a in IA__g_signal_emit_valist (instance=0x49b64c0, signal_id=<value optimized out>,
    detail=0, var_args=0x7fff481b7180) at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:2987
#60 0x00007fcd3b63fb33 in IA__g_signal_emit (instance=0x0, signal_id=1033116288, detail=0)
    at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:3034
#61 0x00007fcd3cd176be in gtk_widget_event_internal (widget=0x49b64c0, event=0x554c410)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkwidget.c:4745
#62 0x00007fcd3cc0d1f3 in IA__gtk_propagate_event (widget=0x49b64c0, event=0x554c410)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:2391
#63 0x00007fcd3cc0e313 in IA__gtk_main_do_event (event=0x554c410)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:1596
#64 0x00007fcd3c89109c in gdk_event_dispatch (source=<value optimized out>, callback=<value optimized out>,
    user_data=<value optimized out>) at /build/buildd/gtk+2.0-2.14.4/gdk/x11/gdkevents-x11.c:2365
#65 0x00007fcd3ad7dd3b in IA__g_main_context_dispatch (context=0x1f44950)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2144
#66 0x00007fcd3ad8150d in g_main_context_iterate (context=0x1f44950, block=1, dispatch=1,
    self=<value optimized out>) at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2778
#67 0x00007fcd3ad81a3d in IA__g_main_loop_run (loop=0x73b53a0)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2986
#68 0x00007fcd3cc0e727 in IA__gtk_main () at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:1200
#69 0x00007fcd3ea86d18 in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#70 0x00007fcd3eb0ff4b in wxAppBase::MainLoop () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#71 0x00007fcd3e3aa73d in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
---Type <return> to continue, or q <return> to quit---
#72 0x0000000000524a52 in main ()

aMule is using some memory:
Code: [Select]
USER       PID     %CPU %MEM    VSZ            RSS            TTY      STAT START   TIME COMMAND
btkaos    21059 23.7      44.3    7847760 6739124 pts/1 Tl   Feb18 699:06 /usr/local/bin/amule

[This is 7Gb]

As far as I know it is not fixed yet, see http://cgit.freedesktop.org/xorg/lib/libX11/tree/src/xcb_io.c#n276

It seems getting > 4 days uptime in AMD64 is challenging at the moment. I've patched libx11, let's see what pops up next.

I couldn't imagine X developers where so careless about this kind of issues. More when GCC warns about this concrete error. It seems aMule being so X intensive has a good effect :)
« Last Edit: February 20, 2009, 03:12:42 AM by btkaos »
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: aMule SVN 9385 crash on 64bit Debian
« Reply #34 on: February 21, 2009, 05:05:30 PM »

Ok I've got new data.
This is very interesting.
Could you repeat the experiment and this time initialize the fences with 0xaaaaaaaaaaaaaaaa ? I'd like to see which part exactly gets overwritten.
I'm thinking about different alignment used in different modules, but SetActiveDialog is also defined in amuledlg.cpp so that should not be a possible explanation.
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

wires

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 83
Re: aMule SVN 9385 crash on 64bit Debian
« Reply #35 on: February 23, 2009, 12:17:33 AM »

Hi Stu, here you are

Code: [Select]
2009-02-22 23:58:04: BROKEN FENCE: aaaaaaaaaaaaaaaa,aaaaaaaaaaaaaaaa
2009-02-22 23:58:09: ClientTCPSocket.cpp(179): ED2k Client: Accepted connection from 192.168.1.33
2009-02-22 23:58:09: BaseClient.cpp(985): Local Client Protocol: Local Client: OP_HELLOANSWER to 192.168.1.33
2009-02-22 23:58:09: BaseClient.cpp(799): Local Client Protocol: Local Client: OP_EMULEINFO/OS_INFO to 192.168.1.33
2009-02-22 23:58:09: BaseClient.cpp(2173): Local Client Protocol: Local Client: OP_SECIDENTSTATE to 192.168.1.33
2009-02-22 23:58:09: BaseClient.cpp(2005): Local Client Protocol: Local Client: OP_PUBLICKEY to 192.168.1.33
2009-02-22 23:58:09: ClientTCPSocket.cpp(803): New message from 'wires' (IP:192.168.1.33)
2009-02-22 23:58:09: BaseClient.cpp(2067): Local Client Protocol: Local Client: OP_SIGNATURE to 192.168.1.33
2009-02-22 23:58:09: BaseClient.cpp(2140): ED2k Client: 'wires' has passed the secure identification, V2 State: 0
2009-02-22 23:58:09: BROKEN FENCE: aaaaaaaaaaaaaaaa,aaaa01aaaaaaaaaa
2009-02-22 23:58:15: BROKEN FENCE: aaaaaaaaaaaaaaaa,aaaa01aaaaaaaaaa
2009-02-22 23:58:20: BROKEN FENCE: aaaaaaaaaaaaaaaa,aaaa01aaaaaaaaaa
2009-02-22 23:58:25: BROKEN FENCE: aaaaaaaaaaaaaaaa,aaaa01aaaaaaaaaa

Just 1 byte gets overwritten... It makes no sense to me  :(
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: aMule SVN 9385 crash on 64bit Debian
« Reply #36 on: February 23, 2009, 11:32:12 PM »

Well, you're the first who brought a little light to the issue. Can't tell if it's enough, but that's certainly more information than we got from the umpty backtraces before. Thank you!
To get a little more light: change your fence check to
Code: [Select]
        if (m_fence1 != m_fence2) {
                AddLogLine(true , CFormat( _("BROKEN FENCE xxx: %x,%x" )) % m_fence1 % m_fence2);
        }
and sprinkle it over the code, changing the xxx to something different each time so you can identify when it occurs. Esspecially before and after the
Code: [Select]
m_nActiveDialog = type;
in SetActiveDialog.
I'd also like to see the output of
Code: [Select]
CFormat(wxT("sb %d sD %d %x %x %x %x %x"))  %  sizeof(bool) % sizeof(DialogType)
% (uint64) & m_wndTaskbarNotifier
% (uint64) & m_fence2
% (uint64) & m_nActiveDialog
% (uint64) & m_is_safe_state
% (uint64) & m_BlinkMessages
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

wires

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 83
Re: aMule SVN 9385 crash on 64bit Debian
« Reply #37 on: February 26, 2009, 01:23:49 AM »

The addresses and sizes you requested:
Code: [Select]
2009-02-24 21:47:37: sb 1 sD 4 &taskBar 7f91049df5e8 &fence2 7f91049df5f0 &activeDiag 7f91049df5f8 &is_safe_state 7f91049df5fc
&blink 7f91049df5fd

This will darken the issue... Once I put the fences check outside ShowTransferRate the behaviour was like this:

Code: [Select]
2009-02-24 21:47:38: KnownFileList.cpp(94): KnownFileList: Reading 0 known files from file format 0x0e.
2009-02-24 21:47:38: KnownFileList.cpp(106): KnownFileList: Finished reading known files
2009-02-24 21:47:38: ClientCreditsList.cpp(168): Creditfile loaded, 0 clients are known
2009-02-24 21:47:38: IPFilter.cpp(109): Loading IP-filters 'ipfilter.dat' and 'ipfilter_static.dat'.
2009-02-24 21:47:38: IPFilter.cpp(333): Loaded 0 IP-ranges from '/home/xxxxxx/.aMule/ipfilter.dat'. 0 malformed lines were discarded.
2009-02-24 21:47:38: IPFilter.cpp(333): Loaded 0 IP-ranges from '/home/xxxxxx/.aMule/ipfilter_static.dat'. 0 malformed lines were discarded.
2009-02-24 21:47:38: ExternalConn.cpp(169): External connections disabled in config file
2009-02-24 21:47:38: MuleUDPSocket.cpp(81): Created Server UDP-Socket at port 4665
2009-02-24 21:47:38: MuleUDPSocket.cpp(81): Created Client UDP-Socket at port 4672
2009-02-24 21:47:38: amuleDlg.cpp(213):
2009-02-24 21:47:38: amuleDlg.cpp(215):  - This is aMule 2.2.2 using wxGTK2 v2.8.9 (Debugging) based on eMule.
2009-02-24 21:47:38: amuleDlg.cpp(217):    Running on Linux 2.6.27.15-78.2.23.fc9.x86_64 x86_64
2009-02-24 21:47:38: amuleDlg.cpp(219):  - Visit http://www.amule.org to check if a new version is available.
2009-02-24 21:47:38: amuleDlg.cpp(220):
2009-02-24 21:47:38: IP2Country.cpp(104): Loaded 248 flag bitmaps.
2009-02-24 21:47:38: ServerList.cpp(83): Loading server.met file: /home/invitado/.aMule/server.met
2009-02-24 21:47:38: ServerList.cpp(168): 7 servers in server.met found
2009-02-24 21:47:38: DownloadQueue.cpp(169): No part files found
2009-02-24 21:47:38: SharedFileList.cpp(352): Found 0 known shared files
2009-02-24 21:47:38: ThreadScheduler.cpp(116): ThreadScheduler: Scheduler created.
2009-02-24 21:47:38: ThreadScheduler.cpp(229): ThreadScheduler: Task scheduled: AICH Syncronizing -
2009-02-24 21:47:38: ThreadScheduler.cpp(79): ThreadScheduler: Starting scheduler
2009-02-24 21:47:38: ThreadScheduler.cpp(161): ThreadScheduler: Scheduler thread started
2009-02-24 21:47:38: ThreadScheduler.cpp(264): ThreadScheduler: Entering scheduling loop
2009-02-24 21:47:38: ThreadScheduler.cpp(274): ThreadScheduler: Resorting tasks
2009-02-24 21:47:38: ThreadScheduler.cpp(288): ThreadScheduler: Current task: AICH Syncronizing -
2009-02-24 21:47:38: ThreadTasks.cpp(265): AICH-Hasher: Syncronization thread started.
2009-02-24 21:47:38: ThreadTasks.cpp(309): AICH-Hasher: Masterhashes of known files have been loaded.
2009-02-24 21:47:38: ThreadScheduler.cpp(308): ThreadScheduler: Completed task 'AICH Syncronizing', 0 tasks remaining.
2009-02-24 21:47:38: ThreadScheduler.cpp(324): ThreadScheduler: Last task, calling OnLastTask
2009-02-24 21:47:38: ThreadScheduler.cpp(278): ThreadScheduler: No more tasks, stopping
2009-02-24 21:47:38: ThreadScheduler.cpp(329): ThreadScheduler: Leaving scheduling loop
2009-02-24 21:47:38: amule.cpp(1884): General: Running: 2.2.2, Version check: 2.2.3
2009-02-24 21:47:38: amule.cpp(1905): You are using an outdated version of aMule!
2009-02-24 21:47:38: amule.cpp(1906): Your aMule version is 2.2.2 and the latest version is 2.2.3
2009-02-24 21:47:38: amule.cpp(1907): The latest version can always be found at http://www.amule.org
2009-02-24 21:47:38: ClientList.cpp(1060): ED2k Client: Cleaned ClientList, removed 0 not used known clients
2009-02-24 21:47:42: BROKEN FENCE ShowTransferRate: 0,aaaaaaaaaaaaaaaa
2009-02-24 21:47:47: BROKEN FENCE ShowTransferRate: 0,aaaaaaaaaaaaaaaa
I've run the test with the check commented out in many places and always got like that so It has to be scaring the bug  :). Activating the check just inside ShowTransferRate, fence2 becomes aaaa01aaaaaaaaaa and fence1 stays aaaa....

My last test was patching r9450 to revert the m_TrayIcon and...... It worked! :o If you can publish a revert patch I would like to test it to confirm that it actually works without the boolean state member. I think that working on a 2.2.2 source isn't so useful.

Regards

Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: aMule SVN 9385 crash on 64bit Debian
« Reply #38 on: February 26, 2009, 09:44:32 PM »

So an enum is 32 bit on a 64 bit compiler. Interesting.

So now you got fence1 set to all zero ?  ??? This is making no sense at all. You sure you initialized fence1 to aaaaaaaa ?

Here's the patch you requested.
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

wires

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 83
Re: aMule SVN 9385 crash on 64bit Debian
« Reply #39 on: February 26, 2009, 09:49:22 PM »

You sure you initialized fence1 to aaaaaaaa ?

 ;D that's exactly the first thing I checked!

I'll try the patch and post the results.
Logged

wires

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 83
Re: aMule SVN 9385 crash on 64bit Debian
« Reply #40 on: February 27, 2009, 01:46:42 AM »

I didn't like what I got so I applied the revert patch to a clean directory to start again (2.2.2).
This may look better:

Code: [Select]
2009-02-27 01:21:38: ClientTCPSocket.cpp(795): Remote Client Protocol: Remote Client: OP_MESSAGE from 192.168.1.33
2009-02-27 01:21:38: ClientTCPSocket.cpp(805): New message from 'wires' (IP:192.168.1.33)
2009-02-27 01:21:38: DEBUG FENCE CChatWnd.ProcessMessage 2: aaaaaaaaaaaaaaaa,aaaa01aaaaaaaaaa
2009-02-27 01:21:38: ClientTCPSocket.cpp(2005): Remote Client Protocol: Packet with protocol c5, opcode 85, size 77 received from 192.168.1.33

The modified version of ChatWnd.cpp
Code: [Select]
void CChatWnd::ProcessMessage(uint64 sender, const wxString& message)
{
        theApp->amuledlg->DebugFences(wxT("CChatWnd.ProcessMessage 1"));
        if ( !theApp->amuledlg->IsDialogVisible(CamuleDlg::DT_CHAT_WND) ) {
                theApp->amuledlg->SetMessageBlink(true);
        }
        theApp->amuledlg->DebugFences(wxT("CChatWnd.ProcessMessage 2"));
        if (chatselector->ProcessMessage(sender, message)) {
                // Check to enable the window controls if needed
                CheckNewButtonsState();
        }
        theApp->amuledlg->DebugFences(wxT("CChatWnd.ProcessMessage 3"));
}

Seeing this, I've realized that the chat icon does not blink after receiving a message. Both IsDialogVisible and SetMessageBlink are quite simple so I'm lost again.

Also, the failure happens only when the active window is not the chat window
Code: [Select]
2009-02-27 01:29:49: ClientTCPSocket.cpp(795): Remote Client Protocol: Remote Client: OP_MESSAGE from 192.168.1.33
2009-02-27 01:29:49: ClientTCPSocket.cpp(805): New message from 'wires' (IP:192.168.1.33)
2009-02-27 01:29:50: ClientTCPSocket.cpp(2005): Remote Client Protocol: Packet with protocol c5, opcode 85, size 77 received from 192.168.1.33
2009-02-27 01:29:50: ClientTCPSocket.cpp(1371): Remote Client Protocol: Remote Client: OP_PUBLICKEY from 192.168.1.33
2009-02-27 01:29:50: ClientTCPSocket.cpp(2005): Remote Client Protocol: Packet with protocol c5, opcode 86, size 49 received from 192.168.1.33
2009-02-27 01:29:50: ClientTCPSocket.cpp(1387): Remote Client Protocol: Remote Client: OP_SIGNATURE from 192.168.1.33
2009-02-27 01:29:50: BaseClient.cpp(2140): ED2k Client: 'wires' has passed the secure identification, V2 State: 0
2009-02-27 01:30:07: ClientTCPSocket.cpp(2005): Remote Client Protocol: Packet with protocol e3, opcode 4e, size 4 received from 192.168.1.33
2009-02-27 01:30:07: ClientTCPSocket.cpp(795): Remote Client Protocol: Remote Client: OP_MESSAGE from 192.168.1.33
2009-02-27 01:30:07: ClientTCPSocket.cpp(805): New message from 'wires' (IP:192.168.1.33)
2009-02-27 01:30:07: DEBUG FENCE CChatWnd.ProcessMessage 2: aaaaaaaaaaaaaaaa,aaaa01aaaaaaaaaa


Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: aMule SVN 9385 crash on 64bit Debian
« Reply #41 on: February 27, 2009, 01:14:18 PM »

So an enum is 32 bit on a 64 bit compiler. Interesting.
STU, I'm not sure what you mean. In ANSI C an enum is just an integer (32 bits in both i386 and AMD64)

However, In C++ behavior is sightly different, in the sense that an enum is "promoted" to an integer, but going from an integer to an enum needs an explicit cast.

MSVC allows to declare the type of enums, but AFAICT this is not portable.
« Last Edit: February 27, 2009, 01:20:13 PM by btkaos »
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: aMule SVN 9385 crash on 64bit Debian
« Reply #42 on: February 27, 2009, 11:24:56 PM »

I didn't like what I got so I applied the revert patch to a clean directory to start again (2.2.2).
Which version did you use? You can't apply the revert-patch to 2.2.2 since the change is only in 2.2.3 and SVN.

So an enum is 32 bit on a 64 bit compiler. Interesting.
STU, I'm not sure what you mean. In ANSI C an enum is just an integer (32 bits in both i386 and AMD64)
Well, it's muddy enough. I remember "int = native machine word size" and "short <= int <= long" (very helpful, thanks). Guess that was true for 16-32 but not for 32-64.

So what do we have?
Code: [Select]
variable                                   offset (dez)
CMuleTrayIcon *m_wndTaskbarNotifier;        0
uint64 fence2;                              8
DialogType m_nActiveDialog;                16
bool m_is_safe_state;                      20
bool m_BlinkMessages;                      21

strange 0x01 (== true) turns up at         13

Could it be that the m_BlinkMessages is written to the wrong adress ?

Please try the following:
- turn on verbose mode so you see the full compiler invocation
- compile ChatWnd.cpp and amuleDlg.cpp by hand, replacing -c with -S so it generates assembler source
- post the assembler files here (along with the full calls to the compiler used)
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
Re: aMule SVN 9385 crash on 64bit Debian
« Reply #43 on: February 28, 2009, 12:17:45 AM »

I remember "int = native machine word size" and "short <= int <= long" (very helpful, thanks). Guess that was true for 16-32 but not for 32-64.

If `int' was 64 bits wide on a 64b arch, there were no type for either 16 or 32 bits.

See http://gcc.gnu.org/onlinedocs/gccint/Type-Layout.html for more information on type sizes.
Logged
concordia cum veritate

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: aMule SVN 9385 crash on 64bit Debian
« Reply #44 on: February 28, 2009, 03:27:19 AM »

So an enum is 32 bit on a 64 bit compiler. Interesting.
STU, I'm not sure what you mean. In ANSI C an enum is just an integer (32 bits in both i386 and AMD64)
Well, it's muddy enough. I remember "int = native machine word size" and "short <= int <= long" (very helpful, thanks). Guess that was true for 16-32 but not for 32-64.
STU, I'm not yet familiar with this particular bug, but the fact is the size of C types in 64bit land was surprising for me as well. I assumed int would be 64 bits whereas is 32bit in i386, but they have the same size as in 64 bits sizeof(int) is 4. However the problem is sizeof(unsigned long) != sizeof64(unsigned long), and here is where most bugs happen. (One is 8, the other is 4)

Such is life, I guess they have good reasons for this choice.
Logged
Pages: 1 2 [3] 4 5