caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] mod_caml makes Apache segfault
@ 2004-09-06 15:50 Alan Schmitt
  2004-09-06 16:02 ` Benjamin Geer
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Alan Schmitt @ 2004-09-06 15:50 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 1163 bytes --]

Hi,

In order to play with cocanwiki, I am currently trying to get mod_caml 
to work on a server here (Fedora Core 1, Apache 2.0.50).

First of all, a small trick: in order to get mod_caml to compile, I had 
to specify two paths for includes:
PACHEINCDIR := /usr/include/httpd -I /usr/include/apr-0

I think this is a bug from RedHat (there is a apr.h included from 
httpd.h without the correct include path).

I have installed mod_caml following the instruction, added a 
"LoadModule" line in the config file:
LoadModule caml_module modules/mod_caml.so
and restarted httpd.

The problem is that now Apache does not serve any pages, and I see in 
the logs a bunch of:

[Mon Sep 06 14:46:43 2004] [notice] child pid 26207 exit signal Segmentation fault (11)
[Mon Sep 06 14:46:43 2004] [notice] child pid 26209 exit signal Segmentation fault (11)
[Mon Sep 06 14:46:52 2004] [notice] child pid 26210 exit signal Segmentation fault (11)

Does someone know how to get mod_caml to work on such FC1 with Apache 2?

Thanks a lot,

Alan Schmitt

-- 
The hacker: someone who figured things out and made something cool happen.
.O.
..O
OOO

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [Caml-list] mod_caml makes Apache segfault
  2004-09-06 15:50 [Caml-list] mod_caml makes Apache segfault Alan Schmitt
@ 2004-09-06 16:02 ` Benjamin Geer
  2004-09-06 16:03 ` Richard Jones
  2004-09-06 16:08 ` [Caml-list] ocamllex parametrized parse regexp lehalle@miriad
  2 siblings, 0 replies; 13+ messages in thread
From: Benjamin Geer @ 2004-09-06 16:02 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: caml-list

Alan Schmitt wrote:
> Segmentation fault (11)

It might be because of this:

http://issues.apache.org/bugzilla/show_bug.cgi?id=27550

Benjamin

-------------------
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] 13+ messages in thread

* Re: [Caml-list] mod_caml makes Apache segfault
  2004-09-06 15:50 [Caml-list] mod_caml makes Apache segfault Alan Schmitt
  2004-09-06 16:02 ` Benjamin Geer
@ 2004-09-06 16:03 ` Richard Jones
  2004-09-07  6:50   ` Alan Schmitt
  2004-11-09 18:02   ` Paul Argentoff
  2004-09-06 16:08 ` [Caml-list] ocamllex parametrized parse regexp lehalle@miriad
  2 siblings, 2 replies; 13+ messages in thread
From: Richard Jones @ 2004-09-06 16:03 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 2045 bytes --]

On Mon, Sep 06, 2004 at 05:50:41PM +0200, Alan Schmitt wrote:
> Hi,
> 
> In order to play with cocanwiki, I am currently trying to get mod_caml 
> to work on a server here (Fedora Core 1, Apache 2.0.50).

Hi Alan,

First thing to say is that there is a show-stopper bug in Apache 2
which prevents modules which use PCRE from working.  mod_caml is one
of those modules:

http://issues.apache.org/bugzilla/show_bug.cgi?id=27550

If you want to see this bug fixed, please add your comments to that
page.

There are suggestions on that page for compiling a version of Apache
which doesn't cause conflicting symbols, however it's probably a case
of it's easier to use a version of Apache 1.3 precompiled for FC1,
which definitely should work.

> First of all, a small trick: in order to get mod_caml to compile, I had 
> to specify two paths for includes:
> PACHEINCDIR := /usr/include/httpd -I /usr/include/apr-0
> 
> I think this is a bug from RedHat (there is a apr.h included from 
> httpd.h without the correct include path).
> 
> I have installed mod_caml following the instruction, added a 
> "LoadModule" line in the config file:
> LoadModule caml_module modules/mod_caml.so
> and restarted httpd.
> 
> The problem is that now Apache does not serve any pages, and I see in 
> the logs a bunch of:
> 
> [Mon Sep 06 14:46:43 2004] [notice] child pid 26207 exit signal Segmentation fault (11)
> [Mon Sep 06 14:46:43 2004] [notice] child pid 26209 exit signal Segmentation fault (11)
> [Mon Sep 06 14:46:52 2004] [notice] child pid 26210 exit signal Segmentation fault (11)
> 
> Does someone know how to get mod_caml to work on such FC1 with Apache 2?

Just to check it is the PCRE bug, can you get a stack trace.  IIRC
the command is:

 gdb
 run /usr/sbin/apache -X
 [segfault]
 bt

Rich.


-- 
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
http://www.YouUnlimited.co.uk/ - management courses

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* [Caml-list] ocamllex parametrized parse regexp
  2004-09-06 15:50 [Caml-list] mod_caml makes Apache segfault Alan Schmitt
  2004-09-06 16:02 ` Benjamin Geer
  2004-09-06 16:03 ` Richard Jones
@ 2004-09-06 16:08 ` lehalle@miriad
  2004-09-06 17:34   ` Luc Maranget
  2004-09-06 17:49   ` skaller
  2 siblings, 2 replies; 13+ messages in thread
From: lehalle@miriad @ 2004-09-06 16:08 UTC (permalink / raw)
  To: caml-list

Hi,

I try to use ocamllex like this (I want to have one of the parsing regexp  
to be read from an external file) :


{
   open Printf;;

}
let digit = ['0'-'9']

let mark = ...read in a file...

rule oaddress outcan = parse
   | mark as bemark
       {
         printf "MARK(%s)" bemark;
         oaddress outcan lexbuf
       }
   | _ as d
       { printf "Unk[%c]\n" d;
         oaddress outcan lexbuf
       }
   | eof
       {
         fprintf outcan "END";
       }

Is it possible or useless to try somethink like that ?

-- 
Charles-Albert Lehalle --- MIRIAD Technologies
Responsable Développements Algorithmiques et Applications
mailto:charles.lehalle@miriadtech.com
keyserver: http://pgp.mit.edu/
tel : 0156431816 - fax: 0156431828
8 av Hoche - 75008 PARIS - FRANCE

-------------------
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] 13+ messages in thread

* Re: [Caml-list] ocamllex parametrized parse regexp
  2004-09-06 16:08 ` [Caml-list] ocamllex parametrized parse regexp lehalle@miriad
@ 2004-09-06 17:34   ` Luc Maranget
  2004-09-06 17:49   ` skaller
  1 sibling, 0 replies; 13+ messages in thread
From: Luc Maranget @ 2004-09-06 17:34 UTC (permalink / raw)
  To: lehalle@miriad; +Cc: caml-list

> Hi,
> 
> I try to use ocamllex like this (I want to have one of the parsing regexp  
> to be read from an external file) :
> 
> 
> {
>   open Printf;;
> 
> }
> let digit = ['0'-'9']
> 
> let mark = ...read in a file...
> 
> rule oaddress outcan = parse
>   | mark as bemark
>       {
>         printf "MARK(%s)" bemark;
>         oaddress outcan lexbuf
>       }
>   | _ as d
>       { printf "Unk[%c]\n" d;
>         oaddress outcan lexbuf
>       }
>   | eof
>       {
>         fprintf outcan "END";
>       }
> 
> Is it possible or useless to try somethink like that ?


ocamllex is a standard compiler, it compiles its input base.mll file into
a base.ml file that implements the lexer.

The language understood by ocamllex remains quite basic. As a consequence
there is no built-in support for what you want.
(Basically the 'let name = regexp' feature can be seen as simple macros).

However, nothing prevents you from generating the appropriate source
(.mll) files before you feed them into ocamllex.

-- Luc

-------------------
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] 13+ messages in thread

* Re: [Caml-list] ocamllex parametrized parse regexp
  2004-09-06 16:08 ` [Caml-list] ocamllex parametrized parse regexp lehalle@miriad
  2004-09-06 17:34   ` Luc Maranget
@ 2004-09-06 17:49   ` skaller
  1 sibling, 0 replies; 13+ messages in thread
From: skaller @ 2004-09-06 17:49 UTC (permalink / raw)
  To: charles.lehalle; +Cc: caml-list

On Tue, 2004-09-07 at 02:08, lehalle@miriad wrote:
> Hi,
> 
> I try to use ocamllex like this (I want to have one of the parsing regexp  
> to be read from an external file) :

> let mark = ...read in a file...

No, you can't do this directly: ocamllex regexps
have to be known at ocamllex compile time.

-- 
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net



-------------------
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] 13+ messages in thread

* Re: [Caml-list] mod_caml makes Apache segfault
  2004-09-06 16:03 ` Richard Jones
@ 2004-09-07  6:50   ` Alan Schmitt
  2004-09-07  8:34     ` Richard Jones
  2004-11-09 18:02   ` Paul Argentoff
  1 sibling, 1 reply; 13+ messages in thread
From: Alan Schmitt @ 2004-09-07  6:50 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 1411 bytes --]

* Richard Jones (rich@annexia.org) wrote:
> On Mon, Sep 06, 2004 at 05:50:41PM +0200, Alan Schmitt wrote:
> > Hi,
> > 
> > In order to play with cocanwiki, I am currently trying to get mod_caml 
> > to work on a server here (Fedora Core 1, Apache 2.0.50).
> 
> Hi Alan,
> 
> First thing to say is that there is a show-stopper bug in Apache 2
> which prevents modules which use PCRE from working.  mod_caml is one
> of those modules:
> 
> http://issues.apache.org/bugzilla/show_bug.cgi?id=27550
> 
> If you want to see this bug fixed, please add your comments to that
> page.
> 
> There are suggestions on that page for compiling a version of Apache
> which doesn't cause conflicting symbols, however it's probably a case
> of it's easier to use a version of Apache 1.3 precompiled for FC1,
> which definitely should work.

Thanks a lot for explaining this, I now understand the comment about 
problems using mod_caml with apache 2 on the cocanwiki page.

Unfortunately I don't think I can install apache 1.3 on this server as 
we're using apache 2 to serve our research lab website (I wanted to add 
a wiki to this site), and I don't think one can have both running at the 
same time. I'll try to find another machine to do this installation 
then.

Thanks again,

Alan Schmitt

-- 
The hacker: someone who figured things out and made something cool happen.
.O.
..O
OOO

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [Caml-list] mod_caml makes Apache segfault
  2004-09-07  6:50   ` Alan Schmitt
@ 2004-09-07  8:34     ` Richard Jones
  0 siblings, 0 replies; 13+ messages in thread
From: Richard Jones @ 2004-09-07  8:34 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 1057 bytes --]

On Tue, Sep 07, 2004 at 08:50:25AM +0200, Alan Schmitt wrote:
> Thanks a lot for explaining this, I now understand the comment about 
> problems using mod_caml with apache 2 on the cocanwiki page.
> 
> Unfortunately I don't think I can install apache 1.3 on this server as 
> we're using apache 2 to serve our research lab website (I wanted to add 
> a wiki to this site), and I don't think one can have both running at the 
> same time. I'll try to find another machine to do this installation 
> then.

Yes, it's a problem, and again I urge you to add a comment to that
page to get the Apache developers to incorporate the fix.

You can run an instance of Apache 1.3 on a different port number, but
of course it's not ideal.

Rich.

-- 
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
MAKE+ is a sane replacement for GNU autoconf/automake. One script compiles,
RPMs, pkgs etc. Linux, BSD, Solaris. http://www.annexia.org/freeware/makeplus/

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [Caml-list] mod_caml makes Apache segfault
  2004-09-06 16:03 ` Richard Jones
  2004-09-07  6:50   ` Alan Schmitt
@ 2004-11-09 18:02   ` Paul Argentoff
  2004-11-10  3:52     ` N. Owen Gunden
  1 sibling, 1 reply; 13+ messages in thread
From: Paul Argentoff @ 2004-11-09 18:02 UTC (permalink / raw)
  To: Richard Jones; +Cc: caml-list


[-- Attachment #1.1: Type: text/plain, Size: 403 bytes --]

Dear Richard Jones,

Let RJ = "Richard Jones" in
  written_by RJ => 

 RJ> First thing to say is that there is a show-stopper bug in Apache 2
 RJ> which prevents modules which use PCRE from working.

IMHO I've found a patch that fixes the bug. At least it prevents httpd.core
at mod_caml.so load.

-- 
Yours truly, WBR, Paul Argentoff.
Jabber:	paul@jabber.rtelekom.ru
RIPE:	PA1291-RIPE


[-- Attachment #1.2: the patch is in there --]
[-- Type: application/octet-stream, Size: 5741 bytes --]

[-- Attachment #2: Type: application/pgp-signature, Size: 186 bytes --]

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

* Re: [Caml-list] mod_caml makes Apache segfault
  2004-11-09 18:02   ` Paul Argentoff
@ 2004-11-10  3:52     ` N. Owen Gunden
  2004-11-10  9:35       ` Richard Jones
  2004-11-10 15:25       ` Paul Argentoff
  0 siblings, 2 replies; 13+ messages in thread
From: N. Owen Gunden @ 2004-11-10  3:52 UTC (permalink / raw)
  To: caml-list

On Tue, Nov 09, 2004 at 09:02:16PM +0300, Paul Argentoff wrote:
> Let RJ = "Richard Jones" in
>   written_by RJ => 
> 
>  RJ> First thing to say is that there is a show-stopper bug in Apache 2
>  RJ> which prevents modules which use PCRE from working.
> 
> IMHO I've found a patch that fixes the bug. At least it prevents httpd.core
> at mod_caml.so load.

Please share a link to more info about this.  My show has still been
stopped re: mod_caml because the only place I can run it currently has a
production apache 2 on it and I don't want to introduce any nonstandard
patches (read: i want the ebuild to work :).


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

* Re: [Caml-list] mod_caml makes Apache segfault
  2004-11-10  3:52     ` N. Owen Gunden
@ 2004-11-10  9:35       ` Richard Jones
  2004-11-10 15:27         ` Paul Argentoff
  2004-11-10 15:25       ` Paul Argentoff
  1 sibling, 1 reply; 13+ messages in thread
From: Richard Jones @ 2004-11-10  9:35 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 1244 bytes --]

On Tue, Nov 09, 2004 at 10:52:28PM -0500, N. Owen Gunden wrote:
> On Tue, Nov 09, 2004 at 09:02:16PM +0300, Paul Argentoff wrote:
> > Let RJ = "Richard Jones" in
> >   written_by RJ => 
> > 
> >  RJ> First thing to say is that there is a show-stopper bug in Apache 2
> >  RJ> which prevents modules which use PCRE from working.
> > 
> > IMHO I've found a patch that fixes the bug. At least it prevents httpd.core
> > at mod_caml.so load.
> 
> Please share a link to more info about this.  My show has still been
> stopped re: mod_caml because the only place I can run it currently has a
> production apache 2 on it and I don't want to introduce any nonstandard
> patches (read: i want the ebuild to work :).

The Apache 2.0 bug report contains patches which fix the problem:

http://issues.apache.org/bugzilla/show_bug.cgi?id=27550

Sadly the Apache 2 developers have not deemed it important enough to
actually apply the patch.

Rich.

-- 
Richard Jones.  http://www.annexia.org/  http://www.j-london.com/
>>>   http://www.team-notepad.com/ - collaboration tools for teams   <<<
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
Advanced wiki and collab tool - http://sandbox.merjis.com/

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [Caml-list] mod_caml makes Apache segfault
  2004-11-10  3:52     ` N. Owen Gunden
  2004-11-10  9:35       ` Richard Jones
@ 2004-11-10 15:25       ` Paul Argentoff
  1 sibling, 0 replies; 13+ messages in thread
From: Paul Argentoff @ 2004-11-10 15:25 UTC (permalink / raw)
  To: caml-list

Dear N Owen Gunden,

Let NOG = "N Owen Gunden" in
  written_by NOG => 

 NOG> Please share a link to more info about this.  My show has still been
 NOG> stopped re: mod_caml because the only place I can run it currently
 NOG> has a production apache 2 on it and I don't want to introduce any
 NOG> nonstandard patches (read: i want the ebuild to work :).

I think Richard's link in a previous messages should be sufficient. No
other ideas yet ;)

-- 
Yours truly, WBR, Paul Argentoff.
Jabber:	paul@jabber.rtelekom.ru
RIPE:	PA1291-RIPE


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

* Re: [Caml-list] mod_caml makes Apache segfault
  2004-11-10  9:35       ` Richard Jones
@ 2004-11-10 15:27         ` Paul Argentoff
  0 siblings, 0 replies; 13+ messages in thread
From: Paul Argentoff @ 2004-11-10 15:27 UTC (permalink / raw)
  To: Richard Jones; +Cc: caml-list

Dear Richard Jones,

Let RJ = "Richard Jones" in
  written_by RJ => 

 RJ> Sadly the Apache 2 developers have not deemed it important enough to
 RJ> actually apply the patch.

BTW 'my' patch works: mod_caml.so linked well into httpd and is still working.

-- 
Yours truly, WBR, Paul Argentoff.
Jabber:	paul@jabber.rtelekom.ru
RIPE:	PA1291-RIPE


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

end of thread, other threads:[~2004-11-10 15:27 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-06 15:50 [Caml-list] mod_caml makes Apache segfault Alan Schmitt
2004-09-06 16:02 ` Benjamin Geer
2004-09-06 16:03 ` Richard Jones
2004-09-07  6:50   ` Alan Schmitt
2004-09-07  8:34     ` Richard Jones
2004-11-09 18:02   ` Paul Argentoff
2004-11-10  3:52     ` N. Owen Gunden
2004-11-10  9:35       ` Richard Jones
2004-11-10 15:27         ` Paul Argentoff
2004-11-10 15:25       ` Paul Argentoff
2004-09-06 16:08 ` [Caml-list] ocamllex parametrized parse regexp lehalle@miriad
2004-09-06 17:34   ` Luc Maranget
2004-09-06 17:49   ` skaller

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).