Skip to content

Comments

Increase Curl timeout value.#168

Closed
nteodosio wants to merge 1 commit intoximion:masterfrom
nteodosio:curl-timeout
Closed

Increase Curl timeout value.#168
nteodosio wants to merge 1 commit intoximion:masterfrom
nteodosio:curl-timeout

Conversation

@nteodosio
Copy link
Contributor

For a poor man's Internet connection, Appstream will bail out when downloading large debs:

2026-02-20 14:06:39 - DEBUG: Failed to download http://archive.ubuntu.com/ubuntu/pool/main/u/ubuntu-wallpapers/ubuntu-wallpapers-bionic_18.04.1-0ubuntu1_all.deb, will retry 4 more times
2026-02-20 14:06:49 - DEBUG: Failed to download http://archive.ubuntu.com/ubuntu/pool/main/e/emacs25/emacs25_25.2+1-6_amd64.deb, will retry 4 more times
2026-02-20 14:06:49 - DEBUG: Failed to download http://archive.ubuntu.com/ubuntu/pool/main/o/openjdk-lts/openjdk-11-jdk-headless_10.0.1+10-3ubuntu1_amd64.deb, will retry 4 more times
2026-02-20 14:06:56 - DEBUG: Failed to download http://archive.ubuntu.com/ubuntu/pool/main/g/gnome-user-docs/gnome-user-docs-de_3.28.1-0ubuntu1_all.deb, will retry 4 more times
2026-02-20 14:07:09 - DEBUG: Failed to download http://archive.ubuntu.com/ubuntu/pool/main/u/ubuntu-wallpapers/ubuntu-wallpapers-bionic_18.04.1-0ubuntu1_all.deb, will retry 3 more times
2026-02-20 14:07:19 - DEBUG: Failed to download http://archive.ubuntu.com/ubuntu/pool/main/o/openjdk-lts/openjdk-11-jdk-headless_10.0.1+10-3ubuntu1_amd64.deb, will retry 3 more times
2026-02-20 14:07:39 - DEBUG: Failed to download http://archive.ubuntu.com/ubuntu/pool/main/u/ubuntu-wallpapers/ubuntu-wallpapers-bionic_18.04.1-0ubuntu1_all.deb, will retry 2 more times
2026-02-20 14:07:49 - DEBUG: Failed to download http://archive.ubuntu.com/ubuntu/pool/main/o/openjdk-lts/openjdk-11-jdk-headless_10.0.1+10-3ubuntu1_amd64.deb, will retry 2 more times
2026-02-20 14:08:09 - DEBUG: Failed to download http://archive.ubuntu.com/ubuntu/pool/main/u/ubuntu-wallpapers/ubuntu-wallpapers-bionic_18.04.1-0ubuntu1_all.deb, will retry 1 more time
2026-02-20 14:08:19 - DEBUG: Failed to download http://archive.ubuntu.com/ubuntu/pool/main/o/openjdk-lts/openjdk-11-jdk-headless_10.0.1+10-3ubuntu1_amd64.deb, will retry 1 more time

It will thereby crash with

terminate called after throwing an instance of 'ASGenerator::DownloadException'
  what():  curl_easy_perform() failed: Timeout was reached
  Stack trace (most recent call last):
  #18   Object "/snap/appstream-generator/177/usr/bin/appstream-generator", at 0x59e1a97573a4, in
  #17   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x74108602a28a, in __libc_start_main
  #16   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x74108602a1c9, in
  #15   Object "/snap/appstream-generator/177/usr/bin/appstream-generator", at 0x59e1a9756ba5, in
  #14   Object "/snap/appstream-generator/177/usr/bin/appstream-generator", at 0x59e1a9757e32, in
  #13   Object "/snap/appstream-generator/177/usr/bin/appstream-generator", at 0x59e1a9784cb0, in
  #12   Object "/snap/appstream-generator/177/usr/bin/appstream-generator", at 0x59e1a9783a19, in
  #11   Object "/snap/appstream-generator/177/usr/bin/appstream-generator", at 0x59e1a977bd26, in
  #10   Object "/snap/appstream-generator/177/gnome-platform/usr/lib/x86_64-linux-gnu/libtbb.so.12", at 0x741086c52540, in
  #9    Object "/snap/appstream-generator/177/usr/bin/appstream-generator", at 0x59e1a9776bb5, in
  #8    Object "/snap/appstream-generator/177/gnome-platform/usr/lib/x86_64-linux-gnu/libtbb.so.12", at 0x741086c65e94, in
  #7    Object "/snap/appstream-generator/177/gnome-platform/usr/lib/x86_64-linux-gnu/libtbb.so.12", at 0x741086c5fd2b, in
  #6    Object "/snap/appstream-generator/177/gnome-platform/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7410864bb0c0, in std::rethrow_exception(std::__exception_ptr::exception_ptr)
  #5    Object "/snap/appstream-generator/177/gnome-platform/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7410864a5a54, in std::terminate()
  #4    Object "/snap/appstream-generator/177/gnome-platform/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7410864bb0d9, in
  #3    Object "/snap/appstream-generator/177/gnome-platform/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7410864a5ff4, in
  #2    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7410860288fe, in abort
  #1    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x74108604527d, in gsignal
  #0    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x74108609eb2c, in pthread_kill
  Aborted (Signal sent by tkill() 19035 1000)
  Aborted (core dumped)

@ximion
Copy link
Owner

ximion commented Feb 23, 2026

Wow, that must be a slow connection - but a 5min timeout seems rather excessive and will slow down the entire process if a server is unresponsive. Would a 1min timeout also work for you?

@nteodosio
Copy link
Contributor Author

nteodosio commented Feb 23, 2026 via email

@ximion
Copy link
Owner

ximion commented Feb 23, 2026

No, the timeout exists specifically because in the past, bad upstream systems could cause the generator to hang forever - and we never want a bad upstream to stall the entire run.

5min still feels crazy slow for a timeout here, depending on how large the distro is that you are building for, your data generation must take forever in download times!
Potentially we can help you out by making the timeout configurable in the config file, just like the allowed CAs already are.

@nteodosio
Copy link
Contributor Author

I built the snap with an outrageous timeout and appstream is indeed hung for about 6 h.

So let me indeed close this. I'll look for a different way to go about things and instead of trying to get the output from the horse's mouth, I'll rather try to come up with a "sample output" from Appstream in my local testing environment. Thank you for your help!

@nteodosio nteodosio closed this Feb 23, 2026
@ximion
Copy link
Owner

ximion commented Feb 23, 2026

Oh, it's good to know that the snap works! :-)

You can just run it on a PPA with very few packages, I am using a small local Debian repo for testing purposes.

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

Successfully merging this pull request may close these issues.

2 participants