{"action":"created","issue":{"url":"https://api.github.com/repos/arrayfire/arrayfire/issues/2115","repository_url":"https://api.github.com/repos/arrayfire/arrayfire","labels_url":"https://api.github.com/repos/arrayfire/arrayfire/issues/2115/labels{/name}","comments_url":"https://api.github.com/repos/arrayfire/arrayfire/issues/2115/comments","events_url":"https://api.github.com/repos/arrayfire/arrayfire/issues/2115/events","html_url":"https://github.com/arrayfire/arrayfire/issues/2115","id":312043002,"number":2115,"title":"Freeze in cpu::MemoryManager::nativeFree()","user":{"login":"WilliamTambellini","id":109458,"avatar_url":"https://avatars3.githubusercontent.com/u/109458?v=4","gravatar_id":"","url":"https://api.github.com/users/WilliamTambellini","html_url":"https://github.com/WilliamTambellini","followers_url":"https://api.github.com/users/WilliamTambellini/followers","following_url":"https://api.github.com/users/WilliamTambellini/following{/other_user}","gists_url":"https://api.github.com/users/WilliamTambellini/gists{/gist_id}","starred_url":"https://api.github.com/users/WilliamTambellini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WilliamTambellini/subscriptions","organizations_url":"https://api.github.com/users/WilliamTambellini/orgs","repos_url":"https://api.github.com/users/WilliamTambellini/repos","events_url":"https://api.github.com/users/WilliamTambellini/events{/privacy}","received_events_url":"https://api.github.com/users/WilliamTambellini/received_events","type":"User","site_admin":false},"labels":[{"id":156639115,"url":"https://api.github.com/repos/arrayfire/arrayfire/labels/CPU","name":"CPU","color":"446688","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-04-06T16:42:18Z","updated_at":"2018-04-09T16:52:43Z","closed_at":null,"author_association":"NONE","body":"Hi @umar456 \r\nWe are experimenting a freeze with the cpu backend: my app, running in single thread mode, simply stops (but does nt crash).\r\nWhen that happens, my app does not use any cpu/cores, probably a deadlock.\r\nWith AF 3.6.0 (master) using the spare CPU backend on CentOS 7 :  \r\n\r\n```\r\n#0 0x00007fffe5cee7f9 in syscall () from /lib64/libc.so.6\r\n#1 0x00007ffff78e64d0 in std::__atomic_futex_unsigned_base::_M_futex_wait_until (this=<optimized out>, __addr=0x1827f010, __val=2147483648,\r\n__has_timeout=<optimized out>, __s=..., __ns=...) at ../../../../../gcc-6.1.0/libstdc+-v3/src/c+11/futex.cc:55\r\n#2 0x00007fffd67f9010 in cpu::MemoryManager::nativeFree(void*) ()\r\nfrom libafcpu.so.3\r\n#3 0x00007fffd67fb250 in common::MemoryManager<cpu::MemoryManager>::cleanDeviceMemoryManager(int) ()\r\nfrom libafcpu.so.3\r\n#4 0x00007fffd67fb812 in common::MemoryManager<cpu::MemoryManager>::alloc(unsigned long, bool) ()\r\nfrom libafcpu.so.3\r\n#5 0x00007fffd67fb912 in std::unique_ptr<float [], std::function<void (float*)> > cpu::memAlloc<float>(unsigned long const&) ()\r\nfrom libafcpu.so.3\r\n#6 0x00007fffd648d631 in cpu::Array<float>::Array(af::dim4) ()\r\nfrom libafcpu.so.3\r\n#7 0x00007fffd648d72c in cpu::Array<float> cpu::createEmptyArray<float>(af::dim4 const&) ()\r\nfrom libafcpu.so.3\r\n#8 0x00007fffd691e91b in cpu::Array<float> cpu::reduce<(af_op_t)18, float, float>(cpu::Array<float> const&, int, bool, double) ()\r\nfrom libafcpu.so.3\r\n#9 0x00007fffd7215a28 in af_max ()\r\nfrom libafcpu.so.3\r\n#10 0x00007fffe701b70d in af_err unified::AFSymbolManager::call<void*, void, int>(char const*, void*, void, int) ()\r\nfrom libaf.so.3\r\n#11 0x00007fffe700eaf4 in af_max ()\r\nfrom libaf.so.3\r\n#12 0x00007fffe71e7328 in af::max(af::array const&, int) ()\r\n```\r\n\r\nAt the moment, sorry but no codes to reproduce. \r\n"},"comment":{"url":"https://api.github.com/repos/arrayfire/arrayfire/issues/comments/379819802","html_url":"https://github.com/arrayfire/arrayfire/issues/2115#issuecomment-379819802","issue_url":"https://api.github.com/repos/arrayfire/arrayfire/issues/2115","id":379819802,"user":{"login":"WilliamTambellini","id":109458,"avatar_url":"https://avatars3.githubusercontent.com/u/109458?v=4","gravatar_id":"","url":"https://api.github.com/users/WilliamTambellini","html_url":"https://github.com/WilliamTambellini","followers_url":"https://api.github.com/users/WilliamTambellini/followers","following_url":"https://api.github.com/users/WilliamTambellini/following{/other_user}","gists_url":"https://api.github.com/users/WilliamTambellini/gists{/gist_id}","starred_url":"https://api.github.com/users/WilliamTambellini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WilliamTambellini/subscriptions","organizations_url":"https://api.github.com/users/WilliamTambellini/orgs","repos_url":"https://api.github.com/users/WilliamTambellini/repos","events_url":"https://api.github.com/users/WilliamTambellini/events{/privacy}","received_events_url":"https://api.github.com/users/WilliamTambellini/received_events","type":"User","site_admin":false},"created_at":"2018-04-09T16:52:43Z","updated_at":"2018-04-09T16:52:43Z","author_association":"NONE","body":"As usual, this is happening using my full proprietary production program for which I cannot share any source code. Reproducing in a simple main() using only AF would take days. :("}}
{"actor":{"display_login":"WilliamTambellini"}}