Quote
Appears that it was an rtorrent/freebsd problem.
For FreeBSD I applied this src patch
http://libtorrent.rakshasa.no/ticket/2661
If anyone runs into this problem do this
Code:
echo "--- src/thread_base.cc.org 2011-04-05 06:26:12.000000000 -0400
+++ src/thread_base.cc 2011-11-07 19:53:21.484185000 -0500
@@ -61,7 +61,7 @@
static const unsigned int max_size = 32;
- thread_queue_hack() { std::memset(this, 0, sizeof(thread_queue_hack)); }
+ thread_queue_hack() : m_lock(0) { std::memset(this, 0, sizeof(thread_queue_hack)); }
void lock() { while (!__sync_bool_compare_and_swap(&m_lock, 0, 1)) usleep(0); }
void unlock() { __sync_bool_compare_and_swap(&m_lock, 1, 0); }
@@ -201,10 +201,15 @@
void
ThreadBase::interrupt_main_polling() {
- do {
+ int sleep_length = 0;
+
+ while (ThreadBase::is_main_polling()) {
+ pthread_kill(main_thread->m_thread, SIGUSR1);
+
if (!ThreadBase::is_main_polling())
return;
- pthread_kill(main_thread->m_thread, SIGUSR1);
- } while (1);
+ usleep(sleep_length);
+ sleep_length = std::min(sleep_length + 50, 1000);
+ }
}" > /usr/ports/net-p2p/rtorrent/files/patch-src_thread_base.cc
if you've built previously you will need to deinstall the port with:
Code:
cd /usr/ports/net-p2p/rtorrent && make deinstall clean
then do:
Code:
cd /usr/ports/net-p2p/rtorrent && make install clean
Have the same problem (200%)
After applying your patch, i recieve:
Code:
pezzak# make install clean
===> Vulnerability check disabled, database not found
===> License check disabled, port has not defined LICENSE
===> Found saved configuration for rtorrent-0.8.9
===> Extracting for rtorrent-0.8.9
=> SHA256 Checksum OK for rtorrent-0.8.9.tar.gz.
===> Patching for rtorrent-0.8.9
===> Applying FreeBSD patches for rtorrent-0.8.9
1 out of 2 hunks failed--saving rejects to src/thread_base.cc.rej
=> Patch patch-src_thread_base.cc failed to apply cleanly.
*** Error code 1
Stop in /usr/ports/net-p2p/rtorrent.
*** Error code 1
Stop in /usr/ports/net-p2p/rtorrent.