{"action":"created","issue":{"url":"https://api.github.com/repos/BVLC/caffe/issues/4783","repository_url":"https://api.github.com/repos/BVLC/caffe","labels_url":"https://api.github.com/repos/BVLC/caffe/issues/4783/labels{/name}","comments_url":"https://api.github.com/repos/BVLC/caffe/issues/4783/comments","events_url":"https://api.github.com/repos/BVLC/caffe/issues/4783/events","html_url":"https://github.com/BVLC/caffe/issues/4783","id":179935627,"number":4783,"title":"malloc error on macOS Sierra 10.12","user":{"login":"vikrantvm","id":2904934,"avatar_url":"https://avatars.githubusercontent.com/u/2904934?v=3","gravatar_id":"","url":"https://api.github.com/users/vikrantvm","html_url":"https://github.com/vikrantvm","followers_url":"https://api.github.com/users/vikrantvm/followers","following_url":"https://api.github.com/users/vikrantvm/following{/other_user}","gists_url":"https://api.github.com/users/vikrantvm/gists{/gist_id}","starred_url":"https://api.github.com/users/vikrantvm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vikrantvm/subscriptions","organizations_url":"https://api.github.com/users/vikrantvm/orgs","repos_url":"https://api.github.com/users/vikrantvm/repos","events_url":"https://api.github.com/users/vikrantvm/events{/privacy}","received_events_url":"https://api.github.com/users/vikrantvm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-29T02:07:51Z","updated_at":"2016-10-01T04:03:16Z","closed_at":null,"body":"I was able to compile and run an example (mnist), but when the example starts I see the following:\r\n\r\n`caffe(51829,0x7fffc23a93c0) malloc: *** malloc_zone_unregister() failed for 0x7fffc239f000`\r\n\r\nThe example proceeds to run, but when I open up the python interpreter and `import caffe`, I see a similar error and the interepreter crashes:\r\n`import caffe`\r\n`Python(14990,0x7fffc23a93c0) malloc: *** malloc_zone_unregister() failed for 0x7fffc239f000\r\n/usr/local/lib/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.\r\n  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')`\r\n`[1]    14990 illegal hardware instruction  python`\r\n\r\nNot sure what causes this?"},"comment":{"url":"https://api.github.com/repos/BVLC/caffe/issues/comments/250890895","html_url":"https://github.com/BVLC/caffe/issues/4783#issuecomment-250890895","issue_url":"https://api.github.com/repos/BVLC/caffe/issues/4783","id":250890895,"user":{"login":"cepiross","id":6228108,"avatar_url":"https://avatars.githubusercontent.com/u/6228108?v=3","gravatar_id":"","url":"https://api.github.com/users/cepiross","html_url":"https://github.com/cepiross","followers_url":"https://api.github.com/users/cepiross/followers","following_url":"https://api.github.com/users/cepiross/following{/other_user}","gists_url":"https://api.github.com/users/cepiross/gists{/gist_id}","starred_url":"https://api.github.com/users/cepiross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cepiross/subscriptions","organizations_url":"https://api.github.com/users/cepiross/orgs","repos_url":"https://api.github.com/users/cepiross/repos","events_url":"https://api.github.com/users/cepiross/events{/privacy}","received_events_url":"https://api.github.com/users/cepiross/received_events","type":"User","site_admin":false},"created_at":"2016-10-01T04:03:16Z","updated_at":"2016-10-01T04:03:16Z","body":"I also experienced a similar error at opengl branch on Sierra.\r\n\r\ncase 1)\r\n`Python 2.7.12 (default, Sep 30 2016, 14:23:15) \r\n[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.38)] on darwin\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.`\r\n`>>> import caffe`\r\n`Python(87258,0x7fffe2b8b3c0) malloc: *** malloc_zone_unregister() failed for 0x7fffe2b81000`\r\n`/Users/cepiross/Documents/srcs/caffe.git.viennacl.build/install/python/caffe/pycaffe.py:13: RuntimeWarning: to-Python converter for std::__1::vector<int, std::__1::allocator<int> > already registered; second conversion method ignored.\r\n  from ._caffe import \\`\r\n`>>> quit()`\r\n\r\ncase 2)\r\n`$ make pytest`\r\n`[  1%] Built target proto`\r\n`[100%] Built target caffe`\r\n`[100%] Built target pycaffe`\r\n`Python(85579,0x7fffe2b8b3c0) malloc: *** malloc_zone_unregister() failed for 0x7fffe2b81000`\r\n`caffe/pycaffe.py:13: RuntimeWarning: to-Python converter for std::__1::vector<int, std::__1::allocator<int> > already registered; second conversion method ignored.\r\n  from ._caffe import \\`\r\n`.................WARNING: Logging before InitGoogleLogging() is written to STDERR`\r\n`I0930 23:27:13.613234 3803755456 net.cpp:346] The NetState phase (1) differed from the phase (0) specified by a rule in layer train_data`\r\n`I0930 23:27:13.613450 3803755456 net.cpp:385] The NetState did not contain stage 'val' specified by a rule in layer val_data`\r\n`I0930 23:27:13.613469 3803755456 net.cpp:346] The NetState phase (1) differed from the phase (0) specified by a rule in layer loss`\r\n`I0930 23:27:13.613474 3803755456 net.cpp:385] The NetState did not contain stage 'val' specified by a rule in layer loss`\r\n`... continue to proceed successfully ...`\r\n\r\nAfter googling other cases, I suspect that the culprit would be related to `malloc`.\r\nAccording to https://github.com/jemalloc/jemalloc/issues/420, Apple seems to change libsystem_malloc, which affects memory allocation in some way.\r\n\r\nSince investigating causality, I have no idea where to start. But if anybody tries to fix this problem, please consider it at first."}}
{"actor":{"display_login":"cepiross"}}