Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#2600 closed Bug (fixed)

tr_bitfieldOr: Assertion `a->bitCount == b->bitCount' failed

Reported by: Ellmout Owned by:
Priority: Normal Milestone:
Component: libtransmission Version: 1.76+
Severity: Blocker Keywords:
Cc: thomas.creutz@…

Description

Got this error when connecting to the Web interface :

[09:11:09.730] Using libcurl 7.19.7 (web.c:43) [09:11:41.759] * Verifying torrent (verify.c:227) [09:11:41.759] * Got 66 peers from tracker (torrent.c:308) [09:12:11.772] * Verifying torrent (verify.c:227) [09:12:11.772] * Got 9 peers from tracker (torrent.c:308) transmission-daemon: bitfield.c:168: tr_bitfieldOr: Assertion `a->bitCount == b->bitCount' failed.

and sometime :

transmission-daemon: bitfield.c:70: tr_bitfieldAdd: Assertion `bitfield->bits' failed.

Attachments (4)

Transmission_2009-11-24-143753_myBook.crash (35.0 KB) - added by tiennou 12 years ago.
OS X Crashlog
Transmission_2009-11-24-183024_Fima.crash (31.7 KB) - added by vaska 12 years ago.
Bildschirmfoto-Systemüberwachung.png (123.3 KB) - added by ThomasCr 12 years ago.
Bildschirmfoto-Systemüberwachung-1.png (123.7 KB) - added by ThomasCr 12 years ago.
after kill -9 pgrep transmission

Download all attachments as: .zip

Change History (22)

Changed 12 years ago by tiennou

OS X Crashlog

comment:1 follow-up: Changed 12 years ago by tiennou

Additional info: b was completely zero-ed.

comment:2 in reply to: ↑ 1 Changed 12 years ago by ThomasCr

Iam affected too.

When I start the GUI on the shell with transmission I get after some secounds:

transmission: bitfield.c:168: tr_bitfieldOr: Assertion `a->bitCount == b->bitCount' failed.
Aborted

my version is the current trunc (9552).

comment:3 Changed 12 years ago by ThomasCr

  • Cc thomas.creutz@… added

comment:4 Changed 12 years ago by ThomasCr

backtrace:

user@nb:/usr/src/torrent/svn$ gdb transmission
GNU gdb (GDB) 7.0-ubuntu
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/transmission...done.
(gdb) r
Starting program: /usr/bin/transmission 
[Thread debugging using libthread_db enabled]
[New Thread 0xb7e60b70 (LWP 25059)]
[New Thread 0xb6da8b70 (LWP 25060)]
[New Thread 0xb65a7b70 (LWP 25061)]
transmission: bitfield.c:168: tr_bitfieldOr: Assertion `a->bitCount == b->bitCount' failed.

Program received signal SIGABRT, Aborted.
0x00e13422 in __kernel_vsyscall ()
(gdb) bt full
#0  0x00e13422 in __kernel_vsyscall ()
No symbol table info available.
#1  0x00b0e4d1 in raise () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#2  0x00b11932 in abort () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#3  0x00b07648 in __assert_fail () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#4  0x080b03c7 in tr_bitfieldOr (a=0x8713e50, b=0xb7425eec) at bitfield.c:168
        ait = 0x0
        aend = 0x0
        bit = 0xc <Address 0xc out of bounds>
        __PRETTY_FUNCTION__ = "tr_bitfieldOr"
#5  0x080ba104 in tr_bitsetOr (a=0x8713e50, b=0xb7425ee8) at bitset.h:76
No locals.
#6  0x080be152 in tr_peerMgrGetAvailable (tor=0x84b4ff0) at peer-mgr.c:1968
        i = 0
        peerCount = 1
        t = 0x84aae70
        peers = 0xb7435ac8
        pieces = 0x8713e50
#7  0x0809e1e2 in tr_torrentStat (tor=0x84b4ff0) at torrent.c:995
        i = 135426200
        peerPieces = 0x81dc238
        s = 0x84b5268
        usableSeeds = 0
        now = 1259071085356
        downloadedForRatio = 3.7269661235728797e-306
        seedRatio = 0
        d = 0
        checkSeedRatio = 8 '\b'
        __PRETTY_FUNCTION__ = "tr_torrentStat"
#8  0x0807a3de in update_foreach (model=0x8127098, path=0x8713720, iter=0xbffff090, data=0x0) at tr-core.c:1228
        oldActivity = 4
        newActivity = 1
        oldUpSpeed = 0
        newUpSpeed = 0
        oldDownSpeed = 0
        newDownSpeed = -1.9962311091722196
        st = 0x837d830
        gtor = 0x81dc238
#9  0x006ad010 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#10 0x006ad7fb in gtk_tree_model_foreach () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#11 0x0807a55e in tr_core_update (self=0x8127058) at tr-core.c:1266
        column = 3
        order = GTK_SORT_DESCENDING
        sortable = 0x8127098
        model = 0x8127098
#12 0x0806f64c in updatemodel (gdata=0x8191f58) at main.c:1151
        data = 0x8191f58
---Type <return> to continue, or q <return> to quit---
        done = 0
#13 0x001bef78 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
No symbol table info available.
#14 0x0030d52c in ?? () from /lib/libglib-2.0.so.0
No symbol table info available.
#15 0x0030ce78 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
No symbol table info available.
#16 0x00310720 in ?? () from /lib/libglib-2.0.so.0
No symbol table info available.
#17 0x00310b8f in g_main_loop_run () from /lib/libglib-2.0.so.0
No symbol table info available.
#18 0x005c9419 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#19 0x0806d84f in main (argc=1, argv=0xbffff514) at main.c:470
        str = 0x8193640 "/home/user/.config/transmission/Incomplete"
        myUIManager = 0x818eb68
        win = 0x81f8da8
        session = 0x8196978
        cbdata = 0x8191f58
        err = 0x0
        argfiles = 0x0
        gerr = 0x0
        didinit = 1
        didlock = 1
        showversion = 0
        startpaused = 0
        startminimized = 0
        domain = 0x80e701d "transmission"
        configDir = 0x8107438 "/home/user/.config/transmission"
        tr_state = GTR_LOCKFILE_SUCCESS
        entries = {{long_name = 0x80e70b6 "paused", short_name = 112 'p', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0xbffff434, description = 0x80e702c "Start with all torrents paused", 
            arg_description = 0x0}, {long_name = 0x80e70bd "version", short_name = 0 '\000', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0xbffff438, 
            description = 0x80e704b "Show version number and exit", arg_description = 0x0}, {long_name = 0x80e70c5 "minimized", short_name = 109 'm', flags = 0, arg = G_OPTION_ARG_NONE, 
            arg_data = 0xbffff430, description = 0x80e7068 "Start minimized in notification area", arg_description = 0x0}, {long_name = 0x80e70cf "config-dir", short_name = 103 'g', flags = 0, 
            arg = G_OPTION_ARG_FILENAME, arg_data = 0xbffff428, description = 0x80e7090 "Where to look for configuration files", arg_description = 0x0}, {long_name = 0x0, short_name = 0 '\000', flags = 0, 
            arg = G_OPTION_ARG_NONE, arg_data = 0x0, description = 0x0, arg_description = 0x0}}

hope it is useful.

comment:5 Changed 12 years ago by ThomasCr

before this svn version I used 1.75 and 1.76 and both versions kill my system with high load.

I cant kill the process with kill -9 $PID because a zombie process was left and this was unkill .

This behaviour is gone with the svn build, but now I get the bug in bitfield.c.

Every time my all downloads get hashed when I start transmission. I found now which one cause this problem an paused them.

Dont know if this information is useful... but I only try to make it reproducible.

comment:6 Changed 12 years ago by charles

  • Milestone None Set deleted
  • Resolution set to fixed
  • Status changed from new to closed

fixed in r9558

comment:7 Changed 12 years ago by vaska

I'm now getting this in Mac 9860, which is the first I've gotten it. I'm not sure if this recurrence should be its own ticket. If you want I'll file one.

comment:8 Changed 12 years ago by ThomasCr

  • Resolution fixed deleted
  • Status changed from closed to reopened

I give svn9570 a try, but now the old behavior is back. 100 % cpu load.

when I try to attach with gdb to the process it hang in channel ptrace_stop (to in gnome-system-monitor)

I cant kill transmission :-(

Changed 12 years ago by ThomasCr

Changed 12 years ago by ThomasCr

after kill -9 pgrep transmission

comment:9 Changed 12 years ago by charles

ThomasCr?: thank you for the screenshots, but they don't give much information about where Transmisison is using the CPU cycles.

Could you please start Transmission inside of gdb and get a backtrace when the CPU use goes up again. By starting it inside of gdb, you won't have to attach to it.

% gdb transmission
(gdb) handle SIGPIPE nostop noprint nopass
(gdb) r
...let transmission run until it goes crazy
CTRL-C
(gdb) thread apply all bt
(gdb) continue
...wait 5 seconds
CTRL-C
(gdb) thread apply all bt
(gdb) continue
...wait 5 seconds
CTRL-C
(gdb) thread apply all bt
(gdb) quit

comment:10 Changed 12 years ago by ThomasCr

ok, I did what you told me, but the problem is, that transmission is also not responding to gdb puase command (CTRL-C). It sitting in ptrace_stop (to see in gnome-system-manager)

creutz@nbtxc:~$ gdb transmission
GNU gdb (GDB) 7.0-ubuntu
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/transmission...done.
(gdb) handle SIGPIPE nostop noprint nopass
Signal        Stop	Print	Pass to program	Description
SIGPIPE       No	No	No		Broken pipe
(gdb) r
Starting program: /usr/bin/transmission 
[Thread debugging using libthread_db enabled]
[New Thread 0xb7e60b70 (LWP 3961)]
[New Thread 0xb6ee9b70 (LWP 3962)]
[New Thread 0xb64ffb70 (LWP 3963)]
^C

comment:11 Changed 12 years ago by ThomasCr

Is this a kernel bug?

I Found this https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/161795

But I use the original Ubuntu Kernel Image 2.6.31-15-generic

comment:12 Changed 12 years ago by jch

  • Component changed from Daemon to libtransmission

Since I also see this with the GTK version, I'm changing the component to libtransmission.

--Juliusz

comment:13 Changed 12 years ago by charles

I don't know what we're talking about anymore.

ThomasCr? is talking about a high CPU load, the ticket's subject is about a bitcount assertion failure, so I don't know which jch is referring to.

comment:14 Changed 12 years ago by jch

The bitset assertion is what I've seen with the GTK version. However, I cannot recall whether this was before or after 9558, so please consider my comment as invalid.

The high CPU load appears to be an altogether different issue.

--Juliusz

comment:15 Changed 12 years ago by charles

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

Closing this ticket because the "Assertion `a->bitCount == b->bitCount' failed" error is fixed. If you see that crash again, please reopen this ticket. If you're seeing high CPU use, please open a separate ticket for that along with gdb or other profiling information.

comment:16 Changed 12 years ago by ThomasCr

I don't know.. but I think the change from this bug has something to do with the 100% cpu load behaviour?!

Before (<=v1.76): 100% cpu load
after (>v1.76 && <= 9552): now 100 % cpu load -> but bitfield.c bug
after (>=svn9570): 100% cpu load is back

:-(

comment:17 Changed 12 years ago by ThomasCr

uups:

after (>v1.76 && <= 9552): now 100 % cpu load -> but bitfield.c bug

correct: after (>v1.76 && <= 9552): no 100 % cpu load -> but bitfield.c bug

comment:18 Changed 12 years ago by ThomasCr

Damn! I cannon get the load problem back. Hashing is over on all running torrents

Note: See TracTickets for help on using tickets.