Dealing with yacc stack overflow

January 23, 2007 at 9:41 pm | Posted in Development | 6 Comments

The ‘yacc stack overflow’ error usually occurs when sections of a DQL query contain too many tokens. The most typical example is something like the following:

select * from dm_document where object_name in ('first token','second token',...,'500th token')

If the number of items in the in list exceeds about 490 items a yacc stack overflow occurs. The solution is to split up the long list of tokens into a number of separate constructs. In the case of the example above:

select * from dm_document where object_name in ('first token','second token',...,'485th token') or
object_name in ('486th token',...,'500th token')



RSS feed for comments on this post. TrackBack URI

  1. In your post, you say that this error appears usually, but in my case I do not have such type of query but the error appeared. Any other reason for this error?

  2. I presume the error occurs during the execution of a DQL query. YACC is a text parser that breaks a piece of text up into tokens. The example I give in the post is the only example that I have come across, I’m sure there are other possibilities. What is the code/query you are running?

  3. The error shows some r_object_id that I have checked in dm_sysobject, they were mostly by DQL read/write activities, but after some modifications that did not afected any DQL read/write activities, it worked. I have same type of workflow as the one that worked without errors, but when I tried to apply the same number of activities, it shows the errors, although I just aplied Alter ACL activities to the previous version. I just don’t know what is the reason this happens and how to solve it or avoid it?
    Btw, the most complicated DQLs that I run are these ones (the second one is from Sub Process that is invoked in the first one that shows the errors):
    —-Select user_name from dm_user where user_name in (select alias_value from dm_alias_set where object_name= ‘as_rkv’ and ANY alias_name like ‘sek_fin%’) ENABLE (ROW_BASED, RETURN_TOP 1) —
    —–select r_performers
    from dm_workflow_r where r_object_id=? and r_perf_act_name=’Sektor za Finansii – odgovorno lice’ and r_performers
    not in (select r_accessor_name from dm_acl_r where r_object_id in
    (select r_object_id from dm_acl_s where object_name=? and owner_name=?))

    • Often Documentum content server constructs queries ‘behind the scenes’ that you weren’t expecting. Best way to discover if this is the problem is to have a look at the session logs (located in $DOCUMENTUM/dba/log/ on the content server).

  4. Do you know if there is any limitation of number of activities in one process template?

    • I know of nothing documented but it wouldn’t surprise me if there is a practical limit and maybe you have hit it.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at
Entries and comments feeds.

%d bloggers like this: