tags:

views:

48

answers:

3

Hi,

I have a maven project which builds OK locally (windows). When i try to build it on our svn server (linux) it hangs when running tests.

I see a tmp file which is created:

nfs0000000001e9c8a900000017

in the following dir from my test module:

/project_name-test/target/surefire-reports

The config in the pom is:

<plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <dependencies/>
            <configuration>
                <systemProperties>
                    <property>
                        <name>java.io.tmpdir</name>
                        <value>${basedir}/target/tmp</value>
                    </property>
                </systemProperties>
                <skip>true</skip>
                <suiteXmlFiles>
                    <suiteXmlFile>
                        src/test/conf/testng.xml
                    </suiteXmlFile>
                </suiteXmlFiles>
                <childDelegation>true</childDelegation>
                <argLine>-Dsun.lang.ClassLoader.allowArraySyntax=true</argLine>
            </configuration>
            <executions>
                <execution>
                    <phase>integration-test</phase>
                    <goals>
                        <goal>test</goal>
                    </goals>
                    <configuration>
                        <skip>false</skip>
                    </configuration>
                </execution>
            </executions>
        </plugin>

Please note that a full checkout and build in /tmp folder works great but on

/var/build/build/project_name/up-docstore/project_name/trunk/project_name-test/target/surefire-reports

fails.

I have a feeling that the .nfs tmp file can give problems...but do not see any workaround.

Can you give me a hint?

Thanks.

UPDATE: what seems to be really strange is that if i press CTRL+Z to send the process in background and type "fg" to continue it, the problem is solved... (the build continues from that hanging state)

+3  A: 

The .nfsXXXX files are due to the so-called "silly rename" that the NFS client does in order to emulate the POSIX delete on last close semantics on top of the stateless NFSv3 protocol.

In other words, they appear when a file is deleted, but some process is still keeping the file opened. When that process exits, the .nfsXXXX file will be deleted for real.

janneb
+1  A: 

Try fuser {filename}

Use fuser to find the process that's locking the file. The nfs file should go away by itself after the process stops.

You might have to kill the process but I suspect it is your maven build itself?

JoseK
+1  A: 

"fixed" it by mounting the build directory to a local disk and only put the maven repository on an NFS mount (because that was the one taking up most of the space).

Cristian Boariu