Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg may sleep on failure to fetch (mostly /usr/sbin/pkg, really) #2038

Closed
cgull opened this issue Apr 21, 2022 · 1 comment
Closed

pkg may sleep on failure to fetch (mostly /usr/sbin/pkg, really) #2038

cgull opened this issue Apr 21, 2022 · 1 comment

Comments

@cgull
Copy link
Contributor

cgull commented Apr 21, 2022

I recently found a bug in /usr/sbin/pkg where it will sleep for a total of 4 seconds, if it can't fetch a file while bootstrapping, at least in some circumstances (mine was IPv4 configured but no DNS).

I reported that to FreeBSD. The sleep(1) in question is in code that originates from pkg and is now in fetch_libfetch.c. The code there has seen more changes, and I wasn't able to reproduce this bug with pkg.

This is obviously not a terribly serious bug, but it might be delaying pkg in some circumstances where it shouldn't, so I'm reporting it here.

@igalic
Copy link

igalic commented Apr 24, 2022

i really don't understand the purpose of that sleep(1); call.

@bapt bapt closed this as completed in 446226c Jul 28, 2022
bapt added a commit that referenced this issue Aug 3, 2022
this sleep(1) was add at the very early times of pkg, but never
really made any sense

Fixes: #2038
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants