This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Deadlock which buiding
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Deadlock which buiding
- From: "Rodrigo Barbosa (aka morcego)" <rodrigob at conectiva dot com dot br>
- Date: Fri, 16 Mar 2001 17:09:26 -0300
- Cc: aoliva at redhat dot com
I and a first (Rik van Riel) have found two problems on the gcc code which
ends up causing gcc to enter a deadlock.
The scenary is quite simples. As root, TMPDIR is set to a directory
mounted using NFS.
We have been unable to confirm this problem in any other environment except
our own, but looking at the code, at least the problem #1 is real on
any Linux environment (not sure about others).
Problem #2 was not tested on the latest CVS snapshot. Actualy, it was
only tested on 2.95.3 (2.95.3 19991030 (prerelease/franzo/20001125)).
Problem #1 (on libiberty/choose-temp.c, try()):
access() does not work on NFS mounted directories with uid mapping,
as documented on the man page. Which the scenary described above, it will
return 0 (permission granted).
Problem #2 (unable to locate on the source):
Once try() said gcc can write on TMPDIR, make_temp_file() will try
creating the file there (actualy, it's a temporary .i file). Once
make_temp_file does not return the reason for the fail, the code
that calls make_temp_file simply keeps retrying, and enter deadlock.
The second problem was only analysed looking at the make_temp_file()
code (where we noticed it does not return the reason for the
failure). The code that does this call was not located, once we are
not so versated on the gcc code tree.
Anyone with more experience in the code should have no problem locating and
solving this issue.
Please, CC me on any reply, and please, I beg, when some one cames up with
a patch for this problem, please, send it to me, so I can backport/apply
on my gcc tree (with the version I stated above).
Thank you vary much in advance.
--
Rodrigo Barbosa (morcego) - rodrigob at conectiva.com.br
Conectiva R&D Team - http://distro.conectiva.com.br
"Quis custodiet ipsos custodiet?" - http://www.conectiva.com
PGP signature