- status: open --> closed-fixed
I'm having a problem when running with OpenHPI 2.4 with
the openhpid.
If I run the daemon in the foreground, things seem to
work just fine and
the clients, such as hpiinv can get the data that they
need from the
server. However, when I start the daemon up and let it
put itself in
the background, then the client programs hang trying to
get information.
If I run hpiinv in "standard" mode without the daemon,
it works fine as
well.
I believe I've narrowed the problem down to seeing the
discovery and
event threads exit when the original parent thread does
an exit(0) when
openhpid tries to morph itself into a daemon process.
Below is a
snippet of strace -f output.
Any help would be appreciated. I've attached my
openhpi.conf file as
well as the configure options.
Ron Rees
=========================
Output from clients:
#: hpiinv -x -z
hpiinv ver 1.5 HPI-B
saHpiSessionOpen rv = 0 sessionid = 2
saHpiDomainInfoGet rv = 0
Starting Discovery, pass 1 ... <========== hangs
right here.
=========================
Here's the output from strace -f when this is occuring,
you can see the
helper threads getting an EINTR.
PID 8669 = original Parent
PID 8670 = discovery thread
PID 8671 = event thread
PID 8672 = new background parent thread
[pid 8669] clone(Process 8672 attached (waiting for
parent)
Process 8672 resumed (parent 8669 ready)
child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xb7cd1
[pid 8669] exit_group(0) = ?
[pid 8671] <... futex resumed> ) = -1 EINTR
(Interrupted system
call)
[pid 8672] setsid( <unfinished ...>
[pid 8670] <... futex resumed> ) = -1 EINTR
(Interrupted system
call)
[pid 8672] <... setsid resumed> ) = 8672
./configure --prefix=/usr --sysconfdir=/etc
--with-varlib=/var/lib/openhpi \
--localstatedir=/var \
--disable-snmp_bc \
--enable-dummy
$: cat /etc/openhpi/openhpi.conf
## File format is outlined here and examples are given
## First section, declare global parameters like the
following.
#OPENHPI_LOG_ON_SEV = "MINOR"
#OPENHPI_ON_EP = "{SYSTEM_CHASSIS,1}"
#OPENHPI_EVT_QUEUE_LIMIT = "0"
#OPENHPI_DEL_SIZE_LIMIT = "0"
#OPENHPI_DEL_SAVE = "NO"
#OPENHPI_DAT_SIZE_LIMIT = "0"
#OPENHPI_DAT_USER_LIMIT = "0"
OPENHPI_THREADED = "YES"
#OPENHPI_PATH = "/usr/local/lib/openhpi:/usr/lib/openhpi"
#OPENHPI_VARPATH = "/usr/local/var/lib/openhpi"
## The default values for each have been selected in
the example above
(except
## for OPENHPI_PATH and OPENHPI_CONF. See below).
## No need to specify any one of them because the
default will be used
## automatically. The library will also look for these
as environment
variables.
## Environment variables found that match a global
parameter will
override the
## corresponding parameter set in this configuration file.
##
## OPENHPI_LOG_SEV sets the lowest severity level an
event must meet to be
## logged in the domain event log. Possible values are
(highest to lowest):
## "CRITICAL", "MAJOR", "MINOR", "INFORMATIONAL", "OK",
and "DEBUG".
## OPENHPI_ON_EP sets the entity path on wich the
application is
running. This
## entity path will be returned when
SaHpiResourceIdGet() is called.
## OPENHPI_EVT_QUEUE_LIMIT sets the maximum number of
events that are
allowed
## in the session's event queue. "0" means unlimited.
## OPENHPI_DEL_SIZE_LIMIT sets the maximum size (in
number of event log
entries)
## for the domain event log. "0" means unlimited.
## OPENHPI_DEL_SAVE sets wether the domain event log
will be persisted
to disk or
## not. The event log is written to OPENHPI_VARPATH value.
## OPENHPI_DAT_SIZE_LIMIT sets the maximum size (in
number of alarm
entries) for
## the alarm table. "0" means unlimited.
## OPENHPI_DAT_USER_LIMIT sets the maximum number of
user type alarm entries
## allowed in the alarm table.
## OPENHPI_THREADED sets whether a thread is used for
handling the event
loop.
## This thread will be looping around the plugin
instances and fetching
events.
## OPENHPI_PATH is a colon (:) delimited list of
directories specifying
## the location of openhpi plugin libraries. The
default is defined when the
## library is configured.
## OPENHPI_VARPATH is a directory to which certain
openhpi data will be
saved to.
## At this point, only the DEL is saved to this
directory. The default
is set at
## compile time through the ./configure options.
## Second section, declare plugin to use. For example:
## plugin plugin-name
plugin libdummy
## Depends on openipmi to be installed on this system:
#plugin libipmi
## Depends on net-snmp being installed on the system:
#plugin libsnmp_bc
## Depends openhpi being configured
## (e.g "configure --enable-dummy=static")
#plugin dummy
#plugin libipmidirect
#############################################################################
##**WARNING** System administrators have to make sure
that entity paths are
## unique in a domain. To avoid entity paths
conflicting among handlers,
make
## sure the "entity_root" is unique for each handler
definition.
#############################################################################
## Third section is a handler (instance) declaration
with arguments
understood by plugin
## Strings are enclosed by "", numbers are not.
handler libdummy {
entity_root = "{SYSTEM_CHASSIS,1}"
name = "test"
addr = 0
}
## Dummy allows you open second virtual by addr 1
#handler libdummy {
# addr = 1
#}
## Section for ipmi plugin using SMI -- local interface
#handler libipmi {
# entity_root = "{SYSTEM_CHASSIS,2}"
# name = "smi"
# addr = 0
#}
## Section for ipmi plugin based on OpenIPMI:
#handler libipmi {
# entity_root = "{SYSTEM_CHASSIS,3}"
# name = "lan"
# addr = "x.x.x.x" #ipaddress
# port = 999
# auth_type = "straight"
# auth_level= "user"
# username = "joe"
# password = "blow"
#}
## Section for snmp_bc plugin:
## The root entry can be omitted in 'entity_root',
## but *not* the chassis entry.
#handler libsnmp_bc {
# entity_root = "{SYSTEM_CHASSIS,4}" # Required
# host = "bc.ibm.com" # Required
# community = "community" # Version 1 Required.
# version = "1" # Required. SNMP protocol
version (1|3)
# security_name = "snmpv3_user" # Version 3
Required.
# passphrase = "opensesame" # Version 3.
Required if
security_level is authNoPriv or authPriv.
# auth_type = "MD5" # Version 3. Passphrase
encoding (MD5|SHA)
# security_level = "noAuthNoPriv" # Version 3.
(noAuthNoPriv|authNoPriv|authPriv)
#}
## Section for static dummy plugin:
## If openhpi configured with
## configure --enable-dummy=static
## the dummy plugin is compiled in.
## It is possible to use dummy and libdummy
## at the same time.
#handler dummy {
# entity_root = "{SYSTEM_CHASSIS,5}"
# name = "test"
# addr = 2
#}
## Section for ipmidirect plugin using SMI -- local
interface
#handler libipmidirect {
# entity_root = "{SYSTEM_CHASSIS,6}"
# name = "smi"
# addr = 0
#}