You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Edwin Goh <ng...@hotmail.com> on 2012/08/28 10:33:48 UTC

Bug: svn: E000002: Can't create temporary file from template '/tmp/svn-XXXXXX': No such file or directory

OS: HP-UX

SVN: svn, version 1.7.6 (r1370777) compiled Aug 20 2012, 15:40:19

SVN are download from http://hpux.connect.org.uk/
HP-UX mktemp man page
http://docstore.mik.ua/manuals/hp-ux/en/B2355-60130/mktemp.3C.html

 

When I tried to perform a commit with HP-UX svn client, I received the
following error:

 

svn: E000002: Can't create temporary file from template '/tmp/svn-XXXXXX':
No such file or directory

svn: E000002: Your commit message was left in a temporary file:

svn: E000002:    '/home/nginhui/svn-commit.2.tmp'

 

After some investigation into SVN 1.7.6 and APR source code, I noticed:

 

SVN client: io.c:4036 - temp_file_create function call apr_file_mktemp with
flag set to not delete when close

APR: mktemp.c:190 - apr_file_mktemp function call Unix mktemp

 

It seems the problem due to mktemp HP-UX open file with the following format
(base on template "svn-XXXXXX") svn-[a-z]<PID> .

For instance: 

PID= 23451, first call to mktemp you will have a temp file open as
/tmp/svn-a23451 the next call to mktemp will result in /tmp/svn-b23451 and
so on, eventually it will reach z (26 files later), it simple exit with
error since it run out of character

 

What I am not sure is if this is a bug in SVN or APR, shouldn't SVN client
set the flag to delete the temp file as soon as it is close? On the other
hands, APR should have use tmpfile function instead of mktemp or the
internally implementation gettemp.

 

Regards,

Edwin

 


Re: Bug: svn: E000002: Can't create temporary file from template '/tmp/svn-XXXXXX': No such file or directory

Posted by Stefan Sperling <st...@apache.org>.
Hi Edwin,

Seems like HP-UX's mktemp() shouldn't be used by APR.
Cross-posting this to apr-dev. I believe it should be addressed
in APR rather than Subversion.

On Tue, Aug 28, 2012 at 11:33:48AM +0300, Edwin Goh wrote:
> OS: HP-UX
> 
> SVN: svn, version 1.7.6 (r1370777) compiled Aug 20 2012, 15:40:19
> 
> SVN are download from http://hpux.connect.org.uk/
> HP-UX mktemp man page
> http://docstore.mik.ua/manuals/hp-ux/en/B2355-60130/mktemp.3C.html
> 
>  
> 
> When I tried to perform a commit with HP-UX svn client, I received the
> following error:
> 
>  
> 
> svn: E000002: Can't create temporary file from template '/tmp/svn-XXXXXX':
> No such file or directory
> 
> svn: E000002: Your commit message was left in a temporary file:
> 
> svn: E000002:    '/home/nginhui/svn-commit.2.tmp'
> 
>  
> 
> After some investigation into SVN 1.7.6 and APR source code, I noticed:
> 
>  
> 
> SVN client: io.c:4036 - temp_file_create function call apr_file_mktemp with
> flag set to not delete when close
> 
> APR: mktemp.c:190 - apr_file_mktemp function call Unix mktemp
> 
>  
> 
> It seems the problem due to mktemp HP-UX open file with the following format
> (base on template "svn-XXXXXX") svn-[a-z]<PID> .
> 
> For instance: 
> 
> PID= 23451, first call to mktemp you will have a temp file open as
> /tmp/svn-a23451 the next call to mktemp will result in /tmp/svn-b23451 and
> so on, eventually it will reach z (26 files later), it simple exit with
> error since it run out of character
> 
>  
> 
> What I am not sure is if this is a bug in SVN or APR, shouldn't SVN client
> set the flag to delete the temp file as soon as it is close? On the other
> hands, APR should have use tmpfile function instead of mktemp or the
> internally implementation gettemp.
> 
>  
> 
> Regards,
> 
> Edwin
> 
>  
> 

Re: Bug: svn: E000002: Can't create temporary file from template '/tmp/svn-XXXXXX': No such file or directory

Posted by Stefan Sperling <st...@apache.org>.
Hi Edwin,

Seems like HP-UX's mktemp() shouldn't be used by APR.
Cross-posting this to apr-dev. I believe it should be addressed
in APR rather than Subversion.

On Tue, Aug 28, 2012 at 11:33:48AM +0300, Edwin Goh wrote:
> OS: HP-UX
> 
> SVN: svn, version 1.7.6 (r1370777) compiled Aug 20 2012, 15:40:19
> 
> SVN are download from http://hpux.connect.org.uk/
> HP-UX mktemp man page
> http://docstore.mik.ua/manuals/hp-ux/en/B2355-60130/mktemp.3C.html
> 
>  
> 
> When I tried to perform a commit with HP-UX svn client, I received the
> following error:
> 
>  
> 
> svn: E000002: Can't create temporary file from template '/tmp/svn-XXXXXX':
> No such file or directory
> 
> svn: E000002: Your commit message was left in a temporary file:
> 
> svn: E000002:    '/home/nginhui/svn-commit.2.tmp'
> 
>  
> 
> After some investigation into SVN 1.7.6 and APR source code, I noticed:
> 
>  
> 
> SVN client: io.c:4036 - temp_file_create function call apr_file_mktemp with
> flag set to not delete when close
> 
> APR: mktemp.c:190 - apr_file_mktemp function call Unix mktemp
> 
>  
> 
> It seems the problem due to mktemp HP-UX open file with the following format
> (base on template "svn-XXXXXX") svn-[a-z]<PID> .
> 
> For instance: 
> 
> PID= 23451, first call to mktemp you will have a temp file open as
> /tmp/svn-a23451 the next call to mktemp will result in /tmp/svn-b23451 and
> so on, eventually it will reach z (26 files later), it simple exit with
> error since it run out of character
> 
>  
> 
> What I am not sure is if this is a bug in SVN or APR, shouldn't SVN client
> set the flag to delete the temp file as soon as it is close? On the other
> hands, APR should have use tmpfile function instead of mktemp or the
> internally implementation gettemp.
> 
>  
> 
> Regards,
> 
> Edwin
> 
>  
>