2016-03-13 106 views
0

我正在爲特定機器上的即將到來的OpenSSL 1.1.0進行掛起自檢故障診斷。我試過兩次調試這個問題,它導致兩人反應遲鈍GDB的和兩個掛起的進程:洪進程和Linux系統調用248?

$ ps -A | grep afalgtest 
1030 pts/0 00:00:00 afalgtest 
1196 pts/0 00:00:00 afalgtest 

我能殺了GDB,但我沒能殺死掛起的進程。

/proc/<pid>/syscall,無論是在系統調用248:

via:test$ sudo cat /proc/1030/syscall 
248 0xb7fd6000 0x1 0xbfff98d4 0xb7fb9270 0xbfff98e0 0xb7ec45f7 0xbfff986c 0xb7fdbbe8 
via:test$ sudo cat /proc/1196/syscall 
248 0xb7fd6000 0x1 0xbfff98d4 0xb7fb9270 0xbfff98e0 0xb7ec45f7 0xbfff986c 0xb7fdbbe8 

我正在一臺機器與威盛C7-d處理器,它需要Lubuntu 15,因爲它的幾個發行版支持的一個VIA的PM400圖形芯片組。 Lubuntu 15採用4.2內核:

$ uname -a 
Linux via 4.2.0-30-generiC#36-Ubuntu SMP Fri Feb 26 00:57:19 UTC 2016 i686 i686 i686 GNU/Linux 

下一個步驟是:

$ cat /usr/include/asm-generic/unistd.h | grep 248 
$ 

它返回什麼。接下來,cat'ing unistd.h

... 
/* 
* Architectures may provide up to 16 syscalls of their own 
* starting with this value. 
*/ 
#define __NR_arch_specific_syscall 244 

#define __NR_wait4 260 
__SC_COMP(__NR_wait4, sys_wait4, compat_sys_wait4) 
#define __NR_prlimit64 261 
__SYSCALL(__NR_prlimit64, sys_prlimit64) 
#define __NR_fanotify_init 262 
__SYSCALL(__NR_fanotify_init, sys_fanotify_init) 
#define __NR_fanotify_mark 263 
... 

萬一2480x248

$ cat /usr/include/asm-generic/unistd.h | grep 584 
$ 

所以我的問題是,我怎麼能確定哪些系統調用過程中被掛在?


看來我有最新的內核頭文件:

$ sudo apt-get install linux-headers-$(uname -r) 
Reading package lists... Done 
Building dependency tree  
Reading state information... Done 
linux-headers-4.2.0-30-generic is already the newest version. 
linux-headers-4.2.0-30-generic set to manually installed. 
+0

嘗試'xmllint --xpath'/ syscalls_info/syscall [@ number = 248]'/ usr/share/gdb/syscalls/i386-linux.xml' –

回答

1

的系統調用號是小數。您正在尋找的Syscall表可以在arch/x86/entry/syscalls/syscall_32.tbl中找到。無論如何,你正在檢查錯誤的文件。你想看到的是/ stack文件中提供的整個backtrace。內核很好,不僅可以展開堆棧,還可以解析所有符號。或者,您可以使用調試器(名爲crash)來檢查實時內核。