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

DubboSaveRegistryCache thread cost a lot of cpu time when device is full #4867

Closed
2 tasks
haiyang1985 opened this issue Aug 19, 2019 · 2 comments
Closed
2 tasks

Comments

@haiyang1985
Copy link
Member

  • 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.3 & 2.5.10
  • Operating System version: mac
  • Java version: JDk 1.8

Steps to reproduce this issue

  1. DubboSaveRegistryCache thread cost a lot of cpu when device is full.
 [DUBBO] Failed to save registry store file, cause: No space left on device, dubbo version: 2.0.1, current host: 10.14.129.133
java.io.IOException: No space left on device
	at java.io.FileOutputStream.writeBytes(Native Method)
	at java.io.FileOutputStream.write(FileOutputStream.java:326)
	at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
	at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
	at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
	at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
	at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
	at java.io.BufferedWriter.flush(BufferedWriter.java:254)
	at java.util.Properties.store0(Properties.java:844)
	at java.util.Properties.store(Properties.java:818)
	at com.alibaba.dubbo.registry.support.AbstractRegistry.doSaveProperties(AbstractRegistry.java:169)
	at com.alibaba.dubbo.registry.support.AbstractRegistry$SaveProperties.run(AbstractRegistry.java:490)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
  1. when device is full, it will retry doSaveProperties and log warn in infinite loop.

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

Seems the version check is not takes effect, doSaveProperties should be stopped.

Actual Result

retry doSaveProperties when device is full takes a lot of cpu time.

@mzorro
Copy link
Contributor

mzorro commented Aug 22, 2019

Duplicate of #3746 (#3748)

@haiyang1985
Copy link
Member Author

Duplicate of #3746 (#3748)

Got it, it has been fixed in 2.7.2.

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