Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aquatone Doesn't Cleanup Tmp files #474

Open
0xdade opened this issue Sep 3, 2020 · 1 comment
Open

Aquatone Doesn't Cleanup Tmp files #474

0xdade opened this issue Sep 3, 2020 · 1 comment
Labels
agent affecting natlas-agent bug Something isn't working

Comments

@0xdade
Copy link
Member

0xdade commented Sep 3, 2020

Version:
Latest

Describe the bug
Chrome stops producing screenshots when /tmp has too many entries in it. Aquatone isn't cleaning up it's tmp files, so the longer an agent runs, the more likely it will run into this. Especially if one agent is running many many scan threads (it was first noticed on an agent running 250 scan threads).

To Reproduce

We can probably mock it like so:

Steps to reproduce the behavior:

  1. Create a ton of directories in /tmp via a bash loop
  2. chromium-browser --headless --screenshot="test.png" https://0xda.de
  3. Get error:

Expected behavior
These files shouldn't be left around forever. I'm not sure if this is something that a smarter init system would fix or if it's a problem with aquatone, or if the underlying problem is that chromium seems to choke when tmp is really full.

Screenshots / Logs

[0903/183339.224279:WARNING:discardable_shared_memory_manager.cc(194)] Less than 64MB of free space in temporary directory for shared memory files: 3
[0903/183339.869269:ERROR:broker_posix.cc(46)] Received unexpected number of handles
[0903/183339.905041:ERROR:broker_posix.cc(46)] Received unexpected number of handles
[0903/183339.905283:ERROR:validation_errors.cc(87)] Invalid message: VALIDATION_ERROR_DESERIALIZATION_FAILED
[0903/183339.905331:ERROR:browser_child_process_host_impl.cc(726)] Terminating child process for bad message: Received bad user message: Validation failed for viz.mojom.CopyOutputResultSender.0  [VALIDATION_ERROR_DESERIALIZATION_FAILED]
[0903/183339.909734:WARNING:gpu_process_host.cc(1233)] The GPU process has crashed 1 time(s)
[0903/183339.925934:WARNING:gpu_process_host.cc(975)] Reinitialized the GPU process after a crash. The reported initialization time was 13 ms
[0903/183339.938050:ERROR:broker_posix.cc(46)] Received unexpected number of handles
[0903/183339.938268:ERROR:validation_errors.cc(87)] Invalid message: VALIDATION_ERROR_DESERIALIZATION_FAILED
[0903/183339.938324:ERROR:browser_child_process_host_impl.cc(726)] Terminating child process for bad message: Received bad user message: Validation failed for viz.mojom.CopyOutputResultSender.0  [VALIDATION_ERROR_DESERIALIZATION_FAILED]
[0903/183339.941788:WARNING:gpu_process_host.cc(1233)] The GPU process has crashed 2 time(s)
[0903/183339.957164:WARNING:gpu_process_host.cc(975)] Reinitialized the GPU process after a crash. The reported initialization time was 13 ms
[0903/183339.957734:ERROR:headless_shell.cc(531)] Capture screenshot failed
@0xdade 0xdade added bug Something isn't working agent affecting natlas-agent labels Sep 3, 2020
@0xdade
Copy link
Member Author

0xdade commented Sep 3, 2020

Temporary workaround can be a cron job on the host that does something like:

docker exec natlas_agent find /tmp -name aquatone-chrome\* -type d -mmin +60 -delete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent affecting natlas-agent bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant