Skip to content

[WARN]ReferenceConfig(null) is not DESTROYED when FINALIZE #5855

@lkj41110

Description

@lkj41110

Environment

  • Dubbo version: 2.7.4.1

Steps to reproduce this issue

在dubbo正常启动的时候,会出现很多一样的警告

2020-03-11 22:56:34.344 [Finalizer] [WARN] com.alibaba.dubbo.config.AbstractConfig -  [DUBBO] ReferenceConfig(null) is not DESTROYED when FINALIZE, dubbo version: 2.6.4, current host: 192.168.31.245
2020-03-11 22:56:34.345 [Finalizer] [WARN] com.alibaba.dubbo.config.AbstractConfig -  [DUBBO] ReferenceConfig(null) is not DESTROYED when FINALIZE, dubbo version: 2.6.4, current host: 192.168.31.245
2020-03-11 22:56:34.345 [Finalizer] [WARN] com.alibaba.dubbo.config.AbstractConfig -  [DUBBO] ReferenceConfig(null) is not DESTROYED when FINALIZE, dubbo version: 2.6.4, current host: 192.168.31.245

是从下面触发了finalize()方法发出,但是现在这个里面也已经没有做任何操作了,是不是可以把finalizerGuardian去掉了?

 private final Object finalizerGuardian = new Object() {
        @Override
        protected void finalize() throws Throwable {
            super.finalize();

            if (!ReferenceConfig.this.destroyed) {
                logger.warn("ReferenceConfig(" + url + ") is not DESTROYED when FINALIZE");

                /* don't destroy for now
                try {
                    ReferenceConfig.this.destroy();
                } catch (Throwable t) {
                        logger.warn("Unexpected err when destroy invoker of ReferenceConfig(" + url + ") in finalize method!", t);
                }
                */
            }
        }
    };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions