Mon 17 Dec 2012 07:53:36 AM UTC, comment #16:
After rebuilding ports (portupgrading) this problem is solved.
As you said, it possible something was linked incorrectly on my system.
|
Fri 19 Oct 2012 07:28:56 AM UTC, comment #15:
Hi,
the following patch soved this issue for me:
--- ipmi-sensors/ipmi-sensors-argp.c.orig 2012-07-30 19:01:47.000000000 +0200
+++ ipmi-sensors/ipmi-sensors-argp.c 2012-10-18 17:28:28.000000000 +0200
@@ -353,7 +353,7 @@
'\0',
sizeof (struct config_file_data_ipmi_sensors));
- if (config_file_parse (cmd_args->common.config_file,
+ if (cmd_args->common.config_file != NULL && config_file_parse (cmd_args->common.config_file,
0,
&(cmd_args->common),
&(cmd_args->sdr),
|
Fri 24 Aug 2012 01:48:52 PM UTC, comment #14:
Ugh, I'm sorry, it's proving difficult to debug this on Linux. The default gdb can't read a FreeBSD binary. I think I have to wait until the BSD maintainer can take a look at this, I've e-mailed him.
|
Fri 24 Aug 2012 10:32:13 AM UTC, comment #13:
I'm sorry:
http://acc107_3.acc.tula.ru/ipmi-sensors/
ipmi-sensors executable binary
ipmi-sensors.core core dump
src-freebsd386.tgz source for build
|
Thu 23 Aug 2012 04:51:31 PM UTC, comment #12:
I get a permission denied on the link. Also, could you post the binary. I don't have a i386 machine anymore.
|
Thu 23 Aug 2012 04:08:58 AM UTC, comment #11:
I got coredump:
http://acc107_3.acc.tula.ru/ipmi-sensors.core
|
Wed 22 Aug 2012 05:10:57 PM UTC, comment #10:
> stacksize 65536 kbytes
The stacksize of 65536 should be more than enough. I tested with a stack as low as 256K (via ulimit -s 256) on Linux and things worked for me. I suppose it couldn't hurt to try and increase your stacksize to see if it helps.
> ipmi_sel_data = Error accessing memory address 0xbfa94a88: Bad address.
Looking online, this can be attributed to a lot of problems. A common problem is when binaries (gdb, libraries, etc.) are built/linked incorrectly for shared i386/x86_64 environments. Is it possible something is linked incorrectly on your system? I ask b/c this is the first i386 bug report I've seen in perhaps 5 years.
|
Wed 22 Aug 2012 12:51:37 AM UTC, comment #9:
FreeBSD Patch for cource code is:
--- libfreeipmi/driver/ipmi-kcs-driver.c.orig 2012-01-03 03:25:58.000000000 +0800
+++ libfreeipmi/driver/ipmi-kcs-driver.c 2012-01-06 04:38:31.485000601 +0800
@@ -491,7 +491,7 @@
#ifdef _FreeBSD_
#ifdef USE_IOPERM
/* i386_set_ioperm has known problems on FBSD 5.x (bus errors). */
- if (i386_set_ioperm (ctx->driver_address, 0x02, 0x01))
+ if (sysarch (I386_SET_IOPERM, (void *) (ctx->driver_address, 0x02, 0x01)))
{
KCS_ERRNO_TO_KCS_ERRNUM (ctx, errno);
return (-1);
--- ipmi-oem/ipmi-oem.h.orig 2012-01-03 03:26:10.000000000 +0800
+++ ipmi-oem/ipmi-oem.h 2012-01-06 04:36:44.994004384 +0800
@@ -20,6 +20,7 @@
#define _IPMI_OEM_H
#include <freeipmi/freeipmi.h>
+#include <sys/limits.h>
#include "tool-cmdline-common.h"
#include "pstdout.h"
|
Wed 22 Aug 2012 12:51:22 AM UTC, comment #8:
limit and ulimit
acc:/usr/ports/sysutils/freeipmi>echo $SHELL
/bin/csh
acc:/usr/ports/sysutils/freeipmi>limit
cputime unlimited
filesize unlimited
datasize 524288 kbytes
stacksize 65536 kbytes
coredumpsize unlimited
memoryuse unlimited
vmemoryuse unlimited
descriptors 14745
memorylocked unlimited
maxproc 5547
sbsize unlimited
swapsize unlimited
acc:/usr/ports/sysutils/freeipmi>bash
[acc107_3@acc /usr/ports/sysutils/freeipmi]$ echo $SHELL
/bin/csh
[acc107_3@acc /usr/ports/sysutils/freeipmi]$ ipmi-sensors
Segmentation fault: 11
[acc107_3@acc /usr/ports/sysutils/freeipmi]$ ulmit
bash: ulmit: команда не найдена
[acc107_3@acc /usr/ports/sysutils/freeipmi]$ ulimit
unlimited
[acc107_3@acc /usr/ports/sysutils/freeipmi]$ ipmi-sensors
Segmentation fault: 11
|
Wed 22 Aug 2012 12:46:06 AM UTC, comment #7:
Error is present a last line.
bt full
#0 0x0805dcba in config_file_parse (filename=0x0, no_error_if_not_found=0,
cmd_args=0xbfb5e370, sdr_args=0xbfb5e3dc, hostrange_args=0xbfb5e3f4,
support=15, tool_support=8192, tool_data=0xbfabe058)
at tool-config-file-common.c:1054
config_file_options = {{optionname = 0x0, option_type = 0,
option_type_arg = 0, callback_func = 0, max_count = 0, required_count = 0,
count_ptr = 0x0, option_ptr = 0x0, option_data = 0} <repeats 1024 times>}
config_file_options_len = 0
driver_type_count = 0
workaround_flags_count = 0
disable_auto_probe_count = 0
driver_address_count = 0
driver_device_count = 0
register_spacing_count = 0
username_count = 0
password_count = 0
k_g_count = 0
session_timeout_count = 0
retransmission_timeout_count = 0
authentication_type_count = 0
cipher_suite_id_count = 0
privilege_level_count = 0
quiet_cache_count = 0
sdr_cache_directory_count = 0
buffer_output_count = 0
consolidate_output_count = 0
fanout_count = 0
eliminate_count = 0
always_prefix_count = 0
bmc_config_username_count = 0
bmc_config_password_count = 0
bmc_config_k_g_count = 0
bmc_config_authentication_type_count = 0
bmc_config_cipher_suite_id_count = 0
bmc_config_privilege_level_count = 0
bmc_config_workaround_flags_count = 0
bmc_device_username_count = 0
bmc_device_password_count = 0
bmc_device_k_g_count = 0
bmc_device_authentication_type_count = 0
bmc_device_cipher_suite_id_count = 0
bmc_device_privilege_level_count = 0
bmc_device_workaround_flags_count = 0
bmc_info_username_count = 0
bmc_info_password_count = 0
bmc_info_k_g_count = 0
bmc_info_authentication_type_count = 0
bmc_info_cipher_suite_id_count = 0
bmc_info_privilege_level_count = 0
bmc_info_workaround_flags_count = 0
bmc_watchdog_workaround_flags_count = 0
ipmi_chassis_username_count = 0
ipmi_chassis_password_count = 0
ipmi_chassis_k_g_count = 0
ipmi_chassis_authentication_type_count = 0
ipmi_chassis_cipher_suite_id_count = 0
ipmi_chassis_privilege_level_count = 0
ipmi_chassis_workaround_flags_count = 0
ipmi_chassis_config_username_count = 0
ipmi_chassis_config_password_count = 0
ipmi_chassis_config_k_g_count = 0
ipmi_chassis_config_authentication_type_count = 0
ipmi_chassis_config_cipher_suite_id_count = 0
ipmi_chassis_config_privilege_level_count = 0
ipmi_chassis_config_workaround_flags_count = 0
ipmi_dcmi_username_count = 0
ipmi_dcmi_password_count = 0
ipmi_dcmi_k_g_count = 0
ipmi_dcmi_authentication_type_count = 0
ipmi_dcmi_cipher_suite_id_count = 0
ipmi_dcmi_privilege_level_count = 0
ipmi_dcmi_workaround_flags_count = 0
ipmi_fru_username_count = 0
ipmi_fru_password_count = 0
ipmi_fru_k_g_count = 0
ipmi_fru_authentication_type_count = 0
ipmi_fru_cipher_suite_id_count = 0
ipmi_fru_privilege_level_count = 0
ipmi_fru_workaround_flags_count = 0
ipmi_oem_username_count = 0
ipmi_oem_password_count = 0
ipmi_oem_k_g_count = 0
ipmi_oem_authentication_type_count = 0
ipmi_oem_cipher_suite_id_count = 0
ipmi_oem_privilege_level_count = 0
ipmi_oem_workaround_flags_count = 0
ipmi_pef_config_username_count = 0
ipmi_pef_config_password_count = 0
ipmi_pef_config_k_g_count = 0
ipmi_pef_config_authentication_type_count = 0
ipmi_pef_config_cipher_suite_id_count = 0
ipmi_pef_config_privilege_level_count = 0
ipmi_pef_config_workaround_flags_count = 0
ipmi_pet_username_count = 0
ipmi_pet_password_count = 0
ipmi_pet_k_g_count = 0
ipmi_pet_authentication_type_count = 0
ipmi_pet_cipher_suite_id_count = 0
ipmi_pet_privilege_level_count = 0
ipmi_pet_workaround_flags_count = 0
ipmi_raw_username_count = 0
ipmi_raw_password_count = 0
ipmi_raw_k_g_count = 0
ipmi_raw_authentication_type_count = 0
ipmi_raw_cipher_suite_id_count = 0
ipmi_raw_privilege_level_count = 0
ipmi_raw_workaround_flags_count = 0
ipmi_sel_username_count = 0
ipmi_sel_password_count = 0
ipmi_sel_k_g_count = 0
ipmi_sel_authentication_type_count = 0
ipmi_sel_cipher_suite_id_count = 0
ipmi_sel_privilege_level_count = 0
ipmi_sel_workaround_flags_count = 0
ipmi_sensors_username_count = 0
ipmi_sensors_password_count = 0
ipmi_sensors_k_g_count = 0
ipmi_sensors_authentication_type_count = 0
ipmi_sensors_cipher_suite_id_count = 0
ipmi_sensors_privilege_level_count = 0
ipmi_sensors_workaround_flags_count = 0
ipmi_sensors_config_username_count = 0
ipmi_sensors_config_password_count = 0
ipmi_sensors_config_k_g_count = 0
ipmi_sensors_config_authentication_type_count = 0
ipmi_sensors_config_cipher_suite_id_count = 0
ipmi_sensors_config_privilege_level_count = 0
ipmi_sensors_config_workaround_flags_count = 0
ipmiconsole_username_count = 0
ipmiconsole_password_count = 0
ipmiconsole_k_g_count = 0
ipmiconsole_authentication_type_count = 0
ipmiconsole_cipher_suite_id_count = 0
ipmiconsole_privilege_level_count = 0
ipmiconsole_workaround_flags_count = 0
ipmipower_username_count = 0
ipmipower_password_count = 0
ipmipower_k_g_count = 0
ipmipower_authentication_type_count = 0
ipmipower_cipher_suite_id_count = 0
ipmipower_privilege_level_count = 0
ipmipower_workaround_flags_count = 0
bmc_config_data = {verbose_count = 0, verbose_count_count = 0}
bmc_config_data_ptr = (struct config_file_data_bmc_config *) 0x0
bmc_info_data = {interpret_oem_data = 0, interpret_oem_data_count = 0}
bmc_info_data_ptr = (struct config_file_data_bmc_info *) 0x0
bmc_watchdog_data = {logfile = 0x0, logfile_count = 0, no_logging = 0,
no_logging_count = 0}
bmc_watchdog_data_ptr = (struct config_file_data_bmc_watchdog *) 0x0
ipmi_chassis_config_data = {verbose_count = 0, verbose_count_count = 0}
ipmi_chassis_config_data_ptr = (
struct config_file_data_ipmi_chassis_config *) 0x0
ipmi_dcmi_data = {interpret_oem_data = 0, interpret_oem_data_count = 0}
ipmi_dcmi_data_ptr = (struct config_file_data_ipmi_dcmi *) 0x0
ipmi_fru_data = {verbose_count = 0, verbose_count_count = 0,
skip_checks = 0, skip_checks_count = 0, interpret_oem_data = 0,
interpret_oem_data_count = 0}
ipmi_fru_data_ptr = (struct config_file_data_ipmi_fru *) 0x0
ipmi_oem_data = {verbose_count = 0, verbose_count_count = 0}
ipmi_oem_data_ptr = (struct config_file_data_ipmi_oem *) 0x0
ipmi_pef_config_data = {verbose_count = 0, verbose_count_count = 0}
ipmi_pef_config_data_ptr = (struct config_file_data_ipmi_pef_config
*) 0x0
ipmi_pet_data = {verbose_count = 0, verbose_count_count = 0,
output_event_severity = 0, output_event_severity_count = 0,
output_event_state = 0, output_event_state_count = 0,
event_state_config_file = 0x0, event_state_config_file_count = 0,
interpret_oem_data = 0, interpret_oem_data_count = 0,
entity_sensor_names = 0, entity_sensor_names_count = 0,
no_sensor_type_output = 0, no_sensor_type_output_count = 0,
comma_separated_output = 0, comma_separated_output_count = 0,
no_header_output = 0, no_header_output_count = 0, non_abbreviated_units = 0,
non_abbreviated_units_count = 0}
ipmi_pet_data_ptr = (struct config_file_data_ipmi_pet *) 0x0
ipmi_sel_data = Error accessing memory address 0xbfa94a88: Bad address.
|
Wed 22 Aug 2012 12:43:11 AM UTC, comment #6:
(gdb) bt
#0 0x0805dcba in config_file_parse (filename=0x0, no_error_if_not_found=0,
cmd_args=0xbfb5e370, sdr_args=0xbfb5e3dc, hostrange_args=0xbfb5e3f4,
support=15, tool_support=8192, tool_data=0xbfabe058)
at tool-config-file-common.c:1054
#1 0x0804f78c in _ipmi_sensors_config_file_parse (cmd_args=0xbfb5e370)
at ipmi-sensors-argp.c:356
#2 0x0804fdca in ipmi_sensors_argp_parse (argc=1, argv=0xbfbfe6e0,
cmd_args=0xbfb5e370) at ipmi-sensors-argp.c:532
#3 0x0804ee2d in main (argc=1, argv=0xbfbfe6e0) at ipmi-sensors.c:1676
(gdb) frame
#0 0x0805dcba in config_file_parse (filename=0x0, no_error_if_not_found=0,
cmd_args=0xbfb5e370, sdr_args=0xbfb5e3dc, hostrange_args=0xbfb5e3f4,
support=15, tool_support=8192, tool_data=0xbfabe058)
at tool-config-file-common.c:1054
1054 {
|
Wed 22 Aug 2012 12:37:25 AM UTC, comment #5:
So line 1054 puts me a the brace "{" in the below:
int
config_file_parse (const char *filename,
int no_error_if_not_found,
struct common_cmd_args *cmd_args,
struct sdr_cmd_args *sdr_args,
struct hostrange_cmd_args *hostrange_args,
unsigned int support,
unsigned int tool_support,
void *tool_data)
{
struct conffile_option config_file_options[CONFIG_FILE_OPTIONS_MAX];
I don't know if the code is slightly modified for distribution in BSD. But perhaps the segfault comes from the config_file_options[] array being too big for you process' stack? In bash on linux this can be modified with 'ulimit' or with 'limit' in tcsh. Does that help?
|
Wed 22 Aug 2012 12:24:32 AM UTC, comment #4:
(gdb) run
Starting program: /usr/local/sbin/ipmi-sensors
[New LWP 100493]
[New Thread 28901140 (LWP 100493/initial thread)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 28901140 (LWP 100493/initial thread)]
0x0805dcba in config_file_parse (filename=0x0, no_error_if_not_found=0,
cmd_args=0xbfb5e370, sdr_args=0xbfb5e3dc, hostrange_args=0xbfb5e3f4,
support=15, tool_support=8192, tool_data=0xbfabe058)
at tool-config-file-common.c:1054
1054 {
(gdb)
I try to make coredump later.
|
Tue 21 Aug 2012 05:15:25 PM UTC, comment #3:
Is there any way you can get a core dump and a gdb backtrace? I don't have a BSD system or an i386 system. It may be a portability issue with i386 or with the BSD drivers.
|
Tue 21 Aug 2012 04:32:38 PM UTC, comment #2:
acc:/home/acc107_3>ipmi-sensors --version
ipmi-sensors - 1.1.7
|
Thu 16 Aug 2012 10:03:26 PM UTC, comment #1:
What version of ipmi-sensors was running? You can find this via ipmi-sensors --version.
|
Thu 16 Aug 2012 05:21:17 PM UTC, original submission:
Runing ipmi-sensors without arguments make segmentation fault.
About OS: uname -a
FreeBSD acc.acc.tula.ru 8.3-RELEASE-p3 FreeBSD 8.3-RELEASE-p3 #17: Wed Jun 13 16:58:08 MSK 2012 root@acc.acc.tula.ru:/usr/obj/usr/src/sys/Z i386
Kernel config:
egrep -i "(ipmi|temp)" /sys/i386/conf/Z
device coretemp
device ipmi
kldstat
Id Refs Address Size Name
1 25 0xc0400000 83e6e8 kernel
2 1 0xc0c3f000 3e38 ulpt.ko
3 1 0xc0c43000 19d0 accf_data.ko
4 1 0xc0c45000 23a4 accf_http.ko
5 1 0xc0c48000 4be0 cuse4bsd.ko
6 1 0xc7cf1000 4000 nullfs.ko
7 1 0xc7d76000 c000 unionfs.ko
8 1 0xc834d000 8000 snd_uaudio.ko
9 2 0xc8355000 4b000 sound.ko
10 1 0xc890f000 4000 logo_saver.ko
11 1 0xc8a00000 3000 if_ef.ko
Motherboard Intel S3210SH
BIOS Information
Vendor: Intel Corporation
Version: S3200X38.86B.00.00.0030.101220071709
Release Date: 10/12/2007
|