git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Arnout Engelen <arnouten@bzzt.net>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] log which temporary file could not be created
Date: Sun, 10 Oct 2010 20:56:22 +0200	[thread overview]
Message-ID: <20101010185622.GX9348@bzzt.net> (raw)
In-Reply-To: <20101010180909.GA12320@burratino>

On Sun, Oct 10, 2010 at 01:09:09PM -0500, Jonathan Nieder wrote:
> Arnout Engelen wrote:
> > On Sat, Oct 09, 2010 at 09:41:24PM -0500, Jonathan Nieder wrote:
> >> 	fatal: Unable to create temporary file '.merge_file_Sc7R5c': File exists
> >> 	fatal: Unable to create temporary file 'newrepo/.git/tOWHcxk': No space left on device
> >
> > Perhaps we should also log the current working directory when the temporary 
> > filename is relative?
> 
> Let's step back for a moment.  Was there an example that prompted
> this patch?  

Yes: I was trying to do an initial push to a sf.net git repo, and this gave me:

arnouten@bird:~/asdf/notion$ git push sourceforge master
raboofje@notion.git.sourceforge.net's password: 
Counting objects: 21542, done.
Compressing objects: 100% (4179/4179), done.
fatal: Unable to create temporary file: Permission denied
error: pack-objects died of signal 13
error: pack-objects died with strange error
error: failed to push some refs to 'ssh://raboofje@notion.git.sourceforge.net/gitroot/notion/notion'
arnouten@bird:~/asdf/notion$

This seems to have been an error at the server side. I never did find out what
exactly went wrong - I just re-initialized the repo using the shell access and
all was fine after that.

> Were you aware of where git would be trying to create
> files in that example?  (I'm genuinely curious.)

No clue - but I'm not very into git 'internals' yet.

> Converting the filename to an absolute path with make_absolute_path
> might be useful, but I am not entirely sure it is worth the
> complication.
> 
> >> 	fatal: Unable to create temporary file '': Permission denied
> >>
> >> What should git do in this situation?
> >
> > Perhaps we should strdup() the template before mkstemp(), and log the 
> > strdup()'ed template when the original has been cleared?
> 
> Is it be preferable for the filename to always have XXXXXX in it?  If
> so, then copying it into a temporary buffer (on-stack, preferably)
> could be a sane solution, yes.

I'm not sure about 'always', but it'd be nice to have something to fall back 
to when the mkstemp clears the template.


Kind regards,

Arnout

  reply	other threads:[~2010-10-10 18:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-09 20:17 [PATCH] log which temporary file could not be created Arnout Engelen
2010-10-10  2:41 ` Jonathan Nieder
2010-10-10 10:33   ` Arnout Engelen
2010-10-10 18:09     ` Jonathan Nieder
2010-10-10 18:56       ` Arnout Engelen [this message]
2010-10-12 20:19         ` [PATCH] send-pack: avoid redundant "pack-objects died with strange error" Jonathan Nieder
2010-10-16  6:04           ` [PATCH v2] " Jonathan Nieder
2010-10-16  9:25             ` Johannes Sixt
2010-10-16 17:09               ` [PATCH v3] " Jonathan Nieder
2010-10-12  3:56       ` [PATCH] log which temporary file could not be created Junio C Hamano
2010-10-18  9:20         ` Arnout Engelen
     [not found]           ` <20101021205800.GC12685@burratino>
2010-11-04  0:24             ` Arnout Engelen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101010185622.GX9348@bzzt.net \
    --to=arnouten@bzzt.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).