You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2011/05/18 11:32:44 UTC
DO NOT REPLY [Bug 51216] New: chmod task when build is run using
sudo hangs.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51216
Bug #: 51216
Summary: chmod task when build is run using sudo hangs.
Product: Ant
Version: 1.6.2
Platform: Other
OS/Version: AIX
Status: NEW
Severity: normal
Priority: P2
Component: Core tasks
AssignedTo: notifications@ant.apache.org
ReportedBy: silvano_lutri@it.ibm.com
Classification: Unclassified
I run a .sh script using sudo that invokes Ant. It copies file and run chmod on
them.
When it arrives to the chmod task it hangs.
Here a subset of my Ant script:
-----------------------------------------------------------------------------
<project name="CustomizeSQLScripts" default="everything" basedir=".">
<description>
This build file is used to customize the sql scripts used to create the
database
</description>
<property name="src" location="."/>
<target name="createDBtools_DB2" description="The target to create in the
temp dir the structure of the DB tools when using DB2">
<mkdir dir="${TWSTEMPDIR}/scripts"/>
<copy file="${DBSETUPSCRIPT}" todir="${TWSTEMPDIR}/scripts"
overwrite="true"/>
<mkdir dir="${TWSTEMPDIR}/sql"/>
<chmod dir="${TWSTEMPDIR}/scripts" perm="755" includes="**/*"/>
<chmod dir="${TWSTEMPDIR}/sql" perm="755" includes="**/*"/>
</target>
<target name="customize_migratedb_root_sh" description="The target to
customize the launching script used to migrate the database on Unix">
<filter token="DB2LOCALADMINUSER" value="${DB2LOCALADMINUSER}"/>
<filter token="TWSTEMPDIR" value="${TWSTEMPDIR}"/>
<copy tofile="${TWSTEMPDIR}/scripts/migratedb_root.sh" filtering="true"
overwrite="true">
<fileset dir="${src}">
<filename name="_migratedb_root.sh"/>
</fileset>
</copy>
<copy file="dbupgrade.sh" todir="${TWSTEMPDIR}/scripts"
overwrite="true"/>
<copy file="dbmigrate.sh" todir="${TWSTEMPDIR}/scripts"
overwrite="true"/>
<chmod file="${TWSTEMPDIR}/scripts/migratedb_root.sh" perm="755"/>
<chmod file="${TWSTEMPDIR}/scripts/dbupgrade.sh" perm="755"/>
<chmod file="${TWSTEMPDIR}/scripts/dbmigrate.sh" perm="755"/>
</target>
<target name="everything"
depends="createDBtools_DB2,
customize_migratedb_root_sh"
description="The default target">
</target>
</project>
And here the output of Ant executed in debug mode:
----------------------------------------------------------------------------
> sudo ./commandToRun.sh
Apache Ant version 1.6.2 compiled on July 16 2004
Buildfile:
/software/TWS/8.5.1/TWS/AIX/./../AIX/tws_tools/customizeS
QLScripts4upgrade84.xml
Detected Java version: 1.4 in:
/tmp/istemp3538996112160829/_bundledJRE_
Detected OS: AIX
parsing buildfile
/software/TWS/8.5.1/TWS/AIX/tws_tools/customizeSQLScripts
4upgrade84.xml with URI =
file:///software/TWS/8.5.1/TWS/AIX/tws_tools/customizeSQL
Scripts4upgrade84.xml
Project base dir set to:
/software/TWS/8.5.1/TWS/AIX/tws_tools
Build sequence for target `everything' is
[detectCurrentOSFamily, defineOSSpecificPlatformFlag,
define_db_use, define_db2Win, define_db2Unix,
define_oracleWin, define_oracleUnix, createDBtools_DB2,
createDBtools_Oracle, customize_migratedb_root_bat,
customize_migratedb_root_oracle_bat,
customize_migratedb_root_sh,
customize_migratedb_root_oracle_sh, customizeSQL,
customizeOracleSQL, chmodSqlDir, chmodSqlStdedDir,
everything]
Complete build sequence is [detectCurrentOSFamily,
defineOSSpecificPlatformFlag, define_db_use,
define_db2Win, define_db2Unix, define_oracleWin,
define_oracleUnix, createDBtools_DB2,
createDBtools_Oracle, customize_migratedb_root_bat,
customize_migratedb_root_oracle_bat,
customize_migratedb_root_sh,
customize_migratedb_root_oracle_sh, customizeSQL,
customizeOracleSQL, chmodSqlDir, chmodSqlStdedDir,
everything, ]
detectCurrentOSFamily:
defineOSSpecificPlatformFlag:
define_db_use:
define_db2Win:
Property ${isWindows} has not been set
define_db2Unix:
define_oracleWin:
Property ${isWindows} has not been set
Property ${DB_ORACLE} has not been set
define_oracleUnix:
Property ${DB_ORACLE} has not been set
createDBtools_DB2:
[copy] Copying 1 file to /tmp/TWA/tws851/scripts
[copy] Copying
/software/TWS/8.5.1/TWS/AIX/tws_tools/dbmigrate.sh to
/tmp/TWA/tws851/scripts/dbmigrate.sh
[chmod] Current OS is AIX
[chmod] Executing 'chmod' with arguments:
[chmod] '755'
[chmod] '/tmp/TWA/tws851/scripts/dbmigrate.sh'
[chmod] '/tmp/TWA/tws851/scripts/dbupgrade.sh'
[chmod] '/tmp/TWA/tws851/scripts/migratedb_root.sh'
[chmod]
[chmod] The ' characters around the executable and
arguments are
[chmod] not part of the command.
--------------------------------------------------------------------------
After this the script hangs.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51216] chmod task when build is run using sudo
hangs.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51216
--- Comment #4 from Jesse Glick <jg...@netbeans.org> 2012-01-24 12:23:10 UTC ---
Sounds likely to be OS-specific.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51216] chmod task when build is run using sudo
hangs.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51216
--- Comment #1 from Silvano Lutri <si...@it.ibm.com> 2011-10-19 11:33:10 UTC ---
Anyone took a look to this?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51216] chmod task when build is run using sudo
hangs.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51216
Jesse Glick <jg...@netbeans.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jglick@netbeans.org
--- Comment #2 from Jesse Glick <jg...@netbeans.org> 2012-01-19 14:34:19 UTC ---
Do you have a minimal test case? Thread dump?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51216] chmod task when build is run using sudo
hangs.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51216
--- Comment #3 from Silvano Lutri <si...@it.ibm.com> 2012-01-24 09:46:42 UTC ---
Hello and thanks for the update.
I would like to underline that the problem is reproduced only on one specific
machine, and that I solved it changing the task from <chmod> to the native
<exec executable="chmod">.
On that machine also a small build.xml file that includes only one
target with only one copy file and the chmod of the same file is hanging
(at the chmod). The Ant task is executed via sudo.
I don't have a thread dump of the problem.
Could the problem be related to some specific configuration of the AIX machine?
Silvano
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.