{"action":"created","issue":{"url":"https://api.github.com/repos/google/shaka-packager/issues/448","repository_url":"https://api.github.com/repos/google/shaka-packager","labels_url":"https://api.github.com/repos/google/shaka-packager/issues/448/labels{/name}","comments_url":"https://api.github.com/repos/google/shaka-packager/issues/448/comments","events_url":"https://api.github.com/repos/google/shaka-packager/issues/448/events","html_url":"https://github.com/google/shaka-packager/issues/448","id":348125970,"node_id":"MDU6SXNzdWUzNDgxMjU5NzA=","number":448,"title":"Possible file name collision when --temp_dir is used","user":{"login":"kqyang","id":7329892,"node_id":"MDQ6VXNlcjczMjk4OTI=","avatar_url":"https://avatars1.githubusercontent.com/u/7329892?v=4","gravatar_id":"","url":"https://api.github.com/users/kqyang","html_url":"https://github.com/kqyang","followers_url":"https://api.github.com/users/kqyang/followers","following_url":"https://api.github.com/users/kqyang/following{/other_user}","gists_url":"https://api.github.com/users/kqyang/gists{/gist_id}","starred_url":"https://api.github.com/users/kqyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kqyang/subscriptions","organizations_url":"https://api.github.com/users/kqyang/orgs","repos_url":"https://api.github.com/users/kqyang/repos","events_url":"https://api.github.com/users/kqyang/events{/privacy}","received_events_url":"https://api.github.com/users/kqyang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-07T00:36:15Z","updated_at":"2018-08-07T00:37:09Z","closed_at":null,"author_association":"COLLABORATOR","body":"There is a chance of file name collision when `--temp_dir` is used: https://github.com/google/shaka-packager/blob/master/packager/file/file_util.cc#L22 as the `TempFilePath` is generated from `process_id`, `thread_id` and `current_time` (in micro-seconds precision). \r\n\r\nWe use different threads for different files, so it could happen only if we are extracting different streams (e.g. audio, video) from the same input file. \r\n\r\nIt affects only single segment output, and segment template output is not affected. This is because we use temporary files to store the data before the init subsegment is finalized in single segment output.\r\n\r\nIf there are multiple streams from the same input source, `TempFilePath` ought to be called multiple times and multiple temporary files ought to be used. But because of this bug, the same file path may be returned from multiple calls of `TempFilePath`. This results in multiple streams to be written to the same temporary file. The result file will be corrupted and non-playable.\r\n\r\nWe have not received any bug reports related to this so the chance of occurring should be very low.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/google/shaka-packager/issues/comments/410895481","html_url":"https://github.com/google/shaka-packager/issues/448#issuecomment-410895481","issue_url":"https://api.github.com/repos/google/shaka-packager/issues/448","id":410895481,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDg5NTQ4MQ==","user":{"login":"kqyang","id":7329892,"node_id":"MDQ6VXNlcjczMjk4OTI=","avatar_url":"https://avatars1.githubusercontent.com/u/7329892?v=4","gravatar_id":"","url":"https://api.github.com/users/kqyang","html_url":"https://github.com/kqyang","followers_url":"https://api.github.com/users/kqyang/followers","following_url":"https://api.github.com/users/kqyang/following{/other_user}","gists_url":"https://api.github.com/users/kqyang/gists{/gist_id}","starred_url":"https://api.github.com/users/kqyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kqyang/subscriptions","organizations_url":"https://api.github.com/users/kqyang/orgs","repos_url":"https://api.github.com/users/kqyang/repos","events_url":"https://api.github.com/users/kqyang/events{/privacy}","received_events_url":"https://api.github.com/users/kqyang/received_events","type":"User","site_admin":false},"created_at":"2018-08-07T00:37:09Z","updated_at":"2018-08-07T00:37:09Z","author_association":"COLLABORATOR","body":"The recent Appveyor test failure is caused by this bug: https://ci.appveyor.com/project/shaka/shaka-packager/build/job/2t0arfp6plq880va."}}
{"actor":{"display_login":"kqyang"}}