Hi,

This is on a openSUSE 10.3 and ipmi is:

OpenIPMI-devel-2.0.7-102

The backtrace:

Thread 1 (process 8787):
#0  0x00000000 in ?? ()
No symbol table info available.
#1  0xb7f8a8b6 in locked_list_remove () from /usr/lib/libOpenIPMIutils.so.0
No symbol table info available.
#2  0xb7b1b19f in _ipmi_fru_deregister_decoder ()
   from /usr/lib/libOpenIPMI.so.0
No symbol table info available.
#3  0xb7b730f0 in _ipmi_fru_spd_decoder_shutdown ()
   from /usr/lib/libOpenIPMI.so.0
No symbol table info available.
#4  0xb7b0254a in ipmi_init () from /usr/lib/libOpenIPMI.so.0
No symbol table info available.
#5  0xb7f95b1a in do_ipmi_cmd (host=0x8051028, request=4)
    at ipmilan_command.c:293
No locals.
#6  0xb7f955f7 in ipmilan_status (s=0x8050f80) at ipmilan.c:231
        rv = <value optimized out>
        node = (struct ipmilanHostInfo *) 0x8051028
        ret = 0
        __FUNCTION__ = "ipmilan_status"

The code is a bit old (from the openipmi 1.x times) and I'm
trying to revive it, so far unsuccessfully. I looked at it for a
while, but can't figure out what's wrong. ipmi_init obviously
fails and segfaults when trying to cleanup. The same device talks
without problems to the ipmitool.

The code is below, with error checking removed for clarity.

Cheers,

Dejan

        os_hnd = ipmi_posix_get_os_handler();
        rv = sel_alloc_selector(os_hnd, &os_sel);
    ipmi_posix_os_handler_set_sel(os_hnd, os_sel);
        rv = ipmi_init(os_hnd);
        ent = gethostbyname(host->ipaddr);
        memcpy(&lan_addr[0], ent->h_addr_list[0], ent->h_length);
        lan_port[0] = host->portnumber;
        lan_port[1] = 0;
        authtype = host->authtype;
        privilege = host->privilege;
        memcpy(username, host->username, sizeof(username));
        memcpy(password, host->password, sizeof(password));
        rv = ipmi_lan_setup_con(lan_addr, lan_port, num_addr, 
                                authtype, privilege,
                                username, strlen(username),
                                password, strlen(password),
                                os_hnd, os_sel,
                                &con);
#if OPENIPMI_VERSION_MAJOR < 2
        con->set_con_change_handler(con, con_changed_handler, &request);
#else
        con->add_con_change_handler(con, con_changed_handler, &request);
#endif
        rv = con->start_con(con);

        gettimeofday(&timeout, NULL);
        timeout.tv_sec += OPERATION_TIME_OUT;
        timeout.tv_usec += 0;
        sel_alloc_timer(os_sel, timed_out, NULL, &timer);
        sel_start_timer(timer, &timeout);

        while (1) {
                rv = sel_select(os_sel, NULL, 0, NULL, NULL);
                if (gstatus != IPMI_RUNNING) {
                        break;
                }
        }

        sel_free_timer(timer);

        con->close_connection(con);
        ipmi_shutdown();


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Reply via email to