{"action":"created","issue":{"url":"https://api.github.com/repos/freebsd/poudriere/issues/278","labels_url":"https://api.github.com/repos/freebsd/poudriere/issues/278/labels{/name}","comments_url":"https://api.github.com/repos/freebsd/poudriere/issues/278/comments","events_url":"https://api.github.com/repos/freebsd/poudriere/issues/278/events","html_url":"https://github.com/freebsd/poudriere/issues/278","id":59852399,"number":278,"title":"Protection from oversized logs","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":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-04T19:56:43Z","updated_at":"2015-04-09T18:39:42Z","closed_at":null,"body":"I've just happened to build math/atlas in poudriere, and something bad had happened:\r\n```\r\n% du -Ah atlas-3.8.4_7,1.log\r\n606G    atlas-3.8.4_7,1.log\r\n```\r\nhowever, thankfully:\r\n```\r\n% du -h atlas-3.8.4_7,1.log\r\n7.9G    atlas-3.8.4_7,1.log\r\n```\r\nIf you're curious,\r\n```\r\n...\r\ngcc48 -I/wrkdirs/usr/ports/math/atlas/work/ATLAS/shared/..//CONFIG/include  -O2 -pipe  -fstack-protector -Wl,-rpath=/usr/local/lib/gcc48 -fno-strict-aliasing -o xatlbench atlbench.o atlconf_misc.o\r\natlconf_misc.o: In function `CmndResults':\r\natlconf_misc.c:(.text+0xbbb): warning: warning: tmpnam() possibly used unsafely; consider using mkstemp()\r\n/usr/bin/make -f Make.top time\r\n./xatlbench -dc /wrkdirs/usr/ports/math/atlas/work/ATLAS/shared/bin/INSTALL_LOG -dp /wrkdirs/usr/ports/math/atlas/work/ATLAS/shared/ARCHS/Core264SSE3\r\nEnter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: Enter Clock rate in Mhz [0]: (continues forever)\r\n```\r\nAnyway, I see two problems here:\r\n* Log will grow and eat all available diskspace\r\n* Even if process is killed, bzcat process which, as I understand, greps log for errors reported by pkg and ports framework, takes forever. Which is worse, it's run multiple times, and which is even more worse, log happens to be sparse file, so it'll grep 600GB instaead of 8.\r\n\r\nWhile port should be fixed of course (I'm thinking of adding IS_INTERACTIVE), it'd be nice to have basic protection against such problems as we have for builds taking too long.\r\nApparent (to protect from big spare files) log size may be monitored by a separate process and build marked as failed if the log size exceeds some sane value like 100MB-1GB."},"comment":{"url":"https://api.github.com/repos/freebsd/poudriere/issues/comments/91322591","html_url":"https://github.com/freebsd/poudriere/issues/278#issuecomment-91322591","issue_url":"https://api.github.com/repos/freebsd/poudriere/issues/278","id":91322591,"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":"2015-04-09T18:39:42Z","updated_at":"2015-04-09T18:39:42Z","body":"I'm guessing this is on a ZFS dataset with compression enabled. By default the log dir uses lz4."}}