Hi Dale
Thanks for the thoughts - I really appreciate you looking at this. 'strace'
was a great suggestion and new discovery for me. I can't say I am sure how
to analyse the output yet, but at least I am able to identify which file it
is trying to write to when it falls over. I made another discovery whilst
doing this - we are running mod_perl and I am starting to get the
impression mod_perl is the underlying cause of the problem (caching
variables somehow). I suspect this because I am now running a test script
which basically just executes the one line:
cd /var/www/test_repo; strace git commit -m 'msg' 2>&1
If I restart apache, the first time it works (it performs the commit).
However, on the second (third, fourth..) run, it gives the 'unable to
create temporary file...' error. Also, if I run it under cgi it works every
time (unfortunately we cant just move everything over to cgi though).
I wont post the full output as it is very long - and am just posting this
on the off chance it instantly means something to you (doesnt mean much to
me yet, but I will investigate!). So when it fails it starts
execve("/usr/bin/git", ["git", "commit", "-m", "msg"], [/* 16 vars */]) = 0
brk(0) = 0x26ee000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f26e51ae000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 0
fstat(0, {st_mode=S_IFREG|0644, st_size=32187, ...}) = 0
mmap(NULL, 32187, PROT_READ, MAP_PRIVATE, 0, 0) = 0x7f26e51a6000
close(0) = 0
open("/lib64/libz.so.1", O_RDONLY) = 0
read(0, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 !\0\0\0\0\0\0"...,
832) = 832
fstat(0, {st_mode=S_IFREG|0755, st_size=88600, ...}) = 0
</code>
I dont know if this is significantly different from when it succeeds (first
run):
execve("/usr/bin/git", ["git", "commit", "-m", "msg"], [/* 16 vars */]) = 0
brk(0) = 0x1daf000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f9b43975000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=32187, ...}) = 0
mmap(NULL, 32187, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f9b4396d000
close(3) = 0
open("/lib64/libz.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 !\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=88600, ...}) = 0
or in CGI:
execve("/usr/bin/git", ["git", "commit", "-m", "msg"], [/* 29 vars */]) = 0
brk(0) = 0x935000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f9969bd7000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=32187, ...}) = 0
mmap(NULL, 32187, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f9969bcf000
close(3) = 0
open("/lib64/libz.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 !\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=88600, ...}) = 0
Below are the last few lines of the strace before it falls over:
close(0) = 0
open(".git/objects/info/alternates", O_RDONLY|O_NOATIME) = -1 ENOENT (No
such file or directory)
access(".git/objects/99/564f15c5a06c44e372d03489c59a32ebcf9ec9", F_OK) = 0
access(".git/hooks/prepare-commit-msg", X_OK) = -1 ENOENT (No such file or
directory)
access(".git/hooks/commit-msg", X_OK) = -1 ENOENT (No such file or
directory)
open(".git/COMMIT_EDITMSG", O_RDONLY) = 0
read(0, "msg\n", 8192) = 4
read(0, "", 12308) = 0
close(0) = 0
open(".git/objects/99/564f15c5a06c44e372d03489c59a32ebcf9ec9",
O_RDONLY|O_NOATIME) = 0
fstat(0, {st_mode=S_IFREG|0444, st_size=52, ...}) = 0
mmap(NULL, 52, PROT_READ, MAP_PRIVATE, 0, 0) = 0x7f26e51ad000
close(0) = 0
munmap(0x7f26e51ad000, 52) = 0
access(".git/objects/f8/8d4f7df95a7c0b3842bf98533e01472efab496", F_OK) =
-1 ENOENT (No such file or directory)
open(".git/objects/f8/tmp_obj_pW5OIL", O_RDWR|O_CREAT|O_EXCL, 0444) = -1
ENOENT (No such file or directory)
mkdir(".git/objects/f8", 0777) = 0
open(".git/objects/f8/tmp_obj_pkqRHL", O_RDWR|O_CREAT|O_EXCL, 0444) = 0
write(2, "error: unable to create temporar"..., 66error: unable to create
temporary file: No such file or directory
) = 66
write(2, "fatal: failed to write commit ob"..., 37fatal: failed to write
commit object
) = 37
exit_group(128) = ?
When it succeeds on the first run, it appears to execute more commands
before arriving at what I guess is the same place,
which looks like:
close(3) = 0
munmap(0x7f9b43974000, 137) = 0
access(".git/objects/99/564f15c5a06c44e372d03489c59a32ebcf9ec9", F_OK) = 0
access(".git/hooks/prepare-commit-msg", X_OK) = -1 ENOENT (No such file or
directory)
access(".git/hooks/commit-msg", X_OK) = -1 ENOENT (No such file or
directory)
open(".git/COMMIT_EDITMSG", O_RDONLY) = 3
read(3, "msg\n", 8192) = 4
read(3, "", 12308) = 0
close(3) = 0
open(".git/objects/99/564f15c5a06c44e372d03489c59a32ebcf9ec9",
O_RDONLY|O_NOATIME) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=52, ...}) = 0
mmap(NULL, 52, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f9b43974000
close(3) = 0
munmap(0x7f9b43974000, 52) = 0
access(".git/objects/0f/7f57fee43d1fa25cfc7f0d7fd1bf5826b22fcc", F_OK) =
-1 ENOENT (No such file or directory)
open(".git/objects/0f/tmp_obj_RAN8sj", O_RDWR|O_CREAT|O_EXCL, 0444) = -1
ENOENT (No such file or directory)
mkdir(".git/objects/0f", 0777) = 0
open(".git/objects/0f/tmp_obj_rnREwj", O_RDWR|O_CREAT|O_EXCL, 0444) = 3
brk(0x1df9000) = 0x1df9000
write(3,
"x\1\255\216I\n\3030\f\0{\366+\374\201\4/R\22A(\355STUY\16\216C\354\26\372"...,
138) = 138
brk(0x1de9000) = 0x1de9000
brk(0x1dd9000) = 0x1dd9000
brk(0x1dd7000) = 0x1dd7000
... and then continues
Many thanks for your help so far!
Tom
--
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.