You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by si...@tcs.com on 2019/01/08 16:48:10 UTC
[users@httpd] URGENT: Apache HTTP Migration from 1.3 to 2.4 UNIX Solaris
Dear All,
I have migrated a user module mod_example from 1.3 to 2.4. But when I try
to start the apache it is giving a segmentation fault and creating a core.
Installed binaries:
Apache 2.4.34
apr-1.6.5
apr-util-1.6.1
pcre-8.40
expat-2.1.0
Following is the stacktrace while debug:
t@1 (l@1) signal SEGV (no mapping at the fault address) in strlen at
0xfefcceb8
0xfefcceb8: strlen+0x0018: ldub [%o2], %o1
Current function is apr_pstrdup
77 len = strlen(s) + 1;
(dbx) where
current thread: t@1
[1] strlen(0x1, 0xed568, 0x1, 0xed558, 0x1, 0x0), at 0xfefcceb8
=>[2] apr_pstrdup(a = 0xb8190, s = 0x1 "<bad address 0x00000001>"), line
77 in "apr_strings.c"
[3] ap_add_module_commands(m = 0xfebc80d8, p = <value unavailable>),
line 546 in "config.c"
[4] ap_add_module(m = 0xfebc80d8, p = 0xb8190, sym_name = <value
unavailable>), at 0x5db30
[5] ap_add_loaded_module(mod = 0xfebc80d8, p = 0xb8190, short_name =
0xed510 "example_module"), line 713 in "config.c"
[6] load_module(cmd = 0xffbfec90, dummy = <value unavailable>, modname =
0xed510 "example_module", filename = <value unavailable>), line 302 in
"mod_so.c"
[7] invoke_cmd(cmd = 0x8fce4, parms = 0xffbfec90, mconfig = 0xffbfeb94,
args = <value unavailable>), line 938 in "config.c"
[8] execute_now(cmd_line = <value unavailable>, args = <value
unavailable>, parms = <value unavailable>, p = <value unavailable>, ptemp
= 0xffbfec90, sub_tree = 0xe35a3, parent = 0xe3d28) (inlined), at 0x5e2c4
[9] ap_build_config_sub(p = <value unavailable>, temp_pool = <value
unavailable>, l = <value unavailable>, parms = 0xed5a8, current = 0xebef8,
curr_parent = (nil), conftree = 0xa9624), line 1167 in "config.c"
Following is the pstack of core:
quartz: /usr/local/apache2/logs > pstack core
core 'core' of 29092: /usr/local/apache2/bin/httpd -k start
fefcceb8 strlen (b8190, 1, b8190, ed5a8, ebef8, 0) + 18
0005ca54 ap_add_module_commands (febd8078, a95d8, b8190, ed568, ed598,
febd8164) + 6c
0005db30 ap_add_module (64, b8190, ed510, dc208, febc75a5, febd8078) +
154
0005dd18 ap_add_loaded_module (febd8078, b8190, ed510, 7, 41503234,
febd8078) + 10
0006f31c load_module (ffbfec60, 8fad8, ed510, febd8078, e09c8, 0) + 2b4
0005c8c0 invoke_cmd (8fce4, ffbfec60, ffbfeb64, e35a3, e3d28, ed510) +
924
0005e2c4 ap_build_config_sub (e35a3, e3d28, ddbe8, ffbfec60, ffbfebd4,
ffbfebd8) + 200
0005e90c ap_build_config (ffbfec60, b8190, e3488, a9624, 0, ffbfec60) +
c0
0005f000 ap_process_resource_config (e01a8, e63b0, a9624, b8190, e3488,
0) + 78
000600b0 ap_read_config (0, e3488, 830b8, a9624, e01a8, 0) + 24c
00081fac main (b8190, a9400, a9400, a8c00, a9400, b6218) + 624
000382fc _start (0, 0, 0, 0, 0, 0) + 5c
This is happening while loading a user module that I created:
LoadModule example_module modules/mod_example.so
Please provide your valuable insight into it so that I can go forward.
Thanks & Regards
Ankit Singhal
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
Re: [users@httpd] URGENT: Apache HTTP Migration from 1.3 to 2.4 UNIX
Solaris
Posted by si...@tcs.com.
Hi Dennis,
I can get the httpd service running if I do not load my
module(example_module)
If I comment this module then apache starts running. So the problem is
with my module only. Maybe I am missing something from the configuration
point.
Here "s = 0x1 "<bad address 0x00000001>"" and it is passing as
cmd->name(command_rec). Maybe apache is not able to get the name of
command_rec directive.
Thanks & Regards
Ankit
From: "Dennis Clarke" <dc...@blastwave.org>
To: users@httpd.apache.org
Date: 08-01-2019 16:58
Subject: Re: [users@httpd] URGENT: Apache HTTP Migration from 1.3
to 2.4 UNIX Solaris
"External email. Open with Caution"
> Could you please suggest whether need to make more entries in the
> httpd.conf of command entries?
Can you get the httpd service running without any modifications and
without excessive modules ?
Dennis
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
Re: [users@httpd] URGENT: Apache HTTP Migration from 1.3 to 2.4 UNIX
Solaris
Posted by Dennis Clarke <dc...@blastwave.org>.
> Could you please suggest whether need to make more entries in the
> httpd.conf of command entries?
Can you get the httpd service running without any modifications and
without excessive modules ?
Dennis
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] URGENT: Apache HTTP Migration from 1.3 to 2.4 UNIX
Solaris
Posted by si...@tcs.com.
Hi William,
Thank you for the response.
I have compiled the code with -g option.
Please find the excerpts from the code and httpd.conf file:
Code declaration:
static const command_rec example_cmds[] =
{
("SCENARIO",CallScenarioName,NULL,RSRC_CONF,"Define scenario name"),
{NULL}
};
module MODULE_VAR_EXPORT example_module =
{
STANDARD20_MODULE_STUFF,
create_example_dir_config, /* per-directory config creator */
NULL, /* dir config merger */
example_create_server_config, /* server config creator */
NULL, /* server config merger */
example_cmds, /* command table */
register_hooks, /* [7] list of handlers */
};
httpd.conf:
<IfModule example_module>
SCENARIO WEBUI_DEFAULTOPEN
</IfModule>
<Location /COMSHTTPS>
SetHandler example-handler
</Location>
Could you please suggest whether need to make more entries in the
httpd.conf of command entries?
Thanks & Regards
Ankit Singhal
Tata Consultancy Services
Mailto: singhal.ankit@tcs.com
Website: http://www.tcs.com
____________________________________________
Experience certainty. IT Services
Business Solutions
Consulting
____________________________________________
From: "William A Rowe Jr" <wr...@rowe-clan.net>
To: users@httpd.apache.org
Date: 08-01-2019 14:57
Subject: Re: [users@httpd] URGENT: Apache HTTP Migration from 1.3
to 2.4 UNIX Solaris
"External email. Open with Caution"
On Tue, Jan 8, 2019 at 10:48 AM <si...@tcs.com> wrote:
I have migrated a user module mod_example from 1.3 to 2.4. But when I try
to start the apache it is giving a segmentation fault and creating a core.
Following is the stacktrace while debug:
t@1 (l@1) signal SEGV (no mapping at the fault address) in strlen at
0xfefcceb8
0xfefcceb8: strlen+0x0018: ldub [%o2], %o1
Current function is apr_pstrdup
77 len = strlen(s) + 1;
(dbx) where
current thread: t@1
[1] strlen(0x1, 0xed568, 0x1, 0xed558, 0x1, 0x0), at 0xfefcceb8
=>[2] apr_pstrdup(a = 0xb8190, s = 0x1 "<bad address 0x00000001>"), line
77 in "apr_strings.c"
[3] ap_add_module_commands(m = 0xfebc80d8, p = <value unavailable>),
line 546 in "config.c"
[4] ap_add_module(m = 0xfebc80d8, p = 0xb8190, sym_name = <value
unavailable>), at 0x5db30
[5] ap_add_loaded_module(mod = 0xfebc80d8, p = 0xb8190, short_name =
0xed510 "example_module"), line 713 in "config.c"
[6] load_module(cmd = 0xffbfec90, dummy = <value unavailable>, modname =
0xed510 "example_module", filename = <value unavailable>), line 302 in
"mod_so.c"
This is happening while loading a user module that I created:
LoadModule example_module modules/mod_example.so
Please provide your valuable insight into it so that I can go forward.
The info above is a bit limited in diagnosing the specifics of source code
you didn't share, and we aren't that great at divining the invisible, so
two
thoughts for you; first build an httpd/apr/your module with CFLAGS -g -O0.
Sometimes you can only reproduce a crash with an optimized build, but
the -g flag always remains useful in this regard (and objcopy can strip
those symbols for general distribution.) I'm guessing the above was built
with '-g' but with some '-O', optimizing out some of the args that might
have been helpful.
Since we can't see above which command in your command_rec array
caused this segfault, we can see you had an invalid string element.
Line 546 of config.c tripped over your input. config.c:546 was trying to;
dir = apr_pstrdup(tpool, cmd->name);
This suggests you added a command to the list without an actual char*
string name value.
Compare your command_rec list with the templates of the various
AP_INIT_* macros to ensure you provided valid initializers... only
static const array values. Ensure you NULL terminate that list.
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
Re: [users@httpd] URGENT: Apache HTTP Migration from 1.3 to 2.4 UNIX Solaris
Posted by William A Rowe Jr <wr...@rowe-clan.net>.
On Tue, Jan 8, 2019 at 10:48 AM <si...@tcs.com> wrote:
>
> I have migrated a user module mod_example from 1.3 to 2.4. But when I try
> to start the apache it is giving a segmentation fault and creating a core.
>
> Following is the stacktrace while debug:
> t@1 (l@1) signal SEGV (no mapping at the fault address) in strlen at
> 0xfefcceb8
> 0xfefcceb8: strlen+0x0018: ldub [%o2], %o1
> Current function is apr_pstrdup
> 77 len = strlen(s) + 1;
> (dbx) where
> current thread: t@1
> [1] strlen(0x1, 0xed568, 0x1, 0xed558, 0x1, 0x0), at 0xfefcceb8
> =>[2] apr_pstrdup(a = 0xb8190, s = 0x1 "<bad address 0x00000001>"), line
> 77 in "apr_strings.c"
> [3] ap_add_module_commands(m = 0xfebc80d8, p = <value unavailable>),
> line 546 in "config.c"
> [4] ap_add_module(m = 0xfebc80d8, p = 0xb8190, sym_name = <value
> unavailable>), at 0x5db30
> [5] ap_add_loaded_module(mod = 0xfebc80d8, p = 0xb8190, short_name =
> 0xed510 "example_module"), line 713 in "config.c"
> [6] load_module(cmd = 0xffbfec90, dummy = <value unavailable>, modname =
> 0xed510 "example_module", filename = <value unavailable>), line 302 in
> "mod_so.c"
>
> This is happening while loading a user module that I created:
> LoadModule example_module modules/mod_example.so
>
> Please provide your valuable insight into it so that I can go forward.
>
The info above is a bit limited in diagnosing the specifics of source code
you didn't share, and we aren't that great at divining the invisible, so two
thoughts for you; first build an httpd/apr/your module with CFLAGS -g -O0.
Sometimes you can only reproduce a crash with an optimized build, but
the -g flag always remains useful in this regard (and objcopy can strip
those symbols for general distribution.) I'm guessing the above was built
with '-g' but with some '-O', optimizing out some of the args that might
have been helpful.
Since we can't see above which command in your command_rec array
caused this segfault, we can see you had an invalid string element.
Line 546 of config.c tripped over your input. config.c:546 was trying to;
dir = apr_pstrdup(tpool, cmd->name);
This suggests you added a command to the list without an actual char*
string name value.
Compare your command_rec list with the templates of the various
AP_INIT_* macros to ensure you provided valid initializers... only
static const array values. Ensure you NULL terminate that list.
Re: [users@httpd] URGENT: Apache HTTP Migration from 1.3 to 2.4 UNIX
Solaris
Posted by Dennis Clarke <dc...@blastwave.org>.
On 1/8/19 1:29 PM, singhal.ankit@tcs.com wrote:
> Hi Dennis,
>
> Thank you for the response..!!
>
Right, that is an old Sun sparc "coolthreads" server of some sort.
Looks like Solaris 11.
> I do not exactly understand by toolchain? Could you please elaborate
> more of what information I can provide?
Essentially all the tools you are using to build the software with.
Don't worry about it. I think the apache 1.3 is provided by Oracle
out of the box. Same with some rev of 2.x but I have never looked at
it as I always just build my own.
Given that you say "understand by toolchain" as a question I'll take
this out of the mail list just to reduce noise and clutter.
Dennis
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] URGENT: Apache HTTP Migration from 1.3 to 2.4 UNIX Solaris
Posted by si...@tcs.com.
Hi Dennis,
Thank you for the response..!!
Following are the specifications:
I do not exactly understand by toolchain? Could you please elaborate more
of what information I can provide?
On the same environment, we were running apache 1.3 successfully. In this
we are using a user module(mod_example) to call a Tuxedo server.
Thanks & Regards
Ankit Singhal
Tata Consultancy Services
Mailto: singhal.ankit@tcs.com
Website: http://www.tcs.com
____________________________________________
Experience certainty. IT Services
Business Solutions
Consulting
____________________________________________
From: "Dennis Clarke" <dc...@blastwave.org>
To: users@httpd.apache.org
Date: 08-01-2019 14:56
Subject: Re: [users@httpd] URGENT: Apache HTTP Migration from 1.3
to 2.4 UNIX Solaris
"External email. Open with Caution"
On 1/8/19 11:48 AM, singhal.ankit@tcs.com wrote:
> Dear All,
>
> I have migrated a user module mod_example from 1.3 to 2.4. But when I
> try to start the apache it is giving a segmentation fault and creating a
> core.
> Installed binaries:
> Apache 2.4.34
> apr-1.6.5
> apr-util-1.6.1
> pcre-8.40
> expat-2.1.0
Difficult to say from your email but you will most likely need to build
a complete toolchain before running any recent Apache. It shouldn't
matter one way or that other, but it does, are you on SPARC or x86_64?
Also what compiler and toolchain do you have now?
Dennis
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
Re: [users@httpd] URGENT: Apache HTTP Migration from 1.3 to 2.4 UNIX
Solaris
Posted by Dennis Clarke <dc...@blastwave.org>.
On 1/8/19 11:48 AM, singhal.ankit@tcs.com wrote:
> Dear All,
>
> I have migrated a user module mod_example from 1.3 to 2.4. But when I
> try to start the apache it is giving a segmentation fault and creating a
> core.
> Installed binaries:
> Apache 2.4.34
> apr-1.6.5
> apr-util-1.6.1
> pcre-8.40
> expat-2.1.0
Difficult to say from your email but you will most likely need to build
a complete toolchain before running any recent Apache. It shouldn't
matter one way or that other, but it does, are you on SPARC or x86_64?
Also what compiler and toolchain do you have now?
Dennis
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org