"apt-get update" runs for 20 minutes...
Hi All,
First post, I've been stuck on a problem got 2 weeks now. When I run apt-get update on my Ubuntu 12.10 machine it hangs for 20 minutes on 'Reading Package Lists...##%' which on my Debian 6 server takes less than a second. My machine is quite powerful and I've been able to do most everything else; install steam, run TF2, music, videos, xbmc and so on... so I know it's working. I can't see any errors in logs that could explain this. So far my best lead is the ltrace and strace I ran to see where the time was being spent but I don't know how to diagnose further.
Any and all help appreciated!
strace -c apt-get update:
Code:
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
93.25 0.005222 373 14 waitpid
4.54 0.000254 0 2662 read
1.61 0.000090 0 875 286 stat64
0.61 0.000034 1 30 munmap
0.00 0.000000 0 590 write
0.00 0.000000 0 240 6 open
0.00 0.000000 0 309 close
0.00 0.000000 0 10 9 unlink
0.00 0.000000 0 1 execve
0.00 0.000000 0 4 chdir
0.00 0.000000 0 17 chmod
0.00 0.000000 0 1 getpid
0.00 0.000000 0 12 11 access
0.00 0.000000 0 10 kill
0.00 0.000000 0 35 rename
0.00 0.000000 0 21 dup
0.00 0.000000 0 23 pipe
0.00 0.000000 0 11 brk
0.00 0.000000 0 2 ioctl
0.00 0.000000 0 232 gettimeofday
0.00 0.000000 0 2 fchmod
0.00 0.000000 0 2 fsync
0.00 0.000000 0 14 clone
0.00 0.000000 0 14 mprotect
0.00 0.000000 0 27 3 _llseek
0.00 0.000000 0 452 select
0.00 0.000000 0 4 msync
0.00 0.000000 0 4 rt_sigaction
0.00 0.000000 0 254 rt_sigprocmask
0.00 0.000000 0 2 getcwd
0.00 0.000000 0 62 mmap2
0.00 0.000000 0 1 ftruncate64
0.00 0.000000 0 2 2 lstat64
0.00 0.000000 0 262 fstat64
0.00 0.000000 0 1 getuid32
0.00 0.000000 0 16 getdents64
0.00 0.000000 0 305 fcntl64
0.00 0.000000 0 1 set_thread_area
0.00 0.000000 0 8 openat
------ ----------- ----------- --------- --------- ----------------
100.00 0.005600 6532 317 total
ltrace -c apt-get update:
Code:
% time seconds usecs/call calls function
------ ----------- ----------- --------- --------------------
49.93 991.580396 991580396 1 _ZN11CommandLine11DispatchArgEPNS_8DispatchEb
44.92 892.111896 892111896 1 _ZN12pkgCacheFile11BuildCachesEP10OpProgressb
5.01 99.452689 99452689 1 _Z10ListUpdateR16pkgAcquireStatusR13pkgSourceListi
0.10 2.011690 4460 451 sigaddset
0.01 0.174376 28 6147 strlen
0.00 0.095587 26 3542 _ZN10pkgAcquire10WorkerStepEPNS_6WorkerE
0.00 0.062476 31 1980 _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_i
0.00 0.058722 130 451 _ZN16pkgAcquireStatus5PulseEP10pkgAcquire
0.00 0.051496 28 1797 __snprintf_chk
0.00 0.041437 45 902 sigprocmask
0.00 0.035268 63 559 _ZNSo5flushEv
0.00 0.027825 26 1041 _ZNSs4_Rep10_M_destroyERKSaIcE
0.00 0.027084 31 858 _Z9SizeToStrd
0.00 0.025476 40 631 memset
0.00 0.025083 39 631 __sprintf_chk
0.00 0.013495 28 481 snprintf
0.00 0.012177 12177 1 _ZN12pkgCacheFile12RemoveCachesEv
0.00 0.011808 26 451 sigemptyset
0.00 0.008400 78 107 _ZNSo3putEc
0.00 0.008065 50 159 gettext
0.00 0.006206 34 181 _Z9TimeToStrm
0.00 0.005443 70 77 _ZN16pkgAcquireStatus7FetchedEyy
0.00 0.004580 25 180 memcpy
0.00 0.004548 25 180 __udivdi3
0.00 0.002492 1246 2 _ZN12pkgCacheFile15BuildSourceListEP10OpProgress
0.00 0.002120 2120 1 _Z13pkgInitConfigR13Configuration
0.00 0.001686 29 57 _ZNSt8ios_base4InitD1Ev
0.00 0.001618 26 60 _ZNSo9_M_insertImEERSoT_
0.00 0.000255 255 1 _ZN16pkgAcquireStatus4StopEv
0.00 0.000219 219 1 _ZN12pkgCacheFileD2Ev
0.00 0.000163 163 1 _Z13pkgInitSystemR13ConfigurationRP9pkgSystem
0.00 0.000132 66 2 signal
0.00 0.000131 26 5 _ZNK13Configuration5FindBEPKcRKb
0.00 0.000122 40 3 _Z12_GetErrorObjv
0.00 0.000109 27 4 _ZNK13Configuration5FindIEPKcRKi
0.00 0.000106 106 1 setlocale
0.00 0.000094 94 1 _ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev
0.00 0.000092 30 3 _ZNSoD1Ev
0.00 0.000089 14 6 __cxa_atexit
0.00 0.000088 29 3 _ZNSt9basic_iosIcSt11char_traitsIcEE5rdbufEPSt15basic_streambufIcS1_E
0.00 0.000087 87 1 _Z8ioprintfRSoPKcz
0.00 0.000068 34 2 _ZNK11CommandLine8FileSizeEv
0.00 0.000065 65 1 _ZN14OpTextProgress4DoneEv
0.00 0.000062 62 1 getuid
0.00 0.000060 60 1 isatty
0.00 0.000058 58 1 ioctl
0.00 0.000049 49 1 _ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
0.00 0.000048 16 3 _ZNSoC1EPSt15basic_streambufIcSt11char_traitsIcEE
0.00 0.000041 41 1 _ZN12pkgCacheFileC2Ev
0.00 0.000040 40 1 _ZN16pkgAcquireStatusC2Ev
0.00 0.000038 38 1 _ZN14OpTextProgressC1ER13Configuration
0.00 0.000036 36 1 _ZN16pkgAcquireStatus5StartEv
0.00 0.000032 32 1 _ZN11CommandLineD1Ev
0.00 0.000032 32 1 _ZN11GlobalError10DumpErrorsERSoRKNS_7MsgTypeERKb
0.00 0.000029 14 2 _ZNSt8ios_base4InitC1Ev
0.00 0.000019 19 1 _ZN11CommandLine5ParseEiPPKc
0.00 0.000016 16 1 textdomain
0.00 0.000016 16 1 _ZN11CommandLineC1EPNS_4ArgsEP13Configuration
------ ----------- ----------- --------- --------------------
100.00 1985.866535 20983 total
Link to my previous investigations: ubuntuforums.org - Installation & Upgrades - "6 Hour+ install time, apt-get / dpkg broken!?"
(can't post links yet)
Thanks,
Noki