Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dubbo 2.7.5 start.sh -Xss=256K is small? #5745

Closed
2 tasks done
byronzoz opened this issue Feb 15, 2020 · 1 comment
Closed
2 tasks done

dubbo 2.7.5 start.sh -Xss=256K is small? #5745

byronzoz opened this issue Feb 15, 2020 · 1 comment
Assignees
Milestone

Comments

@byronzoz
Copy link

byronzoz commented Feb 15, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.7.5
  • Operating System version: Mac OS 10.15.3 (19D76)
  • Java version: java version "1.8.0_181"/ Java(TM) SE Runtime Environment (build 1.8.0_181-b13)/ Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

Steps to reproduce this issue

  1. use default start.sh shell to start
  2. logger with debug level configuration
  3. throws exception: java.lang.StackOverflowError
[15/02/20 07:32:40:040 CST] main  WARN support.DefaultListableBeanFactory: FactoryBean threw exception from getObjectType, despite the contract saying that it should return null if the type of its object cannot be determined yet
java.lang.StackOverflowError
	at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
	at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:242)
	at java.io.File.exists(File.java:819)
	at sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:1282)
	at sun.misc.URLClassPath.getResource(URLClassPath.java:239)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:365)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at org.apache.dubbo.config.ReferenceConfigBase.getInterfaceClass(ReferenceConfigBase.java:183)
	at org.apache.dubbo.config.spring.ReferenceBean.getObjectType(ReferenceBean.java:73)
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getTypeForFactoryBean(FactoryBeanRegistrySupport.java:65)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getTypeForFactoryBean(AbstractBeanFactory.java:1375)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:750)
	at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:529)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:359)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:322)
	at org.springframework.context.support.AbstractApplicationContext.getBeanNamesForType(AbstractApplicationContext.java:1174)
	at org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors(BeanFactoryUtils.java:144)
	at com.alibaba.spring.util.BeanFactoryUtils.getBeans(BeanFactoryUtils.java:80)
	at com.alibaba.spring.util.BeanFactoryUtils.getOptionalBean(BeanFactoryUtils.java:59)
	at org.apache.dubbo.config.spring.extension.SpringExtensionFactory.getExtension(SpringExtensionFactory.java:69)
	at org.apache.dubbo.common.extension.factory.AdaptiveExtensionFactory.getExtension(AdaptiveExtensionFactory.java:47)
	at org.apache.dubbo.common.extension.ExtensionLoader.injectExtension(ExtensionLoader.java:642)
	at org.apache.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:599)
	at org.apache.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:392)
	at org.apache.dubbo.rpc.model.ApplicationModel.getConfigManager(ApplicationModel.java:92)
	at org.apache.dubbo.config.AbstractConfig.addIntoConfigManager(AbstractConfig.java:582)
	at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
......
[15/02/20 07:32:40:040 CST] Thread-1  WARN support.ClassPathXmlApplicationContext: Exception thrown from ApplicationListener handling ContextClosedEvent
java.lang.NoClassDefFoundError: Could not initialize class org.springframework.beans.factory.BeanCreationException
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:529)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
	at org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:170)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:86)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
	at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1049)
	at org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:980)
[15/02/20 07:32:40:040 CST] Thread-1  WARN support.ClassPathXmlApplicationContext: Exception thrown from LifecycleProcessor on context close
java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: org.springframework.context.support.ClassPathXmlApplicationContext@2aa3cd93: startup date [Sat Feb 15 19:32:36 CST 2020]; root of context hierarchy
	at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:360)
	at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1057)
	at org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:980)

Solve by the steps:

  1. copy the start.sh from dubbo to a individual place
  2. change the -Xss to 512K in start.sh
  3. start the system and it seems ok

Does the -Xss=256K is too small ? So not all the Beans can be loaded by the JVM?
So I wonder if -Xss is a configurable option?

@mercyblitz
Copy link
Contributor

Thanks for your report, I think the stack space should be bigger in the Spring scenario.

@mercyblitz mercyblitz self-assigned this Feb 18, 2020
@mercyblitz mercyblitz added this to the 2.7.6 milestone Feb 18, 2020
mercyblitz added a commit to mercyblitz/dubbo that referenced this issue Feb 18, 2020
mercyblitz added a commit that referenced this issue Feb 19, 2020
… register (#5756)

* Polish /#5745 : Increasing the stack size in the start.sh

* Polish /#5297 : Only one of the multiple registration centers using nacos can register
mercyblitz added a commit that referenced this issue Feb 20, 2020
* Polish /#5745 : Increasing the stack size in the start.sh

* Polish /#5297 : Only one of the multiple registration centers using nacos can register

* Polish /#5442 : VERSION_KEY和GROUP_KEY为空时,注册到NACOS的服务名与alibaba实现不一致,导致无法消费

* Polish /#5442 : Merge upstream/master

* Polish /apache/dubbo##5239 : Mock字段注入异常

* Polish /apache/dubbo##5239 : Mock字段注入异常
seedeed pushed a commit to seedeed/dubbo that referenced this issue Feb 20, 2020
…os can register (apache#5756)

* Polish /apache#5745 : Increasing the stack size in the start.sh

* Polish /apache#5297 : Only one of the multiple registration centers using nacos can register
seedeed pushed a commit to seedeed/dubbo that referenced this issue Feb 20, 2020
* Polish /apache#5745 : Increasing the stack size in the start.sh

* Polish /apache#5297 : Only one of the multiple registration centers using nacos can register

* Polish /apache#5442 : VERSION_KEY和GROUP_KEY为空时,注册到NACOS的服务名与alibaba实现不一致,导致无法消费

* Polish /apache#5442 : Merge upstream/master

* Polish /apache/dubbo#apache#5239 : Mock字段注入异常

* Polish /apache/dubbo#apache#5239 : Mock字段注入异常
mercyblitz added a commit that referenced this issue Feb 21, 2020
* Polish /#5745 : Increasing the stack size in the start.sh

* Polish /#5297 : Only one of the multiple registration centers using nacos can register

* Polish /#5442 : VERSION_KEY和GROUP_KEY为空时,注册到NACOS的服务名与alibaba实现不一致,导致无法消费

* Polish /#5442 : Merge upstream/master

* Polish /apache/dubbo##5239 : Mock字段注入异常

* Polish /apache/dubbo##5239 : Mock字段注入异常

* Polish /#5770 : Removing the interinal JDK API from FileSystemDynamicConfiguration

* Polish /#5771 : [Enhancement] Refactor the APT test-cases implementation of dubbo-metadata-processor in Java 9+

* Bugfix for the test-cases
mercyblitz added a commit that referenced this issue Feb 28, 2020
…erface (#5801)

* Polish /#5745 : Increasing the stack size in the start.sh

* Polish /#5297 : Only one of the multiple registration centers using nacos can register

* Polish /#5442 : VERSION_KEY和GROUP_KEY为空时,注册到NACOS的服务名与alibaba实现不一致,导致无法消费

* Polish /#5442 : Merge upstream/master

* Polish /apache/dubbo##5239 : Mock字段注入异常

* Polish /apache/dubbo##5239 : Mock字段注入异常

* Polish /#5770 : Removing the interinal JDK API from FileSystemDynamicConfiguration

* Polish /#5771 : [Enhancement] Refactor the APT test-cases implementation of dubbo-metadata-processor in Java 9+

* Bugfix for the test-cases

* Polish /#5779 : Rename the local variables

* Add FieldUtils

* Polish /#5795 : [Feature] To support the application choose the preferred network interface

* Polish /#5442 : VERSION_KEY和GROUP_KEY为空时,注册到NACOS的服务名与alibaba实现不一致,导致无法消费
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants