Issue with binaries generated(subversion 1.10.2) after compilation on AiX 7.2

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue with binaries generated(subversion 1.10.2) after compilation on AiX 7.2

Prannoy K.v
Hi Team, 

I tried compiling subversion 1.10.2 on AiX 7.2 machine . 
My configure command is as follows :- 

./configure CFLAGS="-I/home/lroot/temp_mod1/subversion/zlib" --without-berkeley-db --with-apr=/home/lroot/temp_mod1/subversion/apr --with-apr-util=/home/lroot/temp_mod1/subversion/apr-util --with-sqlite=/home/lroot/temp_mod1/subve rsion/sqlite-amalgamation/sqlite3.c --with-lz4=internal --with-utf8proc=internal  --disable-nls. 


After "make" command generated binaries work well in the folder where it is generated, whereas if we move binaries to a different location I get the error :- 

svnadmin: E000009: Can't write '/temp1110/home/Repo_test/db/current' atomically 

svnadmin: E000009: Can't flush file '/temp1110/home/Repo_test/db' to disk: Bad file number  


I would like to know if I am missing something. 

Any help in this regard would be appreciated. 


Thanks & Regards,

Prannoy

Reply | Threaded
Open this post in threaded view
|

Re: Issue with binaries generated(subversion 1.10.2) after compilation on AiX 7.2

Daniel Shahaf-2
Prannoy K.v wrote on Thu, 27 Dec 2018 13:35 +0000:
> Hi Team, 
> I tried compiling subversion 1.10.2 on AiX 7.2 machine .

Note that 1.10.3 has been released.

> After "make" command generated binaries work well in the folder where it
> is generated, whereas if we move binaries to a different location I get
> the error :- 
>
> svnadmin: E000009: Can't write '/temp1110/home/Repo_test/db/current' atomically 
>
> svnadmin: E000009: Can't flush file '/temp1110/home/Repo_test/db' to
> disk: Bad file number  

In subversion/libsvn_subr/io.c, in svn_io_file_flush_to_disk(), there's
an APR_STATUS_IS_EINVAL() check.  Try making it check
APR_STATUS_IS_EBADF() as well and handle it the same way (assuming "Bad
file number" is strerror(3) of EBADF) --- read the comment there while
you're at it.  For context, creating new revisions relies on being able
to flush the revision files to disk.

Cheers,

Daniel
Reply | Threaded
Open this post in threaded view
|

Re: Issue with binaries generated(subversion 1.10.2) after compilation on AiX 7.2

Daniel Shahaf-2
Daniel Shahaf wrote on Thu, Dec 27, 2018 at 15:04:09 +0000:
> In subversion/libsvn_subr/io.c, in svn_io_file_flush_to_disk(), there's
> an APR_STATUS_IS_EINVAL() check.  Try making it check
> APR_STATUS_IS_EBADF() as well and handle it the same way (assuming "Bad
> file number" is strerror(3) of EBADF)

For clarity, I meant this:

[[[
Index: subversion/libsvn_subr/io.c
===================================================================
--- subversion/libsvn_subr/io.c (revision 1849781)
+++ subversion/libsvn_subr/io.c (working copy)
@@ -2505,6 +2505,10 @@ svn_error_t *svn_io_file_flush_to_disk(apr_file_t
          ignore the error. */
       if (rv == -1 && APR_STATUS_IS_EINVAL(apr_get_os_error()))
         return SVN_NO_ERROR;
+#ifdef _AIX
+      if (rv == -1 && APR_STATUS_IS_EBADF(apr_get_os_error()))
+        return SVN_NO_ERROR;
+#endif
 
       if (rv == -1)
         return svn_error_wrap_apr(apr_get_os_error(),
]]]

> --- read the comment there while
> you're at it.  For context, creating new revisions relies on being able
> to flush the revision files to disk.
Reply | Threaded
Open this post in threaded view
|

Re: Issue with binaries generated(subversion 1.10.2) after compilation on AiX 7.2

Prannoy K.v
In reply to this post by Daniel Shahaf-2

Hi Daniel,

Thank you for your help. I wanted to know if I am doing any mistake during compilation or is it an Issue with AiX or Subversion ? 
If it is an issue with AiX and Subversion is it resolved in 1.10.3 or any other versions ? 


Thanks and Regards,
Prannoy K V
On Thursday, 27 December 2018, 8:34:11 pm GMT+5:30, Daniel Shahaf <[hidden email]> wrote:


Prannoy K.v wrote on Thu, 27 Dec 2018 13:35 +0000:
> Hi Team, 
> I tried compiling subversion 1.10.2 on AiX 7.2 machine .

Note that 1.10.3 has been released.


> After "make" command generated binaries work well in the folder where it
> is generated, whereas if we move binaries to a different location I get
> the error :- 
>
> svnadmin: E000009: Can't write '/temp1110/home/Repo_test/db/current' atomically 
>
> svnadmin: E000009: Can't flush file '/temp1110/home/Repo_test/db' to
> disk: Bad file number  


In subversion/libsvn_subr/io.c, in svn_io_file_flush_to_disk(), there's
an APR_STATUS_IS_EINVAL() check.  Try making it check
APR_STATUS_IS_EBADF() as well and handle it the same way (assuming "Bad
file number" is strerror(3) of EBADF) --- read the comment there while
you're at it.  For context, creating new revisions relies on being able
to flush the revision files to disk.

Cheers,

Daniel
Reply | Threaded
Open this post in threaded view
|

Re: Issue with binaries generated(subversion 1.10.2) after compilation on AiX 7.2

Daniel Shahaf-2
Prannoy K.v wrote on Fri, 28 Dec 2018 05:53 +0000:
>  
> Hi Daniel,
> Thank you for your help. I wanted to know if I am doing any mistake
> during compilation or is it an Issue with AiX or Subversion ?

Did you see the comment in the source code I referred you to?  I'm
guessing the issue is simply a combination of two factors: (1) you
tested in a temporary mount point, (2) aix returns a different error
code than the one Subversion expects.

> If it is an issue with AiX and Subversion is it resolved in 1.10.3 or
> any other versions ?

I haven't committed the patch I posted, but if it's correct we can
commit it and backport it to the next release.  But then again, if my
guess is correct, the problem only affects temporary mount points to
begin with.

Cheers,

Daniel