Hi, Experts,

I am just using libOpenIPMI to make it work on Oracle Solaris 11, and after
build the OpenIPMI 2.0 library, to verify if the functionalities are OK on
Solaris, I pulled over the test suite within OpenIPMI sourceforge website,
as following.

   http://sourceforge.net/projects/openipmi/files/Test%20Suite/

The library I used is OpenIPMI 2.0.18, and the test suite is
openipmi_testsuite_1.01.tgz

However, the test suite could not run on OpenIPMI 2.0 at all on Solaris. It
is always return memory violation, as following.
# cat /etc/release
                      Oracle Solaris 11 Express snv_156 X86
     Copyright (c) 2011, Oracle and/or its affiliates.  All rights reserved.
                           Assembled 30 December 2010

# ./control_id.test <user> <password>
setup connection
Segmentation Fault (core dumped)
root@ns-x4200-2:/export/OIPMI_TESTSUITE/IPMI1.5/generic-platform# mdb core
Loading modules: [ libc.so.1 ld.so.1 ]
> $c
0x100bd6dc(fefa06d0, 8047ae8, fee90018, 490)
libOpenIPMIutils.so.0.0.1`locked_list_alloc+0x40(fefa06d0, 805b294, 1f,
8047be8
, 805aa2f, 0)
libOpenIPMI.so.0.0.5`setup_domain+0x18f(1, 0, 0, 8047b88)
libOpenIPMI.so.0.0.5`ipmi_open_domain+0x46(805b294, 8047be8, 1, 80575fb, 0,
80577c1)
main+0x13d(3, 8047c24, 8047c34, 8047c18, 8056c9a, 805b180)
_start+0x83(3, 8047cfc, 8047d0e, 8047d14, 0, 8047d1d)


Also, I run the same test on Ubuntu Linux 2.6.32, its segment fails, either,
with same code stack.
# gdb ./control_id.test
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from
/home/jason/OIPMI_TESTSUITE/IPMI1.5/generic-platform/control_id.test...done.
(gdb) r <user> <password>
Starting program:
/home/jason/OIPMI_TESTSUITE/IPMI1.5/generic-platform/control_id.test <user>
<password>
setup connection

Program received signal SIGSEGV, Segmentation fault.
0xb7fe1b20 in ?? ()
(gdb) bt
#0  0xb7fe1b20 in ?? ()
#1  0xb7f4d9b3 in ipmi_open_domain (name=0x8052493 "first", con=0xbffff69c,
num_con=1, con_change_handler=0x804e435 <setup_done>,
con_change_cb_data=0x0, domain_fully_up=0x804e607 <domain_ptr_cb>,
    domain_fully_up_cb_data=0x0, options=0x0, num_options=0,
new_domain=0x8055544) at domain.c:4748
#2  0x0804df7a in main (argc=3, argv=0xbffff774) at control_id.c:161


When I read the lib/locks.c, it looks like it "lock->os_hnd->create_lock"
points to an invalid memory, and up stream code "ipmi_mem_alloc" doesn't
provide a valid create_lock handler at all.

=======   lib/locks.c   ==========
...
78   lock = ipmi_mem_alloc(sizeof(*lock));         <---------   Not register
valid os_hnd->create_lock callback at all.
79    if (!lock)
80       return ENOMEM;
81
82    lock->os_hnd = os_hnd;
83    if (lock->os_hnd && lock->os_hnd->create_lock) {
84        rv = lock->os_hnd->create_lock(lock->os_hnd, &(lock->ll_lock))
<---- panic here, since create_lock refer to an invalid memory heap.
...
===========================


Here are some questions:
1. Is that a bug for OpenIPMI 2.0 library?
2. Or is it because I use wrong tests against it? (i.e., not
openipmi_testsuite_1.01.tgz?),  and where can I find available test to be
run regularly as regression?

Thanks
Jason
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Reply via email to