OpenSolaris

Printable Version Enter a New Search
Bug ID 4693666
Synopsis fix for 4235823 reintroduced 1199162 (mmap'ed writes may fail to update mtime)
State 9-Fix Failed (Previous fix did not work)
Category:Subcategory kernel:ufs
Keywords IMODTIME | as | rtiq-regression | touch | ufs | utime
Reported Against snv_01 , solaris_7
Duplicate Of
Introduced In solaris_9
Commit to Fix snv_73
Fixed In snv_73
Release Fixed solaris_nevada(snv_73)
Related Bugs 1199162 , 4235823 , 4296366 , 6407791 , 6470662 , 6595299 , 6603251 , 6641833 , 6663290
Submit Date 30-May-2002
Last Update Date 31-October-2007
Description
mtime of object file on ufs generated by as(1) is not updated
if touch(1) is run to the object file before as(1) running.
This phenomenon is exposed in S7+106541-15 and later however
it does not occur in S7+106541-14.

The test case consists of the following two files,

----------------------------------------------------------------
# cat a.s
        .section ".text"
        .global func
        .align  4
func:
        mov   0, %o0
        retl
        nop
----------------------------------------------------------------
# cat test.sh
#!/bin/csh
rm a.o
/usr/ccs/bin/as -o a.o -Qy -q a.s 
ls -l a.o 
sleep 60 
/bin/touch a.o 
ls -l a.o 
sleep 60 
/usr/ccs/bin/as -o a.o -Qy -q a.s 
ls -l a.o 
----------------------------------------------------------------

Log of reproduction test is below,

Solaris7 KU20 ================================================================

# uname -a
SunOS xxx 5.7 Generic_106541-20 sun4u sparc SUNW,Ultra-60
# ./test.sh
-rw-r--r--   1 root     other        452  5  30   14:39 a.o
-rw-r--r--   1 root     other        452  5  30   14:40 a.o
-rw-r--r--   1 root     other        452  5  30   14:40 a.o


Solaris7 KU15 ================================================================

# uname -a
SunOS xxx 5.7 Generic_106541-15 sun4u sparc SUNW,Ultra-60
# ./test.sh
-rw-r--r--   1 root     other        452  5  30   11:23 a.o
-rw-r--r--   1 root     other        452  5  30   11:24 a.o
-rw-r--r--   1 root     other        452  5  30   11:24 a.o
# 

Solaris7 KU14 ================================================================

# uname -a
SunOS xxx 5.7 Generic_106541-14 sun4u sparc SUNW,Ultra-2
# ./test.sh
-rw-r--r--   1 root     other        452  5  30   11:23 a.o
-rw-r--r--   1 root     other        452  5  30   11:24 a.o
-rw-r--r--   1 root     other        452  5  30   11:25 a.o
# 
Work Around
Run sync(1M) command after touch(1) command.
 xxxxx@xxxxx.com 2003-07-09

usr /usr/ccs/bin/as from a Solaris 9 FCS system or later.
If you're using the make(1S) command for re-building object files, simply issue a "sync" before the "make". Whether you replace make with a shellscript that issues 'sync; make', shell-alias 'make' to "sync; make", or re-define $(MAKE) in your Makefiles doesn't matter - this problem always has a trivial workaround.
Comments
N/A