caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] mod_caml 1.1.6
@ 2004-06-20 11:45 Alex Samokhvalov
  2004-06-20 12:08 ` Richard Jones
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Samokhvalov @ 2004-06-20 11:45 UTC (permalink / raw)
  To: caml-list

Hi all,

i tried to install mod_caml 1.1.6 on apache 1.3. In both cases i receive
the same error:

after starting apache a message 
'[notice] Accept mutex: sysvsem (Default: sysvsem)' appears in
apache/error_log

each time i try to recieve any file from apache (f.e. index.html) in
error_log appears:
'[notice] child pid 19018 exit signal Segmentation fault (11), possible
coredump in /tmp'

gdb /usr/local/apache/bin/httpd core
.....
#0  0x40226c80 in mod_caml_get_dir_config ()
from /usr/local/apache/libexec/mod_caml.so
(gdb) bt
#0  0x40226c80 in mod_caml_get_dir_config ()
	from /usr/local/apache/libexec/mod_caml.so
#1  0x40235f0f in interprete () from
	/usr/local/apache/libexec/mod_caml.so
#2  0x402322cd in callbackN_exn () from
	/usr/local/apache/libexec/mod_caml.so
#3  0x40232314 in callback_exn () from
	/usr/local/apache/libexec/mod_caml.so
#4  0x402246fd in post_read_request ()
	from /usr/local/apache/libexec/mod_caml.so
#5  0x0806b538 in run_method ()
#6  0x0806b679 in ap_run_post_read_request ()
#7  0x0807c35e in ap_read_request ()
#8  0x0807873c in child_main ()
#9  0x08078a70 in make_child ()
#10 0x08078b17 in startup_children ()
#11 0x08079223 in standalone_main ()
#12 0x08079ada in main ()
#13 0x400a87f8 in __libc_start_main () from /lib/tls/libc.so.6

Any ideas?

Salute


Alex

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] mod_caml 1.1.6
  2004-06-20 11:45 [Caml-list] mod_caml 1.1.6 Alex Samokhvalov
@ 2004-06-20 12:08 ` Richard Jones
  2004-06-20 20:40   ` Alex Samokhvalov
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Jones @ 2004-06-20 12:08 UTC (permalink / raw)
  To: Alex Samokhvalov; +Cc: caml-list

On Sun, Jun 20, 2004 at 01:45:17PM +0200, Alex Samokhvalov wrote:
> Hi all,
> 
> i tried to install mod_caml 1.1.6 on apache 1.3. In both cases i receive
> the same error:
[...]
> #0  0x40226c80 in mod_caml_get_dir_config ()
> from /usr/local/apache/libexec/mod_caml.so
> (gdb) bt
> #0  0x40226c80 in mod_caml_get_dir_config ()
> 	from /usr/local/apache/libexec/mod_caml.so

Ouch, not nice.

Although I suspect it won't make a difference, can you make sure
you're running the latest version of mod_caml from CVS, which you can
find here:

https://savannah.nongnu.org/cvs/?group=modcaml
(section: Anonymous CVS Access / Software repository)

The function where it's segfaulting is very simple:

CAMLprim value
mod_caml_get_dir_config (value rv)
{
  CAMLparam1 (rv);
  CAMLlocal1 (config);
  request_rec *r = Request_rec_val (rv);
  config = *(value *) ap_get_module_config (r->per_dir_config, &caml_module);
  CAMLreturn (config);
}

However, unless I know exactly which line is causing the segfault,
it's rather hard for me to debug.  Needless to say, I run mod_caml all
the time, and have never seen such a problem.

You could try compiling the module with debugging symbols, or simply
add a few print statements to that function to see which variable is
NULL.  Anything printed out with fprintf (stderr, ...) will be sent to
the error log, so you could for example try:

  ...
  fprintf (stderr, "r = %p, r->per_dir_config = %p\n", r, r->per_dir_config);
  config = *(value *) ap_get_module_config (r->per_dir_config, &caml_module);
  fprintf (stderr, "ap_get_module_config done\n");
  ...

Rich.

-- 
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
If I have not seen as far as others, it is because I have been
standing in the footprints of giants.  -- from Usenet

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] mod_caml 1.1.6
  2004-06-20 12:08 ` Richard Jones
@ 2004-06-20 20:40   ` Alex Samokhvalov
  2004-06-21  9:14     ` Richard Jones
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Samokhvalov @ 2004-06-20 20:40 UTC (permalink / raw)
  To: Richard Jones; +Cc: caml-list

On 2004-06-20 13:08 Richard Jones wrote:
> On Sun, Jun 20, 2004 at 01:45:17PM +0200, Alex Samokhvalov wrote:
> > Hi all,
> > 
> > i tried to install mod_caml 1.1.6 on apache 1.3. In both cases i receive
> > the same error:
> [...]
> > #0  0x40226c80 in mod_caml_get_dir_config ()
> > from /usr/local/apache/libexec/mod_caml.so
> > (gdb) bt
> > #0  0x40226c80 in mod_caml_get_dir_config ()
> > 	from /usr/local/apache/libexec/mod_caml.so
> 
> Ouch, not nice.
> 
> Although I suspect it won't make a difference, can you make sure
> you're running the latest version of mod_caml from CVS, which you can
> find here:
> 
> https://savannah.nongnu.org/cvs/?group=modcaml
> (section: Anonymous CVS Access / Software repository)
> 
> The function where it's segfaulting is very simple:
> 
> CAMLprim value
> mod_caml_get_dir_config (value rv)
> {
>   CAMLparam1 (rv);
>   CAMLlocal1 (config);
>   request_rec *r = Request_rec_val (rv);
>   config = *(value *) ap_get_module_config (r->per_dir_config, &caml_module);
>   CAMLreturn (config);
> }

As you wrote:

...
fprintf (stderr, "rv = %p, r = %p, r->per_dir_config = %p, "
		 "r->server->module_config = %p\n", 
		 rv, r, r->per_dir_config, r->server->module_config);
config = *(value *) ap_get_module_config (r->per_dir_config, &caml_module);
fprintf (stderr, "ap_get_module_config done\n");
...

then the error_log contains:
rv = 0x403b74cc, r = 0x80f5924, r->per_dir_config = (nil),
r->server->module_config = 0x80b20e4


Alex

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] mod_caml 1.1.6
  2004-06-20 20:40   ` Alex Samokhvalov
@ 2004-06-21  9:14     ` Richard Jones
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Jones @ 2004-06-21  9:14 UTC (permalink / raw)
  To: Alex Samokhvalov; +Cc: caml-list

On Sun, Jun 20, 2004 at 10:40:26PM +0200, Alex Samokhvalov wrote:
> then the error_log contains:
> rv = 0x403b74cc, r = 0x80f5924, r->per_dir_config = (nil),
> r->server->module_config = 0x80b20e4

Alex,

I've added a patch to CVS which should cure the segfault, although why
the r->per_dir_config is NULL in the first place is still unclear.  Of
course the patch makes no difference for me because r->per_dir_config
is not NULL for me.

Affected files: apache_c.c mod_caml.ml

Rich.

-- 
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
'There is a joke about American engineers and French engineers. The
American team brings a prototype to the French team. The French team's
response is: "Well, it works fine in practice; but how will it hold up
in theory?"'

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-06-21  9:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-20 11:45 [Caml-list] mod_caml 1.1.6 Alex Samokhvalov
2004-06-20 12:08 ` Richard Jones
2004-06-20 20:40   ` Alex Samokhvalov
2004-06-21  9:14     ` Richard Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).