Re: modversions.h race condition

From: peter swain (swine@pobox.com)
Date: Wed May 17 2000 - 17:27:17 EST


"Adam J. Richter" wrote:
> About one third of the time when I run "make depend" on
> an 866MHz Pentium III, it accidentally leaves some files out
> of the include/linux/modversions.h file that it generates.
> This is caused by a the one second granularity of file modification
> times returned by stat (and recorded by most file systems, including
> ext2), and the fact that that linux/Rules.Make determines that it
> is time to rebuild modversions.h by noticing that the .ver files
> are newer. So, if the last two or more directories are processed
> by "make depend" in the same one second tick, only the first directory
> in that one second tick will cause modversions.h to be rebuilt.

well spotted!

i thought there was something like this going on,
and i've fixed similar problems before by adding gratuitous "sleep 1"
actions
to the timestamping rules, but that would add another 117 seconds to
latest 2.3 build time!

your suggested big fix (delaying modversions.h until *.ver, *.stamp are
stable)
is much neater. probably an extra pass of the tree, but that's nothing
compared to
the 3 remakes i often do to avoid this problem, and the occasional
frustrated
"find . -name \*.tstamp -exec rm {} \;" when it gets really screwed.

been meaning to fix this one for ages, but thought it was just an
artefact of my
heavily-modified tree....

^..^
(oo)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:13 EST