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

Error 26, Text file busy #34

Closed
mhariri opened this Issue Oct 2, 2017 · 4 comments

Comments

2 participants
@mhariri
Copy link

mhariri commented Oct 2, 2017

Getting this error sporadically during mvn compile:

build	02-Oct-2017 09:25:10	[ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.0:compile-custom (default) on project x-grpc: An error occurred while invoking protoc. Error while executing process. Cannot run program "/apps/bamboo/xml-data/build-dir/x-grpc/target/protoc-plugins/protoc-3.4.0-linux-x86_64.exe": error=26, Text file busy -> [Help 1]

I saw a few references for a similar plugin facing the same issue: os72/protoc-jar#8 and the root cause was a JDK bug, and they worked around it.

More details about the environment:

$ mvn --version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T16:41:47+00:00)
Maven home: /apps/apache-maven-3.3.9
Java version: 1.8.0_102, vendor: Oracle Corporation
Java home: /usr/java/jdk1.8.0_102/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.9-300.fc23.x86_64", arch: "amd64", family: "unix"

Running the maven command from command-line, and plugin configuration is as below:

<plugin>
                <groupId>org.xolstice.maven.plugins</groupId>
                <artifactId>protobuf-maven-plugin</artifactId>
                <version>0.5.0</version>
                <configuration>
                    <protocArtifact>com.google.protobuf:protoc:${protobuf-java.version}:exe:${os.detected.classifier}</protocArtifact>
                    <pluginId>grpc-java</pluginId>
                    <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
                    <checkStaleness>true</checkStaleness>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>compile-custom</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
@mhariri

This comment has been minimized.

Copy link

mhariri commented Oct 2, 2017

This is the workaround they came up with: os72/protoc-jar@b0d2881

@sergei-ivanov sergei-ivanov self-assigned this Oct 2, 2017

@sergei-ivanov

This comment has been minimized.

Copy link
Member

sergei-ivanov commented Oct 2, 2017

That is an interesting one, certainly not something I've come across before. Let me see if I can port that workaround.

@sergei-ivanov

This comment has been minimized.

Copy link
Member

sergei-ivanov commented Oct 2, 2017

Note to self:
os72/protoc-jar@b0d2881

@sergei-ivanov

This comment has been minimized.

Copy link
Member

sergei-ivanov commented Oct 15, 2017

I have committed a similar change that I hope will fix the problem. Unfortunately, I cannot reproduce the problem on my current system, so I cannot tell if it's been fixed. Please give version 0.5.1 a try (I can see it's already been synced to Maven central).

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