FW: Locks return "Bad Request"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

FW: Locks return "Bad Request"

Joel Low
Hello again,

It's about a month and a half from when I first sent the first email. Are
there any solutions or steps I can take to solve this? I need this quite
badly to help ensure that the binary files do not clash with one another and
diffing those files (they are Flash files) is impossible.

Can anyone offer assistance?

Thank you,
Joel

P/s I don't think I missed a reply (checking both my spam list and
Googling), but if I did, please point me to the archive entry, thanks.

-----Original Message-----
From: Joel Low [mailto:[hidden email]]
Sent: 5 May 2007 8:37 PM
To: '[hidden email]'
Subject: FW: Locks return "Bad Request"

Hello,

I have not gotten any response -- would it be more appropriate if I send
this to dev instead?

Regards,
Joel

-----Original Message-----
From: Joel Low [mailto:[hidden email]]
Sent: 30 April 2007 6:08 PM
To: '[hidden email]'
Subject: Locks return "Bad Request"

Hello,

I'm using Apache 2.2.4 and SVN 1.4.3, with the TortoiseSVN client. When
requesting for locks, I get this error message:

        Error: Lock request failed: 400 Bad Request (https://localhost)

Executing the svn client directly from the command line yields the same
result (svn lock -m "message" path/to/file.ext)

Checking Apache's logs leads me to this very weird error:

        [Mon Apr 30 18:03:08 2007] [error] [client 127.0.0.1] Tried to
attach multiple locks to a resource.  [400, #405]

I've tried using svnserve and using the file:/// protocol directly, and
locking/unlocking is fine. I've Googled this topic and I only get vague
answers (someone suggested downgrading to Apache 2.0, my binaries are for
2.2, and downgrading to Subversion 1.4.2). The mailing list search didn't
give me useful results.

Does anyone have a solution to this?

Thanks in advance,
Joel


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: FW: Locks return "Bad Request"

Karl Fogel-2
"Joel Low" <[hidden email]> writes:
> It's about a month and a half from when I first sent the first email. Are
> there any solutions or steps I can take to solve this? I need this quite
> badly to help ensure that the binary files do not clash with one another and
> diffing those files (they are Flash files) is impossible.
>
> Can anyone offer assistance?
>
> P/s I don't think I missed a reply (checking both my spam list and
> Googling), but if I did, please point me to the archive entry, thanks.

This is the right place to be asking, it must just be a rare error.

My guess would be that something in your Apache configuration is
blocking whatever HTTP/WebDAV commands are used to request a lock.  I
don't know what that configuration problem might be, though --
something to do with access rights, maybe?

-Karl

--
Subversion support & consulting  <>  http://producingoss.com/consulting.html


> -----Original Message-----
> From: Joel Low [mailto:[hidden email]]
> Sent: 5 May 2007 8:37 PM
> To: '[hidden email]'
> Subject: FW: Locks return "Bad Request"
>
> Hello,
>
> I have not gotten any response -- would it be more appropriate if I send
> this to dev instead?
>
> Regards,
> Joel
>
> -----Original Message-----
> From: Joel Low [mailto:[hidden email]]
> Sent: 30 April 2007 6:08 PM
> To: '[hidden email]'
> Subject: Locks return "Bad Request"
>
> Hello,
>
> I'm using Apache 2.2.4 and SVN 1.4.3, with the TortoiseSVN client. When
> requesting for locks, I get this error message:
>
> Error: Lock request failed: 400 Bad Request (https://localhost)
>
> Executing the svn client directly from the command line yields the same
> result (svn lock -m "message" path/to/file.ext)
>
> Checking Apache's logs leads me to this very weird error:
>
> [Mon Apr 30 18:03:08 2007] [error] [client 127.0.0.1] Tried to
> attach multiple locks to a resource.  [400, #405]
>
> I've tried using svnserve and using the file:/// protocol directly, and
> locking/unlocking is fine. I've Googled this topic and I only get vague
> answers (someone suggested downgrading to Apache 2.0, my binaries are for
> 2.2, and downgrading to Subversion 1.4.2). The mailing list search didn't
> give me useful results.
>
> Does anyone have a solution to this?
>
> Thanks in advance,
> Joel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: FW: Locks return "Bad Request"

Joel Low
Hello,

I've managed to find a possible source file which leads to this error being
given: http://svn.collab.net/repos/svn/trunk/subversion/mod_dav_svn/lock.c,
in function static dav_error* append_locks(dav_lockdb *lockdb,
const dav_resource *resource, int make_indirect, const dav_lock *lock).

I'm not sure if I am able to debug into it (I'll try), but otherwise I don't
think anything's conflicting.

Thanks,
Joel

> -----Original Message-----
> From: Karl Fogel [mailto:[hidden email]]
> Sent: 16 June 2007 2:49 AM
> To: Joel Low
> Cc: [hidden email]
> Subject: Re: FW: Locks return "Bad Request"
>
> "Joel Low" <[hidden email]> writes:
> > It's about a month and a half from when I first sent the first email.
> Are
> > there any solutions or steps I can take to solve this? I need this quite
> > badly to help ensure that the binary files do not clash with one another
> and
> > diffing those files (they are Flash files) is impossible.
> >
> > Can anyone offer assistance?
> >
> > P/s I don't think I missed a reply (checking both my spam list and
> > Googling), but if I did, please point me to the archive entry, thanks.
>
> This is the right place to be asking, it must just be a rare error.
>
> My guess would be that something in your Apache configuration is
> blocking whatever HTTP/WebDAV commands are used to request a lock.  I
> don't know what that configuration problem might be, though --
> something to do with access rights, maybe?
>
> -Karl
>
> --
> Subversion support & consulting  <>
> http://producingoss.com/consulting.html
>
>
> > -----Original Message-----
> > From: Joel Low [mailto:[hidden email]]
> > Sent: 5 May 2007 8:37 PM
> > To: '[hidden email]'
> > Subject: FW: Locks return "Bad Request"
> >
> > Hello,
> >
> > I have not gotten any response -- would it be more appropriate if I send
> > this to dev instead?
> >
> > Regards,
> > Joel
> >
> > -----Original Message-----
> > From: Joel Low [mailto:[hidden email]]
> > Sent: 30 April 2007 6:08 PM
> > To: '[hidden email]'
> > Subject: Locks return "Bad Request"
> >
> > Hello,
> >
> > I'm using Apache 2.2.4 and SVN 1.4.3, with the TortoiseSVN client. When
> > requesting for locks, I get this error message:
> >
> > Error: Lock request failed: 400 Bad Request (https://localhost)
> >
> > Executing the svn client directly from the command line yields the same
> > result (svn lock -m "message" path/to/file.ext)
> >
> > Checking Apache's logs leads me to this very weird error:
> >
> > [Mon Apr 30 18:03:08 2007] [error] [client 127.0.0.1] Tried to
> > attach multiple locks to a resource.  [400, #405]
> >
> > I've tried using svnserve and using the file:/// protocol directly, and
> > locking/unlocking is fine. I've Googled this topic and I only get vague
> > answers (someone suggested downgrading to Apache 2.0, my binaries are
> for
> > 2.2, and downgrading to Subversion 1.4.2). The mailing list search
> didn't
> > give me useful results.
> >
> > Does anyone have a solution to this?
> >
> > Thanks in advance,
> > Joel
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: FW: Locks return "Bad Request"

Karl Fogel-2
"Joel Low" <[hidden email]> writes:
> I've managed to find a possible source file which leads to this error being
> given: http://svn.collab.net/repos/svn/trunk/subversion/mod_dav_svn/lock.c,
> in function static dav_error* append_locks(dav_lockdb *lockdb,
> const dav_resource *resource, int make_indirect, const dav_lock *lock).
>
> I'm not sure if I am able to debug into it (I'll try), but otherwise I don't
> think anything's conflicting.

Please do try, since you have the only reproduction case right now.

So it seems lock->next is non-null?  If you can find out why, that
would be great...

-Karl

--
Subversion support & consulting  <>  http://producingoss.com/consulting.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: FW: Locks return "Bad Request"

Joel Low
Hello,

I've got a few preliminary findings.

Firstly, mod_dav_svn assumes certain things that seems to have changed in
httpd 2.2.4. I quote subversion\mod_dav_svn\lock.c:453, as of tag 1.4.4:

  /* allowing mod_dav to fill in dlock->timeout, owner, auth_user. */
  /* dlock->info and dlock->next are NULL by default. */

I've traced it all the way back to httpd-2.2.4\modules\dav\main\util_lock.c
[apache sources], to the place where the "next" value is checked. Data->next
was NEVER set (I set a data breakpoint). This would lead mod_dav_svn to
think that the data->next value is valid (when it is actually pointing to
garbage).

I'll have a go at compiling mod_dav_svn (I used the PDB of the prebuilt
binaries) and see if it helps.

Regards,
Joel

> -----Original Message-----
> From: Karl Fogel [mailto:[hidden email]]
> Sent: 16 June 2007 9:30 AM
> To: Joel Low
> Cc: [hidden email]
> Subject: Re: FW: Locks return "Bad Request"
>
> "Joel Low" <[hidden email]> writes:
> > I've managed to find a possible source file which leads to this error
> being
> > given:
> http://svn.collab.net/repos/svn/trunk/subversion/mod_dav_svn/lock.c,
> > in function static dav_error* append_locks(dav_lockdb *lockdb,
> > const dav_resource *resource, int make_indirect, const dav_lock *lock).
> >
> > I'm not sure if I am able to debug into it (I'll try), but otherwise I
> don't
> > think anything's conflicting.
>
> Please do try, since you have the only reproduction case right now.
>
> So it seems lock->next is non-null?  If you can find out why, that
> would be great...
>
> -Karl
>
> --
> Subversion support & consulting  <>
> http://producingoss.com/consulting.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: FW: Locks return "Bad Request"

Joel Low
Hello all,

Okay, my change to set dlock->next = NULL in the sources seems to work. I've
built a mod_dav_svn.so binary and my Apache is running off it now. Seems to
work just fine.

Joel

> -----Original Message-----
> From: Joel Low [mailto:[hidden email]]
> Sent: 16 June 2007 10:26 AM
> To: [hidden email]
> Subject: RE: FW: Locks return "Bad Request"
>
> Hello,
>
> I've got a few preliminary findings.
>
> Firstly, mod_dav_svn assumes certain things that seems to have changed in
> httpd 2.2.4. I quote subversion\mod_dav_svn\lock.c:453, as of tag 1.4.4:
>
>   /* allowing mod_dav to fill in dlock->timeout, owner, auth_user. */
>   /* dlock->info and dlock->next are NULL by default. */
>
> I've traced it all the way back to httpd-
> 2.2.4\modules\dav\main\util_lock.c
> [apache sources], to the place where the "next" value is checked. Data-
> >next
> was NEVER set (I set a data breakpoint). This would lead mod_dav_svn to
> think that the data->next value is valid (when it is actually pointing to
> garbage).
>
> I'll have a go at compiling mod_dav_svn (I used the PDB of the prebuilt
> binaries) and see if it helps.
>
> Regards,
> Joel
>
> > -----Original Message-----
> > From: Karl Fogel [mailto:[hidden email]]
> > Sent: 16 June 2007 9:30 AM
> > To: Joel Low
> > Cc: [hidden email]
> > Subject: Re: FW: Locks return "Bad Request"
> >
> > "Joel Low" <[hidden email]> writes:
> > > I've managed to find a possible source file which leads to this error
> > being
> > > given:
> > http://svn.collab.net/repos/svn/trunk/subversion/mod_dav_svn/lock.c,
> > > in function static dav_error* append_locks(dav_lockdb *lockdb,
> > > const dav_resource *resource, int make_indirect, const dav_lock
*lock).

> > >
> > > I'm not sure if I am able to debug into it (I'll try), but otherwise I
> > don't
> > > think anything's conflicting.
> >
> > Please do try, since you have the only reproduction case right now.
> >
> > So it seems lock->next is non-null?  If you can find out why, that
> > would be great...
> >
> > -Karl
> >
> > --
> > Subversion support & consulting  <>
> > http://producingoss.com/consulting.html
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: FW: Locks return "Bad Request"

Nicolai Scheer
Hi!

Joel Low schrieb:
> Hello all,
>
> Okay, my change to set dlock->next = NULL in the sources seems to work. I've
> built a mod_dav_svn.so binary and my Apache is running off it now. Seems to
> work just fine.
>
> Joel

Is there any follow up on this? I have two svn Servers running apache
2.2.4 and svn 1.4.4 (windows server 2003) where I can not lock anything
due to the described error.

Will the changes make it into any release?

greetz,

Nico


signature.asc (842 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: FW: Locks return "Bad Request"

D.J. Heap-2
In reply to this post by Joel Low
On 6/15/07, Joel Low <[hidden email]> wrote:
> Hello all,
>
> Okay, my change to set dlock->next = NULL in the sources seems to work. I've
> built a mod_dav_svn.so binary and my Apache is running off it now. Seems to
> work just fine.
>
> Joel


Can you submit a patch for this or at least give a bit more detail on
exactly where you made this change to fix the issue?

Thanks!

DJ

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: FW: Locks return "Bad Request"

Joel Low
Index: lock.c
===================================================================
--- lock.c (revision 25430)
+++ lock.c (working copy)
@@ -449,6 +449,7 @@
                                "Failed to generate a lock token.",
                                resource->pool);
   dlock->locktoken = token;
+  dlock->next = NULL;
 
   /* allowing mod_dav to fill in dlock->timeout, owner, auth_user. */
   /* dlock->info and dlock->next are NULL by default. */

That's all.

However, I have a feeling that the issue is deeper than what I think it is,
since I notice that the call to apr_pcalloc was used. Assuming that the
apr_pcalloc is analogous to C's calloc, the memory returned should be
Zero'ed completely and my code is unnecessary. This probably may just be a
'band-aid' fix for all I know.

I'm not sure where this patch should really go though. If anyone wants to
submit it to the proper bugtracker, please feel free to do so.

Regards,
Joel

-----Original Message-----
From: D.J. Heap [mailto:[hidden email]]
Sent: 24 June 2007 6:16 AM
To: Joel Low
Cc: [hidden email]
Subject: Re: FW: Locks return "Bad Request"

On 6/15/07, Joel Low <[hidden email]> wrote:
> Hello all,
>
> Okay, my change to set dlock->next = NULL in the sources seems to work.
I've
> built a mod_dav_svn.so binary and my Apache is running off it now. Seems
to
> work just fine.
>
> Joel


Can you submit a patch for this or at least give a bit more detail on
exactly where you made this change to fix the issue?

Thanks!

DJ


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: FW: Locks return "Bad Request"

D.J. Heap-2
On 6/23/07, Joel Low <[hidden email]> wrote:

> Index: lock.c
> ===================================================================
> --- lock.c      (revision 25430)
> +++ lock.c      (working copy)
> @@ -449,6 +449,7 @@
>                                "Failed to generate a lock token.",
>                                resource->pool);
>   dlock->locktoken = token;
> +  dlock->next = NULL;
>
>   /* allowing mod_dav to fill in dlock->timeout, owner, auth_user. */
>   /* dlock->info and dlock->next are NULL by default. */
>
> That's all.
>
> However, I have a feeling that the issue is deeper than what I think it is,
> since I notice that the call to apr_pcalloc was used. Assuming that the
> apr_pcalloc is analogous to C's calloc, the memory returned should be
> Zero'ed completely and my code is unnecessary. This probably may just be a
> 'band-aid' fix for all I know.
>
> I'm not sure where this patch should really go though. If anyone wants to
> submit it to the proper bugtracker, please feel free to do so.



Were you compiling and testing this patch with 1.4.x or on a trunk
version?  I can't recreate the problem on trunk with Apache 2.2.4 on
Vista.  Would you mind trying a recent trunk build and seeing if it
still fails for you or has been fixed (I can provide test binaries if
you want to email me privately)?

Thanks!

DJ

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: FW: Locks return "Bad Request"

Tony Harverson-2
In reply to this post by Joel Low
> -----Original Message-----
> From: Joel Low [mailto:[hidden email]]
> Sent: Thursday, June 14, 2007 11:24 AM
> To: [hidden email]
> Subject: FW: Locks return "Bad Request"
>
> Hello again,
>
> It's about a month and a half from when I first sent the
> first email. Are there any solutions or steps I can take to
> solve this? I need this quite badly to help ensure that the
> binary files do not clash with one another and diffing those
> files (they are Flash files) is impossible.
Good Afternoon,

I've recently run across this problem with Apache 2.2.24 (httpd-2.2.4-win32-x86-ssl from www.apachelounge.com) and subversion 1.4.4. According to D.J. Heap, there's a problem caused by using a copy of Apache compiled with Visual Studio 2005 (which the apachelounge version was) along with the precompiled Subversion binaries built with VC6.  

Installing the stock version of apache_2.2.4-win32-x86-openssl-0.9.8d from the Apache site solved the problem, and locks are now working on that server again.

Good Luck,

Tony

 
Reply | Threaded
Open this post in threaded view
|

RE: FW: Locks return "Bad Request"

Joel Low
So is it a possibility that the VC6/VC2005 binaries are not compatible? I compiled Apache myself using the sources distributed at the Apache httpd site.

Joel

> -----Original Message-----
> From: Tony Harverson [mailto:[hidden email]]
> Sent: 20 July 2007 10:10 PM
> To: Joel Low; [hidden email]
> Subject: RE: FW: Locks return "Bad Request"
>
> > -----Original Message-----
> > From: Joel Low [mailto:[hidden email]]
> > Sent: Thursday, June 14, 2007 11:24 AM
> > To: [hidden email]
> > Subject: FW: Locks return "Bad Request"
> >
> > Hello again,
> >
> > It's about a month and a half from when I first sent the
> > first email. Are there any solutions or steps I can take to
> > solve this? I need this quite badly to help ensure that the
> > binary files do not clash with one another and diffing those
> > files (they are Flash files) is impossible.
> Good Afternoon,
>
> I've recently run across this problem with Apache 2.2.24 (httpd-2.2.4-
> win32-x86-ssl from www.apachelounge.com) and subversion 1.4.4.
> According to D.J. Heap, there's a problem caused by using a copy of
> Apache compiled with Visual Studio 2005 (which the apachelounge version
> was) along with the precompiled Subversion binaries built with VC6.
>
> Installing the stock version of apache_2.2.4-win32-x86-openssl-0.9.8d
> from the Apache site solved the problem, and locks are now working on
> that server again.
>
> Good Luck,
>
> Tony
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: RE: FW: Locks return "Bad Request"

Tony Harverson-2
> -----Original Message-----
> From: Joel Low [mailto:[hidden email]]
> Sent: Friday, July 20, 2007 4:34 PM
> To: [hidden email]
> Subject: RE: FW: Locks return "Bad Request"
>
> So is it a possibility that the VC6/VC2005 binaries are not
> compatible? I compiled Apache myself using the sources
> distributed at the Apache httpd site.
>
> Joel

Yes, that appears to be the case.. So it's worth either trying to use a vc6 compiled apache binary, or compiling the subversion binaries in vs 2005. (though I understand that's a challenge).

Tony