Bug 141357 - Adept crashes on download timeout
Summary: Adept crashes on download timeout
Status: RESOLVED FIXED
Alias: None
Product: adept
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Peter Rockai
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-07 20:16 UTC by Andy Harrison
Modified: 2008-08-08 14:46 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Harrison 2007-02-07 20:16:52 UTC
Version:           2.1 Cruiser (using KDE KDE 3.5.6)
Installed from:    Ubuntu Packages
Compiler:          gcc (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5) 
OS:                Linux

I discovered this bug while attempting to adjust my apt.conf timeout settings.  Adept would crash on me somewhat regularly anyway, but I did not know why.  After I started playing with my timeout settings, it became clearer as to the possible reason.

I edited the /etc/apt/apt.conf.d/01ubuntu file and added the lines:

 Acquire::http::Timeout "10";
 Acquire::ftp::Timeout "10";

This works great when running apt-get from the commandline.

I noticed I could always reproduce timeouts when downloading from security.ubuntu.com.  Just for testing, I was trying to install karbon and it was automatically trying to download it from the security repository.  While apt-get would get a timeout and then keep right on rolling to the next repository, adept does not.  Adept segfaults immediately when it reaches the timeout period.  Running strace on adept showed it receive a 400 URI Failure right before it crashed.
When running adept in foreground mode so that I could get coredumps (adept_manager --nofork --sync --nocrashhandler) I could see the following error when I ran strings on the coredump:

400 URI Failure
URI: http://security.ubuntu.com/ubuntu/pool/main/k/koffice/karbon_1.5.2-0ubuntu2.1_i386.deb
Message: Connection timed out
Transient-Failure: true

Previously, Adept would crash after appearing to be stuck on a package for me even before I altered these timeout settings, I just wasn't sure why.  Now I know it was just sitting there until it finally hit the timeout period which is much longer by default.

I tried various settings to see if it would help, but the bottom line
is that adept will always crash when it a timeout occurs.


If more information is required, I can reproduce the problem quite easily.
Comment 1 Peter Rockai 2008-03-08 18:22:39 UTC
Thank you, now this is a good report. Although the download code has been written mostly from scratch for 3.0 (it would also be great if you could try alpha version if you are running Hardy snapshots -- https://launchpad.net/~mornfall/+archive), it is very well possible that the bug is still present. I will try to reproduce myself if you don't report back soon-ish. Thanks again.
Comment 2 Peter Rockai 2008-08-08 14:46:30 UTC
Hi, I have successfully replicated your problem description -- by cutting network connection in middle of a download -- and I can gladly confirm, that adept 3 goes on trying next source (which was a local approx instance) happily (finishing the download and going on to update). This is post-alpha6, although I believe it should work in alpha6 just as well.