apt update hangs when repository url is redirect url
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| apt (Ubuntu) |
High
|
Julian Andres Klode | ||
| Xenial |
High
|
Julian Andres Klode | ||
| Artful |
High
|
Julian Andres Klode |
Bug Description
[Impact]
When using redirect url on /etc/apt/
apt update command hangs
this is affected with commit
https:/
In my test, moving below[1] code after[2]
[1]
###
if (ContentLength == 0)
return true;
###
[2]
if (Encoding == Closes)
Encoding = Stream;
###
it worked fine.
[Test Case]
echo "deb http://
apt update
[Regression]
Could cause some other zero-content redirects to break again (seems unlikely...).
tags: | added: sts |
Changed in apt (Ubuntu): | |
status: | New → Triaged |
Changed in apt (Ubuntu Xenial): | |
status: | New → Triaged |
Changed in apt (Ubuntu Artful): | |
status: | New → Triaged |
Changed in apt (Ubuntu): | |
importance: | Undecided → High |
Changed in apt (Ubuntu Xenial): | |
importance: | Undecided → High |
Changed in apt (Ubuntu Artful): | |
importance: | Undecided → High |
Changed in apt (Ubuntu): | |
assignee: | nobody → Julian Andres Klode (juliank) |
Changed in apt (Ubuntu Xenial): | |
assignee: | nobody → Julian Andres Klode (juliank) |
Changed in apt (Ubuntu Artful): | |
assignee: | nobody → Julian Andres Klode (juliank) |
Julian Andres Klode (juliank) wrote : | #1 |
Julian Andres Klode (juliank) wrote : | #2 |
OK, so I need to dig a bit further into this. I think if I move the if I break things elsewhere. IIRC, I added the if that early because, when apt received a redirect with Content-Length: 0, it started hanging, and that fixed it. But maybe it breaks some other stuff now.
Changed in apt (Ubuntu): | |
status: | Triaged → Invalid |
Julian Andres Klode (juliank) wrote : | #3 |
It's working fine in bionic, but I can confirm it failed in xenial.
Changed in apt (Ubuntu Artful): | |
status: | Triaged → New |
Julian Andres Klode (juliank) wrote : | #4 |
OK, so:
xenial: affected
artful, bionic: NOT affected
So I might just want to revert this commit in an apt 1.2.26 release and look at it again later.
Changed in apt (Ubuntu Artful): | |
status: | New → Invalid |
Changed in apt (Ubuntu Xenial): | |
status: | Triaged → In Progress |
Seyeong Kim (xtrusia) wrote : | #5 |
Hello Julian, no news for this?
Julian Andres Klode (juliank) wrote : | #6 |
I was sort of waiting for 16.04.4 to be released and then lost track of it. Uploading fixed version today.
Julian Andres Klode (juliank) wrote : | #7 |
Uploaded.
Seyeong Kim (xtrusia) wrote : | #8 |
Thanks a lot!
description: | updated |
Hello Seyeong, or anyone else affected,
Accepted apt into xenial-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-
Further information regarding the verification process can be found at https:/
Changed in apt (Ubuntu Xenial): | |
status: | In Progress → Fix Committed |
tags: | added: verification-needed verification-needed-xenial |
Seyeong Kim (xtrusia) wrote : | #10 |
Hello,
I verified this -proposed pkg is working.
1. upgrade apt pkg
2. insert above url in test case to sources.list
3. apt update
4. check if it hangs or not
dpkg -l
ii apt 1.2.26 amd64 commandline package manager
Thanks
tags: |
added: verification-done-xenial removed: verification-needed-xenial |
Launchpad Janitor (janitor) wrote : | #11 |
This bug was fixed in the package apt - 1.2.26
---------------
apt (1.2.26) xenial; urgency=medium
* Revert "http: A response with Content-Length: 0 has no content"
- broke Content-Length: 0 redirects (in xenial only) (LP: #1751225)
* travis: Migrate to Docker to make CI work again
-- Julian Andres Klode <email address hidden> Tue, 06 Mar 2018 09:43:16 +0100
Changed in apt (Ubuntu Xenial): | |
status: | Fix Committed → Fix Released |
The verification of the Stable Release Update for apt has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.
Ack, that seems to make sense. Strange.