On Mon, 23 Jun 2014 18:13:31 GMT, Yiannis Tsirikoglou wrote:

I have a test application running on an Amazon EC2 with nginx.

I got this error and the app crashed.

Path 'w00tw00t.at.blackhats.romanian.anti-sec:)' -> '/w00tw00t.at.blackhats.roma
nian.anti-sec:)'
Task terminated with unhandled exception: Trying to append absolute path.
Full error: core.exception.AssertError@../../../../root/.dub/packages/vibe-d-mas
ter/source/vibe/inet/path.d(186): Trying to append absolute path.
(...)
Segmentation fault (core dumped)

I think this w00tw00t kind of attack contains a GET request without a host.

Recently, assertion handling has been changed to let the application terminate by default. You can define a version VibeDebugCatchAll (see also http://vibed.org/docs#compile-time-configuration) to let vibe.d catch and gracefully handle them. But this isn't recommended for production sites, as it may leave the application in an undefined state or could result in resource/memory leaks.

However, due to this change it has become obvious that there is an explicit input validation check missing. I'll commit a fix.

Additionally how can somebody be notified when an app is crashing on the server? Could it be programmed in the vibe.d app itself or by using another application or script?

You could define your own main() and then add a try { ... } catch (Throwable) { ... } around runEventLoop() and then invoke an external process for sending a mail (assuming that the program state is corrupted at this point). Alternatively, it may make more sense to write a little shell script that continuously runs the application and pipes the stdout/stderr streams to a file. Whenever the application has terminated, it would then mail the last tail -n ... lines of that file for examination. This is about how I do it for this site.