<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.5730.11" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=781444523-19012007><FONT face=Arial 
color=#0000ff size=2>That's great!  I wonder if it would have been better 
to walk through</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=781444523-19012007><FONT face=Arial 
color=#0000ff size=2>the info which is stored by CONFIG_KALLSYMS.  That 
would probably</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=781444523-19012007><FONT face=Arial 
color=#0000ff size=2>work better in the s390x case... However, as bugzilla says, 
"worksforme".</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=781444523-19012007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=781444523-19012007>    <FONT 
face=Arial color=#0000ff size=2>-castor</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> anderson@redhat.com 
[mailto:anderson@redhat.com] <BR><B>Sent:</B> Thursday, January 18, 2007 7:27 
AM<BR><B>To:</B> Discussion list for crash utility usage, maintenance and 
development; Castor Fu<BR><B>Subject:</B> Re: [Crash-utility] Module load patch 
for crash-4.0-3.17<BR></FONT><BR></DIV>
<DIV></DIV>  <BR>Hey Castor, 
<P>This also looks good on ppc64. 
<P>I'm slowly convincing myself that that this facility should be <BR>executed 
by default -- but with an option to turn it *off*...    ;-) 
<P>Dave <BR>  
<P>Castor Fu wrote: 
<BLOCKQUOTE TYPE="CITE">  
  <DIV dir=ltr><SPAN class=592120220-17012007><FONT face=Arial><FONT 
  color=#0000ff><FONT size=-1>Finding the overrun wasn't actually that 
  hard.  It's also fixed in the current GDB 
  tree.</FONT></FONT></FONT></SPAN></DIV>
  <DIV dir=ltr><SPAN class=592120220-17012007></SPAN></DIV>
  <DIV dir=ltr><SPAN class=592120220-17012007><FONT face=Arial><FONT 
  color=#0000ff><FONT size=-1>I've attached a patch which fixes the problem in 
  symfile.c.  The point of this patch</FONT></FONT></FONT></SPAN></DIV>
  <DIV dir=ltr><SPAN class=592120220-17012007><FONT face=Arial><FONT 
  color=#0000ff><FONT size=-1>is to fix loading kernel modules symbol 
  information on 2.6 for those who have not</FONT></FONT></FONT></SPAN></DIV>
  <DIV dir=ltr><SPAN class=592120220-17012007><FONT face=Arial><FONT 
  color=#0000ff><FONT size=-1>been following 
  this.</FONT></FONT></FONT></SPAN></DIV>
  <DIV dir=ltr><SPAN class=592120220-17012007></SPAN></DIV>
  <DIV dir=ltr><SPAN class=592120220-17012007><FONT face=Arial><FONT 
  color=#0000ff><FONT size=-1>Hopefully this will work on other platforms 
  too....</FONT></FONT></FONT></SPAN></DIV>
  <DIV dir=ltr><SPAN class=592120220-17012007></SPAN></DIV>
  <DIV dir=ltr><SPAN class=592120220-17012007><FONT face=Arial><FONT 
  color=#0000ff><FONT size=-1>   
  -castor</FONT></FONT></FONT></SPAN></DIV>
  <DIV dir=ltr><SPAN class=592120220-17012007></SPAN></DIV>
  <DIV dir=ltr><SPAN class=592120220-17012007></SPAN></DIV>
  <DIV dir=ltr>
  <HR tabIndex=-1>
  </DIV>
  <DIV dir=ltr><FONT face=Tahoma><FONT size=-1><B>From:</B> 
  crash-utility-bounces@redhat.com [<A 
  href="mailto:crash-utility-bounces@redhat.com">mailto:crash-utility-bounces@redhat.com</A>] 
  <B>On Behalf Of </B>Castor Fu</FONT></FONT> <BR><FONT face=Tahoma><FONT 
  size=-1><B>Sent:</B> Wednesday, January 17, 2007 7:49 AM</FONT></FONT> 
  <BR><FONT face=Tahoma><FONT size=-1><B>To:</B> Discussion list for crash 
  utility usage, maintenance and development; Discussion list for crash utility 
  usage, maintenance and development</FONT></FONT> <BR><FONT face=Tahoma><FONT 
  size=-1><B>Subject:</B> RE: [Crash-utility] test results of latest 
  4.0-3.16.sym.patch (ia64)</FONT></FONT> <BR> </DIV><!-- Converted from text/plain format -->
  <P><FONT size=-1>Hi Dave:</FONT> 
  <P><FONT size=-1>I reproduced the problem on an x86 system by creating a 
  module with a bunch</FONT> <BR><FONT size=-1>of sections.</FONT> 
  <P><FONT size=-1>I then found the following in 
  gdb-6.1/gdb/symfile.c:add_symbol_table_command()</FONT> <BR>  
  <P><FONT size=-1>    num_sec_opts = 16;</FONT> 
  <P><FONT size=-1>with additional code for xreallocing if it turned out to have 
  too many</FONT> <BR><FONT size=-1>sections.</FONT> 
  <P><FONT size=-1>This seems to be the code which is broken.  I'm loath to 
  figure out exactly</FONT> <BR><FONT size=-1>what it is...  I'll put 
  together a patch against 4.0-3.17 which jacks this</FONT> <BR><FONT 
  size=-1>up, and probably print a warning if we exceed the count.</FONT> 
  <P><FONT size=-1>Thanks for digging so far into this.</FONT> 
  <P><FONT size=-1>   -castor</FONT> 
  <P><FONT size=-1>-----Original Message-----</FONT> <BR><FONT size=-1>From: 
  crash-utility-bounces@redhat.com on behalf of Dave Anderson</FONT> <BR><FONT 
  size=-1>Sent: Thu 1/4/2007 8:22 AM</FONT> <BR><FONT size=-1>To: Discussion 
  list for crash utility usage, maintenance and development</FONT> <BR><FONT 
  size=-1>Subject: Re: [Crash-utility] test results of latest 4.0-3.16.sym.patch 
  (ia64)</FONT> <BR>  
  <P><FONT size=-1>Hi Castor,</FONT> 
  <P><FONT size=-1>Another FYI re: the xrealloc() crash.  The problem 
  appears</FONT> <BR><FONT size=-1>to be specific to gdb.</FONT> 
  <P><FONT size=-1>I captured the "add-symbol-file" command string and 
  saved</FONT> <BR><FONT size=-1>it in an input file.  Then I brought crash 
  up and executed</FONT> <BR><FONT size=-1>the input file, which simply passes 
  the suspect command line</FONT> <BR><FONT size=-1>directly to gdb, and it 
  crashes on its own:</FONT> 
  <P><FONT size=-1>crash> < /tmp/junk</FONT> <BR><FONT size=-1>crash> 
  add-symbol-file /lib/modules/2.6.18-1.2767.el5/kernel/net/ipv6/ipv6.ko 
  0xa00000021ed605b0 -s .exit.text 0xa00000021edb49a0 -s .rodata 
  0xa00000021edbd4c8 -s __ksymtab_strings 0xa00000021edbdc08 -s __versions 
  0xa00000021edbdf98 -s .data 0xa00000021edd6a20 -s .data.rel.ro 
  0xa00000021edd6c00 -s __ksymtab_gpl 0xa00000021edd6df8 -s __kcrctab_gpl 
  0xa00000021edd6ed8 -s .data.rel 0xa00000021edd6f48 -s .data.rel.local 
  0xa00000021ee39940 -s .data.rel.ro.local 0xa00000021ee3a9c0 -s 
  .data.read_mostly 0xa00000021ee3a9e0 -s __ksymtab 0xa00000021ee3aa60 -s 
  __kcrctab 0xa00000021ee3ac30 -s .gnu.linkonce.this_module 0xa00000021ee3ad80 
  -s .sdata 0xa00000021ee5d730 -s .bss 0xa00000021ee5b000 -s .sbss 
  0xa00000021ee5e8b8</FONT> <BR><FONT size=-1>add_symbol_file_command: calling 
  xrealloc w/argcnt: 49 arg: [0xa00000021ee5d730]...</FONT> <BR><FONT 
  size=-1>*** glibc detected *** ./crash: realloc(): invalid next size: 
  0x6000000001921fe0 ***</FONT> <BR><FONT size=-1>======= Backtrace: 
  =========</FONT> <BR><FONT size=-1>/lib/libc.so.6.1[0x20000000002f2a70]</FONT> 
  <BR><FONT 
  size=-1>/lib/libc.so.6.1(realloc-0x1cb0b0)[0x20000000002f5e20]</FONT> 
  <BR><FONT 
  size=-1>./crash(xmrealloc+0x1fffffffffee6e20)[0x40000000003a7d00]</FONT> 
  <BR><FONT size=-1>./crash[0x40000000002ff500]</FONT> <BR><FONT 
  size=-1>./crash[0x40000000004221e0]</FONT> <BR><FONT 
  size=-1>./crash(cmd_func+0x1ffffffffff61610)[0x4000000000422500]</FONT> 
  <BR><FONT 
  size=-1>./crash(execute_command+0x1fffffffffee25f0)[0x40000000003a34f0]</FONT> 
  <BR><FONT 
  size=-1>./crash(gdb_command_funnel+0x1fffffffffe2feb0)[0x40000000002f0dc0]</FONT> 
  <BR><FONT 
  size=-1>./crash(gdb_interface+0x1fffffffffcd7590)[0x40000000001984b0]</FONT> 
  <BR><FONT 
  size=-1>./crash(gdb_pass_through+0x1fffffffffcd6cb0)[0x4000000000197be0]</FONT> 
  <BR><FONT 
  size=-1>./crash(cmd_gdb+0x2000000000151068)[0x400000000019bbc0]</FONT> 
  <BR><FONT 
  size=-1>./crash(exec_command+0x1fffffffffb99db0)[0x400000000005acf0]</FONT> 
  <BR><FONT 
  size=-1>./crash(exec_input_file+0x1fffffffffd86d40)[0x4000000000247c90]</FONT> 
  <BR><FONT size=-1>./crash[0x400000000005b420]</FONT> <BR><FONT 
  size=-1>./crash(exec_command+0x1fffffffffb99e50)[0x400000000005ad90]</FONT> 
  <BR><FONT 
  size=-1>./crash(main_loop+0x1fffffffffb9a2e0)[0x400000000005a8e0]</FONT> 
  <BR><FONT 
  size=-1>./crash(current_interp_command_loop+0x200000000001fd60)[0x40000000004e0cc0]</FONT> 
  <BR><FONT size=-1>./crash[0x40000000003199c0]</FONT> <BR><FONT 
  size=-1>./crash[0x400000000039f370]</FONT> <BR><FONT 
  size=-1>./crash[0x40000000003a4260]</FONT> <BR><FONT 
  size=-1>./crash(catch_errors+0x1fffffffffee33b0)[0x40000000003a4320]</FONT> 
  <BR><FONT size=-1>./crash[0x400000000031a930]</FONT> <BR><FONT 
  size=-1>./crash[0x400000000039f370]</FONT> <BR><FONT 
  size=-1>./crash[0x40000000003a4260]</FONT> <BR><FONT 
  size=-1>./crash(catch_errors+0x1fffffffffee33b0)[0x40000000003a4320]</FONT> 
  <BR><FONT 
  size=-1>./crash(gdb_main+0x1fffffffffe58960)[0x40000000003198e0]</FONT> 
  <BR><FONT 
  size=-1>./crash(gdb_main_entry+0x1fffffffffe589f0)[0x4000000000319980]</FONT> 
  <BR><FONT 
  size=-1>./crash(gdb_main_loop+0x1fffffffffcd54d0)[0x4000000000196470]</FONT> 
  <BR><FONT size=-1>./crash(main+0x1fffffffffb99820)[0x400000000005a330]</FONT> 
  <BR><FONT 
  size=-1>/lib/libc.so.6.1(__libc_start_main-0x2818f0)[0x200000000023f6c0]</FONT> 
  <BR><FONT 
  size=-1>./crash(_start+0x1fffffffffb95240)[0x4000000000056200]</FONT> 
  <BR><FONT size=-1>======= Memory map: ========</FONT> <BR><FONT 
  size=-1>00000000-00004000 r--p 00000000 00:00 0</FONT> <BR><FONT 
  size=-1>2000000000000000-2000000000038000 r-xp 00000000 fd:00 
  10256390           
  /lib/ld-2.5.so</FONT> <BR><FONT size=-1>2000000000044000-2000000000050000 rw-p 
  00034000 fd:00 
  10256390           
  /lib/ld-2.5.so</FONT> <BR><FONT size=-1>2000000000050000-2000000000114000 r-xp 
  00000000 fd:00 
  10256405           
  /lib/libm-2.5.so</FONT> <BR><FONT size=-1>2000000000114000-2000000000120000 
  ---p 000c4000 fd:00 
  10256405           
  /lib/libm-2.5.so</FONT> <BR><FONT size=-1>2000000000120000-2000000000124000 
  rw-p 000c0000 fd:00 
  10256405           
  /lib/libm-2.5.so</FONT> <BR><FONT size=-1>2000000000124000-20000000001b0000 
  r-xp 00000000 fd:00 
  10883077           
  /usr/lib/libncurses.so.5.5</FONT> <BR><FONT 
  size=-1>20000000001b0000-20000000001bc000 ---p 0008c000 fd:00 
  10883077           
  /usr/lib/libncurses.so.5.5</FONT> <BR><FONT 
  size=-1>20000000001bc000-20000000001cc000 rw-p 00088000 fd:00 
  10883077           
  /usr/lib/libncurses.so.5.5</FONT> <BR><FONT 
  size=-1>20000000001cc000-20000000001d0000 rw-p 20000000001cc000 00:00 0</FONT> 
  <BR><FONT size=-1>20000000001d0000-20000000001d8000 r-xp 00000000 fd:00 
  10256403           
  /lib/libdl-2.5.so</FONT> <BR><FONT size=-1>20000000001d8000-20000000001e4000 
  ---p 00008000 fd:00 
  10256403           
  /lib/libdl-2.5.so</FONT> <BR><FONT size=-1>20000000001e4000-20000000001e8000 
  rw-p 00004000 fd:00 
  10256403           
  /lib/libdl-2.5.so</FONT> <BR><FONT size=-1>20000000001e8000-200000000020c000 
  r-xp 00000000 fd:00 
  10882711           
  /usr/lib/libz.so.1.2.3</FONT> <BR><FONT 
  size=-1>200000000020c000-2000000000218000 ---p 00024000 fd:00 
  10882711           
  /usr/lib/libz.so.1.2.3</FONT> <BR><FONT 
  size=-1>2000000000218000-200000000021c000 rw-p 00020000 fd:00 
  10882711           
  /usr/lib/libz.so.1.2.3</FONT> <BR><FONT 
  size=-1>200000000021c000-2000000000480000 r-xp 00000000 fd:00 
  10256397           
  /lib/libc-2.5.so</FONT> <BR><FONT size=-1>2000000000480000-200000000048c000 
  ---p 00264000 fd:00 
  10256397           
  /lib/libc-2.5.so</FONT> <BR><FONT size=-1>200000000048c000-2000000000498000 
  rw-p 00260000 fd:00 
  10256397           
  /lib/libc-2.5.so</FONT> <BR><FONT size=-1>2000000000498000-20000000004d8000 
  rw-p 2000000000498000 00:00 0</FONT> <BR><FONT 
  size=-1>20000000004d8000-2000000003c1c000 r--p 00000000 fd:00 
  10882710           
  /usr/lib/locale/locale-archive</FONT> <BR><FONT 
  size=-1>2000000003c1c000-2000000003c2c000 rw-p 2000000003c1c000 00:00 0</FONT> 
  <BR><FONT size=-1>2000000003c38000-2000000003c44000 r-xp 00000000 fd:00 
  10256427           
  /lib/libthread_db-1.0.so</FONT> <BR><FONT 
  size=-1>2000000003c44000-2000000003c50000 ---p 0000c000 fd:00 
  10256427           
  /lib/libthread_db-1.0.so</FONT> <BR><FONT 
  size=-1>2000000003c50000-2000000003c54000 rw-p 00008000 fd:00 
  10256427           
  /lib/libthread_db-1.0.so</FONT> <BR><FONT 
  size=-1>2000000003c54000-2000000003c58000 rw-p 2000000003c54000 00:00 0</FONT> 
  <BR><FONT size=-1>2000000003c6c000-2000000003da0000 rw-p 2000000003c6c000 
  00:00 0</FONT> <BR><FONT size=-1>2000000003da0000-2000000003dbc000 r-xp 
  00000000 fd:00 
  10884674           
  /usr/lib/libunwind.so.7.0.0</FONT> <BR><FONT 
  size=-1>2000000003dbc000-2000000003dc8000 ---p 0001c000 fd:00 
  10884674           
  /usr/lib/libunwind.so.7.0.0</FONT> <BR><FONT 
  size=-1>2000000003dc8000-2000000003dcc000 rw-p 00018000 fd:00 
  10884674           
  /usr/lib/libunwind.so.7.0.0</FONT> <BR><FONT 
  size=-1>2000000003dcc000-2000000003df0000 rw-p 2000000003dcc000 00:00 0</FONT> 
  <BR><FONT size=-1>2000000003e00000-2000000003e08000 r--s 00000000 fd:00 
  10977539           
  /usr/lib/gconv/gconv-modules.cache</FONT> <BR><FONT 
  size=-1>2000000003e08000-2000000003e18000 rw-p 2000000003e08000 00:00 0</FONT> 
  <BR><FONT size=-1>2000000003e1c000-2000000006edc000 rw-p 2000000003e1c000 
  00:00 0</FONT> <BR><FONT size=-1>2000000006ee8000-2000000006f04000 r-xp 
  00000000 fd:00 
  10256386           
  /lib/libgcc_s-4.1.1-20061130.so.1</FONT> <BR><FONT 
  size=-1>2000000006f04000-2000000006f10000 ---p 0001c000 fd:00 
  10256386           
  /lib/libgcc_s-4.1.1-20061130.so.1</FONT> <BR><FONT 
  size=-1>2000000006f10000-2000000006f14000 rw-p 00018000 fd:00 
  10256386           
  /lib/libgcc_s-4.1.1-20061130.so.1</FONT> <BR><FONT 
  size=-1>2000000006f14000-2000000006f24000 rw-p 2000000006f14000 00:00 0</FONT> 
  <BR><FONT size=-1>2000000008000000-2000000008024000 rw-p 2000000008000000 
  00:00 0</FONT> <BR><FONT size=-1>2000000008024000-200000000c000000 ---p 
  2000000008024000 00:00 0</FONT> <BR><FONT 
  size=-1>4000000000000000-40000000007e0000 r-xp 00000000 fd:00 
  9633909            
  /var/tmp/crash-4.0-3.16/crash</FONT> <BR><FONT 
  size=-1>600000000000c000-600000000006c000 rw-p 007dc000 fd:00 
  9633909            
  /var/tmp/crash-4.0-3.16/crash</FONT> <BR><FONT 
  size=-1>600000000006c000-6000000001fc0000 rw-p 600000000006c000 00:00 
  0          [heap]</FONT> 
  <BR><FONT size=-1>60000fff7fffc000-60000fff80004000 rw-p 60000fff7fffc000 
  00:00 0</FONT> <BR><FONT size=-1>60000ffffe068000-60000ffffe0bc000 rw-p 
  60000ffffe068000 00:00 0          
  [stack]</FONT> <BR><FONT size=-1>a000000000000000-a000000000020000 ---p 
  00000000 00:00 
  0                  
  [vdso]</FONT> <BR><FONT size=-1>Aborted</FONT> <BR>  <BR>  
  <BR>  <PRE WRAP><HR width="90%" SIZE=4>--
Crash-utility mailing list
Crash-utility@redhat.com
<A href="https://www.redhat.com/mailman/listinfo/crash-utility">https://www.redhat.com/mailman/listinfo/crash-utility</A></PRE></BLOCKQUOTE></BODY></HTML>