Re: [users@httpd] ap_log_error dumps on apache start with apache 2.4

2016-09-27 Thread megha chauhan
Hello Eric,

Can you please elaborate your questions.
What are the details you require from my end?

Best Regards,
Megha

On Mon, Sep 19, 2016 at 5:35 PM, Eric Covener  wrote:

> On Mon, Sep 19, 2016 at 1:39 AM, megha chauhan  wrote:
> > Hello Eric,
> >
> > The code is compiled with the below headers:
> >
> > APA24_ORG = httpd-$(APA24_VERSION)
> >
> > APA24_DIR = httpd-$(APA24_VERSION)
> >
> > APA24_INSTDIR = $(shell pwd)/$(APA24_DIR)/inst
> >
> > APA24_TAZ = $(APA24_ORG).tar.gz
> >
> >
> >
> > APA24_IDIR= $(APA24_INSTDIR)/include
> >
> >
> >
> > APA24_HDR_INCL = $(APA24_DIR)/include
> >
> > Also in the source code I have included the headers
> >
> > #include “httpd.h”
> >
> > #include “http_log.h”
> >
> >
> >
> > Same issue persists.
> >
> >
> >
> > Should we include any other header?
> >
> > Best Regards,
> >
> > Megha
>
> I'd suggest looking more closely at how this file is actually
> compiled, what it looks like after the pre-processor, and what symbols
> it has undefined rather than how it's intended to be compiled.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [users@httpd] ap_log_error dumps on apache start with apache 2.4

2016-09-18 Thread megha chauhan
Hello Eric,

The code is compiled with the below headers:

APA24_ORG = httpd-$(APA24_VERSION)

APA24_DIR = httpd-$(APA24_VERSION)

APA24_INSTDIR = $(shell pwd)/$(APA24_DIR)/inst

APA24_TAZ = $(APA24_ORG).tar.gz



APA24_IDIR= $(APA24_INSTDIR)/include



APA24_HDR_INCL = $(APA24_DIR)/include

Also in the source code I have included the headers

#include “httpd.h”

#include “http_log.h”



Same issue persists.



Should we include any other header?

Best Regards,

Megha
-- Forwarded message --
From: Eric Covener 
Date: Fri, Sep 16, 2016 at 3:59 PM
Subject: Re: [users@httpd] ap_log_error dumps on apache start with apache
2.4
To: users@httpd.apache.org


On Fri, Sep 16, 2016 at 1:20 AM, megha chauhan  wrote:
> The same code is working for apache 2.2.

Did you compile this code properly against 2.4 headers? ap_log_error
is a macro in 2.4.  Your binary should only show ap_log_error_ as
undefined with nm otherwise something is fishy.

Also "r" is a very confusing variable name for a server_rec.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org


[users@httpd] ap_log_error dumps on apache start with apache 2.4

2016-09-15 Thread megha chauhan
Hello,



I have built a shared module on apache 2.4. I could get the apache build
succesfull. On apache start there is a dump at the below line:



#ifdef APA24

//ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r, trcStr.getStr());

if (r != NULL) {

ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r, "test");



}



Below is the dump analysis:

ApaTracer::outP(int,Tracer::Verbosity,String&)(this = 0x0001100997b0,
sysmsg = 0, _lvl = Tracer::Info, trcStr = &(...)), line 92 in
"apatracer.cpp"

tracer.Tracer::out(Tracer::Verbosity,String&)(this = 0x0001100997b0,
_lvl = Info, msg = &(...)), line 97 in "tracer.cpp"

ContentServerState::~ContentServerState()(this = 0x000110098ed0,
__dtorFlags = 0, __vtt = (nil)), line 26 in "csrvstate.cpp"

ApaCSServerState::~ApaCSServerState()(this = 0x000110098ed0,
__dtorFlags = 3, __vtt = (nil)), line 32 in "apacsrvstate.cpp"

cs_main_init_cleanup(void*)(obj = (nil)), line 165 in "apacsrvstate.cpp"

run_cleanups(0x1100219d8) at 0x90002a661b8

apr_pool_clear(0x1100219b8) at 0x90002a6709c

main(0x20002, 0xa80) at 0x13bf8



I derefernce the structure variable r which is of type server_rec(apache
struct) and below is the value



(dbx) p *r

(process = 0x00011001fa88, next = (nil), error_fname =
"logs/error_log", error_log = 0x00011001fa10, log = (module_levels =
(nil), level = 4), module_config = 0x000110053420, lookup_defaults =
0x000110054ef8, defn_name = (nil), defn_line_number = 0, is_virtual =
'\0', port = 0, server_scheme = (nil), server_admin = "y...@example.com",
server_hostname = "isi081.wdf.sap.corp", addrs = 0x00011004e410,
timeout = 6000, keep_alive_timeout = 500, keep_alive_max = 100,
keep_alive = 1, names = (nil), wild_names = (nil), path = (nil), pathlen =
0, limit_req_line = 8190, limit_req_fieldsize = 8190, limit_req_fields =
100, context = (nil))



I do not see any corruption in memory. But still there is a dump on apache
start.

If i comment out this line, then everything works as expected. Apache
starts and i am able to complete the operation as well. But we would need
this statement in order to have logging enabled. Is there any other
alternative or fix for the same.



The same code is working for apache 2.2.



Any help would be highly appreciated.



Regards,

Megha