You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Branko Čibej <br...@hermes.si> on 2002/04/18 20:03:31 UTC

Re: HP-UX failures

Turns out this is a faq:

=====================
*An ENOMEM error is returned from DB_ENV->open 
<http://www.sleepycat.com/docs/api_c/env_open.html> or DB_ENV->remove 
<http://www.sleepycat.com/docs/api_c/env_remove.html> .*

Due to the constraints of the PA-RISC memory architecture, HP-UX does 
not allow a process to map a file into its address space multiple times. 
For this reason, each Berkeley DB environment may be opened only once by 
a process on HP-UX; that is, calls to DB_ENV->open 
<http://www.sleepycat.com/docs/api_c/env_open.html> will fail if the 
specified Berkeley DB environment has been opened and not subsequently 
closed.

=====================

Opening an environment more than once is exactly what we do in 
svn_ral_local__split_URL. We either have to get rid of that function, 
keep a list of currently open DB's around, or not work on HP-UX.

(Actually, since we don't support cross-repository copies, we knoy have 
to remember the URL of the laready-open repo. Which makes sense, because 
then we can just do a strncmp on the URL next time we try to open it, 
instead of jumping through hoops the way we do now.)

-- 
Branko Čibej                 <br...@hermes.si>
HERMES SoftLab, Litijska 51, 1000 Ljubljana, Slovenia
voice: (+386 1) 586 53 49     fax: (+386 1) 586 52 70




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: HP-UX failures

Posted by "Kirby C. Bohling" <kb...@birddog.com>.
<snip>
> 
> But I'm not about to lose sleep because of that. I've long since found 
> that users can always find a way to screw up you hadn't thought about, 
> so I just live with that. :-)
> 

Like the old saying:

Building something that is idiot-proof, and they'll just build a better 
idiot.

		Kirby







---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Repository GUIDs (was Re: HP-UX failures)

Posted by Alan Langford <ja...@ambitonline.com>.
At 2002/04/19 20:48 +0200, =?UTF-8?B?QnJhbmtvIMSMaWJlag==?= wrote:
>You know, you have the same potential problem with http:// URLs, too, and 
>there's absolutely nothing you can do about it -- unless you introduce a 
>repository GUID and check that.

That, BTW, is a damn good idea and a pretty inexpensive piece of idiot 
proofing.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: HP-UX failures

Posted by Branko Čibej <br...@xbc.nu>.
Mark Benedetto King wrote:

>On Fri, Apr 19, 2002 at 07:53:38PM +0200, Branko ?ibej wrote:
>
>>Yes, that's what I'm counting on. :-)
>>However, I think we it'll turn out that having is list of open 
>>repositories would be a good thing in the long run, anyway (think 
>>cross-repository copies).
>>
>
>Can we manage to shoot ourselves in the foot through aliasing?
>
>i.e., are "file://foo/bar/baz" and "file://foo/bar/../bar/baz"
>going to be recognized as "different" and thus cause trouble
>when we open the same repository a second time?
>
I don't think this is a valid URL. Even if it is, I don't propose 
relying _only_ on the cache -- we'd have to do what split_URL does now 
for the firs repo we open, anyway.

>If ".." seems to be a pathological case, what about symlinks?
>
>Or do people who manage to break things this way deserve
>what they get?
>
Well, right now svn won't work for them, because we don't do 
cross-repository operations. When we do, everythong should work fine, 
except that it'll be less efficient.

And I totally agree with Mike.


You know, you have the same potential problem with http:// URLs, too, 
and there's absolutely nothing you can do about it -- unless you 
introduce a repository GUID and check that. Not to mention that 
different paths can have different access restrictions.

But I'm not about to lose sleep because of that. I've long since found 
that users can always find a way to screw up you hadn't thought about, 
so I just live with that. :-)

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: HP-UX failures

Posted by cm...@collab.net.
Mark Benedetto King <bk...@answerfriend.com> writes:

> On Fri, Apr 19, 2002 at 07:53:38PM +0200, Branko ?ibej wrote:
> > Yes, that's what I'm counting on. :-)
> > However, I think we it'll turn out that having is list of open 
> > repositories would be a good thing in the long run, anyway (think 
> > cross-repository copies).
> > 
> 
> Can we manage to shoot ourselves in the foot through aliasing?
> 
> i.e., are "file://foo/bar/baz" and "file://foo/bar/../bar/baz"
> going to be recognized as "different" and thus cause trouble
> when we open the same repository a second time?
> 
> If ".." seems to be a pathological case, what about symlinks?
> 
> Or do people who manage to break things this way deserve
> what they get?

As a gesture of my ... appreciation, I'll load their chambers for
them.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: HP-UX failures

Posted by Mark Benedetto King <bk...@answerfriend.com>.
On Fri, Apr 19, 2002 at 07:53:38PM +0200, Branko ?ibej wrote:
> Yes, that's what I'm counting on. :-)
> However, I think we it'll turn out that having is list of open 
> repositories would be a good thing in the long run, anyway (think 
> cross-repository copies).
> 

Can we manage to shoot ourselves in the foot through aliasing?

i.e., are "file://foo/bar/baz" and "file://foo/bar/../bar/baz"
going to be recognized as "different" and thus cause trouble
when we open the same repository a second time?

If ".." seems to be a pathological case, what about symlinks?

Or do people who manage to break things this way deserve
what they get?


--ben



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: HP-UX failures

Posted by Branko Čibej <br...@xbc.nu>.
cmpilato@collab.net wrote:

>=?UTF-8?B?QnJhbmtvIMSMaWJlag==?= <br...@hermes.si> writes:
>
>>Turns out this is a faq:
>>
>>=====================
>>*An ENOMEM error is returned from DB_ENV->open 
>><http://www.sleepycat.com/docs/api_c/env_open.html> or DB_ENV->remove 
>><http://www.sleepycat.com/docs/api_c/env_remove.html> .*
>>
>>Due to the constraints of the PA-RISC memory architecture, HP-UX does 
>>not allow a process to map a file into its address space multiple times. 
>>For this reason, each Berkeley DB environment may be opened only once by 
>>a process on HP-UX; that is, calls to DB_ENV->open 
>><http://www.sleepycat.com/docs/api_c/env_open.html> will fail if the 
>>specified Berkeley DB environment has been opened and not subsequently 
>>closed.
>>
>>=====================
>>
>>Opening an environment more than once is exactly what we do in 
>>svn_ral_local__split_URL. We either have to get rid of that function, 
>>keep a list of currently open DB's around, or not work on HP-UX.
>>
>>(Actually, since we don't support cross-repository copies, we knoy have 
>>to remember the URL of the laready-open repo. Which makes sense, because 
>>then we can just do a strncmp on the URL next time we try to open it, 
>>instead of jumping through hoops the way we do now.)
>>
>
>I think that once we have storage of canonical repos URLs in our
>entries files (soon to occur), svn_ra_local__split_URL() won't be
>used quite as much.  It still must exist, as there are times (import)
>when there are no entries files to read.
>
Yes, that's what I'm counting on. :-)
However, I think we it'll turn out that having is list of open 
repositories would be a good thing in the long run, anyway (think 
cross-repository copies).

>Of course, we *could* just change any subcommands that today use
>REPOS_URLs to instead use both a REPOS_URL (that is, a canonical repos
>URL, like http://svn.collab.net/repos/svn) and a REPOS_PATH (like
>trunk).  I certainly *hope* we don't do such a thing, though.
>
No no no no no! That would be horrible!


-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: HP-UX failures

Posted by cm...@collab.net.
=?UTF-8?B?QnJhbmtvIMSMaWJlag==?= <br...@hermes.si> writes:

> Turns out this is a faq:
> 
> =====================
> *An ENOMEM error is returned from DB_ENV->open 
> <http://www.sleepycat.com/docs/api_c/env_open.html> or DB_ENV->remove 
> <http://www.sleepycat.com/docs/api_c/env_remove.html> .*
> 
> Due to the constraints of the PA-RISC memory architecture, HP-UX does 
> not allow a process to map a file into its address space multiple times. 
> For this reason, each Berkeley DB environment may be opened only once by 
> a process on HP-UX; that is, calls to DB_ENV->open 
> <http://www.sleepycat.com/docs/api_c/env_open.html> will fail if the 
> specified Berkeley DB environment has been opened and not subsequently 
> closed.
> 
> =====================
> 
> Opening an environment more than once is exactly what we do in 
> svn_ral_local__split_URL. We either have to get rid of that function, 
> keep a list of currently open DB's around, or not work on HP-UX.
> 
> (Actually, since we don't support cross-repository copies, we knoy have 
> to remember the URL of the laready-open repo. Which makes sense, because 
> then we can just do a strncmp on the URL next time we try to open it, 
> instead of jumping through hoops the way we do now.)

I think that once we have storage of canonical repos URLs in our
entries files (soon to occur), svn_ra_local__split_URL() won't be
used quite as much.  It still must exist, as there are times (import)
when there are no entries files to read.

Of course, we *could* just change any subcommands that today use
REPOS_URLs to instead use both a REPOS_URL (that is, a canonical repos
URL, like http://svn.collab.net/repos/svn) and a REPOS_PATH (like
trunk).  I certainly *hope* we don't do such a thing, though.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org