GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Channel ManagedChannelImpl{logId=589, target=vision.googleapis.com:443} was not terminated properly · Issue #3912 · googleapis/google-cloud-java

Channel ManagedChannelImpl{logId=589, target=vision.googleapis.com:443} was not terminated properly #3912

New issue
Copy link
New issue
Copy link
Closed
Closed
Channel ManagedChannelImpl{logId=589, target=vision.googleapis.com:443} was not terminated properly#3912
Copy link
Assignees
ajaaym
Labels
api: visionIssues related to the Cloud Vision API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@mcantrell
mcantrell
opened on Nov 6, 2018
Issue body actions

In a concurrent environment, the Vision API client will occasionally log the following error:

Nov 06, 2018 8:07:35 AM io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference cleanQueue
SEVERE: *~*~*~ Channel ManagedChannelImpl{logId=589, target=vision.googleapis.com:443} was not terminated properly!!! ~*~*~*
    Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.
java.lang.RuntimeException: ManagedChannel allocation site
	at io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference.<init>(ManagedChannelOrphanWrapper.java:103)
	at io.grpc.internal.ManagedChannelOrphanWrapper.<init>(ManagedChannelOrphanWrapper.java:53)
	at io.grpc.internal.ManagedChannelOrphanWrapper.<init>(ManagedChannelOrphanWrapper.java:44)
	at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:410)
	at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(InstantiatingGrpcChannelProvider.java:206)
	at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createChannel(InstantiatingGrpcChannelProvider.java:157)
	at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.getTransportChannel(InstantiatingGrpcChannelProvider.java:149)
	at com.google.api.gax.rpc.ClientContext.create(ClientContext.java:149)
	at com.google.cloud.vision.v1.stub.GrpcImageAnnotatorStub.create(GrpcImageAnnotatorStub.java:84)
	at com.google.cloud.vision.v1.stub.ImageAnnotatorStubSettings.createStub(ImageAnnotatorStubSettings.java:120)
	at com.google.cloud.vision.v1.ImageAnnotatorClient.<init>(ImageAnnotatorClient.java:136)
	at com.google.cloud.vision.v1.ImageAnnotatorClient.create(ImageAnnotatorClient.java:117)
	at com.google.cloud.vision.v1.ImageAnnotatorClient.create(ImageAnnotatorClient.java:108)
	at com.acme.vision.support.VisionTerminationErrorTest.executeOcrRequest(VisionTerminationErrorTest.java:60)
	at com.acme.vision.support.VisionTerminationErrorTest.lambda$ocrImage$0(VisionTerminationErrorTest.java:28)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

No error is actually thrown, just logged. I'm attaching a sample project to replicate the condition. Since it doesn't actually throw an exception, I cannot fail the test. You'll need to inspect the log output. You may also need to tweak the number of threads to replicate on your system.

vision-termination-error.zip

Activity

  1. mcantrell commented on Nov 6, 2018

    @mcantrell
    mcantrell
    on Nov 6, 2018
    Author
    More actions

    The following workaround fixes the problem:

     client.shutdown();
     client.awaitTermination(30, TimeUnit.SECONDS);
     client.close();
    

    It feels like client.close() should probably handle this or the documentation updated to include this.

    Reacted by madc0w and madhuparnab
  2. JustinBeckwith
    added
    triage meI really want to be triaged.
    on Nov 7, 2018
  3. chingor13
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Nov 7, 2018
  4. JustinBeckwith
    removed
    triage meI really want to be triaged.
    on Nov 7, 2018
  5. SergeyZadorozhniy
    added a commit that references this issue on Nov 13, 2018

    Fixes for googleapis/google-cloud-java#3912

    9a4cb67
  6. sduskis
    added
    api: visionIssues related to the Cloud Vision API.
    on Nov 19, 2018
  7. talonx commented on Dec 11, 2018

    @talonx
    talonx
    on Dec 11, 2018
    More actions

    The workaround does not work for me. This is with the latest (1.54.0) google-cloud-pubsub lib.

  8. ajaaym commented on Jan 11, 2019

    @ajaaym
    ajaaym
    on Jan 11, 2019
    Contributor
    More actions

    This is fixed in 628. Will be available after new version of gax-java is released

  9. ajaaym
    closed this as completedon Jan 11, 2019
  10. JustinBeckwith
    assigned
    ajaaym
    on Feb 1, 2021
  11. suztomo
    added a commit that references this issue on Mar 9, 2026

    chore(deps): update dependency com.google.cloud:google-cloud-bigquery…

    bb6f6dc
  12. lqiu96
    added a commit that references this issue on Mar 20, 2026

    chore(deps): update dependency com.google.cloud:google-cloud-bigquery…

    a70463d
  13. chingor13
    added 3 commits that reference this issue on Mar 24, 2026

    fix(mtls): Fix EndpointContext's determineEndpoint logic to respect e…

    16591aa

    chore(main): release 2.62.3 (#3914)

    01d50d8

    chore(main): release 6.95.2-SNAPSHOT (#3912)

    abec6ca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @ajaaym
    ajaaym

Labels

api: visionIssues related to the Cloud Vision API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.