[Crash-utility] Adding a new command rbtree

Dave Anderson anderson at redhat.com
Mon May 21 20:21:24 UTC 2012



----- Original Message -----
> The patch has been modified.

Whereas the radix_tree problem I showed in my last email seems to 
be RHEL5-related, I cannot dump a red-black tree from an rb_root on
RHEL5, RHEL6 or Fedora.

For example, taking an mm_struct, it has an "mm_rb" rb_root:
  
  crash> mm_struct.mm_rb
  struct mm_struct {
      [0x8] struct rb_root mm_rb;
  }

Therefore I should be able to dump it with:

  crash> tree -t rb -o mm_struct.mm_rb <mm-struct-address>

I get the mm_struct address like so:

  crash> vm
  PID: 20739  TASK: ffff8100190330c0  CPU: 3   COMMAND: "crash"
         MM               PGD          RSS    TOTAL_VM
  ffff81003ceaeb00  ffff810023f9f000  111452k  190736k 
  ...
    
But it always fails like this on RHEL5:

  crash> tree -t rb -o mm_struct.mm_rb ffff81003ceaeb00
  ffff81003ceaeb08
  ffffffff8006fe65
  6508ec8348f38948
  tree: invalid kernel virtual address: 6508ec8348f38958  type: "rb_node rb_left"
  crash> 

The same thing happens on RHEL6:
  
  crash> vm 
  PID: 14353  TASK: ffff88003a93c080  CPU: 3   COMMAND: "crash"
         MM               PGD          RSS    TOTAL_VM
  ffff880037b65840  ffff88001c31b000  153552k  288936k 
  ...
  
  crash> tree -t rb -o mm_struct.mm_rb ffff880037b65840
  ffff880037b65848
  ffffffff81010800
  f075894ce86d894c
  tree: invalid kernel virtual address: f075894ce86d895c  type: "rb_node rb_left"
  crash>
      
And on a Fedora 3.3.1-3.fc16 kernel:
  
  crash> vm
  PID: 1175   TASK: ffff88003acb9730  CPU: 2   COMMAND: "crash"
         MM               PGD          RSS    TOTAL_VM
  ffff880038495c00  ffff88003ac5a000  181580k  335436k 
  ...
  
  crash> tree -t rb -o mm_struct.mm_rb ffff880038495c00
  ffff880038495c08
  ffffffff81018ce0
  f075894ce86d894c
  tree: invalid kernel virtual address: f075894ce86d895c  type: "rb_node rb_left"
  crash>
        
What's going on there?

Dave
        




More information about the Crash-utility mailing list