* Problem building kernel - too many files open @ 2009-03-10 14:33 Piero Pezzin 2009-03-10 18:22 ` Khem Raj 0 siblings, 1 reply; 11+ messages in thread From: Piero Pezzin @ 2009-03-10 14:33 UTC (permalink / raw) To: openembedded-devel Hello everyone, I'm building a minimal distribution for a x86 machine (my host is a x86-64 with CentOS 4.4): OE Build Configuration: BB_VERSION = "1.8.12" METADATA_BRANCH = "org.openembedded.dev" METADATA_REVISION = "a8a23e995d108ecdfc31129941671551c591bc6e" TARGET_ARCH = "i486" TARGET_OS = "linux" MACHINE = "x86" DISTRO = "minimal" DISTRO_VERSION = ".dev-snapshot-20090310" TARGET_FPU = "" During kernel building, I got the following error: OTE: package linux-2.6.28: started NOTE: package linux-2.6.28-r6: task do_package: started ERROR: Error in executing: /home/piero/work/qong-nobk/openembedded/openembedded/packages/linux/ linux_2.6.28.bb ERROR: Exception:exceptions.IOError Message:[Errno 24] Too many open files: '/home/piero/work/qong-nobk/openembedded/build/tmp/work/x86-oe-linux/linux-2.6.28-r6/tmpQbp1Jr' ERROR: Error in executing: /home/piero/work/qong-nobk/openembedded/openembedded/packages/linux/ linux_2.6.28.bb ERROR: Exception:exceptions.ImportError Message:No module named traceback ERROR: Error in executing: /home/piero/work/qong-nobk/openembedded/openembedded/packages/linux/ linux_2.6.28.bb ERROR: Exception:exceptions.ImportError Message:No module named traceback ERROR: Error in executing: /home/piero/work/qong-nobk/openembedded/openembedded/packages/linux/ linux_2.6.28.bb ERROR: Exception:exceptions.ImportError Message:No module named traceback ERROR: Build of /home/piero/work/qong-nobk/openembedded/openembedded/packages/linux/ linux_2.6.28.bb do_package failed Traceback (most recent call last): File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/bin/bitbake", line 143, in ? File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/bin/bitbake", line 140, in main File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/cooker.py", line 612, in cook File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/cooker.py", line 514, in buildFile File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/runqueue.py", line 842, in execute_runqueue File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/runqueue.py", line 951, in execute_runqueue_internal File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/cooker.py", line 137, in tryBuild File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/cooker.py", line 111, in tryBuildPackage File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/build.py", line 278, in exec_task File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/build.py", line 113, in exec_func File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/build.py", line 136, in exec_func_python File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/utils.py", line 186, in better_exec ImportError: No module named traceback ERROR: Task 12 (/home/piero/work/qong-nobk/openembedded/openembedded/packages/linux/ linux_2.6.28.bb, do_package) failed Does anyone know what's happening? Thanks in advance and best regards. Piero ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Problem building kernel - too many files open 2009-03-10 14:33 Problem building kernel - too many files open Piero Pezzin @ 2009-03-10 18:22 ` Khem Raj 2009-03-11 8:49 ` Piero Pezzin 0 siblings, 1 reply; 11+ messages in thread From: Khem Raj @ 2009-03-10 18:22 UTC (permalink / raw) To: openembedded-devel On Tue, Mar 10, 2009 at 7:33 AM, Piero Pezzin <piero.pezzin@gmail.com> wrote: > Hello everyone, > > I'm building a minimal distribution for a x86 machine (my host is a x86-64 > with CentOS 4.4): > > OE Build Configuration: > BB_VERSION = "1.8.12" > METADATA_BRANCH = "org.openembedded.dev" > METADATA_REVISION = "a8a23e995d108ecdfc31129941671551c591bc6e" > TARGET_ARCH = "i486" > TARGET_OS = "linux" > MACHINE = "x86" > DISTRO = "minimal" > DISTRO_VERSION = ".dev-snapshot-20090310" > TARGET_FPU = "" > > > During kernel building, I got the following error: > > OTE: package linux-2.6.28: started > NOTE: package linux-2.6.28-r6: task do_package: started > ERROR: Error in executing: > /home/piero/work/qong-nobk/openembedded/openembedded/packages/linux/ > linux_2.6.28.bb > ERROR: Exception:exceptions.IOError Message:[Errno 24] Too many open files: > '/home/piero/work/qong-nobk/openembedded/build/tmp/work/x86-oe-linux/linux-2.6.28-r6/tmpQbp1Jr' > ERROR: Error in executing: > /home/piero/work/qong-nobk/openembedded/openembedded/packages/linux/ > linux_2.6.28.bb > ERROR: Exception:exceptions.ImportError Message:No module named traceback > ERROR: Error in executing: > /home/piero/work/qong-nobk/openembedded/openembedded/packages/linux/ > linux_2.6.28.bb > ERROR: Exception:exceptions.ImportError Message:No module named traceback > ERROR: Error in executing: > /home/piero/work/qong-nobk/openembedded/openembedded/packages/linux/ > linux_2.6.28.bb > ERROR: Exception:exceptions.ImportError Message:No module named traceback > ERROR: Build of > /home/piero/work/qong-nobk/openembedded/openembedded/packages/linux/ > linux_2.6.28.bb do_package failed > Traceback (most recent call last): > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/bin/bitbake", line 143, > in ? > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/bin/bitbake", line 140, > in main > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/cooker.py", line > 612, in cook > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/cooker.py", line > 514, in buildFile > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/runqueue.py", > line 842, in execute_runqueue > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/runqueue.py", > line 951, in execute_runqueue_internal > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/cooker.py", line > 137, in tryBuild > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/cooker.py", line > 111, in tryBuildPackage > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/build.py", line > 278, in exec_task > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/build.py", line > 113, in exec_func > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/build.py", line > 136, in exec_func_python > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/utils.py", line > 186, in better_exec > ImportError: No module named traceback > ERROR: Task 12 > (/home/piero/work/qong-nobk/openembedded/openembedded/packages/linux/ > linux_2.6.28.bb, do_package) failed > > Does anyone know what's happening? Someone else also saw this problem. Search the archives. Its most probably your host. > > Thanks in advance and best regards. > > Piero > _______________________________________________ > Openembedded-devel mailing list > Openembedded-devel@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Problem building kernel - too many files open 2009-03-10 18:22 ` Khem Raj @ 2009-03-11 8:49 ` Piero Pezzin 2009-03-12 8:02 ` Marco Cavallini 0 siblings, 1 reply; 11+ messages in thread From: Piero Pezzin @ 2009-03-11 8:49 UTC (permalink / raw) To: openembedded-devel Hi, I searched without success. I agree with you, there is a problem on my host, but I'd like to know why it pops out during the do_package task. Any help will be appreciated. Regards, Piero On Tue, Mar 10, 2009 at 7:22 PM, Khem Raj <raj.khem@gmail.com> wrote: > On Tue, Mar 10, 2009 at 7:33 AM, Piero Pezzin <piero.pezzin@gmail.com> > wrote: > > Hello everyone, > > > > I'm building a minimal distribution for a x86 machine (my host is a > x86-64 > > with CentOS 4.4): > > > > OE Build Configuration: > > BB_VERSION = "1.8.12" > > METADATA_BRANCH = "org.openembedded.dev" > > METADATA_REVISION = "a8a23e995d108ecdfc31129941671551c591bc6e" > > TARGET_ARCH = "i486" > > TARGET_OS = "linux" > > MACHINE = "x86" > > DISTRO = "minimal" > > DISTRO_VERSION = ".dev-snapshot-20090310" > > TARGET_FPU = "" > > > > > > During kernel building, I got the following error: > > > > OTE: package linux-2.6.28: started > > NOTE: package linux-2.6.28-r6: task do_package: started > > ERROR: Error in executing: > > /home/piero/work/qong-nobk/openembedded/openembedded/packages/linux/ > > linux_2.6.28.bb > > ERROR: Exception:exceptions.IOError Message:[Errno 24] Too many open > files: > > > '/home/piero/work/qong-nobk/openembedded/build/tmp/work/x86-oe-linux/linux-2.6.28-r6/tmpQbp1Jr' > > ERROR: Error in executing: > > /home/piero/work/qong-nobk/openembedded/openembedded/packages/linux/ > > linux_2.6.28.bb > > ERROR: Exception:exceptions.ImportError Message:No module named traceback > > ERROR: Error in executing: > > /home/piero/work/qong-nobk/openembedded/openembedded/packages/linux/ > > linux_2.6.28.bb > > ERROR: Exception:exceptions.ImportError Message:No module named traceback > > ERROR: Error in executing: > > /home/piero/work/qong-nobk/openembedded/openembedded/packages/linux/ > > linux_2.6.28.bb > > ERROR: Exception:exceptions.ImportError Message:No module named traceback > > ERROR: Build of > > /home/piero/work/qong-nobk/openembedded/openembedded/packages/linux/ > > linux_2.6.28.bb do_package failed > > Traceback (most recent call last): > > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/bin/bitbake", line > 143, > > in ? > > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/bin/bitbake", line > 140, > > in main > > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/cooker.py", > line > > 612, in cook > > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/cooker.py", > line > > 514, in buildFile > > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/runqueue.py", > > line 842, in execute_runqueue > > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/runqueue.py", > > line 951, in execute_runqueue_internal > > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/cooker.py", > line > > 137, in tryBuild > > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/cooker.py", > line > > 111, in tryBuildPackage > > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/build.py", > line > > 278, in exec_task > > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/build.py", > line > > 113, in exec_func > > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/build.py", > line > > 136, in exec_func_python > > File "/home/piero/work/bitbake-nobk/bitbake-1.8.12/lib/bb/utils.py", > line > > 186, in better_exec > > ImportError: No module named traceback > > ERROR: Task 12 > > (/home/piero/work/qong-nobk/openembedded/openembedded/packages/linux/ > > linux_2.6.28.bb, do_package) failed > > > > Does anyone know what's happening? > > Someone else also saw this problem. Search the archives. Its most > probably your host. > > > > > Thanks in advance and best regards. > > > > Piero > > _______________________________________________ > > Openembedded-devel mailing list > > Openembedded-devel@lists.openembedded.org > > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel > > > > _______________________________________________ > Openembedded-devel mailing list > Openembedded-devel@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Problem building kernel - too many files open 2009-03-11 8:49 ` Piero Pezzin @ 2009-03-12 8:02 ` Marco Cavallini 2009-03-12 8:51 ` Petr Štetiar 0 siblings, 1 reply; 11+ messages in thread From: Marco Cavallini @ 2009-03-12 8:02 UTC (permalink / raw) To: openembedded-devel Piero Pezzin ha scritto: > Hi, > > I searched without success. I agree with you, there is a problem on my host, > but I'd like to know why it pops out during the do_package task. > > Any help will be appreciated. > > Regards, > > Piero > > On Tue, Mar 10, 2009 at 7:22 PM, Khem Raj <raj.khem@gmail.com> wrote: > >> On Tue, Mar 10, 2009 at 7:33 AM, Piero Pezzin <piero.pezzin@gmail.com> >> wrote: >>> Hello everyone, >>> >>> I'm building a minimal distribution for a x86 machine (my host is a >> x86-64 >>> with CentOS 4.4): >>> >>> OE Build Configuration: >>> BB_VERSION = "1.8.12" >>> METADATA_BRANCH = "org.openembedded.dev" >>> METADATA_REVISION = "a8a23e995d108ecdfc31129941671551c591bc6e" >>> TARGET_ARCH = "i486" >>> TARGET_OS = "linux" >>> MACHINE = "x86" >>> DISTRO = "minimal" >>> DISTRO_VERSION = ".dev-snapshot-20090310" >>> TARGET_FPU = "" >>> >>> >>> During kernel building, I got the following error: >>> >>> OTE: package linux-2.6.28: started >>> NOTE: package linux-2.6.28-r6: task do_package: started >>> ERROR: Error in executing: >>> /home/piero/work/qong-nobk/openembedded/openembedded/packages/linux/ >>> linux_2.6.28.bb >>> ERROR: Exception:exceptions.IOError Message:[Errno 24] Too many open >> files: this is a known error. Nobody solved it yet. /marco ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Problem building kernel - too many files open 2009-03-12 8:02 ` Marco Cavallini @ 2009-03-12 8:51 ` Petr Štetiar 2009-03-12 13:14 ` Jader 0 siblings, 1 reply; 11+ messages in thread From: Petr Štetiar @ 2009-03-12 8:51 UTC (permalink / raw) To: openembedded-devel Marco Cavallini <koansoftware@gmail.com> [2009-03-12 09:02:08]: > Piero Pezzin ha scritto: [...] > >>> During kernel building, I got the following error: > >>> > >>> OTE: package linux-2.6.28: started > >>> NOTE: package linux-2.6.28-r6: task do_package: started > >>> ERROR: Error in executing: > >>> /home/piero/work/qong-nobk/openembedded/openembedded/packages/linux/ > >>> linux_2.6.28.bb > >>> ERROR: Exception:exceptions.IOError Message:[Errno 24] Too many open > >> files: > > this is a known error. > Nobody solved it yet. Maybe, that increasing the numbers of max. file handles and number of max. inodes might help you: /proc/sys/fs/file-max /proc/sys/fs/inode-max -- ynezz ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Problem building kernel - too many files open 2009-03-12 8:51 ` Petr Štetiar @ 2009-03-12 13:14 ` Jader 2009-03-12 14:17 ` Piero Pezzin ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: Jader @ 2009-03-12 13:14 UTC (permalink / raw) To: openembedded-devel; +Cc: openembedded-devel [-- Attachment #1: Type: text/plain, Size: 2798 bytes --] Hello. I had the same problem. It's inside classes/kernel.bbclass:298 (reproduced below): python populate_packages_prepend () { def extract_modinfo(file): import tempfile, os, re tempfile.tempdir = bb.data.getVar("WORKDIR", d, 1) tmpfile = tempfile.mkstemp()[1] cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % (bb.data.getVar("PATH", d, 1), bb.data.getVar("HOST_PREFIX", d, 1) or "", file, tmpfile) os.system(cmd) f = open(tmpfile) l = f.read().split("\000") f.close() os.unlink(tmpfile) tempfile.mkstemp() is used to create a temporary file. This function return a tuple with an OS file descriptor and a filename. Filename is stored in "tmpfile" but descriptor is not stored anywhere, but it is still open because it's only an integer to python so it is not closed at the end of the function. For each iteration in which this function is called, a new OS file descriptor is opened, but not closed. The solution is to store the file descriptor and close it: python populate_packages_prepend () { def extract_modinfo(file): import tempfile, os, re tempfile.tempdir = bb.data.getVar("WORKDIR", d, 1) tf = tempfile.mkstemp() tmpfile = tf[1] cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % (bb.data.getVar("PATH", d, 1), bb.data.getVar("HOST_PREFIX", d, 1) or "", file, tmpfile) os.system(cmd) f = open(tmpfile) l = f.read().split("\000") f.close() os.close(tf[0]) os.unlink(tmpfile) There's a patch attached. As Iḿ new to git, I don know it it was created in the right way. Used command following: git format-patch cab70860b89f0fd856c5de1c37c6a3d31fd3cc9d --stdout classes >kernel.bbclass.patch Jader H. Silva 2MI Tecnologia Em Qui, 2009-03-12 às 09:51 +0100, Petr Štetiar escreveu: > Marco Cavallini <koansoftware@gmail.com> [2009-03-12 09:02:08]: > > > Piero Pezzin ha scritto: > > [...] > > > >>> During kernel building, I got the following error: > > >>> > > >>> OTE: package linux-2.6.28: started > > >>> NOTE: package linux-2.6.28-r6: task do_package: started > > >>> ERROR: Error in executing: > > >>> /home/piero/work/qong-nobk/openembedded/openembedded/packages/linux/ > > >>> linux_2.6.28.bb > > >>> ERROR: Exception:exceptions.IOError Message:[Errno 24] Too many open > > >> files: > > > > this is a known error. > > Nobody solved it yet. > > Maybe, that increasing the numbers of max. file handles and number of max. > inodes might help you: > > /proc/sys/fs/file-max > /proc/sys/fs/inode-max > > -- ynezz > > _______________________________________________ > Openembedded-devel mailing list > Openembedded-devel@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel [-- Attachment #2: kernel.bbclass.patch --] [-- Type: text/x-patch, Size: 1074 bytes --] From d74c9667b3cbc6a0631b5cda6e7ed7d1facd2fcb Mon Sep 17 00:00:00 2001 From: Jader H. Silva <vo@northpole.(none)> Date: Thu, 12 Mar 2009 10:10:12 -0300 Subject: [PATCH] Kernel bbclass "too many open files" bugfix --- classes/kernel.bbclass | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index 86f00da..4c1dbda 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -295,12 +295,14 @@ python populate_packages_prepend () { def extract_modinfo(file): import tempfile, os, re tempfile.tempdir = bb.data.getVar("WORKDIR", d, 1) - tmpfile = tempfile.mkstemp()[1] + tf = tempfile.mkstemp() + tmpfile = tf[1] cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % (bb.data.getVar("PATH", d, 1), bb.data.getVar("HOST_PREFIX", d, 1) or "", file, tmpfile) os.system(cmd) f = open(tmpfile) l = f.read().split("\000") f.close() + os.close(tf[0]) os.unlink(tmpfile) exp = re.compile("([^=]+)=(.*)") vals = {} -- 1.5.6.3 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: Problem building kernel - too many files open 2009-03-12 13:14 ` Jader @ 2009-03-12 14:17 ` Piero Pezzin 2009-03-12 16:28 ` Marcin Juszkiewicz 2009-03-12 19:57 ` Khem Raj 2 siblings, 0 replies; 11+ messages in thread From: Piero Pezzin @ 2009-03-12 14:17 UTC (permalink / raw) To: openembedded-devel Hello Jader, it works! Thank you very much. Regards, Piero On Thu, Mar 12, 2009 at 2:14 PM, Jader <jader@2mi.com.br> wrote: > Hello. > I had the same problem. It's inside classes/kernel.bbclass:298 > (reproduced below): > > > python populate_packages_prepend () { > def extract_modinfo(file): > import tempfile, os, re > tempfile.tempdir = bb.data.getVar("WORKDIR", d, 1) > tmpfile = tempfile.mkstemp()[1] > cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % > (bb.data.getVar("PATH", d, 1), bb.data.getVar("HOST_PREFIX", d, 1) or "", > file, tmpfile) > os.system(cmd) > f = open(tmpfile) > l = f.read().split("\000") > f.close() > os.unlink(tmpfile) > > > tempfile.mkstemp() is used to create a temporary file. This function > return a tuple with an OS file descriptor and a filename. Filename is > stored in "tmpfile" but descriptor is not stored anywhere, but it is > still open because it's only an integer to python so it is not closed at > the end of the function. > > For each iteration in which this function is called, a new OS file > descriptor is opened, but not closed. The solution is to store the file > descriptor and close it: > > > python populate_packages_prepend () { > def extract_modinfo(file): > import tempfile, os, re > tempfile.tempdir = bb.data.getVar("WORKDIR", d, 1) > tf = tempfile.mkstemp() > tmpfile = tf[1] > cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % > (bb.data.getVar("PATH", d, 1), bb.data.getVar("HOST_PREFIX", d, 1) or "", > file, tmpfile) > os.system(cmd) > f = open(tmpfile) > l = f.read().split("\000") > f.close() > os.close(tf[0]) > os.unlink(tmpfile) > > > There's a patch attached. As Iḿ new to git, I don know it it was created > in the right way. Used command following: > > > git format-patch cab70860b89f0fd856c5de1c37c6a3d31fd3cc9d --stdout classes > >kernel.bbclass.patch > > > Jader H. Silva > 2MI Tecnologia > > Em Qui, 2009-03-12 às 09:51 +0100, Petr Štetiar escreveu: > > > Marco Cavallini <koansoftware@gmail.com> [2009-03-12 09:02:08]: > > > > > Piero Pezzin ha scritto: > > > > [...] > > > > > >>> During kernel building, I got the following error: > > > >>> > > > >>> OTE: package linux-2.6.28: started > > > >>> NOTE: package linux-2.6.28-r6: task do_package: started > > > >>> ERROR: Error in executing: > > > >>> > /home/piero/work/qong-nobk/openembedded/openembedded/packages/linux/ > > > >>> linux_2.6.28.bb > > > >>> ERROR: Exception:exceptions.IOError Message:[Errno 24] Too many > open > > > >> files: > > > > > > this is a known error. > > > Nobody solved it yet. > > > > Maybe, that increasing the numbers of max. file handles and number of > max. > > inodes might help you: > > > > /proc/sys/fs/file-max > > /proc/sys/fs/inode-max > > > > -- ynezz > > > > _______________________________________________ > > Openembedded-devel mailing list > > Openembedded-devel@lists.openembedded.org > > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel > > _______________________________________________ > Openembedded-devel mailing list > Openembedded-devel@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel > > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Problem building kernel - too many files open 2009-03-12 13:14 ` Jader 2009-03-12 14:17 ` Piero Pezzin @ 2009-03-12 16:28 ` Marcin Juszkiewicz 2009-03-12 17:59 ` Chris Larson 2009-03-12 19:57 ` Khem Raj 2 siblings, 1 reply; 11+ messages in thread From: Marcin Juszkiewicz @ 2009-03-12 16:28 UTC (permalink / raw) To: openembedded-devel Dnia czwartek, 12 marca 2009 o 14:14:34 Jader napisał(a): > There's a patch attached. As Iḿ new to git, I don know it it was > created in the right way. Used command following: Thanks a lot for patch. I checked it locally and pushed into repository. Regards, -- JID: hrw@jabber.org Website: http://marcin.juszkiewicz.com.pl/ LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Problem building kernel - too many files open 2009-03-12 16:28 ` Marcin Juszkiewicz @ 2009-03-12 17:59 ` Chris Larson 0 siblings, 0 replies; 11+ messages in thread From: Chris Larson @ 2009-03-12 17:59 UTC (permalink / raw) To: openembedded-devel A On Thu, Mar 12, 2009 at 9:28 AM, Marcin Juszkiewicz <marcin@juszkiewicz.com.pl> wrote: > Dnia czwartek, 12 marca 2009 o 14:14:34 Jader napisał(a): > >> There's a patch attached. As Iḿ new to git, I don know it it was >> created in the right way. Used command following: > > Thanks a lot for patch. I checked it locally and pushed into repository. Thanks for the patch indeed, I kept getting bitten by this one last week. -- Chris Larson clarson at kergoth dot com clarson at mvista dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Software Engineer MontaVista Software, Inc. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Problem building kernel - too many files open 2009-03-12 13:14 ` Jader 2009-03-12 14:17 ` Piero Pezzin 2009-03-12 16:28 ` Marcin Juszkiewicz @ 2009-03-12 19:57 ` Khem Raj 2009-03-24 20:22 ` Jader H. Silva 2 siblings, 1 reply; 11+ messages in thread From: Khem Raj @ 2009-03-12 19:57 UTC (permalink / raw) To: openembedded-devel; +Cc: openembedded-devel [-- Attachment #1: Type: text/plain, Size: 3177 bytes --] On Thursday 12 March 2009 06:14:34 Jader wrote: > Hello. > I had the same problem. It's inside classes/kernel.bbclass:298 > (reproduced below): > > > python populate_packages_prepend () { > def extract_modinfo(file): > import tempfile, os, re > tempfile.tempdir = bb.data.getVar("WORKDIR", d, 1) > tmpfile = tempfile.mkstemp()[1] > cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % > (bb.data.getVar("PATH", d, 1), bb.data.getVar("HOST_PREFIX", d, 1) or "", > file, tmpfile) os.system(cmd) > f = open(tmpfile) > l = f.read().split("\000") > f.close() > os.unlink(tmpfile) > > > tempfile.mkstemp() is used to create a temporary file. This function > return a tuple with an OS file descriptor and a filename. Filename is > stored in "tmpfile" but descriptor is not stored anywhere, but it is > still open because it's only an integer to python so it is not closed at > the end of the function. > > For each iteration in which this function is called, a new OS file > descriptor is opened, but not closed. The solution is to store the file > descriptor and close it: How about using TemporaryFile () to create the file instead of mkstemp ? we do not have to worry about cleaning it up once it is closed. > > > python populate_packages_prepend () { > def extract_modinfo(file): > import tempfile, os, re > tempfile.tempdir = bb.data.getVar("WORKDIR", d, 1) > tf = tempfile.mkstemp() > tmpfile = tf[1] > cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % > (bb.data.getVar("PATH", d, 1), bb.data.getVar("HOST_PREFIX", d, 1) or "", > file, tmpfile) os.system(cmd) > f = open(tmpfile) > l = f.read().split("\000") > f.close() > os.close(tf[0]) > os.unlink(tmpfile) > > > There's a patch attached. As Iḿ new to git, I don know it it was created > in the right way. Used command following: > > > git format-patch cab70860b89f0fd856c5de1c37c6a3d31fd3cc9d --stdout classes > >kernel.bbclass.patch > > > Jader H. Silva > 2MI Tecnologia > > Em Qui, 2009-03-12 às 09:51 +0100, Petr Štetiar escreveu: > > Marco Cavallini <koansoftware@gmail.com> [2009-03-12 09:02:08]: > > > Piero Pezzin ha scritto: > > > > [...] > > > > > >>> During kernel building, I got the following error: > > > >>> > > > >>> OTE: package linux-2.6.28: started > > > >>> NOTE: package linux-2.6.28-r6: task do_package: started > > > >>> ERROR: Error in executing: > > > >>> /home/piero/work/qong-nobk/openembedded/openembedded/packages/linux > > > >>>/ linux_2.6.28.bb > > > >>> ERROR: Exception:exceptions.IOError Message:[Errno 24] Too many > > > >>> open > > > >> > > > >> files: > > > > > > this is a known error. > > > Nobody solved it yet. > > > > Maybe, that increasing the numbers of max. file handles and number of > > max. inodes might help you: > > > > /proc/sys/fs/file-max > > /proc/sys/fs/inode-max > > > > -- ynezz > > > > _______________________________________________ > > Openembedded-devel mailing list > > Openembedded-devel@lists.openembedded.org > > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel -- Khem Raj [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 204 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Problem building kernel - too many files open 2009-03-12 19:57 ` Khem Raj @ 2009-03-24 20:22 ` Jader H. Silva 0 siblings, 0 replies; 11+ messages in thread From: Jader H. Silva @ 2009-03-24 20:22 UTC (permalink / raw) To: OpenEmbedded Dev List Em Qui, 2009-03-12 às 12:57 -0700, Khem Raj escreveu: > On Thursday 12 March 2009 06:14:34 Jader wrote: > > Hello. > > I had the same problem. It's inside classes/kernel.bbclass:298 > > (reproduced below): > > > > > > python populate_packages_prepend () { > > def extract_modinfo(file): > > import tempfile, os, re > > tempfile.tempdir = bb.data.getVar("WORKDIR", d, 1) > > tmpfile = tempfile.mkstemp()[1] > > cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % > > (bb.data.getVar("PATH", d, 1), bb.data.getVar("HOST_PREFIX", d, 1) or "", > > file, tmpfile) os.system(cmd) > > f = open(tmpfile) > > l = f.read().split("\000") > > f.close() > > os.unlink(tmpfile) > > > > > > tempfile.mkstemp() is used to create a temporary file. This function > > return a tuple with an OS file descriptor and a filename. Filename is > > stored in "tmpfile" but descriptor is not stored anywhere, but it is > > still open because it's only an integer to python so it is not closed at > > the end of the function. > > > > For each iteration in which this function is called, a new OS file > > descriptor is opened, but not closed. The solution is to store the file > > descriptor and close it: > > How about using TemporaryFile () to create the file instead of mkstemp ? > we do not have to worry about cleaning it up once it is closed. It would be a better solution, but unix implementation of TemporaryFile() unlink the temporary file after it is created, so it's removed from filesystem when closed, and so we won't have a valid filename for objdump outfile. > > > > > > python populate_packages_prepend () { > > def extract_modinfo(file): > > import tempfile, os, re > > tempfile.tempdir = bb.data.getVar("WORKDIR", d, 1) > > tf = tempfile.mkstemp() > > tmpfile = tf[1] > > cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % > > (bb.data.getVar("PATH", d, 1), bb.data.getVar("HOST_PREFIX", d, 1) or "", > > file, tmpfile) os.system(cmd) > > f = open(tmpfile) > > l = f.read().split("\000") > > f.close() > > os.close(tf[0]) > > os.unlink(tmpfile) > > > > > > There's a patch attached. As Iḿ new to git, I don know it it was created > > in the right way. Used command following: > > > > > > git format-patch cab70860b89f0fd856c5de1c37c6a3d31fd3cc9d --stdout classes > > >kernel.bbclass.patch > > > > > > Jader H. Silva > > 2MI Tecnologia > > > > Em Qui, 2009-03-12 às 09:51 +0100, Petr Štetiar escreveu: > > > Marco Cavallini <koansoftware@gmail.com> [2009-03-12 09:02:08]: > > > > Piero Pezzin ha scritto: > > > > > > [...] > > > > > > > >>> During kernel building, I got the following error: > > > > >>> > > > > >>> OTE: package linux-2.6.28: started > > > > >>> NOTE: package linux-2.6.28-r6: task do_package: started > > > > >>> ERROR: Error in executing: > > > > >>> /home/piero/work/qong-nobk/openembedded/openembedded/packages/linux > > > > >>>/ linux_2.6.28.bb > > > > >>> ERROR: Exception:exceptions.IOError Message:[Errno 24] Too many > > > > >>> open > > > > >> > > > > >> files: > > > > > > > > this is a known error. > > > > Nobody solved it yet. > > > > > > Maybe, that increasing the numbers of max. file handles and number of > > > max. inodes might help you: > > > > > > /proc/sys/fs/file-max > > > /proc/sys/fs/inode-max > > > > > > -- ynezz > > > > > > _______________________________________________ > > > Openembedded-devel mailing list > > > Openembedded-devel@lists.openembedded.org > > > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel > Att. Jader H. Silva jader@2mi.com.br Depto. de desenvolvimento 2MI Tecnologia ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2009-03-24 20:24 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-03-10 14:33 Problem building kernel - too many files open Piero Pezzin 2009-03-10 18:22 ` Khem Raj 2009-03-11 8:49 ` Piero Pezzin 2009-03-12 8:02 ` Marco Cavallini 2009-03-12 8:51 ` Petr Štetiar 2009-03-12 13:14 ` Jader 2009-03-12 14:17 ` Piero Pezzin 2009-03-12 16:28 ` Marcin Juszkiewicz 2009-03-12 17:59 ` Chris Larson 2009-03-12 19:57 ` Khem Raj 2009-03-24 20:22 ` Jader H. Silva
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.