{"action":"created","issue":{"url":"https://api.github.com/repos/libgit2/libgit2/issues/2857","labels_url":"https://api.github.com/repos/libgit2/libgit2/issues/2857/labels{/name}","comments_url":"https://api.github.com/repos/libgit2/libgit2/issues/2857/comments","events_url":"https://api.github.com/repos/libgit2/libgit2/issues/2857/events","html_url":"https://github.com/libgit2/libgit2/issues/2857","id":55722714,"number":2857,"title":"Segmentation fault when listing branches on Centos","user":{"login":"aiionx","id":428329,"avatar_url":"https://avatars.githubusercontent.com/u/428329?v=3","gravatar_id":"","url":"https://api.github.com/users/aiionx","html_url":"https://github.com/aiionx","followers_url":"https://api.github.com/users/aiionx/followers","following_url":"https://api.github.com/users/aiionx/following{/other_user}","gists_url":"https://api.github.com/users/aiionx/gists{/gist_id}","starred_url":"https://api.github.com/users/aiionx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aiionx/subscriptions","organizations_url":"https://api.github.com/users/aiionx/orgs","repos_url":"https://api.github.com/users/aiionx/repos","events_url":"https://api.github.com/users/aiionx/events{/privacy}","received_events_url":"https://api.github.com/users/aiionx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-28T07:19:28Z","updated_at":"2015-01-29T00:47:02Z","closed_at":null,"body":"Certain repositories will make the process crash when trying to list their branches.\r\nHave tried compiling libgit2 with CMAKE_BUILD_TYPE=Debug flag instead of RelWithDebInfo to avoid any optimization but issue is persistent.\r\n\r\n    <snip>/gitlab/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/rugged-0.21.0/rugged/rugged.so(git_refdb_iterator_next+0x14) [0x7fbe9b7443d4] <snip>/gitlab/vendor/bundle/ruby/2.1.0/gems/rugged-0.21.0/vendor/libgit2/src/refdb.c:147\r\n    <snip>/gitlab/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/rugged-0.21.0/rugged/rugged.so(git_branch_next+0x4d) [0x7fbe9b71922d] <snip>/gitlab/vendor/bundle/ruby/2.1.0/gems/rugged-0.21.0/vendor/libgit2/src/branch.c:162\r\n    <snip>/gitlab/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/rugged-0.21.0/rugged/rugged.so(+0x2f873) [0x7fbe9b6fb873] rugged_branch_collection.c:246\r\n\r\nFull stacktrace can be found here:\r\nhttps://gitlab.com/gitlab-org/gitlab-ce/issues/692\r\n"},"comment":{"url":"https://api.github.com/repos/libgit2/libgit2/issues/comments/71948275","html_url":"https://github.com/libgit2/libgit2/issues/2857#issuecomment-71948275","issue_url":"https://api.github.com/repos/libgit2/libgit2/issues/2857","id":71948275,"user":{"login":"aiionx","id":428329,"avatar_url":"https://avatars.githubusercontent.com/u/428329?v=3","gravatar_id":"","url":"https://api.github.com/users/aiionx","html_url":"https://github.com/aiionx","followers_url":"https://api.github.com/users/aiionx/followers","following_url":"https://api.github.com/users/aiionx/following{/other_user}","gists_url":"https://api.github.com/users/aiionx/gists{/gist_id}","starred_url":"https://api.github.com/users/aiionx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aiionx/subscriptions","organizations_url":"https://api.github.com/users/aiionx/orgs","repos_url":"https://api.github.com/users/aiionx/repos","events_url":"https://api.github.com/users/aiionx/events{/privacy}","received_events_url":"https://api.github.com/users/aiionx/received_events","type":"User","site_admin":false},"created_at":"2015-01-29T00:47:02Z","updated_at":"2015-01-29T00:47:02Z","body":"This is running on RHEL6. We tried to compile and use libgit2 version 0.21.5 but it fails with same error.\r\n\r\nThe code is running under sidekiq with 25 threads and we are seeing SEGV when there are multiple process running in sidekiq trying to read the Git repo branches.\r\n\r\nI suspect the issue is related to reading the repo branches in multi threaded environment for large repositories.\r\n\r\nThanks for your time\r\n\r\n"}}