So today I wrote a class that counts the occurrences of different modules in addExportedPaths() method and writes to a file(file per thread) every 1k occurrences. This seems to give some insight into which dependencies are used most and seem to be looping.
main:
javax.sql.api:main has occurred 1729000 times.
Main thread's file only has occurences of javax.sql.api in the file.
Controller Boot Thread:
This thread had multiple different "loops" of modules. I'm just going to write down the highest number they reached before crashing. This loop appeared first and last in the file:
javax.api:main has occurred 950000 times.
org.jboss.msc:main has occurred 951000 times.
org.jboss.osgi.deployment:main has occurred 951000 times.
org.jboss.osgi.metadata:main has occurred 951000 times.
org.jboss.osgi.resolver:main has occurred 951000 times.
org.jboss.osgi.spi:main has occurred 951000 times.
org.jboss.osgi.vfs:main has occurred 951000 times.
org.osgi.core:main has occurred 951000 times.
javax.api:main has occurred 951000 times.
org.jboss.msc:main has occurred 952000 times.
Another loop was:
org.jboss.osgi.resolver:main has occurred 847000 times.
org.jboss.osgi.repository:main has occurred 848000 times.
org.jboss.osgi.resolver:main has occurred 848000 times.
org.jboss.osgi.repository:main has occurred 849000 times.
And:
javax.interceptor.api:main has occurred 796000 times.
javax.annotation.api:main has occurred 797000 times.
javax.interceptor.api:main has occurred 797000 times.
javax.annotation.api:main has occurred 798000 times.
And:
org.jboss.jts:main has occurred 872000 times.
javax.orb.api:main has occurred 873000 times.
org.jboss.jts:main has occurred 873000 times.
javax.orb.api:main has occurred 874000 times.
On top of these
org.osgi.core:main, org.jboss.logmanager:main and javax.activation.api:main appeared multiple times in a row in the file like this:
javax.activation.api:main has occurred 152000 times.
javax.activation.api:main has occurred 153000 times.
It seems like my counter was not thread safe enough because the above mentioned loops often started on top of another like: javax.annoorg.jboss.osg.repository:main has occurred X times. But I still believe it did its job.
Service Thread 1-1:
com.vividsolutions.jts:main has occurred 974000 times.
javax.api:main has occurred 975000 times.
javax.inject.api:main has occurred 975000 times.
org.apache.xerces:main has occurred 975000 times.
org.jboss.as.controller-client:main has occurred 975000 times.
org.jboss.as.osgi:main has occurred 975000 times.
org.jboss.dmr:main has occurred 975000 times.
org.jboss.logging:main has occurred 975000 times.
org.jboss.modules:main has occurred 975000 times.
org.jboss.msc:main has occurred 975000 times.
org.jboss.osgi.framework:main has occurred 975000 times.
org.jboss.osgi.provision:main has occurred 975000 times.
org.jboss.osgi.repository:main has occurred 975000 times.
org.jboss.osgi.resolver:main has occurred 975000 times.
org.slf4j:main has occurred 975000 times.
org.slf4j.impl:main has occurred 975000 times.
org.omg.api:main has occurred 975000 times.
org.hibernate:main has occurred 975000 times.
org.apache.log4j:main has occurred 975000 times.
com.vividsolutions.jts:main has occurred 975000 times.
javax.api:main has occurred 976000 times.
Service thread 1-1 actually only printed these modules until the whole application crashed. 1k was reached only when the problem bundle was being started. So these modules had their "getDependenciesInternal()" fed to addExportedPaths() almost million times.
Service Thread 1-3:
This thread had many different loops similar to Controller Boot Thread.
Most common:
deployment.com.springsource.org.apache.tools.an:1.8.1 has occurred 218000 times
jbosgi.framework:main has occurred 219000 times.
javax.xml.bind.api:main has occurred 219000 times
org.apache.commons.codec:main has occurred 219000 times
org.slf4j.jcl-over-slf4j:main has occurred 219000 times
deployment.com.springsource.org.apache.tools.an:1.8.1 has occurred 219000 times
jbosgi.framework:main has occurred 220000 times.
Others:
jbosgi.framework:main has occurred 17000 times
deployment.com.springsource.org.aopalliance:1.0.0 has occurred 18000 times
org.slf4j.jcl-over-slf4j:main has occurred 18000 times.
org.apache.commons.pool:main has occurred 18000 times.
deployment.org.apache.servicemix.bundles.spring-beans:4.2.5.RELEASE_1 has occurred 18000 times.
deployment.org.apache.servicemix.bundles.spring-core:4.2.5.RELEASE_1 has occurred 18000 times.
jbosgi.framework:main has occurred 18000 times.
deployment.com.springsource.org.aopalliance:1.0.0 has occurred 19000 times
and the second longest "loop":
deployment.org.apache.service mix.bundles.spring-expression:4.2.5.RELEASE_1 has occurred 13000 times.
deployment.com.springsource.edu.emory.mathcs.backport:3.1.0 has occurred 14000 times.
javax.annotation.api:main has occurred 14000 times.
jbosgi.framework:main has occurred 14000 times.
org.omg.api:main has occurred 14000 times.
javax.jms.api:main has occurred 14000 times.
javax.persistence.api:main has occurred 14000 times.
javax.validation.api:main has occurred 14000 times.
deployment.org.apache.servicemix.specs.jaxws-api-2.2:2.2.0 has occurred 14000 times.
deployment.com.springsource.org.aopalliance:1.0.0 has occurred 14000 times.
org.slf4j.jcl-over-slf4j:main has occurred 14000 times.
deployment.self.bundled.org.joda.time:2.3.0 has occurred 14000 times.
deployment.org.apache.servicemix.bundles.spring-aop:4.2.5.RELEASE_1 has occurred 14000 times.
deployment.org.apache.servicemix.bundles.spring-core:4.2.5.RELEASE_1 has occurred 14000 times.
deployment.org.apache.servicemix.bundles.spring-beans:4.2.5.RELEASE_1 has occurred 14000 times.
deployment.org.apache.servicemix.bundles.spring-expression:4.2.5.RELEASE_1 has occurred 14000 times.
deployment.com.springsource.edu.emory.mathcs.backport:3.1.0 has occurred 15000 times.
Other service threads had nothing written in their files.
None of our own bundles were mentioned in any of the files, just 3rd party dependencies. Hope this gives some insight to how the dependencies are being handled and what's wrong with them. A lot of these "loops" have modules in them. When I looked at the module.xmls for example javax.api has a dependency on javax.sql.api and vice versa. Same is true for org.slf4j and org.slf4j.impl as well as javax.orb.api and org.jboss.jts. Maybe I'm using system modules wrong?
EDIT: Whoops. Accidentally posted while typing out the loops.
EDIT2: Overlined threads. Look next post.