You are not logged in.

#1 2011-08-26 07:25:50

tehkane
Member
Registered: 2010-01-03
Posts: 9

pacman -Sy(yu) is broken. "too many open files"

[root@myhost ~]# pacman -Syu
:: Synchronizing package databases...
error: failed retrieving file 'core.db' from mirror.aarnet.edu.au : Too many open files
error: failed retrieving file 'core.db' from mirror.aarnet.edu.au : Too many open files
error: failed retrieving file 'core.db' from ftp.iinet.net.au : Too many open files
error: failed retrieving file 'core.db' from mirror.internode.on.net : Too many open files
error: failed retrieving file 'core.db' from mirror.internode.on.net : Too many open files
error: failed to update core (Too many open files)
error: failed retrieving file 'extra.db' from mirror.aarnet.edu.au : Too many open files
error: failed retrieving file 'extra.db' from mirror.aarnet.edu.au : Too many open files
error: failed retrieving file 'extra.db' from ftp.iinet.net.au : Too many open files
error: failed retrieving file 'extra.db' from mirror.internode.on.net : Too many open files
error: failed retrieving file 'extra.db' from mirror.internode.on.net : Too many open files
error: failed to update extra (Too many open files)
error: failed retrieving file 'community.db' from mirror.aarnet.edu.au : Too many open files
error: failed retrieving file 'community.db' from mirror.aarnet.edu.au : Too many open files
error: failed retrieving file 'community.db' from ftp.iinet.net.au : Too many open files
error: failed retrieving file 'community.db' from mirror.internode.on.net : Too many open files
error: failed retrieving file 'community.db' from mirror.internode.on.net : Too many open files
error: failed to update community (Too many open files)
error: failed to synchronize any databases
[root@myhost ~]# pacman -Q pacman
pacman 3.5.3-1
[root@myhost ~]# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 20
file size               (blocks, -f) unlimited
pending signals                 (-i) 7937
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 2048
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 7937
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

The closest I've come to fixing this was by doing:

ulimit -n 2048
pacman -Syy

Which results in pacman hanging on "Synchronizing package databases...". I let it set there for ~10-15 minutes before finally killing it.

If it makes any difference, the box doesn't have a direct connection to the internet. I'm using `http_proxy`. Which I've tested with `wget`. Works fine.

Any ideas?

Offline

#2 2011-08-26 17:38:30

serh
Member
Registered: 2011-08-16
Posts: 20

Re: pacman -Sy(yu) is broken. "too many open files"

Did you try switching the mirror to a global one?

Offline

#3 2011-08-29 00:42:41

tehkane
Member
Registered: 2010-01-03
Posts: 9

Re: pacman -Sy(yu) is broken. "too many open files"

Yes, I enabled the mirrors.kernel.org mirror and the same thing happens.

I should point out, I've also rebooted a few times and the error still occurs. Which seems odd, to me, that I can have "too many open files" after a reboot hmm

Offline

#4 2011-08-29 00:44:45

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: pacman -Sy(yu) is broken. "too many open files"

try running ...pacman-db-upgrade...and again when changing mirrors run....pacman -Syy.....

No spaces in the db command.........EDIT:

Last edited by lilsirecho (2011-08-29 00:45:42)


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#5 2011-08-29 01:30:48

toofishes
Developer
From: Chicago, IL
Registered: 2006-06-06
Posts: 602
Website

Re: pacman -Sy(yu) is broken. "too many open files"

If you can get it to hang, can you get lsof output from the pacman process for us? Find the correct pid using ps once it is hung, then something like `lsof -p <pid>`.

Offline

#6 2011-08-29 01:35:00

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: pacman -Sy(yu) is broken. "too many open files"

I'd be curious to see a stack trace of where all these files are being opened... `strace -eopen,close pacman -Syy'

Offline

#7 2011-08-29 03:19:39

tehkane
Member
Registered: 2010-01-03
Posts: 9

Re: pacman -Sy(yu) is broken. "too many open files"

try running ...pacman-db-upgrade...and again when changing mirrors run....pacman -Syy.....

`pacman-db-upgrade` ran without error but the same problem is occurring when I try to `pacman -Syy`

If you can get it to hang, can you get lsof output from the pacman process for us? Find the correct pid using ps once it is hung, then something like `lsof -p <pid>`.

I'd be curious to see a stack trace of where all these files are being opened... `strace -eopen,close pacman -Syy'

I don't have `lsof` or `strace` installed and pacman isn't really available to install them. I'll see if I can grab a .tar.gz of them and compile them manually.

Offline

#8 2011-08-29 03:26:29

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: pacman -Sy(yu) is broken. "too many open files"

tehkane wrote:

I don't have `lsof` or `strace` installed and pacman isn't really available to install them. I'll see if I can grab a .tar.gz of them and compile them manually.

You'd be better served to download the package manually and install them. pacman -U shouldn't pose the same problem here.

Assuming 64 bit...
http://mirrors.rit.edu/archlinux/extra/ … pkg.tar.xz
http://mirrors.rit.edu/archlinux/extra/ … pkg.tar.xz

Offline

#9 2011-08-29 09:22:55

tehkane
Member
Registered: 2010-01-03
Posts: 9

Re: pacman -Sy(yu) is broken. "too many open files"

The problem seems to have been resolved. The only change made was removing my `http_proxy` setting and setting up a direct internet connection. pacman is now updating flawlessly. Seems strange that this would be the cause of the problem hmm

Kinda wish I had strace'd and lsof'd before I fixed the issue... Though, hopefully, no one else encounters this problem.

Offline

#10 2011-08-29 11:58:51

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: pacman -Sy(yu) is broken. "too many open files"

tehkane,
weird, I wouldn't have thought of that cause.
But now that it works please mark this thread as [SOLVED] by editing the title of your first post.


To know or not to know ...
... the questions remain forever.

Offline

#11 2011-08-29 13:26:26

toofishes
Developer
From: Chicago, IL
Registered: 2006-06-06
Posts: 602
Website

Re: pacman -Sy(yu) is broken. "too many open files"

This isn't solved at all. Can you set up the http_proxy again now that you can have strace and lsof installed, and not mark a problem solved that you've worked around and not really fixed? We'd appreciate it.

@bernarcher: I appreciate your forum mod instincts kicking in, but when two pacman developers are looking for answers, we don't like our reproducible test case to disappear on us... We've both suspected it was http_proxy so this isn't unexpected whatsoever.

Offline

#12 2011-08-29 21:13:07

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: pacman -Sy(yu) is broken. "too many open files"

@toofishes
This was only moderating as some kind of side effect (because tehkane claimed it resolved). tongue

In fact the bernarcher person tries to understand what happens. It sonded weird on first thought.  But I did rather skim the topic.
On second thought, however, you are certainly right. It remains somewhat mysterious (to me at least). I still remain curious.

Keep up your research. I am waiting.


To know or not to know ...
... the questions remain forever.

Offline

#13 2011-09-05 04:58:13

tehkane
Member
Registered: 2010-01-03
Posts: 9

Re: pacman -Sy(yu) is broken. "too many open files"

Sorry for the late reply.

This isn't solved at all. Can you set up the http_proxy again now that you can have strace and lsof installed, and not mark a problem solved that you've worked around and not really fixed? We'd appreciate it.

I'll see if I can do this later today and post back the output.

Offline

#14 2012-01-28 10:58:06

neena
Member
Registered: 2012-01-28
Posts: 2

Re: pacman -Sy(yu) is broken. "too many open files"

Hello

I'm having the same problem, and, I can only use the internet via the proxy, so, I can't really use the workaround either.
Here's the output of strace -eopen,close: http://pastebin.com/GW6xgXSs
The /etc/services file seems to be getting close'd twice somewhere, and that's making open increment the fd the next time?

Offline

#15 2012-01-28 13:19:29

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: pacman -Sy(yu) is broken. "too many open files"

I wouldn't expect that this is affecting the latest version of pacman -- you're using (presumably) 3.5.x

Last edited by falconindy (2012-01-28 13:21:11)

Offline

#16 2012-02-21 22:36:08

neena
Member
Registered: 2012-01-28
Posts: 2

Re: pacman -Sy(yu) is broken. "too many open files"

Yes, I was using 3.5.something, it worked fine after I installed with the latest.

I'm sorry, I had put off for later and then completely forgotten about it.
I suppose this thread could be marked as solved now.

Offline

Board footer

Powered by FluxBB