fork(): Resource temporarily unavailable
-
Hallo,
in einem C++ Programm tritte bei Benutzung von fork() der Fehler "Resource temporarily unavailable" den ich über perror abfrage auf, obwohl ich früher Prozesse damit starten konnte. Das sieht zunächst aus als, ob die gestarteten Prozesse nicht beendet werden, aber ps -ef lässt nicht darauf schliessen:
UID PID PPID C STIME TTY TIME CMD root 1 0 0 16:22 ? 00:00:00 init [2] root 2 0 0 16:22 ? 00:00:00 [kthreadd] root 3 2 0 16:22 ? 00:00:00 [migration/0] root 4 2 0 16:22 ? 00:00:00 [ksoftirqd/0] root 5 2 0 16:22 ? 00:00:00 [watchdog/0] root 6 2 0 16:22 ? 00:00:00 [migration/1] root 7 2 0 16:22 ? 00:00:00 [ksoftirqd/1] root 8 2 0 16:22 ? 00:00:00 [watchdog/1] root 9 2 0 16:22 ? 00:00:00 [migration/2] root 10 2 0 16:22 ? 00:00:00 [ksoftirqd/2] root 11 2 0 16:22 ? 00:00:00 [watchdog/2] root 12 2 0 16:22 ? 00:00:00 [migration/3] root 13 2 0 16:22 ? 00:00:00 [ksoftirqd/3] root 14 2 0 16:22 ? 00:00:00 [watchdog/3] root 15 2 0 16:22 ? 00:00:00 [events/0] root 16 2 0 16:22 ? 00:00:00 [events/1] root 17 2 0 16:22 ? 00:00:00 [events/2] root 18 2 0 16:22 ? 00:00:00 [events/3] root 19 2 0 16:22 ? 00:00:00 [cpuset] root 20 2 0 16:22 ? 00:00:00 [khelper] root 21 2 0 16:22 ? 00:00:00 [netns] root 22 2 0 16:22 ? 00:00:00 [async/mgr] root 23 2 0 16:22 ? 00:00:00 [pm] root 24 2 0 16:22 ? 00:00:00 [sync_supers] root 25 2 0 16:22 ? 00:00:00 [bdi-default] root 26 2 0 16:22 ? 00:00:00 [kintegrityd/0] root 27 2 0 16:22 ? 00:00:00 [kintegrityd/1] root 28 2 0 16:22 ? 00:00:00 [kintegrityd/2] root 29 2 0 16:22 ? 00:00:00 [kintegrityd/3] root 30 2 0 16:22 ? 00:00:00 [kblockd/0] root 31 2 0 16:22 ? 00:00:00 [kblockd/1] root 32 2 0 16:22 ? 00:00:00 [kblockd/2] root 33 2 0 16:22 ? 00:00:00 [kblockd/3] root 34 2 0 16:22 ? 00:00:00 [kacpid] root 35 2 0 16:22 ? 00:00:00 [kacpi_notify] root 36 2 0 16:22 ? 00:00:00 [kacpi_hotplug] root 37 2 0 16:22 ? 00:00:00 [kseriod] root 42 2 0 16:22 ? 00:00:00 [kondemand/0] root 43 2 0 16:22 ? 00:00:00 [kondemand/1] root 44 2 0 16:22 ? 00:00:00 [kondemand/2] root 45 2 0 16:22 ? 00:00:00 [kondemand/3] root 46 2 0 16:22 ? 00:00:00 [khungtaskd] root 47 2 0 16:22 ? 00:00:00 [kswapd0] root 48 2 0 16:22 ? 00:00:00 [ksmd] root 49 2 0 16:22 ? 00:00:00 [aio/0] root 50 2 0 16:22 ? 00:00:00 [aio/1] root 51 2 0 16:22 ? 00:00:00 [aio/2] root 52 2 0 16:22 ? 00:00:00 [aio/3] root 53 2 0 16:22 ? 00:00:00 [crypto/0] root 54 2 0 16:22 ? 00:00:00 [crypto/1] root 55 2 0 16:22 ? 00:00:00 [crypto/2] root 56 2 0 16:22 ? 00:00:00 [crypto/3] root 311 2 0 16:22 ? 00:00:00 [kmmcd] root 318 2 0 16:22 ? 00:00:00 [ksuspend_usbd] root 319 2 0 16:22 ? 00:00:00 [khubd] root 320 2 0 16:22 ? 00:00:00 [ata/0] root 321 2 0 16:22 ? 00:00:00 [ata/1] root 322 2 0 16:22 ? 00:00:00 [ata/2] root 323 2 0 16:22 ? 00:00:00 [ata/3] root 324 2 0 16:22 ? 00:00:00 [ata_aux] root 340 2 0 16:22 ? 00:00:00 [scsi_eh_0] root 341 2 0 16:22 ? 00:00:00 [scsi_eh_1] root 342 2 0 16:22 ? 00:00:00 [scsi_eh_2] root 343 2 0 16:22 ? 00:00:00 [scsi_eh_3] root 344 2 0 16:22 ? 00:00:00 [scsi_eh_4] root 345 2 0 16:22 ? 00:00:00 [scsi_eh_5] root 366 2 0 16:22 ? 00:00:00 [usbhid_resumer] root 408 2 0 16:22 ? 00:00:00 [kjournald] root 505 2 0 16:22 ? 00:00:00 [flush-8:0] root 515 1 0 16:22 ? 00:00:00 udevd --daemon root 836 2 0 16:22 ? 00:00:00 [kpsmoused] root 882 2 0 16:22 ? 00:00:00 [pccardd] root 896 2 0 16:22 ? 00:00:00 [radeon/0] root 897 2 0 16:22 ? 00:00:00 [radeon/1] root 898 2 0 16:22 ? 00:00:00 [radeon/2] root 899 2 0 16:22 ? 00:00:00 [radeon/3] root 900 2 0 16:22 ? 00:00:00 [ttm_swap] root 904 2 0 16:22 ? 00:00:00 [iwlagn] root 905 2 0 16:22 ? 00:00:00 [phy0] root 949 2 0 16:22 ? 00:00:00 [hd-audio0] root 974 2 0 16:22 ? 00:00:00 [hd-audio1] root 1197 2 0 16:22 ? 00:00:00 [firewire_sbp2] root 1330 1 0 16:22 ? 00:00:00 /sbin/wpa_supplicant -s -B -P /var/run/wpa_supplicant.wlan0.pid -i wlan0 -D wext -c /etc/wpa_supplicant/wpa_supplicant root 1353 1 0 16:24 ? 00:00:00 dhclient -v -pf /var/run/dhclient.wlan0.pid -lf /var/lib/dhcp/dhclient.wlan0.leases wlan0 daemon 1380 1 0 16:24 ? 00:00:00 /sbin/portmap statd 1392 1 0 16:24 ? 00:00:00 /sbin/rpc.statd root 1544 1 0 16:24 ? 00:00:00 /usr/sbin/rsyslogd -c4 103 1586 1 0 16:24 ? 00:00:00 /usr/bin/dbus-daemon --system root 1593 1 0 16:24 ? 00:00:00 /usr/sbin/acpid root 1608 1 0 16:24 ? 00:00:00 /usr/sbin/apache2 -k start www-data 1618 1608 0 16:24 ? 00:00:00 /usr/sbin/apache2 -k start www-data 1619 1608 0 16:24 ? 00:00:00 /usr/sbin/apache2 -k start www-data 1620 1608 0 16:24 ? 00:00:00 /usr/sbin/apache2 -k start www-data 1621 1608 0 16:24 ? 00:00:00 /usr/sbin/apache2 -k start www-data 1622 1608 0 16:24 ? 00:00:00 /usr/sbin/apache2 -k start root 1623 1 0 16:24 ? 00:00:00 /usr/sbin/NetworkManager root 1629 1 0 16:24 ? 00:00:00 /usr/sbin/modem-manager root 1639 1 0 16:24 ? 00:00:00 /sbin/wpa_supplicant -u -s root 1643 1 0 16:24 ? 00:00:00 /usr/sbin/gdm3 root 1655 1643 0 16:24 ? 00:00:00 /usr/lib/gdm3/gdm-simple-slave --display-id /org/gnome/DisplayManager/Display1 105 1657 1 0 16:24 ? 00:00:00 /usr/sbin/hald root 1658 1657 0 16:24 ? 00:00:00 hald-runner root 1662 1655 3 16:24 tty7 00:01:11 /usr/bin/Xorg :0 -br -verbose -audit 0 -novtswitch -auth /var/run/gdm3/auth-for-Debian-gdm-RTWmqw/database -nolisten t root 1683 1658 0 16:24 ? 00:00:00 hald-addon-input: Listening on /dev/input/event1 /dev/input/event3 /dev/input/event10 /dev/input/event4 /dev/input/eve root 1691 1658 0 16:24 ? 00:00:00 /usr/lib/hal/hald-addon-rfkill-killswitch root 1692 1658 0 16:24 ? 00:00:00 /usr/lib/hal/hald-addon-leds root 1699 1658 0 16:24 ? 00:00:00 /usr/lib/hal/hald-addon-generic-backlight root 1706 1658 0 16:24 ? 00:00:00 hald-addon-storage: polling /dev/sr0 (every 2 sec) 105 1708 1658 0 16:24 ? 00:00:00 hald-addon-acpi: listening on acpid socket /var/run/acpid.socket root 1719 1623 0 16:24 ? 00:00:00 /sbin/dhclient -d -4 -sf /usr/lib/NetworkManager/nm-dhcp-client.action -pf /var/run/dhclient-eth0.pid -lf /var/lib/dhc daemon 1721 1 0 16:24 ? 00:00:00 /usr/sbin/atd avahi 1736 1 0 16:24 ? 00:00:00 avahi-daemon: running [debianDB.local] avahi 1737 1736 0 16:24 ? 00:00:00 avahi-daemon: chroot helper root 1746 1 0 16:24 ? 00:00:00 /usr/sbin/bluetoothd root 1750 2 0 16:24 ? 00:00:00 [bluetooth] root 1761 2 0 16:24 ? 00:00:00 [krfcommd] root 1837 1 0 16:24 ? 00:00:00 /usr/sbin/cron root 1856 515 0 16:24 ? 00:00:00 udevd --daemon root 1857 515 0 16:24 ? 00:00:00 udevd --daemon root 1861 1 0 16:24 ? 00:00:00 /usr/sbin/cupsd -C /etc/cups/cupsd.conf 101 2117 1 0 16:24 ? 00:00:00 /usr/sbin/exim4 -bd -q30m root 2144 2 0 16:24 ? 00:00:00 [kconservative/0] root 2145 2 0 16:24 ? 00:00:00 [kconservative/1] root 2146 2 0 16:24 ? 00:00:00 [kconservative/2] root 2147 2 0 16:24 ? 00:00:00 [kconservative/3] root 2194 1 0 16:24 ? 00:00:01 /usr/bin/python -O /usr/share/wicd/daemon/wicd-daemon.py root 2207 2194 0 16:24 ? 00:00:00 /usr/bin/python -O /usr/share/wicd/daemon/monitor.py root 2215 1 0 16:24 tty1 00:00:00 /sbin/getty 38400 tty1 root 2216 1 0 16:24 tty2 00:00:00 /sbin/getty 38400 tty2 root 2217 1 0 16:24 tty3 00:00:00 /sbin/getty 38400 tty3 root 2218 1 0 16:24 tty4 00:00:00 /sbin/getty 38400 tty4 root 2219 1 0 16:24 tty5 00:00:00 /sbin/getty 38400 tty5 root 2220 1 0 16:24 tty6 00:00:00 /sbin/getty 38400 tty6 root 2229 1 0 16:24 ? 00:00:00 /usr/sbin/console-kit-daemon --no-daemon 108 2351 1 0 16:24 ? 00:00:00 /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 root 2355 1 0 16:24 ? 00:00:00 /usr/lib/upower/upowerd root 2356 1655 0 16:24 ? 00:00:00 /usr/lib/gdm3/gdm-session-worker root 2374 1 0 16:24 ? 00:00:00 /usr/lib/policykit-1/polkitd root 2427 2 0 16:24 ? 00:00:00 [kauditd] diminho 2444 2356 0 16:24 ? 00:00:00 x-session-manager diminho 2479 2444 0 16:24 ? 00:00:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session x-session-manager diminho 2482 1 0 16:24 ? 00:00:00 /usr/bin/dbus-launch --exit-with-session x-session-manager diminho 2483 1 0 16:24 ? 00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session diminho 2485 1 0 16:24 ? 00:00:00 /usr/lib/xfconf/xfconfd diminho 2491 2444 0 16:24 ? 00:00:00 xfwm4 --display :0.0 --sm-client-id 21dbef6ee-7e63-4404-8bee-a5e5d45a2757 diminho 2492 1 0 16:24 ? 00:00:00 xfsettingsd diminho 2493 2444 0 16:24 ? 00:00:01 xfdesktop --display :0.0 --sm-client-id 2dbeea336-c414-4b99-a05f-2063ddd2910f diminho 2495 2444 0 16:24 ? 00:00:01 xfdesktop --display :0.0 --sm-client-id 292c41f95-0c1d-4d02-a65a-13d03578078f diminho 2496 2444 0 16:24 ? 00:00:04 xfdesktop --display :0.0 --sm-client-id 2418810f8-242d-4d96-9f56-926959fc3bee diminho 2499 1 0 16:24 ? 00:00:00 xfce4-power-manager --restart --sm-client-id 2c84eae4b-6ca8-4b33-9d3f-f5fd14894aa6 diminho 2500 1 0 16:24 ? 00:00:00 xfce4-settings-helper --display :0.0 --sm-client-id 25054f293-6954-4721-a829-1cd2d0d4f741 diminho 2506 1 0 16:24 ? 00:00:00 /usr/bin/Thunar --daemon diminho 2508 1 0 16:24 ? 00:00:00 /usr/lib/gvfs/gvfsd diminho 2512 2444 0 16:24 ? 00:00:02 nautilus --sm-client-id 2baaeff24-b126-42ba-a971-0fba23212179 --sm-client-state-file /home/diminho/.config/session-sta diminho 2514 1 0 16:24 ? 00:00:00 /usr/lib/libgconf2-4/gconfd-2 diminho 2516 1 0 16:24 ? 00:00:00 xfce4-panel diminho 2521 1 0 16:24 ? 00:00:00 /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 diminho 2526 1 0 16:24 ? 00:00:00 python /usr/bin/system-config-printer-applet diminho 2528 1 0 16:24 ? 00:00:00 /usr/lib/evolution/2.30/evolution-alarm-notify diminho 2530 1 0 16:24 ? 00:00:00 /usr/bin/python -O /usr/share/wicd/gtk/wicd-client.py diminho 2532 1 0 16:24 ? 00:00:00 update-notifier diminho 2534 1 0 16:24 ? 00:00:00 nm-applet --sm-disable root 2540 1 0 16:24 ? 00:00:00 /usr/lib/udisks/udisks-daemon root 2541 2540 0 16:24 ? 00:00:00 udisks-daemon: polling /dev/sr0 diminho 2543 1 0 16:24 ? 00:00:02 /home/diminho/.dropbox-dist/dropbox diminho 2548 1 0 16:24 ? 00:00:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.15 /org/gtk/gvfs/exec_spaw/0 diminho 2549 2516 0 16:24 ? 00:00:00 /usr/lib/xfce4/panel-plugins/xfce4-menu-plugin socket_id 39845913 name xfce4-menu id 5 display_name Xfce-Menü size 28 diminho 2551 1 0 16:24 ? 00:00:00 /usr/lib/evolution/e-calendar-factory diminho 2611 1 0 16:24 ? 00:00:00 /usr/lib/gvfs/gvfs-gdu-volume-monitor diminho 2613 1 0 16:24 ? 00:00:00 /usr/lib/gvfs/gvfs-afc-volume-monitor diminho 2616 1 0 16:24 ? 00:00:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor diminho 2641 1 0 16:24 ? 00:00:00 /usr/lib/xfce4-notifyd/xfce4-notifyd diminho 2670 1 0 16:24 ? 00:00:00 /usr/lib/gvfs/gvfsd-burn --spawner :1.15 /org/gtk/gvfs/exec_spaw/1 diminho 2746 1 3 16:28 ? 00:00:54 /usr/bin/kdevelop.bin diminho 2753 1 0 16:28 ? 00:00:00 kdeinit4: kdeinit4 Running... diminho 2756 2753 0 16:28 ? 00:00:00 kdeinit4: klauncher [kdeinit] --fd=8 diminho 2758 1 0 16:28 ? 00:00:00 kdeinit4: kded4 [kdeinit] diminho 3335 1 0 16:48 ? 00:00:00 xfce4-terminal diminho 3336 3335 0 16:48 ? 00:00:00 gnome-pty-helper diminho 3337 3335 0 16:48 pts/0 00:00:00 bash root 3340 3337 0 16:48 pts/0 00:00:00 su root 3348 3340 0 16:48 pts/0 00:00:00 bash diminho 3395 1 7 16:51 ? 00:00:22 /usr/bin/x-www-browser diminho 3397 1 0 16:51 ? 00:00:00 /usr/lib/gvfs/gvfsd-metadata diminho 3399 1 0 16:51 ? 00:00:00 /usr/bin/gnome-keyring-daemon --start --foreground --components=secrets root 3546 1 0 16:53 pts/0 00:00:00 /usr/local/lib/torcs/torcs-bin -l /root/.torcs -L /usr/local/lib/torcs -D /usr/local/share/games/torcs root 3594 3348 0 16:56 pts/0 00:00:00 ps -ef
Genauso sind die Grenzen für die maximale Anzahl der Prozesse für einen Benutzer unlimitiert (ulimit -a):
core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 16382 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 1024 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) unlimited virtual memory (kbytes, -v) unlimited file locks (-x) unlimited
In der /etc/securitiy/limits.conf ist alles auskommentiert.
Auch nach langer Suche im Web habe ich keine Lösung gefunden. Habt ihr eine Idee?Viele Grüße
diminho
-
Dieser Thread wurde von Moderator/in SeppJ aus dem Forum C++ (auch C++0x und C++11) in das Forum Linux/Unix verschoben.
Im Zweifelsfall bitte auch folgende Hinweise beachten:
C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?Dieses Posting wurde automatisch erzeugt.
-
Hat keiner eine Idee? Ich könnte wirklich HIlfe benötigen...
Viele Grüße
diminho
-
Es wäre sehr hilfreich, wenn du nützliche Informationen liefern würdest (zum Beispiel ein kleines, aber vollständiges(!), Beispielprogramm, welches den Fehler zeigt), anstatt Helfer mit seitenweise Informationsmüll von zweifelhaftem Belang zu vergraulen.