How to determine location in code where segfault occurred using syslog message? - debugging

I have some code that can't be run under GDB because it's an embedded system. However, in the syslog I will occasionally see the following:
kernel: nam[13986]: segfault at b579000 ip b71737dc sp b5120c9c error 4 in libc-2.5.so[b7102000+13f000]
Is there some way to find where in the code this error occurred using the numbers listed in the error output above?

Yes, ip stands for "instruction pointer", and it's the location of the crash. In the quoted message, it's 0xb71737dc.

Related

Error: command "bash" failed with no error message?

I am using terraform on my Mac system, and terraform apply results with below error
Error: command "bash" failed with no error message
on ssm.tf line 7, in data "external" "ssm-dynamic-general":
7: data "external" "ssm-dynamic-general" {
However there is nothing wrong in ssm.tf file, same runs perfectly fine in my another system.
Can some one please let me know what i am missing here?
You might have done what I accidentally did: not follow the external program protocol:
https://www.terraform.io/docs/providers/external/data_source.html#external-program-protocol
In my particular case, I failed to send the errors that were coming from my program to standard error. Instead, those errors were going to standard out.
That's why Terraform wasn't able to report on those errors.
So if you send any and all errors from your program to standard error using > &2, you should be able to see those errors when you run terraform plan.

Chef - ArgumentError: too short control escape

I will glad to get an any help in the next issue:
when I run a numerous recipes (when I run an each in a separate way it doesn't fails), I sometimes get a next error:
"ArgumentError: too short control escape"
log:
[2016-03-15T15:41:55+01:00] INFO: Running queued delayed notifications before re-raising exception
[2016-03-15T15:41:55+01:00] ERROR: Running exception handlers
[2016-03-15T15:41:55+01:00] ERROR: Exception handlers complete
[2016-03-15T15:41:55+01:00] FATAL: Stacktrace dumped to c:/chef/chef-stacktrace.out
[2016-03-15T15:41:55+01:00] FATAL: ArgumentError: too short control escape
chef-stacktrace.out:
Generated at 2016-03-14 15:56:29 +0100
ArgumentError: too short control escape
C:/opscode/chef/embedded/apps/chef/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb:66:in 'recipe_snippet'
C:/opscode/chef/embedded/apps/chef/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb:43:in 'add_explanation'
It happens randomly and I can't to find an explanation,
Thanks
I'm guessing something is going wonky with the regexp compile. It supposed to use Regexp.escape(source) but something might be slipping through? Please include the full error output though.
After a deep investigations, we have found the root cause of the issue. The name of the Github repository was interpreted by Chef as an escape character (the name of repository was starting with capital letter "C") which caused the configuration to fail alternately.
It regards to Chef 12.0.3 version (I hope, they fixed it in a newer next version)
We changed the name of repository and it solved the problem.

Jmeter 2.10 and 2.11 don't let me start a HTTP Script Recorder

I'm having trouble starting a proxy server for jmeter 2.10 and 2.11. I found a couple links here on SO and apache.org but my error message is slightly different that what's written on these links. Per the wiki from apache.org, I don't think I have trouble finding keytool because it returns the path when I do a
which keytool
/usr/bin/keytool
and I don't have trouble creating a file in the jmeter-210 and jmeter-211/bin dirs. This is the error message I get in my jmeter.log file:
ERROR - jmeter.protocol.http.proxy.ProxyControl: Could not initialise key store java.io.IOException: Command :'"keytool" "-genkeypair" "-alias" ":root_ca:" "-dname" "CN=_ DO NOT INSTALL unless this is your certificate (JMeter root CA), OU=Username: COMPANY\user.name, C=US" "-keyalg" "RSA" "-keystore" "proxyserver.jks" "-storepass" "randomstr1" "-keypass" "randomstr1" "-validity" "7" "-ext" "bc:c"' failed, code: 1
keytool error: java.io.IOException: Invalid escaped character in AVA: 's'
I don't know what this "invalid escaped char in AVA" is. My company and username don't have the string "AVA" and I didn't find it in any of the property files in jmeter-21x/bin.
Not sure if this is affecting it but I'm running jmeter from Darwin on a MBP, OSX 10.7.5.
JMeter 2.9 doesn't give me any proxy issues, although, I ran into other issues with it, which is why I tried using these 2 newer versions, which are giving me problems with the proxy server. I'll try going down to 2.8 to see what happens but I'd rather not if I can help it. That and I'm super curious what the issue is with 2.1x and my laptop. Thanks in advance for your help.
EDIT: The COMPANY/user.name part of the error message was changed this way to sanitize the error message, although, I will try at home on my linux box to see if the funny username representation is the cause.
As per sebb response on User Mailing List:
"I suspect it might be in the string "COMPANY\user.name" which is
derived from the Java system property "user.name".
You could try redefining it on the command line (or in
system.properties) to something simpler, for example:
-Duser.name=foobar
A bug has been opened to fix this issue with "\" character:
https://issues.apache.org/bugzilla/show_bug.cgi?id=56178

OS X NSTask error 22

I am building a simple package on OS X using pkgbuild that consists of a folder of stuff and the pre/postinstall scripts. When I try to execute the resulting package, the installer fails with the following message in the log:
Nov 1 13:28:11 localhost installd[631]: ./preinstall: 2013-11-01 13:28:11.074 installd[637:203] * NSTask: Task create for path '/tmp/PKInstallSandbox.P6mPx2/Scripts/com.xyz.utility.pkg.TWwYct/preinstall' failed: 22, "Invalid argument". Terminating temporary process.
The installer is running as root. The problem does not appear to be the contents of the scripts since they fail even after I cut them down to a simple "exit 0" with the interpreter declaration. This issues occurs on 10.8.2 and 10.8.4.
The issue looks like an exception that is thrown from within an NSTask object, but all I get is this 22 error code and the "Invalid argument" message. I think this message might refer to an NSInvalidArgumentException. I made sure the scripts are indeed being placed at the temporary location listed in the error message and they are there with the correct permissions.
Any ideas as to what causes this type of error message? I found several references to this error when I did some searching but there didn't seem to be a unifying cause or solution.
Add #!/bin/sh header into the preinstall script.

Running OpenMPI on Windows XP

I'm trying to build a simple cluster based on Windows XP. I compiled OpenMPI-1.4.2 successfully, and tools like mpicc and ompi_info work too, but I can't get my mpirun working properly. The only output I can see is
Z:\>orterun --hostfile z:\hosts.txt -np 2 hostname
[host0:04728] Failed to initialize COM library. Error code = -2147417850
[host0:04728] [[8946,0],0] ORTE_ERROR_LOG: Error in file ..\..\openmpi-1.4.2
\orte\mca\ess\hnp\ess_hnp_module.c at line 218
--------------------------------------------------------------------------
It looks like orte_init failed for some reason; your parallel process is
likely to abort. There are many reasons that a parallel process can
fail during orte_init; some of which are due to configuration or
environment problems. This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):
orte_plm_init failed
--> Returned value Error (-1) instead of ORTE_SUCCESS
--------------------------------------------------------------------------
[host0:04728] [[8946,0],0] ORTE_ERROR_LOG: Error in file ..\..\openmpi-1.4.2
\orte\runtime\orte_init.c at line 132
--------------------------------------------------------------------------
It looks like orte_init failed for some reason; your parallel process is
likely to abort. There are many reasons that a parallel process can
fail during orte_init; some of which are due to configuration or
environment problems. This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):
orte_ess_set_name failed
--> Returned value Error (-1) instead of ORTE_SUCCESS
--------------------------------------------------------------------------
[host0:04728] [[8946,0],0] ORTE_ERROR_LOG: Error in file ..\..\..\..\openmpi
-1.4.2\orte\tools\orterun\orterun.c at line 543
Where z:\hosts.txt appears as follows:
host0
host1
Z: is a shared network drive available to both host0 and host1.
What my problem is and how do I fix it?
Upd:
Ok, this problem seems to be fixed. It seems to me that WideCap driver and/or software components causes this error to appear. A "clean" machine runs local task successfully. Anyway, I still cannot run a task within at least 2 machines, I'm getting following message:
Z:\>mpirun --hostfile z:\hosts.txt -np 2 hostname
connecting to host1
username:MAIN\cluster
password:********
Save Credential?(Y/N) y
[host0:04728] This feature hasn't been implemented yet.
[host0:04728] Could not connect to namespace cimv2 on node host1. Error code =-2147217400
--------------------------------------------------------------------------
mpirun was unable to start the specified application as it encountered an error.
More information may be available above.
--------------------------------------------------------------------------
I googled a little and did all the things as described here: http://www.open-mpi.org/community/lists/users/2010/03/12355.php but I'm still getting the same error. Can anyone help me?
Upd2:
Error code -2147217400 might be WMI error WBEM_E_INVALID_PARAMETER (0x80041008) which occures when one of the parameters passed to the WMI call is not correct. Does this mean that the problem is in OpenMPI source code itself? Or maybe it's because of wrong/outdated wincred.h and credui.lib I used while building OpenMPI from the source code?

Resources