|
From: | Marcus Wichelmannn |
Subject: | Re: Running bash using su -c causes 100% cpu usage on one core |
Date: | Mon, 4 Jan 2016 15:01:58 +0100 |
It's impossible to tell with the amount of info you provided. That's why there's a 'bashbug' script alongside bash to generate a useful bug report template. Provide: - bash version: bash --version - OS name and version: uname -a - The contents of the run.sh file - If possible also the su version (in my case it doesn't have a version flag, but it's part of the login package). - The output of running said script, with 'set -x' enabled You might not be running bash at all, since you didn't explictly called /bin/bash, instead letting su run /bin/sh, which could be dash, or any other shell.--Eduardo Bustamante https://dualbus.me/
Configuration Information [Automatically generated, do not change]:Machine: armOS: linux-gnueabihfCompiler: gccCompilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='arm' -DCONF_OSTYPE='linux-gnueabihf' -DCONF_MACHTYPE='arm-unknown-linux-gnueabihf' -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H $uname output: Linux HAUS-STEUERUNG 3.4.100-sun7i+ #1 SMP PREEMPT Tue Jul 29 13:25:24 CEST 2014 armv7l GNU/LinuxMachine Type: arm-unknown-linux-gnueabihfBash Version: 4.3Patch Level: 30Release Status: release
#!/bin/sh -ealias ls="ls --color"echo 0 > /sys/class/leds/green\:ph20\:led1/brightnesssu cubie -c "(cd /home/cubie/Haussteuerung/Haussteuerung; ./run.sh)" -s /bin/sh &exit 0
#!/bin/sh./Haussteuerung >> log 2>&1bash mailnotify.sh "Unerwarteter Fehler" "Das Haussteuerungsprogramm wurde unerwartet beendet! Siehe Anhang fuer weitere Informationen." log
login:Installiert: 1:4.1.5.1-1Installationskandidat: 1:4.2-3Versionstabelle:1:4.2-3 0500 http://ftp.de.debian.org/debian/ stable/main armhf Packages*** 1:4.1.5.1-1 0100 /var/lib/dpkg/status
+ ./Haussteuerung
sudo /etc/rc.local+ alias ls=ls --color+ echo 0+ exit 0+ su cubie -c (cd /home/cubie/Haussteuerung/Haussteuerung; ./run.sh) -s /bin/sh
PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command2199 cubie 20 0 44168 15484 7552 R 101. 1.7 11:45.44 /usr/bin/cli ./Haussteuerung2206 cubie 20 0 44168 15484 7552 S 1.4 1.7 0:05.98 /usr/bin/cli ./Haussteuerung2081 root 20 0 3884 1324 988 S 0.0 0.1 0:00.03 su cubie -c (cd /home/cubie/Haussteuerung/Haussteuerung; ./run.sh) -s /bin/sh
[Prev in Thread] | Current Thread | [Next in Thread] |