Bug 1281969 - baseurl with file:// hangs and then timeout in yum repo
Summary: baseurl with file:// hangs and then timeout in yum repo
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: curl
Version: 7.1
Hardware: x86_64
OS: Linux
urgent
medium
Target Milestone: rc
: ---
Assignee: Kamil Dudka
QA Contact: Daniel Rusek
URL:
Whiteboard:
: 1701370 (view as bug list)
Depends On:
Blocks: 1709474
TreeView+ depends on / blocked
 
Reported: 2015-11-13 22:54 UTC by eduda
Modified: 2019-08-06 13:03 UTC (History)
7 users (show)

Fixed In Version: curl-7.29.0-52.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1709474 (view as bug list)
Environment:
Last Closed: 2019-08-06 13:03:15 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:2181 None None None 2019-08-06 13:03:28 UTC

Description eduda 2015-11-13 22:54:38 UTC
Description of problem:

using file:// in the repo appears to cause yum to timeout and not work

Version-Release number of selected component (if applicable):


How reproducible:

cat /rpmcache/7/myrepo.repo 

[myrepo]
name=myrepo
baseurl=file:///rpmcache/7/myrepo
enabled=1

/rpmcache/7/myrepo/* has a few rpms in it and repodata is created with createrepo

/usr/bin/yum --setopt=reposdir=/rpmcache/7 list


Actual results:

file:///rpmcache/7/myrepo/repodata/repomd.xml: [Errno 12] Timeout on file://rpmcache/7/myrepo/repodata/repomd.xml: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Trying other mirror.

...repeats that msg.

Expected results:

should list the rpms

Additional info:

python-urlgrabber-3.10-6.el7.noarch

Comment 2 eduda 2015-11-18 17:21:56 UTC
bug appears to be related to throttle=100 in yum.conf, so we might be able to work around this by increasing it.

Comment 4 Michal Domonkos 2018-11-28 17:27:07 UTC
Indeed, curl shouldn't apply the speed limit when fetching local files:

https://curl.haxx.se/libcurl/c/CURLOPT_MAX_RECV_SPEED_LARGE.html

[...]
This option doesn't affect transfer speeds done with FILE:// URLs. 
[...]

This is also reproducible using the curl(1) binary on RHEL-7.6:

$ curl --limit-rate 100 file:///path/to/file

I have tried the same command on a Fedora 29 system and it worked correctly (i.e. the limit wasn't applied).  Reassigning to curl.

Comment 5 Kamil Dudka 2018-11-28 21:59:57 UTC
(In reply to Michal Domonkos from comment #4)
> Indeed, curl shouldn't apply the speed limit when fetching local files:
> 
> https://curl.haxx.se/libcurl/c/CURLOPT_MAX_RECV_SPEED_LARGE.html
> 
> [...]
> This option doesn't affect transfer speeds done with FILE:// URLs. 
> [...]

You are referring to documentation of the latest upstream release of curl, not to the release of curl that we have in RHEL-7.

> This is also reproducible using the curl(1) binary on RHEL-7.6:
> 
> $ curl --limit-rate 100 file:///path/to/file
> 
> I have tried the same command on a Fedora 29 system and it worked correctly
> (i.e. the limit wasn't applied).  Reassigning to curl.

Thanks for the reproducer!  This was fixed upstream by the following commits:

https://github.com/curl/curl/commit/curl-7_34_0-39-g2715d7f94
https://github.com/curl/curl/commit/curl-7_34_0-40-gf718415bc

We should be able to backport them to RHEL-7.

Comment 6 Michal Domonkos 2018-11-30 14:43:41 UTC
(In reply to Kamil Dudka from comment #5)
> You are referring to documentation of the latest upstream release of curl,
> not to the release of curl that we have in RHEL-7.

Oh, you got me there :)  Right, I didn't consider this possibility.  Thanks for noticing.

> 
> > This is also reproducible using the curl(1) binary on RHEL-7.6:
> > 
> > $ curl --limit-rate 100 file:///path/to/file
> > 
> > I have tried the same command on a Fedora 29 system and it worked correctly
> > (i.e. the limit wasn't applied).  Reassigning to curl.
> 
> Thanks for the reproducer!  This was fixed upstream by the following commits:
> 
> https://github.com/curl/curl/commit/curl-7_34_0-39-g2715d7f94
> https://github.com/curl/curl/commit/curl-7_34_0-40-gf718415bc
> 
> We should be able to backport them to RHEL-7.

That's perfect, thank you!

Comment 9 Kamil Dudka 2019-05-09 13:10:24 UTC
*** Bug 1701370 has been marked as a duplicate of this bug. ***

Comment 15 errata-xmlrpc 2019-08-06 13:03:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:2181


Note You need to log in before you can comment on or make changes to this bug.