googleapis / google-api-java-client

Google APIs Client Library for Java
Apache License 2.0
1.35k stars 698 forks source link

Google drive api gets stuck on uploading files in aix. #2490

Open david-actian opened 6 months ago

david-actian commented 6 months ago

Hi

We are using google drive api to upload files to google drive. The same code works fine with linux and windows, but does not work with aix.

Here is the code:

                    File newMetadata = new File();
                    newMetadata.setName(file.getName());
                    newMetadata.setParents(file.getParents());
                    Drive.Files files = service.files();
                    Update update = files.update(file.getId(), newMetadata, content);
                    update.getMediaHttpUploader().setChunkSize(262144); // Set chunk size to 256KB
                    update.execute();

After our investigation, it finally stops at line 110 of SocketOutputStream.java socketWrite0(…)

image

Here is the call stack: image

These are all the google dependencies we use:

    <dependency>
        <groupId>com.google.api-client</groupId>
        <artifactId>google-api-client</artifactId>
        <version>2.5.1</version>
    </dependency>
    <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>33.2.0-jre</version>
    </dependency>

    <dependency>
        <groupId>com.google.oauth-client</groupId>
        <artifactId>google-oauth-client-jetty</artifactId>
        <version>1.36.0</version>
    </dependency>

    <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-drive</artifactId>
        <version>v3-rev20240509-2.0.0</version>
    </dependency>
suztomo commented 5 months ago

Thank you for reporting the problem. However, I'm afraid it's really challenging to diagnose the problem that only happen in the AIX operating system. SocketOutputStream is from your JDK. I can only recommend to set a break points in many places to see what it is waiting for.

If you have a support contract with Google, please create an issue in the support console. This will ensure a timely response and troubleshooting.