Opened 13 years ago

Closed 11 years ago

#1135 closed Bug (fixed)

crashes when adding torrent, with "assert( ( info->pieceSize % tor->blockSize ) == 0 );"

Reported by: razzmatazz Owned by: charles
Priority: Normal Milestone: 1.30
Component: libtransmission Version: 1.22
Severity: Normal Keywords:
Cc:

Description

torrent file attached (on a a private tracker, but anyways :)

(gdb) bt
#0  0xb7f7f410 in __kernel_vsyscall ()
#1  0xb721c085 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb721da01 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb721510e in __assert_fail () from /lib/tls/i686/cmov/libc.so.6
#4  0x08088af3 in tr_torrentNew (handle=0x82621c8, ctor=0x89fea18, 
    setmeError=0xbfe92d9c) at torrent.c:407
#5  0x0805dd8f in sourceChanged (b=0x829c2f0, gdata=0x8400e08)
    at add-dialog.c:99
#6  0xb7769aff in g_cclosure_marshal_VOID__VOID ()
   from /usr/lib/libgobject-2.0.so.0
#7  0xb775c759 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#8  0xb7770f8b in ?? () from /usr/lib/libgobject-2.0.so.0
#9  0xb7772c1f in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#10 0xb7772ee0 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#11 0xb7bf831a in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#12 0xb7769aff in g_cclosure_marshal_VOID__VOID ()
   from /usr/lib/libgobject-2.0.so.0
#13 0xb775c759 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#14 0xb7770f8b in ?? () from /usr/lib/libgobject-2.0.so.0
#15 0xb7772c1f in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#16 0xb7772ee0 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#17 0xb7c0d597 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#18 0xb7769aff in g_cclosure_marshal_VOID__VOID ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/libgobject-2.0.so.0
#19 0xb775c759 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#20 0xb7770f8b in ?? () from /usr/lib/libgobject-2.0.so.0
#21 0xb7772c1f in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#22 0xb7772ee0 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#23 0xb7c0d597 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#24 0xb7769aff in g_cclosure_marshal_VOID__VOID ()
   from /usr/lib/libgobject-2.0.so.0
#25 0xb775c759 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#26 0xb7770f8b in ?? () from /usr/lib/libgobject-2.0.so.0
#27 0xb7772c1f in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#28 0xb7772ee0 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#29 0xb7c0654b in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#30 0xb7769aff in g_cclosure_marshal_VOID__VOID ()
   from /usr/lib/libgobject-2.0.so.0
#31 0xb775c759 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#32 0xb7770f8b in ?? () from /usr/lib/libgobject-2.0.so.0
#33 0xb7772c1f in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#34 0xb7772f69 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#35 0xb7d53cb9 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#36 0xb7d54621 in gtk_tree_selection_select_path ()
   from /usr/lib/libgtk-x11-2.0.so.0
#37 0xb7d546d5 in gtk_tree_selection_select_iter ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/libgtk-x11-2.0.so.0
#38 0xb7bfcbdb in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#39 0xb7c1a3c9 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#40 0xb7bfc911 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#41 0xb7769aff in g_cclosure_marshal_VOID__VOID ()
   from /usr/lib/libgobject-2.0.so.0
#42 0xb775c759 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#43 0xb7770f8b in ?? () from /usr/lib/libgobject-2.0.so.0
#44 0xb7772c1f in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#45 0xb7772ee0 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#46 0xb621a6df in ?? () from /usr/lib/gtk-2.0/2.10.0/filesystems/libgio.so
#47 0xb7ef1cad in ?? () from /usr/lib/libgio-2.0.so.0
#48 0xb7f03ba3 in g_simple_async_result_complete ()
   from /usr/lib/libgio-2.0.so.0
#49 0xb7f03bf1 in ?? () from /usr/lib/libgio-2.0.so.0
#50 0xb76d71e1 in ?? () from /usr/lib/libglib-2.0.so.0
#51 0xb76d8dd6 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#52 0xb76dc193 in ?? () from /usr/lib/libglib-2.0.so.0
#53 0xb76dc577 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#54 0xb7c64264 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#55 0x08069bc3 in main (argc=Cannot access memory at address 0x52b9
) at main.c:391
(gdb) 

Attachments (1)

Sliders S03 NTSC DVD-Hextreme.torrent (131.1 KB) - added by razzmatazz 13 years ago.

Download all attachments as: .zip

Change History (11)

Changed 13 years ago by razzmatazz

comment:1 Changed 13 years ago by livings124

  • Owner set to charles
  • Priority changed from High to Normal
  • Severity changed from Critical to Normal
  • Version changed from 1.22 to 1.22+

comment:2 Changed 13 years ago by charles

  • Component changed from Transmission to libtransmission
  • Milestone changed from None Set to 1.30
  • Status changed from new to assigned

Confirmed. The problem with this torrent is that its piece size is 8053063 bytes. It's incredibly unusual to see a torrent whose piece size isn't some power of two, so much so that I wonder if this torrent is corrupt.

Having a piece size that isn't evenly divisible causes a lot of problems, and this is the first one I've seen "in the field", so my first thought is to fail more gracefully, but to not support odd piece sizes for now.

comment:3 Changed 13 years ago by charles

  • Resolution set to fixed
  • Status changed from assigned to closed

as of r6429, we now fail more gracefully by returning TR_INVALID when trying to parse that torrent's metainfo.

comment:4 Changed 13 years ago by charles

  • Version changed from 1.22+ to 1.22

comment:5 Changed 13 years ago by charles

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:6 Changed 13 years ago by charles

according to muks in IRC this isn't fixed yet. :)

comment:7 Changed 13 years ago by charles

  • Resolution set to fixed
  • Status changed from reopened to closed

false alarm. :)

comment:8 Changed 13 years ago by add

Last edited 11 years ago by livings124 (previous) (diff)

comment:9 Changed 11 years ago by User294

  • Resolution fixed deleted
  • Status changed from closed to reopened

There is bug #3524 and you've closed it as duplicate of this bug. However, while this bug marked as "fixed", it appears that returning TR_INVALID error when torrent's piece size isn't power of 2 isn't a great fix of the problem itself. So users will eventually have troubles downloading some torrents. Please re-investigate and re-check this scenario. Failed downloads are not what makes users happy. As for me, torrent client have to handle as many corner cases as possible when it comes to parsing torrent files and downloading them. If some torrent fails to download when other clients can handle it, it looks like a bug (even if used parameters are rare and uncommon). Bug #3524 seems to be like this. I will be evil enough to reopen this bug because it appears to me that some rare but evil problem still lurks here and sometimes hits users.

comment:10 Changed 11 years ago by charles

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.