問候,爲了節省您的時間這個bug在v0.4.5中修復了 今天安裝node.js時遇到了一個相當奇怪的問題,通過郵件歸檔篩選,但不能釘住它!所以我張貼的問題的NodeJS herenodejs-0.4.2啓動時的段錯誤(固定在v 0.4.5)
剛擡起頭,我改變snapshot='snapshot=on'
從WScript的在 節點到snapshot=''
。 我這樣做是因爲之前做這個我做過程中遇到以下 錯誤:
scons: *** [obj/release/snapshot.cc] Error -11
我們的步驟我跟着。
*以root身份登錄
---配置
adil-X:/usr/local/nodejs/node-v0.4.2 # ./configure --prefix=/usr/local/nodejs
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for program gcc or cc : /usr/bin/gcc
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for gcc : ok
Checking for library dl : yes
Checking for openssl : yes
Checking for library util : yes
Checking for library rt : yes
--- libeio ---
Checking for library pthread : yes
Checking for function pthread_create : yes
Checking for function pthread_atfork : yes
Checking for futimes(2) : yes
Checking for readahead(2) : yes
Checking for fdatasync(2) : yes
Checking for pread(2) and pwrite(2) : yes
Checking for sendfile(2) : yes
Checking for sync_file_range(2) : yes
--- libev ---
Checking for header sys/inotify.h : yes
Checking for function inotify_init : yes
Checking for header sys/epoll.h : yes
Checking for function epoll_ctl : yes
Checking for header port.h : not found
Checking for header poll.h : yes
Checking for function poll : yes
Checking for header sys/event.h : not found
Checking for header sys/queue.h : yes
Checking for function kqueue : not found
Checking for header sys/select.h : yes
Checking for function select : yes
Checking for header sys/eventfd.h : yes
Checking for function eventfd : yes
Checking for SYS_clock_gettime : yes
Checking for library rt : yes
Checking for function clock_gettime : yes
Checking for function nanosleep : yes
Checking for function ceil : yes
Checking for fdatasync(2) with c++ : yes
'configure' finished successfully (2.239s)
的開始----配置結束
----化妝開始(編譯沒有問題! )
[使輸出爲簡潔起見省略]
Waf: Leaving directory /usr/local/nodejs/node-v0.4.2/build'
'build' finished successfully (21.853s)
-----結束使
-----化妝測試的開始
/usr/bin/python "/usr/local/nodejs/node-v0.4.2/tools/scons/scons.py" -
j 2 -C "/usr/local/nodejs/node-v0.4.2/build/default/" -Y "/usr/local/
nodejs/node-v0.4.2/deps/v8" visibility=default mode=release arch=ia32
toolchain=gcc library=static
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: `library' is up to date.
scons: done building targets.
DEST_OS: linux
DEST_CPU: ia32
Parallel Jobs: 2
Product type: program
python tools/test.py --mode=release simple message
[00:00|% 0|+ 0|- 0]: release test-pipe-
head === release test-
pipe-head ===
Path: simple/test-pipe-head
Command: build/default/node /usr/local/nodejs/node-v0.4.2/test/simple/
test-pipe-head.js
--- CRASHED ---
... 所有後續測試的失敗,類似的時尚。
-----化妝測試結束
-----化妝開始安裝(我沒有對前幾tries.it運行make測試只是到了後來,我用它)
adil-X:/usr/local/nodejs/node-v0.4.2 # make install
Waf: Entering directory `/usr/local/nodejs/node-v0.4.2/build'
DEST_OS: linux
DEST_CPU: ia32
Parallel Jobs: 2
Product type: program
* installing build/default/config.h as /usr/local/nodejs/include/node/
config.h
* installing build/default/tools/nodejs.pc as /usr/local/nodejs/lib/
pkgconfig/nodejs.pc
* installing build/default/node as /usr/local/nodejs/bin/node
* installing build/default/src/node_config.h as /usr/local/nodejs/
include/node/node_config.h
Waf: Leaving directory `/usr/local/nodejs/node-v0.4.2/build'
'install' finished successfully (0.122s)
之作-----結束安裝
我更新了PATH
變量包括倉的NodeJS。
現在用的NodeJS以下錯誤崩潰啓動時
adil-X:/usr/local/nodejs/node-v0.4.2 # node example.js
node.js:0
Segmentation fault
,我仍然可以看到node.js的版本
adil-X:~ # node -v
v0.4.2
OS /拱門信息:
adil-X:~ # cat /etc/*release
LSB_VERSION="core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-
ia32:core-3.2-ia32:core-4.0-ia32"
openSUSE 11.3 (i586)
adil-X:~ # cat /proc/cpuinfo
vendor_id :GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Core(TM)2 Duo CPU T6500 @ 2.10GHz
stepping : 10
cpu MHz : 1200.000
cache size : 2048 KB
隨着從源代碼構建時沒有錯誤,我無法 figu解決問題。 我錯過了明顯的東西?謝謝。
對於所有的好建議+1。現在gdb顯示'No Stack'。所有我在dmesg的輸出得到的是'[3736.369391] npviewer.bin [5879]:段錯誤在0 IP(空)SP bf81d3dc錯誤14 npviewer.bin [8048000 + 2a000]' – 2011-03-06 16:24:10
strace的顯示'6346 <...了nanosleep (0,900000},<未完成...> 6345 write(2,「node。js:0 \ n「,10)= 10 6345 --- SIGSEGV(分段錯誤)@ 0(0)--- 6346 +++死於SIGSEGV +++'......哇我一直在想我想在源文件中找到它:) – 2011-03-06 16:31:26
@Adil Mehmood,heh,這是你的'dmesg'中的Adobe Flash崩潰。愚蠢的錯誤堆...... :)我很驚訝' gdb'' No Stack',我從來沒有見過這個,那'ltrace'輸出怎麼樣? – sarnold 2011-03-07 01:42:48