Bug 155273 - "Too many root sets" when using Eclipse
"Too many root sets" when using Eclipse
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2005-04-18 14:52 EDT by Luca Barbieri
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version: fc6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-03-08 18:46:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Luca Barbieri 2005-04-18 14:52:22 EDT
Description of problem:
The message "Too many root sets" sometimes appears, especially using Eclipse.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. See bug 154525

Additional info:
If I am understanding libgcj correctly, it seems that the problem is that some
libraries (such as ant when exporting Eclipse plugins) are mapped several times,
with a root set for each instance.

This results in exceeding the limit in real usage.

Possible fix:
Make the root sets table dynamically sized or raise MAX_ROOT_SETS.
Comment 1 Jakub Jelinek 2005-04-24 08:10:59 EDT
I can't find MAX_ROOT_SETS nor anything similar in libjava, nor such message.
Comment 2 Luca Barbieri 2005-04-24 09:06:27 EDT
It is in Boehm GC: look in boehm-gc/include/private/gc_priv.h

The error message is printed from boehm-gc/mark_rts.c
Comment 3 Andrew Haley 2005-04-24 10:48:08 EDT
The right thing to do is


in boehm-gc/configure.host

IMO this is acceptable for mainline.
Comment 4 Luca Barbieri 2005-04-24 11:41:27 EDT
I agree.

Longer-term, the structures ought to made dynamically sized.
Comment 5 Andrew Haley 2005-04-25 05:46:36 EDT
I don't think that these structures hould be dynamically sized.  Ths simple fact
of it is that we have too many static roots; finding ways to accomodate what is
essentially a bug is not the route I'd like us to take.
Comment 6 Luca Barbieri 2005-04-25 06:09:29 EDT
Aren't static root sets the sets of static variables of each dynamic library (or
an area with pointers to blocks of such variables)?

If so, we would want to have an unlimited number of static root sets, since we
obviously would like to be able to load an unlimited number of libraries.

BTW, it may be possible to just set a very high value for MAX_ROOT_SETS and rely
on virtual memory on-demand allocation.
Comment 7 Andrew Haley 2005-04-25 06:14:59 EDT
Static root sets are indeed the static variables of each dynamic library.

The problem at the present time is that we do a conservative scan of the static
data area.  This is inefficient and can leak memory.  If we do the right thing,
which is to switch to a precise scan of everything except the stack. this issue
will go away.
Comment 8 Luca Barbieri 2005-04-25 06:21:46 EDT
What is the relation of the conservativeness of the scan to the number of root sets?

They seem to be independent issues unless GCJ creates a lot of root sets to try
to avoid covering non-pointer areas.
Comment 9 Andrew Haley 2005-04-25 06:27:14 EDT
The root sets in each shared library exist only because we're conservatively
scanning static data areas.  When we move to a precise scan we will no longer
register these root sets because every static datum is reachable from its class.
Comment 10 Tom Tromey 2006-09-27 14:13:39 EDT
The FC6 gcj has a change that dramatically reduces the number of roots.
I think this bug is fixed there.
If you can try it, please do.
Otherwise I think we should close this PR.
Comment 11 Tom Tromey 2007-03-08 18:46:24 EST
It has been a few months since the last note here.
I believe this was fixed in FC6, so I am closing it.
If you disagree please reopen or comment.  Thanks.

Note You need to log in before you can comment on or make changes to this bug.