Return-Path: X-Original-To: apmail-apr-dev-archive@www.apache.org Delivered-To: apmail-apr-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5CC81D99C for ; Tue, 28 Aug 2012 09:34:35 +0000 (UTC) Received: (qmail 47125 invoked by uid 500); 28 Aug 2012 09:34:34 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 46625 invoked by uid 500); 28 Aug 2012 09:34:29 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 46597 invoked by uid 99); 28 Aug 2012 09:34:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Aug 2012 09:34:28 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [192.109.42.8] (HELO einhorn.in-berlin.de) (192.109.42.8) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Aug 2012 09:34:21 +0000 X-Envelope-From: stsp@stsp.name Received: from ted.stsp.name (ted.stsp.name [217.197.84.34]) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id q7S9Y0lj016938 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 28 Aug 2012 11:34:00 +0200 Received: from ted.stsp.name (stsp@localhost [127.0.0.1]) by ted.stsp.name (8.14.5/8.14.3) with ESMTP id q7S9Y0U3012532; Tue, 28 Aug 2012 11:34:00 +0200 (CEST) Received: (from stsp@localhost) by ted.stsp.name (8.14.5/8.14.3/Submit) id q7S9XvC0032266; Tue, 28 Aug 2012 11:33:57 +0200 (CEST) Date: Tue, 28 Aug 2012 11:33:57 +0200 From: Stefan Sperling To: Edwin Goh Cc: users@subversion.apache.org, dev@apr.apache.org Subject: Re: Bug: svn: E000002: Can't create temporary file from template '/tmp/svn-XXXXXX': No such file or directory Message-ID: <20120828093357.GA7795@ted.stsp.name> Mail-Followup-To: Edwin Goh , users@subversion.apache.org, dev@apr.apache.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 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] . > > 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 > > >