[Crash-utility] [PATCH] add a new command: ipcs

qiaonuohan qiaonuohan at cn.fujitsu.com
Wed Apr 11 09:06:25 UTC 2012


Hello Dave,

I cannot get all kernels at hand. So I have to ask you about the code. 
Please show me.

>
> (a) On these kernel versions:
>
>      2.6.9-89.ELxenU
>      2.6.15-1.2054_FC5
>      2.6.16.33-xen
>      2.6.18-1.2714.el5xen
>      2.6.18-36.el5xen
>      2.6.18-58.el5xen
>      2.6.18-152.el5xen
>      2.6.31 uniprocessor kernel
>
>      the command fails immediatedly with this error:
>
>        ipcs: cannot resolve "hugetlbfs_file_operations"
>
>
> (b) On *all* RHEL5 2.6.18-era kernels, the message queue display
>      always fails like this:
>
>      ------ Message Queues --------
>      KEY        MSQID      UID        PERMS      USED-BYTES   MESSAGES
>      ipcs: invalid structure member offset: kern_ipc_perm_id
>            FILE: ipcs.c  LINE: 899  FUNCTION: get_msg_info()

I want to see the struct msg_queue and struct struct kern_ipc_perm.

>
>
> (c) On this 2.6.36-0.16.rc3.git0.fc15 Fedora kernel, it shows:
>
>      ------ Shared Memory Segments ------
>      KEY        SHMID      UID        PERMS      BYTES      NATTCH     STATUS
>      ipcs: invalid kernel virtual address: 10  type: "nsproxy.ipc_ns"

what is struct nsproxy? Or is there any symbol referring to ipc_ns?

>
>
> (d) On *all* RHEL4 2.6.9-era and SLES9 2.6.5-era kernels, the command fail like this:
>
>      ------ Shared Memory Segments ------
>      KEY        SHMID      UID        PERMS      BYTES      NATTCH     STATUS
>      ipcs: invalid structure member offset: ipc_id_ary_p
>            FILE: ipcs.c  LINE: 540  FUNCTION: ipc_search_array()
>
>      or this:
>
>      ------ Shared Memory Segments ------
>      KEY        SHMID      UID        PERMS      BYTES      NATTCH     STATUS
>      (none allocated)------ Semaphore Arrays --------
>      KEY        SEMID      UID        PERMS      NSEMS
>      ipcs: invalid structure member offset: ipc_id_ary_p
>            FILE: ipcs.c  LINE: 540  FUNCTION: ipc_search_array()
>

what is struct ipc_id? And what is entries in struct ipc_id or something 
similar to it?

>
> It would be preferable if you could support all 2.6-era kernels, but if not,
> the command should handle them more gracefully by pre-verifying the offsets
> before using them, and if they are invalid, then use the option_not_supported()
> routine.
>

-- 
--
Regards
Qiao Nuohan




More information about the Crash-utility mailing list