{"action":"created","issue":{"url":"https://api.github.com/repos/freebsd/poudriere/issues/371","labels_url":"https://api.github.com/repos/freebsd/poudriere/issues/371/labels{/name}","comments_url":"https://api.github.com/repos/freebsd/poudriere/issues/371/comments","events_url":"https://api.github.com/repos/freebsd/poudriere/issues/371/events","html_url":"https://github.com/freebsd/poudriere/issues/371","id":125826559,"number":371,"title":"Lock files keep piling up in /tmp","user":{"login":"AMDmi3","id":474217,"avatar_url":"https://avatars.githubusercontent.com/u/474217?v=3","gravatar_id":"","url":"https://api.github.com/users/AMDmi3","html_url":"https://github.com/AMDmi3","followers_url":"https://api.github.com/users/AMDmi3/followers","following_url":"https://api.github.com/users/AMDmi3/following{/other_user}","gists_url":"https://api.github.com/users/AMDmi3/gists{/gist_id}","starred_url":"https://api.github.com/users/AMDmi3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AMDmi3/subscriptions","organizations_url":"https://api.github.com/users/AMDmi3/orgs","repos_url":"https://api.github.com/users/AMDmi3/repos","events_url":"https://api.github.com/users/AMDmi3/events{/privacy}","received_events_url":"https://api.github.com/users/AMDmi3/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-10T15:35:41Z","updated_at":"2016-01-11T21:55:24Z","closed_at":"2016-01-11T19:13:32Z","body":"I've noticed gtk apps hang in file/open dialog in /tmp. It turned out that there were thousands of lock files from poudriere. After cleaning /tmp up, they are piling up again:\r\n\r\n```\r\n% ls /tmp/.pou*\r\n/tmp/.poudriere-lock-12228-11-amd64-default-update_stats.flock\r\n/tmp/.poudriere-lock-12356-10-i386-default-update_stats.flock\r\n/tmp/.poudriere-lock-12966-9-amd64-default-update_stats.flock\r\n/tmp/.poudriere-lock-14614-10-amd64-default-noport-update_stats.flock\r\n/tmp/.poudriere-lock-19042-10-amd64-default-update_stats.flock\r\n/tmp/.poudriere-lock-19632-10-amd64-default-update_stats.flock\r\n/tmp/.poudriere-lock-24734-9-amd64-default-update_stats.flock\r\n/tmp/.poudriere-lock-26774-10-amd64-default-noport-update_stats.flock\r\n/tmp/.poudriere-lock-27699-10-amd64-default-noport-update_stats.flock\r\n/tmp/.poudriere-lock-28357-10-i386-default-update_stats.flock\r\n/tmp/.poudriere-lock-32007-10-amd64-default-noport-update_stats.flock\r\n/tmp/.poudriere-lock-38250-10-amd64-default-update_stats.flock\r\n/tmp/.poudriere-lock-38489-10-i386-default-update_stats.flock\r\n/tmp/.poudriere-lock-43389-9-i386-default-update_stats.flock\r\n/tmp/.poudriere-lock-44661-10-amd64-default-noport-update_stats.flock\r\n/tmp/.poudriere-lock-45957-10-amd64-default-update_stats.flock\r\n/tmp/.poudriere-lock-49253-9-i386-default-update_stats.flock\r\n/tmp/.poudriere-lock-50386-10-i386-default-update_stats.flock\r\n/tmp/.poudriere-lock-51416-10-amd64-default-update_stats.flock\r\n/tmp/.poudriere-lock-55764-10-amd64-default-update_stats.flock\r\n/tmp/.poudriere-lock-63117-10-amd64-default-update_stats.flock\r\n/tmp/.poudriere-lock-63348-10-amd64-default-noport-update_stats.flock\r\n/tmp/.poudriere-lock-63618-10-amd64-default-update_stats.flock\r\n/tmp/.poudriere-lock-65233-10-amd64-default-update_stats.flock\r\n/tmp/.poudriere-lock-70542-10-amd64-default-noport-update_stats.flock\r\n/tmp/.poudriere-lock-75574-10-amd64-default-update_stats.flock\r\n/tmp/.poudriere-lock-77202-10-amd64-default-update_stats.flock\r\n/tmp/.poudriere-lock-77315-9-amd64-default-update_stats.flock\r\n/tmp/.poudriere-lock-782-11-amd64-default-update_stats.flock\r\n/tmp/.poudriere-lock-8269-10-amd64-default-noport-update_stats.flock\r\n/tmp/.poudriere-lock-87612-9-amd64-default-update_stats.flock\r\n/tmp/.poudriere-lock-87883-9-i386-default-update_stats.flock\r\n/tmp/.poudriere-lock-8860-11-amd64-default-update_stats.flock\r\n/tmp/.poudriere-lock-93725-11-amd64-default-update_stats.flock\r\n/tmp/.poudriere-lock-96749-11-amd64-default-update_stats.flock\r\n/tmp/.poudriere-lock-9719-10-amd64-default-noport-update_stats.flock\r\n/tmp/.poudriere-lock-99493-9-i386-default-update_stats.flock\r\n```"},"comment":{"url":"https://api.github.com/repos/freebsd/poudriere/issues/comments/170703142","html_url":"https://github.com/freebsd/poudriere/issues/371#issuecomment-170703142","issue_url":"https://api.github.com/repos/freebsd/poudriere/issues/371","id":170703142,"user":{"login":"bdrewery","id":33693,"avatar_url":"https://avatars.githubusercontent.com/u/33693?v=3","gravatar_id":"","url":"https://api.github.com/users/bdrewery","html_url":"https://github.com/bdrewery","followers_url":"https://api.github.com/users/bdrewery/followers","following_url":"https://api.github.com/users/bdrewery/following{/other_user}","gists_url":"https://api.github.com/users/bdrewery/gists{/gist_id}","starred_url":"https://api.github.com/users/bdrewery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdrewery/subscriptions","organizations_url":"https://api.github.com/users/bdrewery/orgs","repos_url":"https://api.github.com/users/bdrewery/repos","events_url":"https://api.github.com/users/bdrewery/events{/privacy}","received_events_url":"https://api.github.com/users/bdrewery/received_events","type":"User","site_admin":false},"created_at":"2016-01-11T21:55:24Z","updated_at":"2016-01-11T21:55:24Z","body":"Good find. It's this code in `exit_handler` then. The JSON process is still running in the background after `cleanup` removes all lock files. This would lead to stale locks and lost locks:\r\n\r\n<pre>\r\n[ ${STATUS} -eq 1 ] && cleanup   \r\n                                 \r\nif was_a_bulk_run; then          \r\n        coprocess_stop html_json \r\n        coprocess_stop pkg_cacher\r\nfi                               \r\n</pre>"}}