Opened 7 years ago

Closed 6 years ago

#4768 closed Bug (duplicate)

Transmission crashes randomly when operated from python bindings module

Reported by: gtt Owned by:
Priority: Normal Milestone: None Set
Component: Transmission Version: 2.42
Severity: Normal Keywords:
Cc: jj_rockingit@…

Description (last modified by jordan)

I have pretty simple python code which adds, waits and removes torrents from transmission

import transmissionrpc tc = transmissionrpc.Client('localhost', port=9091)

while 1:

magnet = get_from_db() tr = tc.add_torrent("magnet:?xt=urn:btih:" + magnet + "&dn=" + "tmp" + str(k)) torrents.append(tr)

for torrent in torrents:

print tc.info()[torrent.id] if something:

tc.remove_torrent(torrent.id,delete_data=True)

It crushes randomly:

transmission-gtk 
^[[A*** glibc detected *** transmission-gtk: double free or corruption (out): 0xb54fcaf0 ***
======= Backtrace: =========
/lib/i386-linux-gnu/libc.so.6(+0x6ebc2)[0xb6bdcbc2]
/lib/i386-linux-gnu/libc.so.6(+0x6f862)[0xb6bdd862]
/lib/i386-linux-gnu/libc.so.6(cfree+0x6d)[0xb6be094d]
/usr/lib/libevent-2.0.so.5(event_mm_free_+0x35)[0xb6f4e2b5]
/usr/lib/libevent-2.0.so.5(event_free+0x15c)[0xb6f4e5ac]
transmission-gtk[0x80ce211]
transmission-gtk[0x80bd244]
transmission-gtk[0x80a2411]
transmission-gtk[0x80a2536]
transmission-gtk[0x80a6306]
transmission-gtk[0x80ab308]
/usr/lib/libevent-2.0.so.5(event_base_loop+0x209)[0xb6f4c0c9]
/usr/lib/libevent-2.0.so.5(event_base_dispatch+0x23)[0xb6f4d2d3]
transmission-gtk[0x80ab1a0]
transmission-gtk[0x8094720]
/lib/i386-linux-gnu/libpthread.so.0(+0x6d31)[0xb6cf0d31]
/lib/i386-linux-gnu/libc.so.6(clone+0x5e)[0xb6c400ce]
======= Memory map: ========
08048000-08109000 r-xp 00000000 08:01 788876     /usr/bin/transmission-gtk
08109000-0810a000 r--p 000c0000 08:01 788876     /usr/bin/transmission-gtk
0810a000-0810c000 rw-p 000c1000 08:01 788876     /usr/bin/transmission-gtk
08a09000-08ff7000 rw-p 00000000 00:00 0          [heap]
ac300000-ac400000 rw-p 00000000 00:00 0 
ac500000-ac5a5000 rw-p 00000000 00:00 0 
ac5a5000-ac600000 ---p 00000000 00:00 0 
ac600000-ac700000 rw-p 00000000 00:00 0 
ac700000-ac800000 rw-p 00000000 00:00 0 
ac900000-aca00000 rw-p 00000000 00:00 0 
aca10000-ad400000 r--p 00000000 08:01 2101443    /usr/share/fonts/truetype/arphic/bkai00mp.ttf
ad400000-ad4e7000 rw-p 00000000 00:00 0 
ad4e7000-ad500000 ---p 00000000 00:00 0 
ad500000-ad600000 rw-p 00000000 00:00 0 
ad75b000-ad800000 r--p 00000000 08:01 2101545    /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf
ad800000-ad900000 rw-p 00000000 00:00 0 
ada00000-adc00000 rw-p 00000000 00:00 0 
adc00000-add00000 rw-p 00000000 00:00 0 
add1d000-add39000 r-xp 00000000 08:01 3902       /lib/i386-linux-gnu/libgcc_s.so.1
add39000-add3a000 r--p 0001b000 08:01 3902       /lib/i386-linux-gnu/libgcc_s.so.1
add3a000-add3b000 rw-p 0001c000 08:01 3902       /lib/i386-linux-gnu/libgcc_s.so.1
add50000-ade00000 r--p 00000000 08:01 2101549    /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
ade00000-adf00000 rw-p 00000000 00:00 0 
adf0c000-adf6c000 rw-s 00000000 00:04 327688     /SYSV00000000 (deleted)
adf6c000-ae3d8000 r--p 00000000 08:01 2101446    /usr/share/fonts/truetype/arphic/gkai00mp.ttf
ae3d8000-ae417000 r-xp 00000000 08:01 790184     /usr/lib/libibus-1.0.so.0.0.0
ae417000-ae418000 r--p 0003f000 08:01 790184     /usr/lib/libibus-1.0.so.0.0.0
ae418000-ae419000 rw-p 00040000 08:01 790184     /usr/lib/libibus-1.0.so.0.0.0
ae419000-ae41e000 r-xp 00000000 08:01 793567     /usr/lib/i386-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so
ae41e000-ae41f000 ---p 00005000 08:01 793567     /usr/lib/i386-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so
ae41f000-ae420000 r--p 00005000 08:01 793567     /usr/lib/i386-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so
ae420000-ae421000 rw-p 00006000 08:01 793567     /usr/lib/i386-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so
ae421000-ae481000 rw-s 00000000 00:04 294916     /SYSV00000000 (deleted)
ae481000-ae4d3000 r--p 00000000 08:01 2101645    /usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-B.ttf
ae4d3000-ae539000 r--p 00000000 08:01 2101648    /usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-L.ttf
ae539000-ae680000 r-xp 00000000 08:01 786550     /usr/lib/libxml2.so.2.7.8
ae680000-ae684000 r--p 00147000 08:01 786550     /usr/lib/libxml2.so.2.7.8
ae684000-ae685000 rw-p 0014b000 08:01 786550     /usr/lib/libxml2.so.2.7.8
ae685000-ae686000 rw-p 00000000 00:00 0 
ae686000-ae6b7000 r-xp 00000000 08:01 789854     /usr/lib/libcroco-0.6.so.3.0.1
ae6b7000-ae6b8000 r--p 00030000 08:01 789854     /usr/lib/libcroco-0.6.so.3.0.1
ae6b8000-ae6ba000 rw-p 00031000 08:01 789854     /usr/lib/libcroco-0.6.so.3.0.1
ae6ba000-ae6f0000 r-xp 00000000 08:01 793172     /usr/lib/i386-linux-gnu/librsvg-2.so.2.34.1
ae6f0000-ae6f1000 r--p 00036000 08:01 793172     /usr/lib/i386-linux-gnu/librsvg-2.so.2.34.1
ae6f1000-ae6f2000 rw-p 00037000 08:01 793172     /usr/lib/i386-linux-gnu/librsvg-2.so.2.34.1
ae6ff000-ae707000 r--s 00000000 08:01 660620     /home/george/.local/share/gvfs-metadata/uuid-BE50D8CB50D88B91-d5358767.log
ae707000-ae708000 r-xp 00000000 08:01 793544     /usr/lib/i386-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
ae708000-ae709000 r--p 00000000 08:01 793544     /usr/lib/i386-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
ae709000-ae70a000 rw-p 00001000 08:01 793544     /usr/lib/i386-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
ae70a000-ae727000 r--s 00000000 08:01 1310986    /usr/share/mime/mime.cache
ae727000-ae779000 r--p 00000000 08:01 2101557    /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf
ae779000-ae7d0000 r--p 00000000 08:01 2101650    /usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf
ae7d0000-ae7d2000 r-xp 00000000 08:01 917528     /usr/lib/i386-linux-gnu/pango/1.6.0/modules/pango-basic-fc.so
ae7d2000-ae7d3000 r--p 00001000 08:01 917528     /usr/lib/i386-linux-gnu/pango/1.6.0/modules/pango-basic-fc.so
ae7d3000-ae7d4000 rw-p 00002000 08:01 917528     /usr/lib/i386-linux-gnu/pango/1.6.0/modules/pango-basic-fc.so
ae7d4000-ae7d5000 r--s 00000000 08:01 2365011    /var/cache/fontconfig/c05880de57d1f5e948fdfacc138775d9-le32d4.cache-3
ae7d5000-ae7db000 r--s 00000000 08:01 2365005    /var/cache/fontconfig/945677eb7aeaf62f1d50efc3fb3ec7d8-le32d4.cache-3
ae7db000-ae7dd000 r--s 00000000 08:01 2365006    /var/cache/fontconfig/99e8ed0e538f840c565b6ed5dad60d56-le32d4.cache-3
ae7dd000-ae7e3000 r--s 00000000 08:01 2365022    /var/cache/fontconfig/e383d7ea5fbe662a33d9b44caf393297-le32d4.cache-3
ae7e3000-ae7e6000 r--s 00000000 08:01 2364991    /var/cache/fontconfig/2cd17615ca594fa2959ae173292e504c-le32d4.cache-3
ae7e6000-ae7e7000 r--s 00000000 08:01 2365025    /var/cache/fontconfig/fd9505950c048a77dc4b710eb6a628ed-le32d4.cache-3
ae7e7000-ae7e9000 r--s 00000000 08:01 2365020    /var/cache/fontconfig/ddc79d3ea06a7c6ffa86ede85f3bb5df-le32d4.cache-3
ae7e9000-ae7ea000 r--s 00000000 08:01 2365023    /var/cache/fontconfig/e7071f4a29fa870f4323321c154eba04-le32d4.cache-3
ae7ea000-ae7eb000 r--s 00000000 08:01 2365009    /var/cache/fontconfig/a2ab74764b07279e7c36ddb1d302cf26-le32d4.cache-3
ae7eb000-ae7ed000 r--s 00000000 08:01 2365012    /var/cache/fontconfig/c69f04ab05004e31a6d5e715764f16d8-le32d4.cache-3
ae7ed000-ae7f1000 r--s 00000000 08:01 2365001    /var/cache/fontconfig/6eb3985aa4124903f6ff08ba781cd364-le32d4.cache-3
ae7f1000-ae7f2000 r--s 00000000 08:01 2364995    /var/cache/fontconfig/4c73fe0c47614734b17d736dbde7580a-le32d4.cache-3
ae7f2000-ae7f3000 r--s 00000000 08:01 2364987    /var/cache/fontconfig/0d8c3b2ac0904cb8a57a757ad11a4a08-le32d4.cache-3
ae7f3000-ae7f5000 r--s 00000000 08:01 2364998    /var/cache/fontconfig/646addb8444faa74ee138aa00ab0b6a0-le32d4.cache-3
ae7f5000-ae7f6000 r--s 00000000 08:01 2364999    /var/cache/fontconfig/6a53c69dea097a2d716e069445527da8-le32d4.cache-3
ae7f6000-ae7fa000 r--s 00000000 08:01 2365010    /var/cache/fontconfig/a755afe4a08bf5b97852ceb7400b47bc-le32d4.cache-3
ae7fa000-ae7fc000 r--s 00000000 08:01 2364990    /var/cache/fontconfig/20bd79ad97094406f7d1b9654bfbd926-le32d4.cache-3
ae7fc000-ae7ff000 r--s 00000000 08:01 2365007    /var/cache/fontconfig/9c0624108b9a2ae8552f664125be8356-le32d4.cache-3
ae7ff000-ae806000 r--s 00000000 08:01 2365000    /var/cache/fontconfig/6d41288fd70b0be22e8c3a91e032eec0-le32d4.cache-3
ae806000-ae808000 r--s 00000000 08:01 2365019    /var/cache/fontconfig/da1bd5ca8443ffe22927a23ce431d198-le32d4.cache-3
ae808000-ae813000 r--s 00000000 08:01 2364988    /var/cache/fontconfig/0f34bcd4b6ee430af32735b75db7f02b-le32d4.cache-3
ae813000-ae816000 r--s 00000000 08:01 2365017    /var/cache/fontconfig/d60319d88cac85ba9e1a07bd06cfbb8c-le32d4.cache-3
ae816000-ae817000 r--s 00000000 08:01 2362382    /var/cache/fontconfig/4794a0821666d79190d59a36cb4f44b5-le32d4.cache-3
ae817000-ae839000 r--s 00000000 08:01 2362540    /var/cache/fontconfig/365b55f210c0a22e9a19e35191240f32-le32d4.cache-3
ae839000-ae846000 r--s 00000000 08:01 2365016    /var/cache/fontconfig/d52a8644073d54c13679302ca1180695-le32d4.cache-3
ae846000-ae84c000 r--s 00000000 08:01 2365008    /var/cache/fontconfig/a0513722a37733a9dfd54dccd328039d-le32d4.cache-3
ae84c000-ae84f000 r--s 00000000 08:01 2364986    /var/cache/fontconfig/089dead882dea3570ffc31a9898cfb69-le32d4.cache-3
ae84f000-ae852000 r--s 00000000 08:01 2365024    /var/cache/fontconfig/fac9d1061ce4dddb2143955f84876fd7-le32d4.cache-3
ae852000-ae85d000 r--s 00000000 08:01 2365496    /var/cache/fontconfig/e13b20fdb08344e0e664864cc2ede53d-le32d4.cache-3
ae85d000-ae86b000 r--s 00000000 08:01 2365004    /var/cache/fontconfig/865f88548240fee46819705c6468c165-le32d4.cache-3
ae86b000-ae86e000 r--p 00000000 08:01 2888050    /usr/share/locale-langpack/ru/LC_MESSAGES/atk10.mo
ae86e000-ae86f000 ---p 00000000 00:00 0 
ae86f000-af06f000 rw-p 00000000 00:00 0 
af06f000-b01b3000 r--p 00000000 08:01 2757757    /usr/share/icons/hicolor/icon-theme.cache
b01b3000-b3b14000 r--p 00000000 08:01 2757590    /usr/share/icons/gnome/icon-theme.cache
b3b14000-b3bfd000 r--p 00000000 08:01 2761851    /usr/share/icons/Humanity/icon-theme.cache
b3bfd000-b3bfe000 ---p 00000000 00:00 0 
b3bfe000-b43fe000 rw-p 00000000 00:00 0 
b43fe000-b43ff000 ---p 00000000 00:00 0 
b43ff000-b4bff000 rw-p 00000000 00:00 0 
b4bff000-b4c00000 ---p 00000000 00:00 0 
b4c00000-b5400000 rw-p 00000000 00:00 0 
b5400000-b5500000 rw-p 00000000 00:00 0 
b5507000-b550b000 r-xp 00000000 08:01 792783     /usr/lib/gtk-2.0/2.10.0/menuproxies/libappmenu.so
b550b000-b550c000 r--p 00004000 08:01 792783     /usr/lib/gtk-2.0/2.10.0/menuproxies/libappmenu.so
b550c000-b550d000 rw-p 00005000 08:01 792783     /usr/lib/gtk-2.0/2.10.0/menuproxies/libappmenu.so
b550d000-b5515000 r--p 00000000 08:01 2888130    /usr/share/locale-langpack/ru/LC_MESSAGES/gdk-pixbuf.mo
b5515000-b5538000 r--p 00000000 08:01 2772341    /usr/share/icons/ubuntu-mono-light/icon-theme.cache
b5538000-b5548000 r-xp 00000000 08:01 3965       /lib/i386-linux-gnu/libudev.so.0.12.0
b5548000-b5549000 r--p 0000f000 08:01 3965       /lib/i386-linux-gnu/libudev.so.0.12.0
b5549000-b554a000 rw-p 00010000 08:01 3965       /lib/i386-linux-gnu/libudev.so.0.12.0
b554a000-b5591000 r-xp 00000000 08:01 3891       /lib/i386-linux-gnu/libdbus-1.so.3.5.7
b5591000-b5592000 r--p 00046000 08:01 3891       /lib/i386-linux-gnu/libdbus-1.so.3.5.7
b5592000-b5593000 rw-p 00047000 08:01 3891       /lib/i386-linux-gnu/libdbus-1.so.3.5.7
b5593000-b55a6000 r-xp 00000000 08:01 792276     /usr/lib/gio/modules/libgioremote-volume-monitor.so
b55a6000-b55a7000 r--p 00012000 08:01 792276     /usr/lib/gio/modules/libgioremote-volume-monitor.so
b55a7000-b55a8000 rw-p 00013000 08:01 792276     /usr/lib/gio/modules/libgioremote-volume-monitor.so
b55a8000-b55bd000 r-xp 00000000 08:01 792846     /usr/lib/gvfs/libgvfscommon.so
b55bd000-b55be000 r--p 00015000 08:01 792846     /usr/lib/gvfs/libgvfscommon.so
b55be000-b55bf000 rw-p 00016000 08:01 792846     /usr/lib/gvfs/libgvfscommon.so
b55bf000-b55e9000 r-xp 00000000 08:01 792277     /usr/lib/gio/modules/libgvfsdbus.so
b55e9000-b55ea000 r--p 00029000 08:01 792277     /usr/lib/gio/modules/libgvfsdbus.so
b55ea000-b55eb000 rw-p 0002a000 08:01 792277     /usr/lib/gio/modules/libgvfsdbus.so
b55eb000-b55f7000 r--p 00000000 08:01 2888349    /usr/share/locale-langpack/ru/LC_MESSAGES/transmission-gtk.mo
b55f7000-b55f8000 ---p 00000000 00:00 0 
b55f8000-b5df8000 rw-p 00000000 00:00 0 
b5df8000-b5e14000 r--p 00000000 08:01 2888146    /usr/share/locale-langpack/ru/LC_MESSAGES/glib20.mo
b5e14000-b5e41000 r-xp 00000000 08:01 792780     /usr/lib/gtk-2.0/2.10.0/engines/libmurrine.so
b5e41000-b5e42000 r--p 0002c000 08:01 792780     /usr/lib/gtk-2.0/2.10.0/engines/libmurrine.so
b5e42000-b5e43000 rw-p 0002d000 08:01 792780     /usr/lib/gtk-2.0/2.10.0/engines/libmurrine.so
b5e43000-b5e49000 r-xp 00000000 08:01 793133     /usr/lib/i386-linux-gnu/libogg.so.0.7.1
b5e49000-b5e4a000 r--p 00005000 08:01 793133     /usr/lib/i386-linux-gnu/libogg.so.0.7.1
b5e4a000-b5e4b000 rw-p 00006000 08:01 793133     /usr/lib/i386-linux-gnu/libogg.so.0.7.1
b5e4b000-b5e74000 r-xp 00000000 08:01 793215     /usr/lib/i386-linux-gnu/libvorbis.so.0.4.5
b5e74000-b5e75000 r--p 00028000 08:01 793215     /usr/lib/i386-linux-gnu/libvorbis.so.0.4.5
b5e75000-b5e76000 rw-p 00029000 08:01 793215     /usr/lib/i386-linux-gnu/libvorbis.so.0.4.5
b5e76000-b5e7e000 r-xp 00000000 08:01 790255     /usr/lib/libltdl.so.7.3.0
b5e7e000-b5e7f000 r--p 00008000 08:01 790255     /usr/lib/libltdl.so.7.3.0
b5e7f000-b5e80000 rw-p 00009000 08:01 790255     /usr/lib/libltdl.so.7.3.0
b5e80000-b5e91000 r-xp 00000000 08:01 793202     /usr/lib/i386-linux-gnu/libtdb.so.1.2.9
b5e91000-b5e92000 r--p 00010000 08:01 793202     /usr/lib/i386-linux-gnu/libtdb.so.1.2.9
b5e92000-b5e93000 rw-p 00011000 08:01 793202     /usr/lib/i386-linux-gnu/libtdb.so.1.2.9
b5e93000-b5e9b000 r-xp 00000000 08:01 793219     /usr/lib/i386-linux-gnu/libvorbisfile.so.3.3.4
b5e9b000-b5e9c000 r--p 00007000 08:01 793219     /usr/lib/i386-linux-gnu/libvorbisfile.so.3.3.4
b5e9c000-b5e9d000 rw-p 00008000 08:01 793219     /usr/lib/i386-linux-gnu/libvorbisfile.so.3.3.4
b5e9d000-b5eac000 r-xp 00000000 08:01 787435     /usr/lib/libcanberra.so.0.2.5
b5eac000-b5ead000 r--p 0000e000 08:01 787435     /usr/lib/libcanberra.so.0.2.5
b5ead000-b5eae000 rw-p 0000f000 08:01 787435     /usr/lib/libcanberra.so.0.2.5
b5eae000-b5eb2000 r-xp 00000000 08:01 787441     /usr/lib/libcanberra-gtk.so.0.1.8
b5eb2000-b5eb3000 r--p 00003000 08:01 787441     /usr/lib/libcanberra-gtk.so.0.1.8
b5eb3000-b5eb4000 rw-p 00004000 08:01 787441     /usr/lib/libcanberra-gtk.so.0.1.8
b5eb5000-b5ebc000 r-xp 00000000 08:01 792275     /usr/lib/gio/modules/libdconfsettings.so
b5ebc000-b5ebd000 r--p 00006000 08:01 792275     /usr/lib/gio/modules/libdconfsettings.so
b5ebd000-b5ebe000 rw-p 00007000 08:01 792275     /usr/lib/gio/modules/libdconfsettings.so
b5ebe000-b5ec7000 r-xp 00000000 08:01 803548     /usr/lib/i386-linux-gnu/gtk-2.0/2.10.0/engines/libpixmap.so
b5ec7000-b5ec8000 r--p 00008000 08:01 803548     /usr/lib/i386-linux-gnu/gtk-2.0/2.10.0/engines/libpixmap.so
b5ec8000-b5ec9000 rw-p 00009000 08:01 803548     /usr/lib/i386-linux-gnu/gtk-2.0/2.10.0/engines/libpixmap.so
b5ec9000-b5eff000 r--p 00000000 08:01 2888183    /usr/share/locale-langpack/ru/LC_MESSAGES/gtk20-properties.mo
b5eff000-b5f0a000 r-xp 00000000 08:01 3922       /lib/i386-linux-gnu/libnss_files-2.13.so
b5f0a000-b5f0b000 r--p 0000a000 08:01 3922       /lib/i386-linux-gnu/libnss_files-2.13.so
b5f0b000-b5f0c000 rw-p 0000b000 08:01 3922       /lib/i386-linux-gnu/libnss_files-2.13.so
b5f0c000-b5f21000 r-xp 00000000 08:01 3916       /lib/i386-linux-gnu/libnsl-2.13.so
b5f21000-b5f22000 r--p 00015000 08:01 3916       /lib/i386-linux-gnu/libnsl-2.13.so
b5f22000-b5f23000 rw-p 00016000 08:01 3916       /lib/i386-linux-gnu/libnsl-2.13.so
b5f23000-b5f25000 rw-p 00000000 00:00 0 
b5f25000-b5f2d000 r-xp 00000000 08:01 3918       /lib/i386-linux-gnu/libnss_compat-2.13.so
b5f2d000-b5f2e000 r--p 00007000 08:01 3918       /lib/i386-linux-gnu/libnss_compat-2.13.so
b5f2e000-b5f2f000 rw-p 00008000 08:01 3918       /lib/i386-linux-gnu/libnss_compat-2.13.so
b5f31000-b5f34000 r--s 00000000 08:01 2362541    /var/cache/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le32d4.cache-3
b5f34000-b5f42000 r-xp 00000000 08:01 790359     /usr/lib/liboverlay-scrollbar-0.2.so.0.0.11
b5f42000-b5f43000 r--p 0000d000 08:01 790359     /usr/lib/liboverlay-scrollbar-0.2.so.0.0.11
b5f43000-b5f44000 rw-p 0000e000 08:01 790359     /usr/lib/liboverlay-scrollbar-0.2.so.0.0.11
b5f44000-b5f6f000 r--p 00000000 08:01 2888228    /usr/share/locale-langpack/ru/LC_MESSAGES/libc.mo
b5f6f000-b5f80000 r--p 00000000 08:01 2888184    /usr/share/locale-langpack/ru/LC_MESSAGES/gtk20.mo
b5f80000-b5f87000 r--s 00000000 08:01 793521     /usr/lib/i386-linux-gnu/gconv/gconv-modules.cache
b5f87000-b5f92000 r--p 00000000 08:01 2901800    /usr/share/locale/ru/LC_MESSAGES/transmission-gtk.mo
b5f92000-b5f93000 r--p 03f4c000 08:01 793830     /usr/lib/locale/locale-archive
b5f93000-b60c3000 r--p 0045d000 08:01 793830     /usr/lib/locale/locale-archive
b60c3000-b62c3000 r--p 00000000 08:01 793830     /usr/lib/locale/locale-archive
b62c3000-b62c7000 rw-p 00000000 00:00 0 
b62c7000-b62c9000 r-xp 00000000 08:01 3910       /lib/i386-linux-gnu/libkeyutils.so.1.3
b62c9000-b62ca000 r--p 00001000 08:01 3910       /lib/i386-linux-gnu/libkeyutils.so.1.3
b62ca000-b62cb000 rw-p 00002000 08:01 3910       /lib/i386-linux-gnu/libkeyutils.so.1.3
b62cb000-b62d0000 r-xp 00000000 08:01 792939     /usr/lib/i386-linux-gnu/libXdmcp.so.6.0.0
b62d0000-b62d1000 r--p 00004000 08:01 792939     /usr/lib/i386-linux-gnu/libXdmcp.so.6.0.0
b62d1000-b62d2000 rw-p 00005000 08:01 792939     /usr/lib/i386-linux-gnu/libXdmcp.so.6.0.0
b62d2000-b62d4000 r-xp 00000000 08:01 792931     /usr/lib/i386-linux-gnu/libXau.so.6.0.0
b62d4000-b62d5000 r--p 00001000 08:01 792931     /usr/lib/i386-linux-gnu/libXau.so.6.0.0
b62d5000-b62d6000 rw-p 00002000 08:01 792931     /usr/lib/i386-linux-gnu/libXau.so.6.0.0
b62d6000-b62e6000 r-xp 00000000 08:01 793200     /usr/lib/i386-linux-gnu/libtasn1.so.3.1.11
b62e6000-b62e7000 r--p 0000f000 08:01 793200     /usr/lib/i386-linux-gnu/libtasn1.so.3.1.11
b62e7000-b62e8000 rw-p 00010000 08:01 793200     /usr/lib/i386-linux-gnu/libtasn1.so.3.1.11
b62e8000-b62eb000 r-xp 00000000 08:01 3908       /lib/i386-linux-gnu/libgpg-error.so.0.8.0
b62eb000-b62ec000 r--p 00002000 08:01 3908       /lib/i386-linux-gnu/libgpg-error.so.0.8.0
b62ec000-b62ed000 rw-p 00003000 08:01 3908       /lib/i386-linux-gnu/libgpg-error.so.0.8.0
b62ed000-b62ee000 rw-p 00000000 00:00 0 
b62ee000-b62f5000 r-xp 00000000 08:01 793093     /usr/lib/i386-linux-gnu/libkrb5support.so.0.1
b62f5000-b62f6000 r--p 00006000 08:01 793093     /usr/lib/i386-linux-gnu/libkrb5support.so.0.1
b62f6000-b62f7000 rw-p 00007000 08:01 793093     /usr/lib/i386-linux-gnu/libkrb5support.so.0.1
b62f7000-b62f9000 r-xp 00000000 08:01 3886       /lib/i386-linux-gnu/libcom_err.so.2.1
b62f9000-b62fa000 r--p 00001000 08:01 3886       /lib/i386-linux-gnu/libcom_err.so.2.1
b62fa000-b62fb000 rw-p 00002000 08:01 3886       /lib/i386-linux-gnu/libcom_err.so.2.1
b62fb000-b6322000 r-xp 00000000 08:01 797932     /usr/lib/i386-linux-gnu/libk5crypto.so.3.1
b6322000-b6323000 r--p 00026000 08:01 797932     /usr/lib/i386-linux-gnu/libk5crypto.so.3.1
b6323000-b6324000 rw-p 00027000 08:01 797932     /usr/lib/i386-linux-gnu/libk5crypto.so.3.1
b6324000-b63e6000 r-xp 00000000 08:01 793066     /usr/lib/i386-linux-gnu/libkrb5.so.3.3
b63e6000-b63ec000 r--p 000c1000 08:01 793066     /usr/lib/i386-linux-gnu/libkrb5.so.3.3
b63ec000-b63ed000 rw-p 000c7000 08:01 793066     /usr/lib/i386-linux-gnu/libkrb5.so.3.3
b63ed000-b6406000 r-xp 00000000 08:01 793179     /usr/lib/i386-linux-gnu/libsasl2.so.2.0.24
b6406000-b6407000 r--p 00019000 08:01 793179     /usr/lib/i386-linux-gnu/libsasl2.so.2.0.24
b6407000-b6408000 rw-p 0001a000 08:01 793179     /usr/lib/i386-linux-gnu/libsasl2.so.2.0.24
b6408000-b6409000 rw-p 00000000 00:00 0 
b6409000-b642f000 r-xp 00000000 08:01 3897       /lib/i386-linux-gnu/libexpat.so.1.5.2
b642f000-b6430000 ---p 00026000 08:01 3897       /lib/i386-linux-gnu/libexpat.so.1.5.2
b6430000-b6432000 r--p 00026000 08:01 3897       /lib/i386-linux-gnu/libexpat.so.1.5.2
b6432000-b6433000 rw-p 00028000 08:01 3897       /lib/i386-linux-gnu/libexpat.so.1.5.2
b6433000-b643b000 r-xp 00000000 08:01 793223     /usr/lib/i386-linux-gnu/libxcb-render.so.0.0.0
b643b000-b643c000 r--p 00007000 08:01 793223     /usr/lib/i386-linux-gnu/libxcb-render.so.0.0.0
b643c000-b643d000 rw-p 00008000 08:01 793223     /usr/lib/i386-linux-gnu/libxcb-render.so.0.0.0
b643d000-b643f000 r-xp 00000000 08:01 793227     /usr/lib/i386-linux-gnu/libxcb-shm.so.0.0.0
b643f000-b6440000 r--p 00001000 08:01 793227     /usr/lib/i386-linux-gnu/libxcb-shm.so.0.0.0
b6440000-b6441000 rw-p 00002000 08:01 793227     /usr/lib/i386-linux-gnu/libxcb-shm.so.0.0.0
b6441000-b6469000 r-xp 00000000 08:01 3940       /lib/i386-linux-gnu/libpng12.so.0.46.0
b6469000-b646a000 r--p 00027000 08:01 3940       /lib/i386-linux-gnu/libpng12.so.0.46.0
b646a000-b646b000 rw-p 00028000 08:01 3940       /lib/i386-linux-gnu/libpng12.so.0.46.0
b646b000-b646c000 rw-p 00000000 00:00 0 
b646c000-b64ea000 r-xp 00000000 08:01 793153     /usr/lib/i386-linux-gnu/libpixman-1.so.0.22.2
b64ea000-b64ee000 r--p 0007d000 08:01 793153     /usr/lib/i386-linux-gnu/libpixman-1.so.0.22.2
b64ee000-b64ef000 rw-p 00081000 08:01 793153     /usr/lib/i386-linux-gnu/libpixman-1.so.0.22.2
b64ef000-b650c000 r-xp 00000000 08:01 793229     /usr/lib/i386-linux-gnu/libxcb.so.1.1.0
b650c000-b650d000 r--p 0001c000 08:01 793229     /usr/lib/i386-linux-gnu/libxcb.so.1.1.0
b650d000-b650e000 rw-p 0001d000 08:01 793229     /usr/lib/i386-linux-gnu/libxcb.so.1.1.0
b650e000-b65a0000 r-xp 00000000 08:01 793006     /usr/lib/i386-linux-gnu/libfreetype.so.6.6.2
b65a0000-b65a4000 r--p 00091000 08:01 793006     /usr/lib/i386-linux-gnu/libfreetype.so.6.6.2
b65a4000-b65a5000 rw-p 00095000 08:01 793006     /usr/lib/i386-linux-gnu/libfreetype.so.6.6.2
b65a5000-b65a8000 r-xp 00000000 08:01 3892       /lib/i386-linux-gnu/libdl-2.13.so
b65a8000-b65a9000 r--p 00002000 08:01 3892       /lib/i386-linux-gnu/libdl-2.13.so
b65a9000-b65aa000 rw-p 00003000 08:01 3892       /lib/i386-linux-gnu/libdl-2.13.so
b65aa000-b65ab000 rw-p 00000000 00:00 0 
b65ab000-b6655000 r-xp 00000000 08:01 793061     /usr/lib/i386-linux-gnu/libgnutls.so.26.16.14
b6655000-b6656000 ---p 000aa000 08:01 793061     /usr/lib/i386-linux-gnu/libgnutls.so.26.16.14
b6656000-b665a000 r--p 000aa000 08:01 793061     /usr/lib/i386-linux-gnu/libgnutls.so.26.16.14
b665a000-b665b000 rw-p 000ae000 08:01 793061     /usr/lib/i386-linux-gnu/libgnutls.so.26.16.14
b665b000-b6672000 r-xp 00000000 08:01 793175     /usr/lib/i386-linux-gnu/librtmp.so.0
b6672000-b6673000 r--p 00016000 08:01 793175     /usr/lib/i386-linux-gnu/librtmp.so.0
b6673000-b6674000 rw-p 00017000 08:01 793175     /usr/lib/i386-linux-gnu/librtmp.so.0
b6674000-b66f6000 r-xp 00000000 08:01 3904       /lib/i386-linux-gnu/libgcrypt.so.11.7.0
b66f6000-b66f7000 r--p 00081000 08:01 3904       /lib/i386-linux-gnu/libgcrypt.so.11.7.0
b66f7000-b66f9000 rw-p 00082000 08:01 3904       /lib/i386-linux-gnu/libgcrypt.so.11.7.0
b66f9000-b6734000 r-xp 00000000 08:01 793091     /usr/lib/i386-linux-gnu/libgssapi_krb5.so.2.2
b6734000-b6735000 ---p 0003b000 08:01 793091     /usr/lib/i386-linux-gnu/libgssapi_krb5.so.2.2
b6735000-b6736000 r--p 0003b000 08:01 793091     /usr/lib/i386-linux-gnu/libgssapi_krb5.so.2.2
b6736000-b6737000 rw-p 0003c000 08:01 793091     /usr/lib/i386-linux-gnu/libgssapi_krb5.so.2.2
b6737000-b6784000 r-xp 00000000 08:01 798121     /usr/lib/i386-linux-gnu/libldap_r-2.4.so.2.7.0
b6784000-b6785000 ---p 0004d000 08:01 798121     /usr/lib/i386-linux-gnu/libldap_r-2.4.so.2.7.0
b6785000-b6786000 r--p 0004d000 08:01 798121     /usr/lib/i386-linux-gnu/libldap_r-2.4.so.2.7.0
b6786000-b6787000 rw-p 0004e000 08:01 798121     /usr/lib/i386-linux-gnu/libldap_r-2.4.so.2.7.0
b6787000-b6789000 rw-p 00000000 00:00 0 
b6789000-b6796000 r-xp 00000000 08:01 793095     /usr/lib/i386-linux-gnu/liblber-2.4.so.2.7.0
b6796000-b6797000 r--p 0000c000 08:01 793095     /usr/lib/i386-linux-gnu/liblber-2.4.so.2.7.0
b6797000-b6798000 rw-p 0000d000 08:01 793095     /usr/lib/i386-linux-gnu/liblber-2.4.so.2.7.0fish: Job 1, 'transmission-gtk ' terminated by signal SIGABRT (Abort)


And python says:
Traceback (most recent call last):
  File "index.py", line 31, in <module>
    torrent_info = tc.info()[torrent.id]
  File "/usr/local/lib/python2.7/dist-packages/transmissionrpc-0.9-py2.7.egg/transmissionrpc/client.py", line 520, in info
    return self._request('torrent-get', {'fields': arguments}, ids, timeout=timeout)
  File "/usr/local/lib/python2.7/dist-packages/transmissionrpc-0.9-py2.7.egg/transmissionrpc/client.py", line 173, in _request
    http_data = self._http_query(query, timeout)
  File "/usr/local/lib/python2.7/dist-packages/transmissionrpc-0.9-py2.7.egg/transmissionrpc/client.py", line 134, in _http_query
    result = self.http_handler.request(self.url, query, headers, timeout)
  File "/usr/local/lib/python2.7/dist-packages/transmissionrpc-0.9-py2.7.egg/transmissionrpc/httphandler.py", line 55, in request
    response = urllib2.urlopen(request, timeout=timeout)
  File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 394, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 412, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 372, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1201, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1174, in do_open
    r = h.getresponse(buffering=True)
  File "/usr/lib/python2.7/httplib.py", line 1027, in getresponse
    response.begin()
  File "/usr/lib/python2.7/httplib.py", line 407, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.7/httplib.py", line 365, in _read_status
    line = self.fp.readline()
  File "/usr/lib/python2.7/socket.py", line 447, in readline
    data = self._sock.recv(self._rbufsize)
socket.error: [Errno 104] Connection reset by peer

sorry but I could not test it with nightly builds: files in the ppa for ubuntu are old. Anything else I need to provide to help you?

Change History (22)

comment:1 Changed 7 years ago by x190

Last edited 7 years ago by x190 (previous) (diff)

comment:2 Changed 7 years ago by gtt

I've played a bit more and noticed that removing torrent from a transmission probably causes a crash. The problem always occurs after a certain number of torrents being processed (i.e. added, downloaded and removed) by my script. The number is pretty high -- usually 200, sometimes more.

Probably, I could provide a script which will reproduce an error. Will it help?

comment:3 Changed 7 years ago by livings124

A script couldn't hurt, thanks!

comment:4 Changed 7 years ago by x190

"Normally, you'd get an RST if you do a close which doesn't linger (i.e. in which data can be discarded by the stack if it hasn't been sent and ACK'd) and a normal FIN if you allow the close to linger (i.e. the close waits for the data in transit to be ACK'd).

Perhaps all you need to do is set your socket to linger so that you remove the race condition between a non lingering close done on the socket and the ACKs arriving?"

EDIT: I see that the Mac Client does handle connection resets (known as error 54 on a Mac) properly.

Last edited 7 years ago by x190 (previous) (diff)

comment:5 Changed 7 years ago by x190

  • Summary changed from Transmission crushies randomly when operated from python bindings module to Transmission crashes randomly when operated from python bindings module

comment:6 Changed 7 years ago by x190

Last edited 7 years ago by x190 (previous) (diff)

comment:7 Changed 7 years ago by jordan

  • Description modified (diff)

comment:8 Changed 7 years ago by jordan

gtt, does your Ubuntu desktop ask you to report this to launchpad when transmission-gtk crashes? If so, it would be great if you would do that because launchpad will come up with a useful backtrace.

Otherwise, if you could repeat the crash with the debug deb installed so that gdb can create a better backtrace, that would also be helpful. The Ubuntu wiki has instructions for this at https://wiki.ubuntu.com/Backtrace ... though transmission-gtk requires one extra step: after the (gdb) handle SIG3 nostop nopass noprint step, repeat it for SIGPIPE: (gdb) handle SIGPIPE nostop nopass noprint

Thanks!

comment:9 Changed 7 years ago by gtt

jordan, thank you for ideas, currently I'm slightly busy, but I will do testing in the beginning of the next week.

comment:10 Changed 7 years ago by livings124

gtt: any update here?

comment:11 Changed 7 years ago by gtt

Script is almost ready...

comment:12 Changed 7 years ago by jordan

gtt: any update here? :)

comment:13 Changed 7 years ago by gtt

Ok, I've found it.

The following code reproduces error on my machine:

import transmissionrpc 
import time

tc = transmissionrpc.Client('localhost', port=9091)

magnet = "0be1919d55fbde050b7c923c698f0af100618e61"
tr = tc.add_torrent("magnet:?xt=urn:btih:" + magnet + "&dn=" + "tmp") 
time.sleep(10)
print tr
tc.remove_torrent(tr.id,delete_data=True)

There are two interesting things:

  1. Error occurs only then delete_data is set True. Otherwise everything works normal.
  2. After installation of the transmission-dbg ubuntu package I've lost ability to connect to the rpc interface: transmission asks my for the password whether authentication enabled or not and even if enabled it rejects password specified in preferences.

comment:14 Changed 7 years ago by gtt

p.s. sorry for the delays :/

comment:15 Changed 7 years ago by jordan

This script doesn't work with transmissionrpc 0.8 -- it looks like add_torrent's been replaced with add which returns a dict, and remove_torrent's been replaced with remove.

I modified the script like this:

import transmissionrpc
import time

tc = transmissionrpc.Client('localhost', port=9091)
magnet = "0be1919d55fbde050b7c923c698f0af10061lala"
tr = tc.add_uri("magnet:?xt=urn:btih:" + magnet + "&dn=" + "tmp")
time.sleep(10)
tc.remove(tr.keys(),delete_data=True)

Which fails to crash 2.50.

So, I think we're back to the ideas I mentioned above in comment #8 -- what we really need is a debugger backtrace of Transmission, preferably of a version newer than 2.42.

comment:16 Changed 7 years ago by gtt

Ok, I will investigate further but you know my pace...

comment:17 Changed 7 years ago by JJR

I've been using a version of the transmissionrpc modified for Python 3.2. I've found that .init() can crash the transmission-daemon through the rpc handling under certain circumstances.

For example 'client.info(1)' will never crash the daemon. However 'client.info()' will crash the daemon, when a 'zero pieces' torrent is handled.

Using gdb to go through a daemon crash (please be patient, i've next to zero experience with gdb using console only):

0 0x00007ffff661ffa5 in raise () from /lib/libc.so.6
1 0x00007ffff6621428 in abort () from /lib/libc.so.6
2 0x00007ffff6619002 in assert_fail_base () from /lib/libc.so.6
3 0x00007ffff66190b2 in
assert_fail () from /lib/libc.so.6
4 0x000000000043b5a4 in tr_bitfieldGetRaw (b=0x7ffff61bc8d0, byte_count=0x7ffff61bc968) at ../../Transmission/libtransmission/bitfield.c:171[[BR]] 5 0x000000000043ed29 in tr_cpCreatePieceBitfield (cp=0x7ffff003f0a8,byte_count=0x7ffff61bc968) at ../../Transmission/libtransmission/completion.c:289[[BR]] 6 0x00000000004630a0 in addField (tor=0x7ffff003ee80, inf=0x7ffff003ee88, st=0x7ffff003f220, d=0x7ffff1fdc4b0, key=0x7ffff361cf28 "pieces") at ../../Transmission/libtransmission/rpcimpl.c:656[[BR]] 7 0x0000000000463acc in addInfo (tor=0x7ffff003ee80, d=0x7ffff1fdc4b0, fields=0x7ffff3071a50) at ../../Transmission/libtransmission/rpcimpl.c:748[[BR]] 8 0x0000000000463cc5 in torrentGet (session=0x6a9240, args_in=0x7ffff07e2fb0, args_out=0x7ffff35f4500, idle_data=0x0) at ../../Transmission/libtransmission/rpcimpl.c:785[[BR]] 9 0x0000000000466ef7 in request_exec (session=0x6a9240, request=0x7ffff61bcbb0, callback=0x456a05 <rpc_response_func>, callback_user_data=0x7ffff0b5ee80) at ../../Transmission/libtransmission/rpcimpl.c:1864[[BR]] 10 0x0000000000467110 in tr_rpc_request_exec_json (session=0x6a9240, request_json=0x7ffff34b993c, request_len=1052, callback=0x456a05 <rpc_response_func>, callback_user_data=0x7ffff0b5ee80) at ../../Transmission/libtransmission/rpcimpl.c:1907[[BR]] 11 0x0000000000456b8d in handle_rpc (req=0x7ffff34bc570, server=0x7ffff0004810) at ../../Transmission/libtransmission/rpc-server.c:553[[BR]] 12 0x0000000000457016 in handle_request (req=0x7ffff34bc570, arg=0x7ffff0004810) at ../../Transmission/libtransmission/rpc-server.c:667[[BR]] 13 0x00007ffff79b7eb5 in ?? () from /lib/libevent-2.0.so.5
14 0x00007ffff79b6e3d in ?? () from /lib/libevent-2.0.so.5
15 0x00007ffff79b6ff8 in ?? () from /lib/libevent-2.0.so.5
16 0x00007ffff79a72ba in ?? () from /lib/libevent-2.0.so.5
17 0x00007ffff799c8c4 in event_base_loop () from /lib/libevent-2.0.so.5
18 0x000000000042bfb7 in libeventThreadFunc (veh=0x6a9880) at ../../Transmission/libtransmission/trevent.c:248[[BR]] 19 0x00000000004146b1 in ThreadFunc? (_t=0x6a9a20) at ../../Transmission/libtransmission
/platform.c:118[[BR]] 20 0x00007ffff6996e0f in start_thread () from /lib/libpthread.so.0
21 0x00007ffff66cf05d in clone () from /lib/libc.so.6

This is always the same spot for all crashes.

Program received signal SIGABRT, Aborted. [Switching to Thread 0x7ffff61bd700 (LWP 2581)] 0x00007ffff661ffa5 in raise () from /lib/libc.so.6

(gdb) up #1 0x00007ffff6621428 in abort () from /lib/libc.so.6 (gdb) #2 0x00007ffff6619002 in assert_fail_base () from /lib/libc.so.6 (gdb) #3 0x00007ffff66190b2 in assert_fail () from /lib/libc.so.6 (gdb) #4 0x000000000043b59c in tr_bitfieldGetRaw (b=0x7ffff61bc8d0, byte_count=0x7ffff61bc968) at ../../Transmission/libtransmission/bitfield.c:171 171 assert( b->bit_count > 0 ); (gdb) list 166 tr_bitfieldGetRaw( const tr_bitfield * b, size_t * byte_count ) 167 { 168 const size_t n = get_bytes_needed( b->bit_count ); 169 uint8_t * bits = tr_new0( uint8_t, n ); 170 171 assert( b->bit_count > 0 ); 172 173 if( b->alloc_count ) { 174 assert( b->alloc_count <= n ); 175 memcpy( bits, b->bits, b->alloc_count ); (gdb) print *b $1 = {bits = 0x0, alloc_count = 0, bit_count = 0, true_count = 0, have_all_hint = false, have_none_hint = false} (gdb) print *byte_count $2 = 0 (gdb)

#5 0x000000000043ed21 in tr_cpCreatePieceBitfield (cp=0x7ffff03cb5a8, byte_count=0x7ffff61bc968) at ../../Transmission/libtransmission/completion.c:289 289 ret = tr_bitfieldGetRaw( &pieces, byte_count ); (gdb) list 284 flags[i] = tr_cpPieceIsComplete( cp, i ); 285 tr_bitfieldSetFromFlags( &pieces, flags, n ); 286 tr_free( flags ); 287 } 288 289 ret = tr_bitfieldGetRaw( &pieces, byte_count ); 290 tr_bitfieldDestruct( &pieces ); 291 return ret; 292 } 293 (gdb) print *cp $7 = {tor = 0x7ffff03cb380, blockBitfield = {bits = 0x0, alloc_count = 0, bit_count = 0, true_count = 0, have_all_hint = false, have_none_hint = true}, sizeWhenDoneLazy = 0,

sizeWhenDoneIsDirty = false, haveValidLazy = 0, haveValidIsDirty = false, sizeNow = 0}

(gdb) print *byte_count $8 = 0

All the crashes show the same, zero byte's etc... The next step is printing the tor pointer from the next up, which I'd prefer not to post, but can provide if needed.

It should be noted that the location for the data on my system is external and often the data can become unsynchronised.

Anyways I'm sure this is a bit incomplete, I'm just getting used to using gdb.

comment:18 Changed 7 years ago by JJR

  • Cc jj_rockingit@… added

I've been using a version of the transmissionrpc modified for Python 3.2. I've found that .init() can crash the transmission-daemon through the rpc handling under certain circumstances.

For example 'client.info(1)' will never crash the daemon. However 'client.info()' will crash the daemon, when a 'zero pieces' torrent is handled.

Using gdb to go through a daemon crash (please be patient, i've next to zero experience with gdb using console only):

0 0x00007ffff661ffa5 in raise () from /lib/libc.so.6
1 0x00007ffff6621428 in abort () from /lib/libc.so.6
2 0x00007ffff6619002 in assert_fail_base () from /lib/libc.so.6
3 0x00007ffff66190b2 in
assert_fail () from /lib/libc.so.6
4 0x000000000043b5a4 in tr_bitfieldGetRaw (b=0x7ffff61bc8d0, byte_count=0x7ffff61bc968) at ../../Transmission/libtransmission/bitfield.c:171[[BR]] 5 0x000000000043ed29 in tr_cpCreatePieceBitfield (cp=0x7ffff003f0a8,byte_count=0x7ffff61bc968) at ../../Transmission/libtransmission/completion.c:289[[BR]] 6 0x00000000004630a0 in addField (tor=0x7ffff003ee80, inf=0x7ffff003ee88, st=0x7ffff003f220, d=0x7ffff1fdc4b0, key=0x7ffff361cf28 "pieces") at ../../Transmission/libtransmission/rpcimpl.c:656[[BR]] 7 0x0000000000463acc in addInfo (tor=0x7ffff003ee80, d=0x7ffff1fdc4b0, fields=0x7ffff3071a50) at ../../Transmission/libtransmission/rpcimpl.c:748[[BR]] 8 0x0000000000463cc5 in torrentGet (session=0x6a9240, args_in=0x7ffff07e2fb0, args_out=0x7ffff35f4500, idle_data=0x0) at ../../Transmission/libtransmission/rpcimpl.c:785[[BR]] 9 0x0000000000466ef7 in request_exec (session=0x6a9240, request=0x7ffff61bcbb0, callback=0x456a05 <rpc_response_func>, callback_user_data=0x7ffff0b5ee80) at ../../Transmission/libtransmission/rpcimpl.c:1864[[BR]] 10 0x0000000000467110 in tr_rpc_request_exec_json (session=0x6a9240, request_json=0x7ffff34b993c, request_len=1052, callback=0x456a05 <rpc_response_func>, callback_user_data=0x7ffff0b5ee80) at ../../Transmission/libtransmission/rpcimpl.c:1907[[BR]] 11 0x0000000000456b8d in handle_rpc (req=0x7ffff34bc570, server=0x7ffff0004810) at ../../Transmission/libtransmission/rpc-server.c:553[[BR]] 12 0x0000000000457016 in handle_request (req=0x7ffff34bc570, arg=0x7ffff0004810) at ../../Transmission/libtransmission/rpc-server.c:667[[BR]] 13 0x00007ffff79b7eb5 in ?? () from /lib/libevent-2.0.so.5
14 0x00007ffff79b6e3d in ?? () from /lib/libevent-2.0.so.5
15 0x00007ffff79b6ff8 in ?? () from /lib/libevent-2.0.so.5
16 0x00007ffff79a72ba in ?? () from /lib/libevent-2.0.so.5
17 0x00007ffff799c8c4 in event_base_loop () from /lib/libevent-2.0.so.5
18 0x000000000042bfb7 in libeventThreadFunc (veh=0x6a9880) at ../../Transmission/libtransmission/trevent.c:248[[BR]] 19 0x00000000004146b1 in ThreadFunc? (_t=0x6a9a20) at ../../Transmission/libtransmission
/platform.c:118[[BR]] 20 0x00007ffff6996e0f in start_thread () from /lib/libpthread.so.0
21 0x00007ffff66cf05d in clone () from /lib/libc.so.6

This is always the same spot for all crashes.

Program received signal SIGABRT, Aborted. [Switching to Thread 0x7ffff61bd700 (LWP 2581)] 0x00007ffff661ffa5 in raise () from /lib/libc.so.6

(gdb) up #1 0x00007ffff6621428 in abort () from /lib/libc.so.6 (gdb) #2 0x00007ffff6619002 in assert_fail_base () from /lib/libc.so.6 (gdb) #3 0x00007ffff66190b2 in assert_fail () from /lib/libc.so.6 (gdb) #4 0x000000000043b59c in tr_bitfieldGetRaw (b=0x7ffff61bc8d0, byte_count=0x7ffff61bc968) at ../../Transmission/libtransmission/bitfield.c:171 171 assert( b->bit_count > 0 ); (gdb) list 166 tr_bitfieldGetRaw( const tr_bitfield * b, size_t * byte_count ) 167 { 168 const size_t n = get_bytes_needed( b->bit_count ); 169 uint8_t * bits = tr_new0( uint8_t, n ); 170 171 assert( b->bit_count > 0 ); 172 173 if( b->alloc_count ) { 174 assert( b->alloc_count <= n ); 175 memcpy( bits, b->bits, b->alloc_count ); (gdb) print *b $1 = {bits = 0x0, alloc_count = 0, bit_count = 0, true_count = 0, have_all_hint = false, have_none_hint = false} (gdb) print *byte_count $2 = 0 (gdb)

#5 0x000000000043ed21 in tr_cpCreatePieceBitfield (cp=0x7ffff03cb5a8, byte_count=0x7ffff61bc968) at ../../Transmission/libtransmission/completion.c:289 289 ret = tr_bitfieldGetRaw( &pieces, byte_count ); (gdb) list 284 flags[i] = tr_cpPieceIsComplete( cp, i ); 285 tr_bitfieldSetFromFlags( &pieces, flags, n ); 286 tr_free( flags ); 287 } 288 289 ret = tr_bitfieldGetRaw( &pieces, byte_count ); 290 tr_bitfieldDestruct( &pieces ); 291 return ret; 292 } 293 (gdb) print *cp $7 = {tor = 0x7ffff03cb380, blockBitfield = {bits = 0x0, alloc_count = 0, bit_count = 0, true_count = 0, have_all_hint = false, have_none_hint = true}, sizeWhenDoneLazy = 0,

sizeWhenDoneIsDirty = false, haveValidLazy = 0, haveValidIsDirty = false, sizeNow = 0}

(gdb) print *byte_count $8 = 0

All the crashes show the same, zero byte's etc... The next step is printing the tor pointer from the next up, which I'd prefer not to post, but can provide if needed.

It should be noted that the location for the data on my system is external and often the data can become unsynchronised.

Anyways I'm sure this is a bit incomplete, I'm just getting used to using gdb.

comment:19 Changed 7 years ago by JJR

just for testing, I commented out bitfield.c:171, the assertion that's stopping the daemon. I've been running it with this assertion turned off and now I've yet to crash the daemon. I don't yet understand what this was protecting? If there isn't meant to be zero piece tor's then shouldn't this be handled elsewhere? in a more pleasant way?

comment:20 Changed 7 years ago by jordan

JJR, I think the crash you're reporting today is already covered in #4932 and doesn't seem to be related to the double-free error.

comment:21 Changed 6 years ago by jordan

Is this still an issue? If so, could you please attach a backtrace from 2.70 or higher, which fixes the tr_bitfieldGetRaw() via #4932?

comment:22 Changed 6 years ago by jordan

  • Resolution set to duplicate
  • Status changed from new to closed

Closing as a duplicate of #4932

Note: See TracTickets for help on using tickets.