#222 Fileinfo purge Crash.

closed-fixed
Usability (114)
5
2003-07-20
2003-06-19
Hit1Hard
No

Working with Gtk-gnutella 0.92 stable (Latest CVS)

After deleting a download from the queu. (Rightclick
abort.)
and removing the file within the active download window
(Rightcllick remove file.)
(Not Autoclearing failed downloads setting.)

In the fileinfo menu the download still exists.
When purging that download the program crashes.

Greetings.

Discussion

  • Jeroen Asselman

    Jeroen Asselman - 2003-06-25

    Logged In: YES
    user_id=92911

    I was able to reproduce this one (remove all by filename,
    and then purge), bt

    #0 0x4047c7d1 in kill () from /lib/libc.so.6
    (gdb) bt full
    #0 0x4047c7d1 in kill () from /lib/libc.so.6
    No symbol table info available.
    #1 0x4040b9c3 in pthread_kill () from /lib/libpthread.so.0
    No symbol table info available.
    #2 0x4040bcdb in raise () from /lib/libpthread.so.0
    No symbol table info available.
    #3 0x4047db9b in abort () from /lib/libc.so.6
    No symbol table info available.
    #4 0x401cc3d9 in g_logv () from /usr/lib/libglib-1.2.so.0
    No symbol table info available.
    #5 0x401cc414 in g_log () from /usr/lib/libglib-1.2.so.0
    No symbol table info available.
    #6 0x0811b483 in file_info_hash_remove (fi=0x8ba00e4) at
    fileinfo.c:1475
    nsk = {name = 0x40178fb8 "\216\025", size = 137937840}
    ns = (struct namesize *) 0x40178fb8
    x = (void *) 0x9058118
    found = -1073746752
    l = (struct _GSList *) 0xbfffeb18
    newl = (struct _GSList *) 0x401d3491
    #7 0x0811f999 in fi_purge (fih=5) at fileinfo.c:3292
    sl = (struct _GSList *) 0x0
    csl = (struct _GSList *) 0x9058118
    fi = (struct dl_file_info *) 0x8ba00e4
    #8 0x080de96f in on_button_fi_purge_clicked
    (button=0x838c3b0, user_data=0x0) at fileinfo_gui.c:126
    No locals.
    #9 0x400c8896 in gtk_marshal_NONE__NONE () from
    /usr/lib/libgtk-1.2.so.0
    No symbol table info available.
    #10 0x401000d1 in gtk_handlers_run () from
    /usr/lib/libgtk-1.2.so.0
    No symbol table info available.
    #11 0x400ff372 in gtk_signal_real_emit () from
    /usr/lib/libgtk-1.2.so.0
    No symbol table info available.
    #12 0x400fd042 in gtk_signal_emit () from
    /usr/lib/libgtk-1.2.so.0
    No symbol table info available.
    #13 0x4005237f in gtk_button_clicked () from
    /usr/lib/libgtk-1.2.so.0
    No symbol table info available.
    #14 0x4005349a in gtk_real_button_released () from
    /usr/lib/libgtk-1.2.so.0
    No symbol table info available.
    #15 0x400c8896 in gtk_marshal_NONE__NONE () from
    /usr/lib/libgtk-1.2.so.0
    No symbol table info available.
    #16 0x400ff285 in gtk_signal_real_emit () from
    /usr/lib/libgtk-1.2.so.0
    No symbol table info available.
    #17 0x400fd042 in gtk_signal_emit () from
    /usr/lib/libgtk-1.2.so.0
    No symbol table info available.
    #18 0x4005228f in gtk_button_released () from
    /usr/lib/libgtk-1.2.so.0
    No symbol table info available.
    #19 0x40052e51 in gtk_button_button_release () from
    /usr/lib/libgtk-1.2.so.0
    No symbol table info available.
    #20 0x400c84e6 in gtk_marshal_BOOL__POINTER () from
    /usr/lib/libgtk-1.2.so.0
    No symbol table info available.
    #21 0x400ff3b7 in gtk_signal_real_emit () from
    /usr/lib/libgtk-1.2.so.0
    No symbol table info available.
    #22 0x400fd042 in gtk_signal_emit () from
    /usr/lib/libgtk-1.2.so.0
    ---Type <return> to continue, or q <return> to quit---
    No symbol table info available.
    #23 0x4013fe38 in gtk_widget_event () from
    /usr/lib/libgtk-1.2.so.0
    No symbol table info available.
    #24 0x400c81af in gtk_propagate_event () from
    /usr/lib/libgtk-1.2.so.0
    No symbol table info available.
    #25 0x400c70f6 in gtk_main_do_event () from
    /usr/lib/libgtk-1.2.so.0
    No symbol table info available.
    #26 0x40195db3 in gdk_event_dispatch () from
    /usr/lib/libgdk-1.2.so.0
    No symbol table info available.
    #27 0x401cac2e in g_main_dispatch () from
    /usr/lib/libglib-1.2.so.0
    No symbol table info available.
    #28 0x401ca9fa in g_main_iterate () from
    /usr/lib/libglib-1.2.so.0
    No symbol table info available.
    #29 0x401c99a4 in g_main_run () from /usr/lib/libglib-1.2.so.0
    No symbol table info available.
    #30 0x400c6ba7 in gtk_main () from /usr/lib/libgtk-1.2.so.0
    No symbol table info available.
    #31 0x080de392 in main_gui_run () at main_gui.c:645
    coord = {0, 24, 1018, 693}
    #32 0x081291b1 in main (argc=1, argv=0xbffff904,
    env=0xbffff90c) at main.c:463
    i = 256
    #33 0x40468dc4 in __libc_start_main () from /lib/libc.so.6
    No symbol table info available.

    (gdb) frame 6
    #6 0x0811b483 in file_info_hash_remove (fi=0x8ba00e4) at
    fileinfo.c:1475
    1475 g_assert(fi->hashed);
    (gdb) print *fi
    $1 = {fi_handle = 5, flags = 2, file_name = 0x8f96294 "some
    filename", path = 0x8c0f31c "/home/jeroen/tmp/Incomplete/",
    alias = 0x91d3cf0,
    size = 532688896, size_atom = 0x8b95c54, sha1 = 0x9193824
    "iS\2146ѿ+\0167\234blitti", cha1 = 0x0, refcount =
    0, sources = 0x0, lifecount = 0, stamp = 0,
    last_flush = 0, last_dmesh = 0, done = 0, chunklist =
    0x9158308, generation = 0, use_swarming = 1, dirty = 0,
    dirty_status = 1, hashed = 0, recvcount = 0,
    recv_last_rate = 0, recv_amount = 0, recv_last_time = 0,
    cha1_elapsed = 0, cha1_hashed = 0, copy_elapsed = 0, copied = 0}

     
  • Jeroen Asselman

    Jeroen Asselman - 2003-06-25
    • status: open --> open-accepted
     
  • Emilie le Vivre

    Emilie le Vivre - 2003-07-06

    Logged In: YES
    user_id=774331

    I still don't know the core well enough to fix this one but
    here's what my attempts have found so far. Hopefully it
    speeds up the bug fixing for someone else.

    - As 'nonamer' said, I was able to reproduce this by
    'removing all by name' in the downloads tab and then trying
    to 'purge' the file in the fileinfo tab

    - The crash comes from an assert failed
    (g_assert(fi->hashed)) in file_info_hash_remove
    (fileinfo.c:1475)

    - file_info_hash_remove is called by fi_purge (fileinfo.c:
    3265). It's weird because the assert is fine (ie. fi_hashed
    is true) until after the call to download_remove(dl);
    (download_remove is in download.c).

    So, somewhere in download_remove the hashed flag in fi gets
    flipped. I have no idea how or why. As far as I can tell,
    download_remove has no way to access the fi struct who's
    flag gets flipped and nothing seems like it should be
    causing it to flip. This means we have a weird memory
    overwriting happening (bad and unlikely) or else I just
    don't understand the core well enough to know what's
    happening (not so bad and much more likely).

    Hopefully this helps someone. emile.

     
  • Christian Biere

    Christian Biere - 2003-07-20

    Logged In: YES
    user_id=643728

    Should be fixed in current CVS.

    FYI, download_remove() calls file_info_remove_source() which
    calls file_info_hash_remove() if fi->flags has FI_F_DISCARD
    set. fi_purge() also called
    file_info_hash_remove() which caused the bug.

     
  • Christian Biere

    Christian Biere - 2003-07-20
    • labels: --> Usability
    • assigned_to: nobody --> cbiere
    • status: open-accepted --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks