[Crash-utility] loop in crash

Karlsson, Jan Jan.Karlsson at sonymobile.com
Fri Apr 27 07:15:38 UTC 2012


Thanks Dave.

I found one more issue with a somewhat "corrupt" vmcore. In this case it is ARM-specific in unwind_arm.c, so maybe Mika will also look at it.

In the case I am investigating I get a readmem error while reading the unwind tables. The way unwinding currently is implemented Crash then stops and no further analysis is possible. When I patched Crash to continue anyhow, every command I tried worked nicely including bt, so there is no reason to stop at this kind of problem.

When investigating further I found that the problem occurs in init_module_unwind_tables. It is in the call to do_list(&ld) that the readmem error is found. I also looked in the code for do_list and saw that it could be configured to return even if errors were found, by setting ld.flags.

	/*
	 * Iterate through unwind table list and store start address of each
	 * table in table_list.
	 */
	ld.flags += RETURN_ON_LIST_ERROR;           /* added line */
	hq_open();
	cnt = do_list(&ld);
	if (cnt == -1) {           /* added if statement, 3 lines */
		return FALSE;
	}
	table_list = (ulong *)GETBUF(cnt * sizeof(ulong));
	cnt = retrieve_list(table_list, cnt);
	hq_close();

By adding the lines indicated above I get an appropriate warning that the unwind tables cannot be read, and then Crash works as usual.

Jan

Jan Karlsson
Senior Software Engineer
MIB
 
Sony Mobile Communications
Tel: +46703062174
sonymobile.com
 


-----Original Message-----
From: crash-utility-bounces at redhat.com [mailto:crash-utility-bounces at redhat.com] On Behalf Of Dave Anderson
Sent: torsdag den 26 april 2012 15:09
To: Discussion list for crash utility usage, maintenance and development
Cc: Fänge, Thomas
Subject: Re: [Crash-utility] loop in crash



----- Original Message -----
> Hi
> 
> and thanks for your work with this problem.
> 
> As you expected crash silently just loops and I spotted the problem
> by turning on debug printouts.
> If I include printouts for the "cache" address, the first value seems
> reasonable, but then it starts to repeat with the value 0x00000001.
> Last, your patch solves the problem nicely. I get a warning about
> duplicate kmem_slab entry and crash continues to execute and issues
> other warnings indicating a corrupt vmcore file.
> 
> Jan
 
OK good -- I should have hq_xxx()'d that loop a long time ago.

Queued for crash-6.0.6.

Thanks,
  Dave

 

--
Crash-utility mailing list
Crash-utility at redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility




More information about the Crash-utility mailing list