[opensuse-buildservice] bug in file method of build controller
Hi, I ran into a bug in the file action of the build controller in the OBS API. Whenever the backend has a file that is exactly of size 8192*n+1 and the last byte is 0x30 = '0' the API cannot deliver the complete file through the path build/:project/:repository/:arch/:package/:filename but delivers only the full 8192 chunks without the final byte. Some debugging demonstrated the the backend itself does still deliver the file correctly but the API does cut off the last byte. I am not a deep Ruby expert but my interpretation of this behavior is that apparently some part of the code incorrectly interprets a chunk consisting of a single 0x30 = '0' as an empty chunk and thus concludes that the file reading has completed. Especially since it does not seem to happen when the last byte is different from 0x30. You can reproduce that by just placing a file there of the above style (for instance with "echo -n 0 > foobar.rpm" for the most simple case of n=0) and then try to retrieve it through the API. Robert -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On 17.04.2012 16:22, Robert Schiele wrote:
Hi,
I ran into a bug in the file action of the build controller in the OBS API. Whenever the backend has a file that is exactly of size 8192*n+1 and the last byte is 0x30 = '0' the API cannot deliver the complete file through the path build/:project/:repository/:arch/:package/:filename but delivers only the full 8192 chunks without the final byte. Some debugging demonstrated the the backend itself does still deliver the file correctly but the API does cut off the last byte.
I am not a deep Ruby expert but my interpretation of this behavior is that apparently some part of the code incorrectly interprets a chunk consisting of a single 0x30 = '0' as an empty chunk and thus concludes that the file reading has completed. Especially since it does not seem to happen when the last byte is different from 0x30.
You can reproduce that by just placing a file there of the above style (for instance with "echo -n 0 > foobar.rpm" for the most simple case of n=0) and then try to retrieve it through the API.
You don't need to be a ruby expert, but an apache one ;( VOLLEY(mod_xforward): /build/home:coolo/openSUSE_Factory/x86_64/clicfs/foobar.rpm Greetings, Stephan -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Wed, Apr 18, 2012 at 05:16:52PM +0200, Stephan Kulow wrote:
You don't need to be a ruby expert, but an apache one ;(
VOLLEY(mod_xforward): /build/home:coolo/openSUSE_Factory/x86_64/clicfs/foobar.rpm
Uh, seems to be a backend issue. Fixed with commit #ebf964bc. M. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (3)
-
Michael Schroeder
-
Robert Schiele
-
Stephan Kulow