Unix system crashing - Need help to identify the issue


 
Thread Tools Search this Thread
Top Forums Programming Unix system crashing - Need help to identify the issue
# 8  
Old 04-27-2011
XML Crashes most likely occur due to content

The first thing you should check is the validity of the XML that you are trying to parse here.

If the XML is part of a bigger stream, I would try to log all XML documents and process return codes to a log file.

XML processes often crash during parse...

Also instead of doing all operations in the try{}catch() {} block you should better check the results of your operations.

i.e.:
Code:
accountDetailArray = parse>getArray("listOfSearchResults!searchResult",res2);
noOfAccountDetails = accountDetailArray->numEntries();


Here you should check
Code:
if (accountDetailArray == null ) return ((unsigned int)-1); /* just a possible error value */

Also, if this function is true source of your SEGFAULT you should
Code:
catch(Error e) { /*any Error*/}

# 9  
Old 04-27-2011
Thanks ikrabbe ..

When we simulate the same secnario with the exact response received during the crash , it worked fine. I have given one of the sample XML response we received


SAMPLE RESPONSE:
Code:
[response]
 
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
- <searchCustomerResponse xmlns="capabilities.nat.bt.com/xsd/crm/v3/Customers"
- <listOfSearchResults>
- <searchResult>
<customerAccountId>xxxxx</customerAccountId> 
<name>Mr BROOKE HALLIWELL</name> 
<creditScore /> 
<type>CONSUMER</type> 
<primaryContactId>xxxxx</primaryContactId> 
<billingAccountNumber>xxxxxx</billingAccountNumber> 
<billingAccountStatus>Closed</billingAccountStatus> 
<telNo>xxxxxxx</telNo> 
<restrictedVisibilityIndicator>Y</restrictedVisibilityIndicator> 
- <address>
<id>xxxx</id> 
<shortDescription>16, , , TIBBERSLEY AVENUE, BILLINGHAM, TS23 1JP</shortDescription> 
</address>
<accountManager /> 
</searchResult>
- <searchResult>
<customerAccountId>xxxxxx</customerAccountId> 
<name>BTSS (CORAL RACING)</name> 
<creditScore /> 
<type>ACCOUNT(BUS)</type> 
<billingAccountNumber>xxxxx</billingAccountNumber> 
<billingAccountStatus>Closed</billingAccountStatus> 
<telNo>xxxxx</telNo> 
<restrictedVisibilityIndicator>Y</restrictedVisibilityIndicator> 
- <address>
<id>xxxx</id> 
<shortDescription>1, CHARNWOOD PLACE, , SOUTH ALBION STREET, LEICESTER, LE1 6JL</shortDescription> 
</address>
<accountManager /> 
</searchResult>
</listOfSearchResults>
</searchCustomerResponse>
 
[/response]

Note:
For security reasons have masked the private details in response.
I could post with RL , so remove http in xmlns tag.
Regards,
Banu

Last edited by Scott; 04-27-2011 at 06:57 AM.. Reason: Code tags...
# 10  
Old 04-27-2011
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
- <searchCustomerResponse xmlns="capabilities.nat.bt.com/xsd/crm/v3/Customers"

1. What is the leading '-' in these lines? Copy&Paste error or real output. This would be one problem
2.
Code:
<searchCustomerResponse

... is never closed by '>'

Please post correct ascii or UTF-8 maybe to pastebin.
# 11  
Old 04-27-2011
Quote:
Originally Posted by banus
Please find the code sinnpet
Code:
unsigned int CMPClient::scrGetResponse(RWCString &pck, XMLWrapper *parse, DOMElement * res, char* rspBuf)
{
    ...
}

What leads you to believe your problem is all in that code?
# 12  
Old 04-27-2011
Since you have both source, binary and core dump; you may just want to fire your debugger and see where it crashed.

Alternatively, compile with debugging symbols and reproduce the problem. Then you should get together with the binary and core dump a pretty good idea what's going on.

PS> the dump you have posted doesn't seem to mention a call to the CMPClient::scrGetResponse() method ?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to identify whether the script is in Unix format or not ?

Hi All, I have the below scenario in my environment Developers used to copy file from windows to Linux box. Some time on the copied file developers miss to run the dos2unix utility. Because of this script gets failed during the execution. Most of the failures are due to the dos2unix format... (7 Replies)
Discussion started by: kalpeer
7 Replies

2. AIX

How to Identify long running unix processes

Hi All, Need an urgent help, I have a requirement to find long running unix processes.. I have tried the below commands, but not succeed. I need to arrange the unix processess in an order of elapsed time (high to low) that runs in a system. For Eg: Consider we have 3 processes, Pid 1 pid 2... (5 Replies)
Discussion started by: mohamedirfan
5 Replies

3. UNIX for Dummies Questions & Answers

Unix System Programmer Vs. Unix System Administrator

Hi friends, I hope you are all fine and doing well. First of all, let me say that I love Unix with passion. But I have one query in my mind that is bothering me. What should I do, Unix System Administration or Unix System Programmering. Could you please tell me the difference between the two. And... (3 Replies)
Discussion started by: gabam
3 Replies

4. UNIX for Dummies Questions & Answers

Identify issues through logging in unix

I am a newbie to unix and appeared for an interview and was asked this question. If i was working for a company as a support person on an application and has to monitor the logs how would i determine if there was outage by checking the logs and where would i search for the issue initially. and... (2 Replies)
Discussion started by: praveenveerla
2 Replies

5. Solaris

Mail system Configuration issue on UNIX box

Hi, I wanted to configure a mail system on my UNIX box. For that I read a document Sun Internet Mail Server 3.5 Advanced Installation Guide: Contents which is actually quite useful document but I am not sure from where can I bring patch? Is this patch will come in any CD form which I need to run... (1 Reply)
Discussion started by: Dhruvak
1 Replies

6. UNIX for Dummies Questions & Answers

identify a customer under a UNIX server

Like many UNIX users, there is a small team that is connected to UNIX (under the same UNIX user) via putty from a Windows PC. Is there a way, once under UNIX, to know the address of the originating computer or anything that can differentiate initial users ? (7 Replies)
Discussion started by: popescu1954
7 Replies

7. Shell Programming and Scripting

how to identify the mode of the file in unix

hi, I have a requirement in that i need to process a input file The problem is, the input file sometimes it is coming in dos mode and some times it is coming in unix mode The script which i have written will process the file only if it is in unix mode and it is not processing if the file is in... (7 Replies)
Discussion started by: trichyselva
7 Replies

8. Shell Programming and Scripting

Identify records having junk characters in unix

Hi Friends, I need to have a command in Unix which output all teh records havingg junk characters in a file.... I know a command cat -tv <Filename> which opens the file and we can check for any junk character in it. But my requirement is to fetch ONLY THOSE records having junk characters.... (6 Replies)
Discussion started by: sureshg_sampat
6 Replies

9. UNIX for Advanced & Expert Users

Identify a remote machine as windows or unix

Hi, I have a IP address of the target machine.Is there is any way to find out whether it is a unix box or windows box without logging into it?. Regs Anand (5 Replies)
Discussion started by: u449064
5 Replies

10. UNIX for Dummies Questions & Answers

how does unix identify C and other language code!

Hello everyone, this question is probably simple for you ppl but i am jus a beginner and still learing. i was wondering if someone could tell me that how does unix identify different program codes in it's environment. for example, unix recognises this C code in the body of any script. how... (2 Replies)
Discussion started by: a25khan
2 Replies
Login or Register to Ask a Question