Has anyone encountered with this error?

Has anyone encountered with this error?
failed during stage ‘building site’: Build script returned non-zero exit code: 139

From a quick google search it means that the program crashed before it could exit, giving you this 139 error.

Do you have any other output from the logs?

What are you trying to deploy?

Our build image is a Linux system and in most cases an exit code of over 128 represents a process shutting down because of a signal it received from the operating system. There is info about this here:

  • (see the second answer)

Quoting part of the second answer (itself quoting the Advanced Bash Scripting Guide):

128+n: Fatal error signal “n”

So, for 139, this was signal 11 (because 139-128=11). Checking the signal manpage, (using man 7 signal) I see this:

SIGSEGV      11       Core    Invalid memory reference

So this appear to be a segmentation fault (aka segfault) during the build process.

Which static site generator are you using? Would you be willing to copy/paste the error message (and surrounding log lines for context) here?