Forum OpenACS Q&A: AOLServer just dies on Mac OS X

Collapse
Posted by Bruno Mattarollo on

Hello,

I managed to compile AOLServer 3.3.1+ad13, PostgreSQL 7.2.4 and all the modules, got OpenACS 4.6.2 from CVS (with cvs -z3 co -r oacs-4-6-2-final openacs-4) and can start and browse the default site.

I get loads of things similar to this:

NOTICE:  identifier "apm_package_version__add_interface" will be truncated to "apm_package_version__add_interf"
NOTICE:  identifier "apm_package_version__add_dependency" will be truncated to "apm_package_version__add_depend"
NOTICE:  identifier "apm_package_version__add_dependency" will be truncated to "apm_package_version__add_depend"
The strange part is when I install another package, like forums or etp (or others, just mentioning these because they are the ones I tried last), and after mounting them, trying to see them, the connection just dies. With ETP, the last message that I got in the log is:
[18/Apr/2003:23:36:38][716.14687216][-conn3-] Notice: dbdrv: opening database 'postgres:localhost::development'
[18/Apr/2003:23:36:38][716.14687216][-conn3-] Notice: Opening development on localhost
[18/Apr/2003:23:36:38][716.14687216][-conn3-] Notice: Ns_PgOpenDb(postgres):  Openned connection to localhost::development.
NOTICE:  Adding missing FROM-clause entry for table "acs_object_id_seq"
NOTICE:  identifier "acs_object__initialize_attributes" will be truncated to "acs_object__initialize_attribut"
[18/Apr/2003:23:36:39][716.14522864][-conn0-] Notice: Asking for index_title_attr_name
[18/Apr/2003:23:36:39][716.14522864][-conn0-] Notice: Asking for index_description_attr_name
[18/Apr/2003:23:36:39][716.14522864][-conn0-] Notice: Asking for index_content_attr_name
[18/Apr/2003:23:36:39][716.14522864][-conn0-] Warning: columns: 
      i.item_id, i.name, tree_sortkey as sort_order,
      to_char(r.publish_date, 'Mon DD, YYYY') as publish_date,
      (select object_type from acs_objects 
       where object_id = i.item_id) as object_type,
             etp__get_relative_url(i.item_id, i.name) as url,
             etp__get_title(i.item_id, r.title) as title,
             etp__get_description(i.item_id, r.description) as description      
   
Any idea of what the problem might be? Anyone running OpenACS on Mac OS X?

Just to add a bit more about my environment, I am running 10.2.5 and the development tools of Dec 2002 on a PowerBook G4.

Thanks!

Collapse
Posted by Tom Lazar on

hi bruno,

i'm currently running oacs 4.6.2 beta and 4.6.2 final on mac osx 10.2.5 with dec2002 dev tools. i've been following the instructions of markd, and after some initial troubles am now quite happy...

one big culprit is the .tcl file you use for starting up the oacs application. try using a very minimal one and see if that makes any difference.

also remember to restart the nsd-process after mounting applications and regularily vacuuming your db!

Collapse
Posted by Bruno Mattarollo on
Hello Tom,

Thanks, I also followed the instructions for some packages as well. Did you have to remove the "StackSize" parameter from the "threads" section? In my case, if that is present it won't allow AOLServer to start, it would report an invalid attribute or something like that in the log file. So when I start OpenACS for the first time, the installation complains that the StackSize is not of the right size. Anyway, I don't think that is the real problem. I will try to minimize the .tcl file and see what happens.

As of vacuuming the db, :), yes, I will ... but first I will try to get it running for more than a few minutes ;)!

Cheers

Collapse
Posted by Bruno Mattarollo on

I enabled debug on the server and these are the last lines in my log before the server dies:

[19/Apr/2003:12:08:21][476.14741232][-conn2-] Debug: PgBindCmd: sql = 
            select 1
            where 't' = acs_permission__permission_p(:object_id, :party_id, :privilege)
        
[19/Apr/2003:12:08:21][476.14741232][-conn2-] Debug: PgBindCmd: bind var: object_id = 304
[19/Apr/2003:12:08:21][476.14741232][-conn2-] Debug: PgBindCmd: bind var: party_id = 292
[19/Apr/2003:12:08:21][476.14741232][-conn2-] Debug: PgBindCmd: bind var: privilege = write
[19/Apr/2003:12:08:21][476.14741232][-conn2-] Debug: PgBindCmd: query with bind variables substituted = 
            select 1
            where 't' = acs_permission__permission_p('304', '292', 'write')
        
[19/Apr/2003:12:08:21][476.14741232][-conn2-] Notice: Querying '
            select 1
            where 't' = acs_permission__permission_p('304', '292', 'write');'
[19/Apr/2003:12:08:21][476.14741232][-conn2-] Notice: dbinit: sql(localhost::development): '
            select 1
            where 't' = acs_permission__permission_p('304', '292', 'write')
        '
Doing the select from psql gives the following:
development=# select 1 where 't' = acs_permission__permission_p('304','292','write');
 ?column? 
----------
        1
(1 row)
:-?

Collapse
Posted by Bruno Mattarollo on
Does anyone know a "ptrace" like utility for Mac OS X? Something that would allow me to attach to a process and see the function calls and what's happening? I have that utility in Linux but the only reference that I found in Mac OS X is a ptrace function in C ...
Collapse
Posted by Bruno Mattarollo on
While chatting with Tilmann on the IRC channel, he told me to put the StackSize parameter in the .tcl file to an exact multiple of 1024, for example: [expr 512 * 1024] and it solved the problems I was having. It seems to be working now, all the places where it would die now are being served!

Thank you Tilmann!

Collapse
Posted by mark dalrymple on
Does anyone know a "ptrace" like utility for Mac OS X? "ptrace()" is the process tracing stuff that debuggers can use. Other platforms have "truss" (Solaris) and "strace" (Linux) to show system calls. Mac OS X has "ktrace". It's a two-stage deal: ktrace your program and you'll get a ktrace.out file. Then run kdump to see the results. You can see stuff in real-time by doing a "kdump -l". The ktrace and kdump man pages have details.