{"action":"created","issue":{"url":"https://api.github.com/repos/arvidn/libtorrent/issues/134","labels_url":"https://api.github.com/repos/arvidn/libtorrent/issues/134/labels{/name}","comments_url":"https://api.github.com/repos/arvidn/libtorrent/issues/134/comments","events_url":"https://api.github.com/repos/arvidn/libtorrent/issues/134/events","html_url":"https://github.com/arvidn/libtorrent/issues/134","id":105029511,"number":134,"title":"torrent_handle::status() hangs up on a paused torrent","user":{"login":"evgenyzinoviev","id":6204306,"avatar_url":"https://avatars.githubusercontent.com/u/6204306?v=3","gravatar_id":"","url":"https://api.github.com/users/evgenyzinoviev","html_url":"https://github.com/evgenyzinoviev","followers_url":"https://api.github.com/users/evgenyzinoviev/followers","following_url":"https://api.github.com/users/evgenyzinoviev/following{/other_user}","gists_url":"https://api.github.com/users/evgenyzinoviev/gists{/gist_id}","starred_url":"https://api.github.com/users/evgenyzinoviev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evgenyzinoviev/subscriptions","organizations_url":"https://api.github.com/users/evgenyzinoviev/orgs","repos_url":"https://api.github.com/users/evgenyzinoviev/repos","events_url":"https://api.github.com/users/evgenyzinoviev/events{/privacy}","received_events_url":"https://api.github.com/users/evgenyzinoviev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-05T14:28:17Z","updated_at":"2015-09-05T17:25:42Z","closed_at":null,"body":"I have probably similar problem as described here: https://code.google.com/p/libtorrent/issues/detail?id=360\r\nI use libtorrent version 1.0.6, boost 1.56.0 on linux x86_64.\r\n\r\nFirst I add a torrent with ```auto_managed``` set to ```false```. Then I ```pause()``` it, and then I print it's status every second:\r\n\r\n```\r\n    torrent_status status;\r\n    do {\r\n        status = handle.status(0);\r\n        \r\n        printf(\"%.2f%% (down: %.1f kb/s, up: %.1f kb/s, peers: %d, paused: %d, auto_managed: %d, qp: %d) %s\\n\",\r\n               status.progress * 100,\r\n               (double) status.download_rate / 1000,\r\n               (double) status.upload_rate / 1000,\r\n               status.num_peers,\r\n               status.paused ? 1 : 0,\r\n               status.auto_managed ? 1 : 0,\r\n               status.queue_position,\r\n               torrent_handle_state_str[status.state]);\r\n        ::sleep(1);\r\n    } while (true);\r\n```\r\n\r\nThe first 6 iterations are ok, but on 7th iteration handle.status() hangs up, CPU usage grows up to 100%, and this is gdb backtrace:\r\n```\r\n(gdb) bt\r\n#0  0x00007ffff749854f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0\r\n#1  0x00007ffff7ab3bc3 in libtorrent::torrent_handle::status(unsigned int) const () from /usr/lib64/libtorrent-rasterbar.so.8\r\n#2  0x0000000000480ecd in simple_torrent_client (path=\"/home/user/Downloads/test.torrent\") at /home/user/dev/test_torrent/torrent.cpp:432\r\n#3  0x000000000046f283 in main (argc=1, argv=0x7fffffffd958) at /home/user/dev/test_torrent/main.cpp:66\r\n```\r\n\r\nThe same thing happens if I set ```auto_managed``` to ```true```, but prioritize all files to 0.\r\n\r\nBasically, I just want to start it without any file being downloaded, and if I don't use ```torrent_handle::status()```, everything is ok, but I want to get some information about a paused torrent. What am I doing wrong, or is it a libtorrent's bug, and if yes, how can I work around this?\r\n\r\nThank you!"},"comment":{"url":"https://api.github.com/repos/arvidn/libtorrent/issues/comments/137979312","html_url":"https://github.com/arvidn/libtorrent/issues/134#issuecomment-137979312","issue_url":"https://api.github.com/repos/arvidn/libtorrent/issues/134","id":137979312,"user":{"login":"arvidn","id":661450,"avatar_url":"https://avatars.githubusercontent.com/u/661450?v=3","gravatar_id":"","url":"https://api.github.com/users/arvidn","html_url":"https://github.com/arvidn","followers_url":"https://api.github.com/users/arvidn/followers","following_url":"https://api.github.com/users/arvidn/following{/other_user}","gists_url":"https://api.github.com/users/arvidn/gists{/gist_id}","starred_url":"https://api.github.com/users/arvidn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arvidn/subscriptions","organizations_url":"https://api.github.com/users/arvidn/orgs","repos_url":"https://api.github.com/users/arvidn/repos","events_url":"https://api.github.com/users/arvidn/events{/privacy}","received_events_url":"https://api.github.com/users/arvidn/received_events","type":"User","site_admin":false},"created_at":"2015-09-05T17:25:42Z","updated_at":"2015-09-05T17:25:42Z","body":"would you mind printing the stack of the thread that's stuck? i.e. when this happens, break and issue the command:\r\n\r\n`thread apply all bt`\r\n"}}