roxen.lists.roxen.general

Subject Author Date
Roxen 4.0 sudden death on piketag - corrupted double-linked lists on #include? <gnudiff <> 05-01-2006
Hello.

I have had Roxen 4.0. source-compiled, installed and running OK for
about 2-3 weeks already. All of a sudden any time user accesses some
particular pages which have piketag content - <?pike -- Roxen exits.

There is no error message when Roxen is run normally, it just quits.

I tried ./start -v -w --with-debug --once

which gave me the following error msg before the quit:
*** glibc detected *** corrupted double-linked list: 0x000000000118b070 ***


There is one error message when Roxen _starts_, unfortunately I don't
know whether it has been present before (in the past couple weeks) as
I purged the old logfiles some time ago:

Bad argument 1 to map(). Expected
array|mapping|program|function|multiset|string|object
Unknown program:
map(0,/usr/local/roxen/server-4.0.425/bin/garbagecollector()->__lambda_65612_0_line_208)
/usr/local/roxen/server-4.0.425/bin/garbagecollector.pike:211:
/usr/local/roxen/server-4.0.425/bin/garbagecollector()->create_cache("roxen_cache/logs/")
/usr/local/roxen/server-4.0.425/bin/garbagecollector.pike:693:
/usr/local/roxen/server-4.0.425/bin/garbagecollector()->create("roxen_cache/","roxen_cache/logs/",1,25,0,5,"")
/usr/local/roxen/server-4.0.425/bin/garbagecollector.pike:470:
/usr/local/roxen/server-4.0.425/bin/garbagecollector()->do_command(())
/usr/local/roxen/server-4.0.425/bin/garbagecollector.pike:493:
/usr/local/roxen/server-4.0.425/bin/garbagecollector()->got_command(Stdio.FILE("stdin",
0, 777 /* fd=0
*/),"6ke0create\broxen_cache/\rroxen_cache/logs/h\b(\b&")
/usr/local/roxen/server-4.0.425/pike/lib/pike/modules/Stdio.pmod/module.pmod:733:
Stdio.File("stdin", 0, 777 /* fd=0 */)->__stdio_read_callback()


I tried enabling tracing with -t to gather more information.
Unfortunately I have no idea where  to start/stop the paste, I hope
this is enough:

- piketag.pike: 321: 98a638->compile_string("#line 1
\"pike-tag(preamble)\"\ninherit __ps_magic_helpers;\nimport
Roxen;\n\n#line ..
- master.pike: 300: 98a638->get_predefines()
- master.pike: 303: 102aaa0->get_default_module()
- -:   0: 96fad8->__lambda_65612_7_line_1817()
- roxenloader.pike:1819:
813f68->call_out(/usr/local/roxen/server-4.0.425/base_server/roxenloader()->__lambda_65612_7_line_1817,1)
- roxenloader.pike:1820:
96fad8->do_tailf(0,"/usr/local/roxen/configurations/_mysql/error_log")
- roxenloader.pike:1598:
96fad8->file_stat("/usr/local/roxen/configurations/_mysql/error_log")
- roxenloader.pike:1064:
96fad8->roxen_path("/usr/local/roxen/configurations/_mysql/error_log")
- roxenloader.pike:1030: 96fad8->roxen_version()
- roxenloader.pike:1031: 813f90->getenv("LOCALDIR")
- roxenloader.pike:1035: 970b90->query("logdirprefix")
- basic_defvar.pike: 235: 9709b0->query()
- module.pmod: 455: 9709b0->default_value()
- roxenloader.pike:1039: 813f90->getenv("VARDIR")
- master.pike: 303:
102aaa0->resolv("Roxen","pike-tag(preamble)",RoxenModule(CSmain/piketag#0)->__class_66538_0_line_270())
- piketag.pike: 283:
98a638->resolv("Roxen","pike-tag(preamble)",RoxenModule(CSmain/piketag#0)->__class_66538_0_line_270())
- master.pike:1812: 98a638->dirname("pike-tag(preamble)")
- master.pike:1826:
98a638->resolv_base("Roxen","pike-tag(preamble)",RoxenModule(CSmain/piketag#0)->__class_66538_0_line_270())
- master.pike:1727: 102aaa0->get_default_module()
- master.pike:1743: 98a638->dirname("pike-tag(preamble)")
- master.pike:1748:
98a638->findmodule("/usr/local/roxen/server-4.0.425/etc/modules/Roxen",RoxenModule(CSmain/piketag#0)->__clas..
- master.pike: 303:
102aaa0->resolv("Roxen","pike-tag(preamble)",RoxenModule(CSmain/piketag#0)->__class_66538_0_line_270())
- piketag.pike: 283:
98a638->resolv("Roxen","pike-tag(preamble)",RoxenModule(CSmain/piketag#0)->__class_66538_0_line_270())
- master.pike:1812: 98a638->dirname("pike-tag(preamble)")
- piketag.pike: 322: eb1b30->query("program_cache_limit")
- basic_defvar.pike: 235: eb1b58->query()
- module.pmod: 455: eb1b58->default_value()
*** glibc detected *** corrupted double-linked list: 0x00000000011cc1b0 ***
          : Start script terminating.


Updated:

after experimenting some more I came up with the culprit.

the line that causes Roxen to exit is the  #include line:

<?pike
        #include "ns_sql_interface.h"

      object(Regexp) validchars =
Regexp("^[A-Za-z0-9\.,_=@!]([A-Za-z0-9\.,_
=@!])*[A-Za-z0-9\.,_=@!]$");
....

If I coment out the #include, Roxen doesn't exit anymore.
If I make the file unreadable (tried #include
"/absolute/path/to/file/file.h" Roxen just complains that it can't
find the file, so the error is with the contents.

File is couple years old, it contains a sorta smallish DB abstraction
helper functions.
Here is the head of the file:


/*
 * This will provide a consistent SQL interface to
 * the player registration.
 * 22:42 2003-11-15 Emils
 * var.ns_database must be defined for functions to work!
 */

array(string) errors = ({ });

array ns_sql_raw(string qstring,void|mapping extraargs)
{
        object db=DBManager.get(var.ns_database);

        array res;
        mixed err=catch {
                res=db->query(qstring,extraargs);
        };

        if (err)
        {
                werror("Database error occured. Please try again later.");
                return 0;
        }
        return res;
};
.....


Any notes on what has changed since previous version of Roxen that
would warrant such drastic happenings?

If I insert the contents of the .h file in the RXML file, and remove
#include, everything works as expected.

Emils