Thanks to all for your help! We greatly appreciate it!

Kind regards,
Jordan Rasmussen

On Mon, Jun 22, 2020, 11:24 AM Braxton Van Gundy <[email protected]> wrote:

> We fixed the issue, it turns out the errors we were seeing were a result
> of a cyclic group reference.  I tried to find the group programatically,
> but had issues getting the changes to take in the code.  In the end, I just
> went through each group one by one and looked for circular group
> membership.  It took forever, but eventually I found the offending group
> and removed it in the database.  The table you need to modify is the
> "group2group" table. We deleted the offending entry from this table in the
> psql database and all of our group related internal server errors went
> away.
>
> On Friday, June 19, 2020 at 7:40:37 PM UTC-4, Braxton Van Gundy wrote:
>>
>> Hi Mark, thanks for the reply!  I think this is pointing us in the right
>> direction. Now it's just a matter of getting my changes to
>> GroupServiceImpl.java to actually take so I can figure out which path is
>> the culprit.
>>
>> On Friday, June 19, 2020 at 10:48:29 AM UTC-4, Mark H. Wood wrote:
>>>
>>> The seemingly endless recursion (which caused the stack overflow)
>>> makes me think that there may be a circular group membership
>>> somewhere.  Group A contains group B contains group A would be a
>>> simple example.  The only way I've thought of to look for such a
>>> problem is to inspect the group2group database table.  The content of
>>> that table should represent a collection of directed acyclic graphs.
>>> If one of those graphs is cyclic, GroupServiceImpl.getChildren will
>>> never terminate and will eventually fill the stack.
>>>
>>> I don't have a simple, quick way to find such a cycle, but I found a
>>> few references that will probably tell you more than you ever wanted
>>> to know about the subject, with suggestions for practical solutions.
>>>
>>>
>>> https://stackoverflow.com/questions/261573/best-algorithm-for-detecting-cycles-in-a-directed-graph
>>> https://www.geeksforgeeks.org/detect-cycle-in-a-graph/
>>> https://en.wikipedia.org/wiki/Cycle_(graph_theory)
>>>
>>> I'd read the one at StackOverflow first.  Remember that the table
>>> probably contains *more than one graph*.  The 'epersongroup' table
>>> contains all of the groups and may be helpful for inspecting the whole
>>> collection of graphs.
>>>
>>>
>>>
>>> There's another approach:  add some code to limit the depth of
>>> getChildren, throwing an exception when the limit is hit.  Catching,
>>> logging and then re-throwing the exception in getChildren ought to
>>> show you the problematic path.  This would be similar to the depth-first
>>> search for a cycle suggested in the references above.  I don't know
>>> which way would be better for you.
>>>
>>> We probably ought to have such an (adjustable) depth limit in
>>> getChildren anyway.
>>>
>>> --
>>> Mark H. Wood
>>> Lead Technology Analyst
>>>
>>> University Library
>>> Indiana University - Purdue University Indianapolis
>>> 755 W. Michigan Street
>>> Indianapolis, IN 46202
>>> 317-274-0749
>>> www.ulib.iupui.edu
>>>
>> --
> All messages to this mailing list should adhere to the DuraSpace Code of
> Conduct: https://duraspace.org/about/policies/code-of-conduct/
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "DSpace Technical Support" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/dspace-tech/X9gA_k2bWFA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dspace-tech/4bc91fd1-24cd-42aa-bde7-e0090735bdfdo%40googlegroups.com
> <https://groups.google.com/d/msgid/dspace-tech/4bc91fd1-24cd-42aa-bde7-e0090735bdfdo%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
All messages to this mailing list should adhere to the DuraSpace Code of 
Conduct: https://duraspace.org/about/policies/code-of-conduct/
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/CAAu3LhNeiqVFGXgqH%3DEp6fPN0Fgdjx3T_aiv1eQAmWhn_tPUJg%40mail.gmail.com.

Reply via email to