{"action":"created","issue":{"url":"https://api.github.com/repos/davidhubbard/v0lum3/issues/1","repository_url":"https://api.github.com/repos/davidhubbard/v0lum3","labels_url":"https://api.github.com/repos/davidhubbard/v0lum3/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/davidhubbard/v0lum3/issues/1/comments","events_url":"https://api.github.com/repos/davidhubbard/v0lum3/issues/1/events","html_url":"https://github.com/davidhubbard/v0lum3/issues/1","id":169252951,"number":1,"title":"vkDeviceWaitIdle: returned VK_ERROR_DEVICE_LOST after loop 666","user":{"login":"davidhubbard","id":4205476,"avatar_url":"https://avatars.githubusercontent.com/u/4205476?v=3","gravatar_id":"","url":"https://api.github.com/users/davidhubbard","html_url":"https://github.com/davidhubbard","followers_url":"https://api.github.com/users/davidhubbard/followers","following_url":"https://api.github.com/users/davidhubbard/following{/other_user}","gists_url":"https://api.github.com/users/davidhubbard/gists{/gist_id}","starred_url":"https://api.github.com/users/davidhubbard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidhubbard/subscriptions","organizations_url":"https://api.github.com/users/davidhubbard/orgs","repos_url":"https://api.github.com/users/davidhubbard/repos","events_url":"https://api.github.com/users/davidhubbard/events{/privacy}","received_events_url":"https://api.github.com/users/davidhubbard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-03T22:50:56Z","updated_at":"2016-08-09T15:57:50Z","closed_at":null,"body":"X server freezes up and application hangs. This might be a resource leak, since it is affected by how many times the main loop runs.\r\n\r\nSee the code in main/main.cpp:\r\n```\r\n\tfprintf(stderr, \"vkQueuePresentKHR done, end of loop %d\\n\", count);\r\n\t//\r\n\t// Probability of vkDeviceWaitIdle() failing with error:\r\n\t// \"W ParameterValidation: code9: vkDeviceWaitIdle: returned VK_ERROR_DEVICE_LOST, indicating\r\n\t// that the logical device has been lost\"\r\n\t// \"vkDeviceWaitIdle returned -4\"\r\n\t// 0 <= count <= 664: 0%\r\n\t// 0 <= count <= 665: 5%\r\n\t// 0 <= count <= 666: 100%\r\n\t//\r\n\tcount++;\r\n\tif (count > 666) break;\r\n```\r\n\r\nThe relevant output is:\r\n```\r\nvkQueuePresentKHR done, end of loop 665\r\nvkAcquireNextImageKHR\r\nvkQueueSubmit\r\nD MEM: code0: Details of Memory Object list (of size 0 elements)\r\nD MEM: code0: =============================\r\nD MEM: code0: Details of CB list (of size 3 elements)\r\nD MEM: code0: ==================\r\nD MEM: code0:     CB Info (0x0x2581dd0) has CB 0x0x2588720\r\nD MEM: code0:     CB Info (0x0x257ecf0) has CB 0x0x2587900\r\nD MEM: code0:     CB Info (0x0x2592be0) has CB 0x0x257f5d0\r\nvkQueuePresentKHR\r\nvkQueuePresentKHR done, end of loop 666\r\nvkDeviceWaitIdle\r\n```\r\n\r\nAt this point, the X server hangs (the mouse cursor stops responding), the app hangs, and after ~2 seconds the app resumes with:\r\n\r\n```\r\nW ParameterValidation: code9: vkDeviceWaitIdle: returned VK_ERROR_DEVICE_LOST, indicating that the logical device has been lost\r\nvkDeviceWaitIdle returned -4\r\n```\r\n\r\nnvidia-smi output:\r\n```\r\n$ nvidia-smi\r\nWed Aug  3 15:50:44 2016       \r\n+-----------------------------------------------------------------------------+\r\n| NVIDIA-SMI 367.35                 Driver Version: 367.35                    |\r\n|-------------------------------+----------------------+----------------------+\r\n| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |\r\n| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |\r\n|===============================+======================+======================|\r\n|   0  Quadro K600         Off  | 0000:04:00.0      On |                  N/A |\r\n| 25%   51C    P8    N/A /  N/A |    183MiB /   979MiB |      0%      Default |\r\n+-------------------------------+----------------------+----------------------+\r\n|   1  GeForce GTX TIT...  Off  | 0000:05:00.0     Off |                  N/A |\r\n| 22%   36C    P8    15W / 250W |      1MiB / 12206MiB |      0%      Default |\r\n+-------------------------------+----------------------+----------------------+\r\n                                                                               \r\n+-----------------------------------------------------------------------------+\r\n| Processes:                                                       GPU Memory |\r\n|  GPU       PID  Type  Process name                               Usage      |\r\n|=============================================================================|\r\n|    0      3817    G   /usr/bin/X                                      96MiB |\r\n|    0      5543    G   ...iveTaskBlocking/Enabled/StrictSecureCooki    86MiB |\r\n+-----------------------------------------------------------------------------+\r\n```"},"comment":{"url":"https://api.github.com/repos/davidhubbard/v0lum3/issues/comments/238599892","html_url":"https://github.com/davidhubbard/v0lum3/issues/1#issuecomment-238599892","issue_url":"https://api.github.com/repos/davidhubbard/v0lum3/issues/1","id":238599892,"user":{"login":"davidhubbard","id":4205476,"avatar_url":"https://avatars.githubusercontent.com/u/4205476?v=3","gravatar_id":"","url":"https://api.github.com/users/davidhubbard","html_url":"https://github.com/davidhubbard","followers_url":"https://api.github.com/users/davidhubbard/followers","following_url":"https://api.github.com/users/davidhubbard/following{/other_user}","gists_url":"https://api.github.com/users/davidhubbard/gists{/gist_id}","starred_url":"https://api.github.com/users/davidhubbard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidhubbard/subscriptions","organizations_url":"https://api.github.com/users/davidhubbard/orgs","repos_url":"https://api.github.com/users/davidhubbard/repos","events_url":"https://api.github.com/users/davidhubbard/events{/privacy}","received_events_url":"https://api.github.com/users/davidhubbard/received_events","type":"User","site_admin":false},"created_at":"2016-08-09T15:57:50Z","updated_at":"2016-08-09T15:57:50Z","body":"Good idea! If this turns out to be the case, then vulkan-tutorial.com needs to be updated. I am using a refactored version of this code:\r\n\r\nhttps://vulkan-tutorial.com/Drawing_a_triangle/Swap_chain_recreation"}}
{"actor":{"display_login":"davidhubbard"}}