apache / apache/dubbo-admin

启动服务消费者出现异常java.nio.channels.OverlappingFileLockException: null

Open
#875 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
4.1k
Forks
2.2k
Avg merge
10d 12h
Merged PRs (30d)
4

Description

2022-02-24 17:33:28.417 INFO 20832 --- [ main] o.a.d.r.zookeeper.ZookeeperRegistry : [DUBBO] Notify urls for subscribe url dubbo://192.168.56.1/com.ghy.www.api.IService1?application=my-zookeeper-consumer&background=false&category=providers,configurators,routers&dubbo=2.0.2&interface=com.ghy.www.api.IService1&logger=slf4j&metadata-type=remote&methods=getHello&pid=20832&qos.enable=false&release=3.0.5&side=consumer&sticky=false×tamp=1645695208396, url size: 3, dubbo version: 3.0.5, current host: 192.168.56.1
2022-02-24 17:33:28.418 WARN 20832 --- [ main] o.a.d.r.integration.RegistryDirectory : [DUBBO] Servicecom.ghy.www.api.IService1 received empty address list with no EMPTY protocol set, trigger empty protection., dubbo version: 3.0.5, current host: 192.168.56.1
2022-02-24 17:33:28.427 WARN 20832 --- [andler-thread-1] o.a.d.r.zookeeper.ZookeeperRegistry : [DUBBO] Failed to save registry cache file, will retry, cause: null, dubbo version: 3.0.5, current host: 192.168.56.1

java.nio.channels.OverlappingFileLockException: null
at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255) ~[na:1.8.0_321]
at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152) ~[na:1.8.0_321]
at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1107) ~[na:1.8.0_321]
at java.nio.channels.FileChannel.tryLock(FileChannel.java:1155) ~[na:1.8.0_321]
at org.apache.dubbo.registry.support.AbstractRegistry.doSaveProperties(AbstractRegistry.java:187) ~[dubbo-3.0.5.jar:3.0.5]
at org.apache.dubbo.registry.support.AbstractRegistry$SaveProperties.run(AbstractRegistry.java:555) [dubbo-3.0.5.jar:3.0.5]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_321]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_321]
at java.lang.Thread.run(Thread.java:750) [na:1.8.0_321]

2022-02-24 17:33:28.427 WARN 20832 --- [andler-thread-2] o.a.d.r.zookeeper.ZookeeperRegistry : [DUBBO] Failed to save registry cache file, will retry, cause: null, dubbo version: 3.0.5, current host: 192.168.56.1

java.nio.channels.OverlappingFileLockException: null
at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255) ~[na:1.8.0_321]
at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152) ~[na:1.8.0_321]
at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1107) ~[na:1.8.0_321]
at java.nio.channels.FileChannel.tryLock(FileChannel.java:1155) ~[na:1.8.0_321]
at org.apache.dubbo.registry.support.AbstractRegistry.doSaveProperties(AbstractRegistry.java:187) ~[dubbo-3.0.5.jar:3.0.5]
at org.apache.dubbo.registry.support.AbstractRegistry$SaveProperties.run(AbstractRegistry.java:555) [dubbo-3.0.5.jar:3.0.5]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_321]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_321]
at java.lang.Thread.run(Thread.java:750) [na:1.8.0_321]

2022-02-24 17:33:28.428 INFO 20832 --- [ main] o.a.d.r.c.m.MetadataServiceNameMapping : [DUBBO] com.ghy.www.api.IService1 mapping to [my-zookeeper-provider] instructed by remote metadata center., dubbo version: 3.0.5, current host: 192.168.56.1

Contributor guide

Open the contributing guide

Research direction

Start at org.apache.dubbo.registry.support.AbstractRegistry.doSaveProperties around line 187, then follow AbstractRegistry.SaveProperties.run and the concurrent startup path shown in the stack trace. Reproduce the consumer startup with Dubbo 3.0.5 and verify that registry cache saving no longer emits OverlappingFileLockException warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.