Forum OpenACS Q&A: Another 4.6.2 Bug

Collapse
Posted by Randy Ferrer on

From OpenACS Object Type Administration I'm getting the following when accessing top level Objects. For example - selecting objects gets me:

Request Error
Database operation "0or1row" failed (exception NSINT, "Query returned more than one row.")
    while executing
"ns_pg_bind 0or1row nsdb0 {
      select comments from user_tab_comments where table_name = 'ACS_OBJECTS'
      }"
    ("uplevel" body line 1)
    invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql"
    invoked from within
"db_exec 0or1row $db $full_name $sql"
    invoked from within
"set selection [db_exec 0or1row $db $full_name $sql]"
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $code_block "
    invoked from within
"db_with_handle db {
	set selection [db_exec 0or1row $db $full_name $sql]
    }"
    (procedure "db_string" line 7)
    invoked from within
"db_string table_comment "select comments from user_tab_comments where table_name = '[string toupper $table_name]'" -default """
    invoked from within
"if { [exists_and_not_null table_name] } {

Objects down the hierarchy like Relationship work fine. The error occurs on an 4.6.2 (tarball install) and PG 7.3.2 installation. I have 4.6.1 installed on another server with PG 7.2.4 and it works fine. I just got an additional drive for my laptop and I'm going to go ahead and sacrifice it to the cause and install Linux with PG 7.2.4 and 4.6.2 on it from the tarball since this should be the stable reference version and test all this out.

BTW - If anyone is using Jeff's photo-album, don't move to PG 7.3.2. Simply put - they are not compatible. I guess the same caveat goes for packages not in the core unless the maintainers have moved their code to work with 7.3.2 and have explicitly said so. I was experimenting with Jeff's photo album on my 7.2.4 installation and I naively installed it on 4.6.2/7.3.2 and it bombed. I knew well enough that I should have checked the code before...Once I get through some things I'll go into photo-album and fix what I can and try again. I'll diff to Jeff the fixes.

Collapse
2: Re: Another 4.6.2 Bug (response to 1)
Posted by Randy Ferrer on

Ok got everything set-up and have a fresh copy of 4.6.2(tarball)/7.2.4 running and I can confirm that the above bug is related to PG 7.3.2 as are the problems I've experienced with the blogger in posting replies to articles. Seems that 4.6.2 is less than ready for 7.3.2...

Don - I'll continue testing against 7.3.2. Besides the semantic changes in timestamp, are there any changes in 7.2.4 -> 7.3.2 that are an issue for oacs 4.6.2? I'm reading the docs, but you've worked with both PG versions a lot longer than I - anything you can share is appreciated. Thanks.

Collapse
3: Re: Another 4.6.2 Bug (response to 1)
Posted by Don Baccus on
Oh, yuck, this implies a change to the semantics of the system table or view that maps comments to a table (via the SQL "comment on foo" command.)

This should answer your last question (yes, apparently there are semantic differences beyond timestamp.)  I won't worry too much about this - I suspect acs_objects may actually have more than one "comment on" and that 7.2 may not have kept more than one around while 7.3 does, something along those lines.  I'll look into it.  Sorry we missed this in testing, direct object administration is something that's rarely used since in large installations it's useless.

Yeah, please let Jeff know about the photo-album stuff that breaks for 7.3, we will be officially supporting 7.3 for now on and he'll want to fix it, without doubt.

Probably simple stuff, I'd imagine.

Collapse
4: Re: Another 4.6.2 Bug (response to 1)
Posted by Randy Ferrer on
I'll keep testing other packages on 4.6.2/7.3.2 as well. So far it looks like the major problem is in ACS Messaging & General Comments - so far I have no idea what's going on there. On the surface of it, it looks like photo-album may not take much time to update. BTW - I'm having way too much fun having oacs on a laptop. I don't know why I didn't do this sooner. 😊
Collapse
5: Re: Another 4.6.2 Bug (response to 1)
Posted by Don Baccus on
Yeah, I do most of my work on my laptop these days, though my new machine's so much faster than it that it may draw me back ...

Anyway, I've upgrade acs-kernel to fix the problem you discovered with the user_tab_comment view.  You can run acs-kernel/sql/postgresql/upgrade/upgrade-4.6.2-4.6.3.sql by hand, it just drops and redefines the view properly (we'll probably end up releasing a 4.6.3 quickly while we work on localization for 5.0)

Collapse
6: Re: Another 4.6.2 Bug (response to 1)
Posted by Randy Ferrer on

4.6.2/7.3.2 Schema Browser is returning:

Database operation "select" failed (exception NSDB, "Query was not a statement returning rows.")
    while executing
"ns_pg_bind select nsdb0 {
        select
          rcname as constraint_name,
          rcsrc as constraint_source
        from
         pg_relcheck r..."
    ("uplevel" body line 1)
    invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql"
    invoked from within
"db_exec select $db $full_statement_name $sql"
    invoked from within
"set selection [db_exec select $db $full_statement_name $sql]"
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $code_block "
    invoked from within
"db_with_handle db {
	set selection [db_exec select $db $full_statement_name $sql]
Collapse
7: Re: Another 4.6.2 Bug (response to 1)
Posted by Randy Ferrer on
Don - Searched CVS for .../upgrade-4.6.2-4.6.3.sql but didn't find it. I guess you haven't had a chance to commit the file? I'll catch it tomorrow or whenever. Just completed some client work today, so I should have a lot more time this week to dedicate to testing and stuff. I should be able to go through all or most all 4.6.2 by early this week. I'll continue posting bugs in this thread? Once done, I'll jump into debugging and do whatever I can on that end. Thanks.
Collapse
8: Re: Another 4.6.2 Bug (response to 1)
Posted by Don Baccus on
It's in the attic, apparently because it only exists in the 4.6 branch.  I deleted my "acs-kernel/sql/postgresql/upgrade" directory in my 4.6 branch checkout, did a "cvs update -d" and  cvs did grab 4.6.2-4.6.3 just fine ...
Collapse
9: Re: Another 4.6.2 Bug (response to 1)
Posted by Randy Ferrer on

Ok. I just finished going through all the packages and this is what's broken against PG 7.3.2: acs-schema, acs-person, address-book, CMS (sitemap & templates) CMS search isn't working for me on any platform, general-comments/acs-messaging, Monitoring (Table Analysis doesn't work at all), News, Jeff's photo-album (didn't test the original photo-album)

I still need to look into a couple of things, but this seems to be the bulk of it.

Collapse
10: Re: Another 4.6.2 Bug (response to 1)
Posted by Jon Griffin on
acs-person is deprecated,so I wouldn't bother fixing that.
Collapse
11: Re: Another 4.6.2 Bug (response to 1)
Posted by Don Baccus on
I just committed a fix for acs-messaging ...

Thanks for your good work ferreting out brokeness, Randy, it's a big help.

Collapse
12: Re: Another 4.6.2 Bug (response to 1)
Posted by Jon Griffin on
To save some work, here is the fix for schema browser: In sb_get_table_description
select
          conname as constraint_name,
          consrc as constraint_source
        from
         pg_constraint r join (select oid from pg_class where relname = lower(:table_name)) c
           on (c.oid = r.conrelid)
        order by constraint_name

The problem is the changed system catalog names, but this should fix your problem. I don't know when I will have time to patch the proc, it needs an if for pg_version.

Collapse
13: Re: Another 4.6.2 Bug (response to 1)
Posted by Jon Griffin on
The updated schema-browser file is in cvs.
Collapse
14: Re: Another 4.6.2 Bug (response to 1)
Posted by Randy Ferrer on

No problem Don. I'm happy to help out and contribute in any way I can. You guys are sure quick with fixes! 😊 Now - I'm still not satisfied I got everything, so between tomorrow and end of Wednesday (I'm on the East Coast) I think I should be through with my testing. There are some modules I'm not satisfied that I've tested through and through. Unfortunately I got called away with an emergency and could not finish most of it today. If I find anything else I'll post it in this thread or else let everyone know that I found nothing else.

BTW - I have an old server, recently shored-up that I've set-up strictly for oacs testing purposes. I will install some stress testing software I have and overtime adapt it to oacs as well. If anyone has anything along these lines geared to oacs, I would like to hear about it. Anyway, as you move forward with new development, I'll be happy to test new releases or whatever - that server, is now dedicated to that. I also have some updates for deprecated procs for Lars-Blogger that I need to submit patches for. Tempus fugit....

Collapse
15: Re: Another 4.6.2 Bug (response to 1)
Posted by Don Baccus on
Check out tclwebtest, it allows for the writing of tcl scripts that do http requests, check for results via regexp, that sort of thing.  For blind dumb-assed load testing apache bench is easy to use and distributed with Linux as "ab".

There's also an automated test package in OpenACS that we want to start using more, as people get time to do so.

Jon: thanks for the schema browser fix.

Collapse
16: Re: Another 4.6.2 Bug (response to 1)
Posted by Randy Ferrer on
Is the Ticket Tracker stuff going to be maintained going forward? Also, is Workflow 0.2d2 the latest version? Thanks.
Collapse
17: Re: Another 4.6.2 Bug (response to 1)
Posted by Randy Ferrer on
More brokeness on 7.3.2... Found Workflow Package 0.2d2 brakes when trying to "Start a new case". Ticket Tracker based on Workflow is broken as well if you try to create a new ticket. More to do tomorrow. BTW - Thanks Don and Jon for your fixes. It is really appreciated. Will there be a new tarball with these updates?
Collapse
18: Re: Another 4.6.2 Bug (response to 1)
Posted by Peter Marklund on
Randy,
thanks for this great PG 7.3 effort!

Concerning Ticket Tracker I don't know if it will be maintained but I doubt it. I personally don't think it is in the best interest of this community to maintain multiple packages with the same feature set, i.e. we shouldn't put time into Ticket Tracker when we have Bug Tracker (also functions for tasks with arbitrary workflows), we shouldn't maintain bboard when we have forums.

I think the OpenACS core team should decide on a limited set of quality applications (basically those in .LRN and a few others) and put some of the old ones to the side. To me, this clean up is akin to removing deprecated procs, something I think we should consider btw for the 5.0 release of OpenACS.

Collapse
19: Re: Another 4.6.2 Bug (response to 1)
Posted by Randy Ferrer on

Hi Peter - I agree. It doesn't seem like a very difficult decision to make and implement, other than perhaps there are some legacy sites out there that are utilizing for example, Ticket Tracker, and for whatever reason have not moved to Bug Tracker. This is a minor issue IMHO. Besides, removing these "deprecated" packages from the core distribution does not mean that they have to be gone forever. It's easy enough to create an archive for deprecated packages. Anyone who is interested can download and play with the caveat the those packages are "unsupported".

I know that one goal for oacs is to move all application packages outside the core distribution to a central repository making the core distribution smaller. I think this is a good first step in that direction and it would streamline efforts moving forward. I've also begun the task of cleaning deprecated procs out of the distribution and for a start submitted patches for acs-subsite/www/register. I have some coming up for Lars-blogger. I hope to complete this for the kernel/acs-subsite by end of this month with the rest of the packages to follow. Not having to worry about packages that aren't going to be around soon would of course streamline that effort as well...

Collapse
20: Re: Another 4.6.2 Bug (response to 1)
Posted by Don Baccus on
With regard to deprecated procs, we need to announce to people when they'll start disappearing well in advance, otherwise their code will break.  In particular we have folks who moved their old 4.2 sites over to the OpenACS 4 core under Oracle, removing deprecated procs will break this legacy code.

We need to do it ... the questions are "when" and "with how much advance notification".

I don't mind removing the old ticket tracker apps once we have  an "obsolete package" repository available.

Collapse
21: Re: Another 4.6.2 Bug (response to 1)
Posted by Randy Ferrer on

Thanks for that Don. Well, then it seems the thing to do is to go ahead and make all the patches for the changes and once that is done, a decision regarding when to implement them and how much advance notice to give can be made... I'll continue making changes and making patches and then the core team can decide when and how you want to implement them. Sound like a plan?

Regarding obsolete packages - it looks like there's a general concensus on this issue. If indeed that is the case, then we just need a volunteer with access to openacs.org to make an "obsolete package repository" so we can clean the distribution a bit. Anyone???

Collapse
22: Re: Another 4.6.2 Bug (response to 1)
Posted by Don Baccus on
Surely we'll take patches removing *calls* to deprecated procs right now, my comments were in regard to removing the deprecated proc declarations themselves.  We do need testing to make sure that the replacements work as advertised, of course, but you seem quite dogmatic on this point so I'm not too worried.  We should work this towards OpenACS 5 (what we've called 4.7 in the past, i.e. our next big release early this summer) as was mentioned above.
Collapse
23: Re: Another 4.6.2 Bug (response to 1)
Posted by Peter Marklund on
Randy and Don, looking at the current cvs structure I propose adding the directory obsolete next to contrib and packages. The obsolete directory could contain a packages directory like the contrib one does. I have started a separate package inventory thread in this forum.
Collapse
24: Re: Another 4.6.2 Bug (response to 1)
Posted by Randy Ferrer on
Don - Yes, I like to test early and as often as it is logically possible. I do test all patches and any updates before uploading them to be sure they function properly. One of the reasons I set-up my test server is to facilitate, this process. But as you know, it never hurts to have as many people testing as much as possible under as many different conditions as possible. 😊) This is probably overkill for a simple process of removing calls to deprecated procs - but a second look never hurts. Anyway, I should have all the packages patched way ahead of time of the proposed 5.0 release. So, I'm totally commiting myself publicly to completing this work for the next release. My only question is - how do you guys prefer that I send these patches? Do you want me to collect them and upload in a single batch or upload to patches as I make them? It's the same to me - whatever is easier for you guys....
Collapse
25: Re: Another 4.6.2 Bug (response to 1)
Posted by Randy Ferrer on
PG 7.3.2 Compatibility Testing Final Results

I just completed testing of the full oacs distribution and these are my results. The following modules have problems:

  1. address-book - Can't add a contact.
  2. CMS - Sitemap and templates links are not functioning
  3. Monitor - Statistics from top and Table analysis return db errors
  4. News - Can't create a news item.
  5. Ticket Tracker based on workflow package - Can't create a ticket.
  6. ACS-Workflow - Can't start any new case
  7. MP3-Jukebox - Followed the instructions faithfully and could not get any joy. Can't get into the admin functions since I get an error returned. Not sure what the problem is, I really did not look much further than that it was not working after I followed instructions...no time. But I would like to get this running...
  8. acs-person - Can't create a new person.

I included "obsolete" modules for completeness and in case anyone wants to add an "known issues" to the docs for those packages. acs-schema, general-comments, acs-messaging, static-pages, lars-blogger are all working correctly. I created my own little shop in ecommerce and it's working nicely. Core Kernel admin functions like creating groups etc. are also functioning correctly.

There are some things I could not test throughly so perhaps someone can pitch in here. Functions like notifications etc. seem to be ok. But my sendmail is really broken on that machine - I will be installing qmail over the weekend, but until I do, I can't very well test the functionalities that send out mail. More importantly, I think that the acs-subsite stuff that requires sending out mail should be tested by someone. It should not take more than 30 mins to do this. I also did not test Robot-Detection or the gateway stuff. The user-preference package looks like it has a lot of promise. The apm loaded it, but something seemed strange. No postgresql model... It still got loaded by apm when it should have been under the PG incompatible list.

Having gone through the modules in the past few days has given me a much better holistic view of oacs. I have TONS of ideas that I will organize and take a look at soon. Please let me know if anything else is required on the testing end. I'll (work load permitting) look into fixing some of these issues in the next few days. 😊)

Collapse
26: Re: Another 4.6.2 Bug (response to 1)
Posted by Randy Ferrer on
Please look at the full thread for a broader picture of other packages that I looked at not mentioned above that are also broken. Thanks.
Collapse
27: Re: Another 4.6.2 Bug (response to 1)
Posted by Tom Jackson on
According to this thread, Calendar is also broken. I checked it and it is true: no permissions check. Any user can post to any public Calendar. Actually they are encouraged to do so, as they appear in the drop down list of choices! I'll try to look into this for a quick fix.
Collapse
28: Re: Another 4.6.2 Bug (response to 1)
Posted by Randy Ferrer on
Hi Tom - Yeah I didn't go any farther since my testing was primarily to dig up compatibility issues with PG 7.3.2 but you're right - Calendar seems to be a package that has been mentioned several times on the forums as having issues. Thanks for pointing that out and looking into it. 😊)
Collapse
29: Re: Another 4.6.2 Bug (response to 1)
Posted by Randy Ferrer on

I've just discovered another bug in /acs-admin/users on 4.6.2/7.3.2. If you try to do a complex query using the group drop down, a db error is generated:

Database operation "select" failed (exception NSDB, "Query was not a statement returning rows.")
    while executing
"ns_pg_bind select nsdb0 {select distinct first_names, last_name, email, member_state, email_verified_p, cu.user_id
from cc_users cu, group_member_map ..."
    ("uplevel" body line 1)...

This error occurs only when a selection is made in the Group drop down.

Also, a friend who has been testing oacs as well, tells me that he has not been able to get the Registration Requires Email Verification functionality to work or for that fact any of the acs-subsite mail functions. He's running sendmail. Is qmail required? I don't think so, but perhaps someone can clarify. Is there special set-up required? His sendmail is working fine with other apps... Also, if someone can test the email stuff out, it would be great.

Collapse
30: Re: Another 4.6.2 Bug (response to 1)
Posted by Randy Ferrer on
Traced the email issue to a misconfig in sendmail, fixed it and everything is working well. Just finished testing the acs-subsite email stuff and everything is functioning so far. I apologize, I should have fixed my config error prior to posting and retested. 😟(( It's no excuse but things have been rather crazy lately...The acs-admin/users bug is still an issue though unless someone has fixed it...
Collapse
31: Re: Another 4.6.2 Bug (response to 1)
Posted by Matt Fulghum on
If y'all are looking for bugs related to pg 7.3.2 w/4.6.2, there's still at least one issue in the calendar.  try to create a recurring calendar item, and it returns a pg error, one of those

Database operation "0or1row" failed (exception NSINT, "Query returned more than one row.")
    while executing

kinda errors.

already filed a bug report, but ran across this thread, and figured I'd put it here too.

Thanks,

mhf.