Hi Damon

There is an old page in the manual (we must start a thorough revision of it!)

http://tcl.apache.org/rivet/manual2.2/internals.html#idp60748528

where it's explained how to use strace. It's an attempt worth to be done. It might at least tell us in which function the fault occurs by going back from the bottom of the output to the last mod_rivet call that caused the fault (usually mod_rivet function names have the form Rivet_xxxxx)

The alternative is building both Apache and Rivet with symbols and debug flags. Beware the page I quoted is so old that it's still referring to the old configure.tcl script we long abandoned in favor of autotools, I'm going to fix that tonight

Assuming you have unpacked httpd and rivet starting from the same directory

$ cd http-2.4.10/
$ export CFLAGS="-g -O0"
$ export LDFLAGS="-g"
$ ./configure --enable-maintainer-mode --enable-mods-shared=all --enable-mpms-shared=all --prefix=/tmp/apache2 --enable-symbols
$ make
$ make install

and then

$ cd ../rivet-2.2.2
$ ./configure --with-apache=/tmp/apache2 --with-rivet-target-dir=/tmp/rivet2.2 --enable-version-display --with-tcl=/usr/lib/tcl8.6 -enable-symbols
$ make
$ make install

under /tmp/apache2 you have your web server, copy your application configuration inside conf/httpd.conf, load mod_rivet in it and change the MPM as prefork. You may also change the port to listen to as 8080 (or any other free number in the "high" range) in order to be able to run Apache as non-privileged user. If everything is OK you run the debugger

$ gdb bin/httpd
$ (gdb) r -X

you may need to add extra parameters if they apply in your configuration. When something goes bad the debugger stops, the (dgb) prompt appears and you can print the backtrace using command bt. This tells you easily where the web server stopped

E.g.

(gdb) bt
#0 Rivet_Parse (clientData=<optimized out>, interp=0x975d20, objc=<optimized out>, objv=<optimized out>) at mod_rivet/rivetCore.c:247 #1 0x00007fffe796d337 in TclNRRunCallbacks () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so #2 0x00007fffe7cd16d3 in Rivet_ExecuteAndCheck (private=private@entry=0x7ffff7fbc5b0, tcl_script_obj=tcl_script_obj@entry=0x7fffd42a3fd0) at mod_rivet/mod_rivet.c:878 #3 0x00007fffe7cd1b00 in Rivet_ParseExecFile (private=private@entry=0x7ffff7fbc5b0, filename=0x7fffbc015a98 "/home/manghi/sitoimaging/index.rvt", toplevel=toplevel@entry=1)
    at mod_rivet/mod_rivet.c:1165
#4 0x00007fffe7cd23b9 in Rivet_SendContent (private=0x7ffff7fbc5b0) at mod_rivet/mod_rivet.c:728 #5 0x00007fffe5299d23 in request_processor (thd=0x7ffff7fbc550, data=<optimized out>) at mod_rivet/rivet_worker_mpm.c:201 #6 0x00007ffff752e182 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#7  0x00007ffff725b47d in clone () from /lib/x86_64-linux-gnu/libc.so.6

let me know

 -- Massimo

On 04/20/2015 06:02 PM, Brice Hamon wrote:
Hi Massimo,

Not at all. Complex and mature systems are the hardest to debug.


Yes I can reproduce it if I re-install 2.2.2 and run the website. Now I
am not familiar with Apache way of debugging.

Please let me know how to proceed and I'll do it.

Thanks



On Mon, Apr 20, 2015 at 11:46 AM, Massimo Manghi
<[email protected] <mailto:[email protected]>> wrote:

    As I already said privately it would be helpful if you could
    reproduce the fault...

    People at FA who are testing 2.2.2 are warned there are problems
    ahead, still if they could continue their tests and provide more
    feedback that would be great

    anyway, I'm sorry, it seems I'm not able to do anymore my work the
    way it's supposed to be done. Perhaps I need some vacation and Rivet
    probably needs fresh energies

    thanks

      -- Massimo


    On 04/20/2015 05:25 PM, Brice Hamon wrote:

        Hi Massimo,

        I am getting this all the time with Rivet 2.2.2

        [Sun Apr 19 14:23:02 2015] [notice] child pid 18013 exit signal
        Segmentation fault (11)
        [Sun Apr 19 14:23:04 2015] [notice] child pid 18010 exit signal
        Segmentation fault (11)
        [Sun Apr 19 14:24:39 2015] [notice] child pid 18107 exit signal
        Segmentation fault (11)
        [Sun Apr 19 14:24:40 2015] [notice] child pid 18080 exit signal
        Segmentation fault (11)
        [Sun Apr 19 14:24:41 2015] [notice] child pid 17998 exit signal
        Segmentation fault (11)
        [Sun Apr 19 14:26:31 2015] [notice] child pid 17916 exit signal
        Segmentation fault (11)
        [Sun Apr 19 14:26:32 2015] [notice] child pid 18105 exit signal
        Segmentation fault (11)
        [Sun Apr 19 14:26:33 2015] [notice] child pid 18145 exit signal
        Segmentation fault (11)

        I reverted to Rivet 2.1.3 and those crashes do not happen.

        I compile plain vanilla with :

        It was created by Rivet configure 2.2.2, which was
        generated by GNU Autoconf 2.69.  Invocation command line was

            $ ./configure --with-tcl=/usr/local/lib64
        --with-tclsh=/usr/local/bin/tclsh8.6 --with-apache=/usr
        --with-rivet-target-dir=/usr/lib/rivet --with-apxs=/usr/sbin/apxs2

        No error all look good.

        Any ideas ?

        Thanks you,

        B.



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to