Forum: NGINX expected behavior of --with-debug

5c81ae45f224300f577ae6378ce876d8?d=identicon&s=25 Jeff Kaufman (Guest)
on 2014-04-09 16:51
(Received via mailing list)
In ngx_pagespeed we interpret --with-debug to mean "include debugging
symbols and debug-only assertions".  Is this what most people using
nginx would expect?

(We distribute two precompiled versions of PSOL, "debug" and
"release", and we've been using --with-debug to switch between them.
Now we're wondering if this is an abuse of that flag, and if we should
instead add our own flag to specify which precompiled version to use.)
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2014-04-09 17:34
(Received via mailing list)
Hello!

On Wed, Apr 09, 2014 at 10:51:24AM -0400, Jeff Kaufman wrote:

> In ngx_pagespeed we interpret --with-debug to mean "include debugging
> symbols and debug-only assertions".  Is this what most people using
> nginx would expect?
>
> (We distribute two precompiled versions of PSOL, "debug" and
> "release", and we've been using --with-debug to switch between them.
> Now we're wondering if this is an abuse of that flag, and if we should
> instead add our own flag to specify which precompiled version to use.)

The --with-debug in nginx means "enable debug logging", which
includes logging itself and in some cases some additional
cleanup/tests to simplify debugging (e.g., ngx_queue_remove() will
set prev/next pointers to NULL on the element it removes from
queue).

Debug symbols are included by default for all supported compilers
regardless of configure options.  If desired, they can be stripped
later using strip(1).

Assertions as in assert(3) are not used in nginx.  In the
event-based server it's not a good idea to call abort(), as it
will affect multiple connections handled in the same process.  If
needed for debugging, there is ngx_debug_point() which can be
controlled using the debug_points directive, see
http://nginx.org/r/debug_points.

--
Maxim Dounin
http://nginx.org/
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.