Stay organized with collections
Save and categorize content based on your preferences.
This page describes using system call tracing to diagnose container sandbox
limitations, and assumes that you have some familiarity with system call tracing,
using tools such as strace or
dtruss. If you are not familiar with system call tracing, you should proceed
only after you contact Google Cloud support with the details of your problem
and have been invited to trace the system calls by the Google Cloud support team.
The container sandbox does not support all of the system calls that are
supported in Linux. You can use system call tracing tools such as strace
(Linux) or dtruss (macOS) to examine the syscalls made by your application, to
help determine the syscalls that are not supported by the sandbox.
Using strace (Linux)
If you're running your code on Linux, install and enable strace:
sudoapt-getinstallstrace
Run your application with strace by prefacing your usual invocation with
strace -f where -f means to trace all child threads. For example, if you
normally invoke your application with ./main, you can run it with strace by
invoking /usr/bin/strace -f ./main.
Viewing the logs returned by strace
The system logs from strace look like this:
Using dtruss (macOS)
If you're running your code on macOS, use dtrusss by prefacing your usual
invocation with dtruss -a from the command line, for example:
sudodtruss-a./main
For documentation, use the command man dtruss, or visit one of the
dtrace/drusss websites.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Tracing system calls\n\nThis page describes using system call tracing to diagnose container sandbox\nlimitations, and assumes that you have some familiarity with system call tracing,\nusing tools such as [`strace`](https://en.wikipedia.org/wiki/Strace) or\n`dtruss`. If you are not familiar with system call tracing, you should proceed\nonly after you contact Google Cloud support with the details of your problem\nand have been invited to trace the system calls by the Google Cloud support team.\n\nThe container sandbox does not support all of the system calls that are\nsupported in Linux. You can use system call tracing tools such as `strace`\n(Linux) or `dtruss` (macOS) to examine the syscalls made by your application, to\nhelp determine the syscalls that are not supported by the sandbox.\n\nUsing `strace` (Linux)\n----------------------\n\nIf you're running your code on Linux, install and enable `strace`: \n\n```bash\nsudo apt-get install strace\n```\n\nRun your application with strace by prefacing your usual invocation with\n`strace -f` where `-f` means to trace all child threads. For example, if you\nnormally invoke your application with `./main`, you can run it with strace by\ninvoking `/usr/bin/strace -f ./main`.\n\n### Viewing the logs returned by strace\n\nThe system logs from strace look like this:\n\nUsing `dtruss` (macOS)\n----------------------\n\nIf you're running your code on macOS, use `dtrusss` by prefacing your usual\ninvocation with `dtruss -a` from the command line, for example: \n\n```bash\nsudo dtruss -a ./main\n```\n\nFor documentation, use the command `man dtruss`, or visit one of the\n[`dtrace/drusss` websites](http://www.brendangregg.com/DTrace/dtruss_example.txt)."]]