Bug 696722 - apcupsd dies with "FATAL ERROR in newups.c [...] Mutex lock failure. ERR=Invalid argument" after a while
Summary: apcupsd dies with "FATAL ERROR in newups.c [...] Mutex lock failure. ERR=Inva...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: apcupsd
Version: el5
Hardware: i386
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Michal Hlavinka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-14 17:56 UTC by Patrick C. F. Ernzer
Modified: 2011-05-16 21:07 UTC (History)
1 user (show)

Fixed In Version: apcupsd-3.14.8-1.el5
Clone Of:
Environment:
Last Closed: 2011-05-16 21:07:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Patrick C. F. Ernzer 2011-04-14 17:56:51 UTC
Description of problem:
Recently I started getting this;
apcupsd FATAL ERROR in newups.c at line 62 Mutex lock failure. ERR=Invalid argument
apcupsd FATAL ERROR in newups.c at line 100 Mutex lock failure. ERR=Invalid argument

Version-Release number of selected component (if applicable):
apcupsd-3.14.0-4.el5

How reproducible:
random

Steps to Reproduce:
1. run apcupsd (connected via USB to a SMT series APC UPS)
2. run gapcmon on another host (my workstation) to monitor the UPSes (there are two UPSes)
3. notice that one or both report communication error every once in a while (multiple days between occurrences)
  
Actual results:
[root@qnap named]# grep apcupsd\ FATAL /var/log/messages*
/var/log/messages:Apr 14 19:34:54 qnap apcupsd[3064]: apcupsd FATAL ERROR in newups.c at line 62 Mutex lock failure. ERR=Invalid argument 
/var/log/messages:Apr 14 19:34:54 qnap apcupsd[3064]: apcupsd FATAL ERROR in newups.c at line 100 Mutex lock failure. ERR=Invalid argument 
/var/log/messages.1:Apr  4 16:52:28 qnap apcupsd[25348]: apcupsd FATAL ERROR in newups.c at line 100 Mutex lock failure. ERR=Invalid argument 
/var/log/messages.1:Apr  4 16:52:28 qnap apcupsd[25348]: apcupsd FATAL ERROR in newups.c at line 62 Mutex lock failure. ERR=Invalid argument 
/var/log/messages.1:Apr  4 16:52:28 qnap apcupsd[25348]: apcupsd FATAL ERROR in newups.c at line 100 Mutex lock failure. ERR=Invalid argument 
/var/log/messages.2:Mar 30 15:51:45 qnap apcupsd[3015]: apcupsd FATAL ERROR in newups.c at line 100 Mutex lock failure. ERR=Invalid argument 
/var/log/messages.2:Mar 30 15:51:45 qnap apcupsd[3015]: apcupsd FATAL ERROR in newups.c at line 100 Mutex lock failure. ERR=Invalid argument 
/var/log/messages.2:Mar 30 15:51:45 qnap apcupsd[3015]: apcupsd FATAL ERROR in newups.c at line 62 Mutex lock failure. ERR=Invalid argument 
/var/log/messages.2:Mar 30 15:51:45 qnap apcupsd[3015]: apcupsd FATAL ERROR in newups.c at line 100 Mutex lock failure. ERR=Invalid argument 
/var/log/messages.2:Mar 30 15:51:47 qnap apcupsd[3015]: apcupsd FATAL ERROR in newups.c at line 62 Mutex lock failure. ERR=Invalid argument 
/var/log/messages.2:Mar 30 15:51:47 qnap apcupsd[3015]: apcupsd FATAL ERROR in newups.c at line 100 Mutex lock failure. ERR=Invalid argument 
[root@qnap named]# cat /etc/redhat-release 
CentOS release 5.6 (Final)
[root@qnap named]# rpm -q apcupsd
apcupsd-3.14.0-4.el5
[root@qnap named]# uname -a
Linux qnap.internal.paranoid.com 2.6.18-238.5.1.el5 #1 SMP Fri Apr 1 18:42:32 EDT 2011 i686 i686 i386 GNU/Linux
[root@qnap named]# 


[root@router ~]# grep apcupsd\ FATAL /var/log/messages*
/var/log/messages.2:Mar 29 23:32:04 router apcupsd[3117]: apcupsd FATAL ERROR in newups.c at line 62 Mutex lock failure. ERR=Invalid argument 
/var/log/messages.2:Mar 29 23:32:04 router apcupsd[3117]: apcupsd FATAL ERROR in newups.c at line 100 Mutex lock failure. ERR=Invalid argument 
/var/log/messages.2:Mar 31 11:08:42 router apcupsd[20697]: apcupsd FATAL ERROR in newups.c at line 62 Mutex lock failure. ERR=Invalid argument 
/var/log/messages.2:Mar 31 11:08:42 router apcupsd[20697]: apcupsd FATAL ERROR in newups.c at line 100 Mutex lock failure. ERR=Invalid argument 
[root@router ~]# cat /etc/redhat-release 
CentOS release 5.6 (Final)
[root@router ~]# rpm -q apcupsd
apcupsd-3.14.0-4.el5
[root@router ~]# uname -a
Linux router.internal.paranoid.com 2.6.18-238.5.1.el5 #1 SMP Fri Apr 1 18:42:32 EDT 2011 i686 i686 i386 GNU/Linux


Expected results:
apcupsd continues running.

Additional info:
In December in only had the one UPS connected to the machine 'qnap'. In March, the second UPS was delivered and connected to the machine called 'router'.
I noticed the first crash a couple weeks ago. But since apcupsd has not been updated since December, either something else changed on both machines, or I missed previous crashes (doubtful, but not excluded as I only started using gapcmon on my workstation recently). While I doubt the addition of a second UPS has anything to do with the daemon crashing (both machines do not query each other), I figured it was worth mentioning.

[root@qnap named]# rpm -q --queryformat "%{name}-%{version}-%{release} was installed on %{INSTALLTIME:date}\n" apcupsd
apcupsd-3.14.0-4.el5 was installed on Tue 07 Dec 2010 19:28:14 EET

[root@router ~]# rpm -q --queryformat "%{name}-%{version}-%{release} was installed on %{INSTALLTIME:date}\n" apcupsd
apcupsd-3.14.0-4.el5 was installed on Tue 29 Mar 2011 10:54:36 AM EEST

Comment 1 Fedora Update System 2011-04-15 13:07:37 UTC
apcupsd-3.14.8-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/apcupsd-3.14.8-1.el5

Comment 2 Fedora Update System 2011-04-15 17:58:32 UTC
Package apcupsd-3.14.8-1.el5:
* should fix your issue,
* was pushed to the Fedora EPEL 5 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing apcupsd-3.14.8-1.el5'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/apcupsd-3.14.8-1.el5
then log in and leave karma (feedback).

Comment 3 Fedora Update System 2011-05-16 21:07:51 UTC
apcupsd-3.14.8-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.