[Nut-upsuser] Segmentation fault

Peter Selinger selinger at mathstat.dal.ca
Sun Nov 12 23:45:03 CET 2006


I am not familiar with your "/etc/init.d/nut" script, so it's hard to
say how this "restarting" is implemented.  I assume that it terminates
the driver process, then starts another one. (The fact that the
process ID changed seems to support this). I cannot immediately see
how this should affect the memory footprint of the driver.

I notice that it the script says "upsdrvctl failed", which cannot be a
good thing.

It is possible that there are minor memory leaks in the driver, but
I can't quite imagine what might take up 200MB. 

Can your reproduce this behavior using just NUT commands (rather than
init scripts?)

-- Peter

Magnus Johansson wrote:
> 
> Peter Selinger skrev:
> > Yes, this has been fixed some time ago in the SVN version. -- Peter
> 
> Thank you! I got the trunk and installed it, one thing that is a bit 
> strange to me, restarting can cause newhidups to eat up a whole lot of 
> memory or not restart at all...
> 
> [root at vader trunk]# /etc/init.d/nut start
> Starting Network UPS Tools: upsd upsmon.
> [root at vader trunk]# ps -U nut u
> USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
> nut      11665  0.0  0.0   7212   744 ?        Ss   19:36   0:00 
> /usr/local/ups/bin/newhidups -a VaderUPS
> nut      11667  0.0  0.0  10892   752 ?        Ss   19:36   0:00 
> /usr/local/ups/sbin/upsd
> nut      11670  0.0  0.1  10888  1028 ?        S    19:36   0:00 
> /usr/local/ups/sbin/upsmon
> [root at vader trunk]# /etc/init.d/nut restart
> Restarting Network UPS Tools: (upsdrvctl failed) upsd upsmon.
> [root at vader trunk]# ps -U nut u
> USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
> nut      11683  0.0  0.0  10896   764 ?        Ss   19:37   0:00 
> /usr/local/ups/sbin/upsd
> nut      11686  0.0  0.1  10892  1056 ?        S    19:37   0:00 
> /usr/local/ups/sbin/upsmon
> nut      11687  0.0  0.0      0     0 ?        Z    19:37   0:00 
> [upsmon] <defunct>
> [root at vader trunk]# /etc/init.d/nut restart
> Restarting Network UPS Tools: (upsdrvctl failed) upsd upsmon.
> [root at vader trunk]# ps -U nut u
> USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
> nut      11701  0.0  0.0   7216   748 ?        Ss   19:37   0:00 
> /usr/local/ups/bin/newhidups -a VaderUPS
> nut      11703  0.0  0.0  10896   756 ?        Ss   19:37   0:00 
> /usr/local/ups/sbin/upsd
> nut      11706  0.0  0.1  10888  1028 ?        S    19:37   0:00 
> /usr/local/ups/sbin/upsmon
> [root at vader trunk]# /etc/init.d/nut restart
> Restarting Network UPS Tools: upsd upsmon.
> [root at vader trunk]# ps -U nut u
> USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
> nut      11715  0.0 20.9 208544 202076 ?       Ss   19:37   0:00 
> /usr/local/ups/bin/newhidups -a VaderUPS
> nut      11717  0.0  0.0  10892   752 ?        Ss   19:37   0:00 
> /usr/local/ups/sbin/upsd
> nut      11720  0.0  0.1  10888  1028 ?        S    19:37   0:00 
> /usr/local/ups/sbin/upsmon
> [root at vader trunk]# /usr/local/ups/bin/newhidups
> Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.1.0)
> 
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
> 




More information about the Nut-upsuser mailing list