[Nut-upsuser] Segmentation fault

Magnus Johansson rnd-nut2 at rnd.se
Mon Nov 13 09:53:46 CET 2006


> One thing that comes to mind is that stopping a driver is an asynchronous
> process. Which means that you may be starting the new driver before the
> previous one has terminated. Could you try again if you can reproduce the
> results if you put a 'sleep 5' between these statements in the nut-ss
> script?

 From my quick test it seems less probable that bad things happen, it 
still does though. (I started out with no driver running).

[root at vader ~]# cat ./nut-ss
/usr/local/ups/bin/upsdrvctl stop
sleep 5
/usr/local/ups/bin/upsdrvctl start
[root at vader ~]# ./nut-ss
Network UPS Tools - UPS driver controller 2.1.0
Can't open /var/state/ups/newhidups-VaderUPS.pid: No such file or directory
Network UPS Tools - UPS driver controller 2.1.0
Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.1.0)

Detected a UPS: American Power Conversion/Back-UPS CS 500 FW:808.q7.I 
USB FW:q7
Using subdriver: APC/CyberPower HID 0.9
[root at vader ~]# ps -U nut u
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
nut        495  0.0 86.1 1116532 829880 ?      Ss   09:45   0:00 
/usr/local/ups/bin/newhidups -a VaderUPS
[root at vader ~]# ./nut-ss
Network UPS Tools - UPS driver controller 2.1.0
Network UPS Tools - UPS driver controller 2.1.0
Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.1.0)

Detected a UPS: American Power Conversion/Back-UPS CS 500 FW:808.q7.I 
USB FW:q7
Using subdriver: APC/CyberPower HID 0.9
[root at vader ~]# ps -U nut u
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
nut        503  0.0  0.0   7212   716 ?        Ss   09:45   0:00 
/usr/local/ups/bin/newhidups -a VaderUPS
[root at vader ~]# ./nut-ss
Network UPS Tools - UPS driver controller 2.1.0
Network UPS Tools - UPS driver controller 2.1.0
Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.1.0)

Detected a UPS: American Power Conversion/Back-UPS CS 500 FW:808.q7.I 
USB FW:q7
Using subdriver: APC/CyberPower HID 0.9
[root at vader ~]# ps -U nut u
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
nut        510  0.0  0.0   7212   720 ?        Ss   09:45   0:00 
/usr/local/ups/bin/newhidups -a VaderUPS
[root at vader ~]# ./nut-ss
Network UPS Tools - UPS driver controller 2.1.0
Network UPS Tools - UPS driver controller 2.1.0
Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.1.0)

Detected a UPS: American Power Conversion/Back-UPS CS 500 FW:808.q7.I 
USB FW:q7
Using subdriver: APC/CyberPower HID 0.9
[root at vader ~]# ps -U nut u
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
nut        517  0.0  0.0   7216   720 ?        Ss   09:45   0:00 
/usr/local/ups/bin/newhidups -a VaderUPS
[root at vader ~]# ./nut-ss
Network UPS Tools - UPS driver controller 2.1.0
Network UPS Tools - UPS driver controller 2.1.0
Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.1.0)

Detected a UPS: American Power Conversion/Back-UPS CS 500 FW:808.q7.I 
USB FW:q7
Using subdriver: APC/CyberPower HID 0.9
[root at vader ~]# ps -U nut u
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
nut        524  0.0  0.0   7216   724 ?        Ss   09:45   0:00 
/usr/local/ups/bin/newhidups -a VaderUPS
[root at vader ~]# ./nut-ss
Network UPS Tools - UPS driver controller 2.1.0
Network UPS Tools - UPS driver controller 2.1.0
Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.1.0)

Detected a UPS: American Power Conversion/Back-UPS CS 500 FW:808.q7.I 
USB FW:q7
Using subdriver: APC/CyberPower HID 0.9
[root at vader ~]# ps -U nut u
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
nut        531  0.0 52.3 511080 504584 ?       Ss   09:46   0:00 
/usr/local/ups/bin/newhidups -a VaderUPS
[root at vader ~]#

-- 
Magnus Johansson
LE Elektronik AB
Aröds Industriväg 76
42243 Hisings Backa

tfn: 031-7242480
fax: 031-7242481



More information about the Nut-upsuser mailing list