exe build with cygwin gcc hanging when running in cygwin terminal - cygwin

I build an exe named DatalogTest.exe with cygwin gcc.
When I try to run this (./DatalogText.exe), I just hangs. I can not kill it with Ctrl-C, suspend it with Ctrl-Z or kill it by doing a kill -9 in another shell.
strace gives this output, and then it hangs:
$ strace DatalogTest.exe
1 1 [main] DatalogTest (94016) **********************************************
71 72 [main] DatalogTest (94016) Program name: C:\Project\hpj_main_LFC\ControlMicro\ServiceLayer\Datalog\Test\DatalogTest.exe (windows pid 94016)
51 123 [main] DatalogTest (94016) OS version: Windows NT-6.1
24 147 [main] DatalogTest (94016) **********************************************
427 574 [main] DatalogTest (94016) sigprocmask: 0 = sigprocmask (0, 0x6123E468, 0x610FCAB0)
309 883 [main] DatalogTest 94016 open_shared: name shared.5, n 5, shared 0x60FF0000 (wanted 0x60FF0000), h 0x8C, *m 6
66 949 [main] DatalogTest 94016 heap_init: heap base 0x80000000, heap top 0x80000000, heap size 0x18000000 (402653184)
38 987 [main] DatalogTest 94016 open_shared: name S-1-5-21-1408293143-2956554002-1949004742-1377.1, n 1, shared 0x60FE0000 (wanted 0x60FE0000), h 0x88, *m 6
35 1022 [main] DatalogTest 94016 user_info::create: opening user shared for 'S-1-5-21-1408293143-2956554002-1949004742-1377' at 0x60FE0000
35 1057 [main] DatalogTest 94016 user_info::create: user shared version 6467403B
54 1111 [main] DatalogTest 94016 fhandler_pipe::create: name \\.\pipe\cygwin-c5e39b7a9d22bafb-94016-sigwait, size 164, mode PIPE_TYPE_MESSAGE
49 1160 [main] DatalogTest 94016 fhandler_pipe::create: pipe read handle 0xA0
18 1178 [main] DatalogTest 94016 fhandler_pipe::create: CreateFile: name \\.\pipe\cygwin-c5e39b7a9d22bafb-94016-sigwait
33 1211 [main] DatalogTest 94016 fhandler_pipe::create: pipe write handle 0xA4
43 1254 [main] DatalogTest 94016 dll_crt0_0: finished dll_crt0_0 initialization
387 1641 [main] DatalogTest 94016 mount_info::conv_to_posix_path: conv_to_posix_path (C:\Project\hpj_main_LFC\ControlMicro\ServiceLayer\Datalog\Test, no-keep-rel, no-add-slash)
31 1672 [main] DatalogTest 94016 normalize_win32_path: C:\Project\hpj_main_LFC\ControlMicro\ServiceLayer\Datalog\Test = normalize_win32_path (C:\Project\hpj_main_LFC\ControlMicro\ServiceLayer\Datalog\Test)
20 1692 [main] DatalogTest 94016 mount_info::conv_to_posix_path: /cygdrive/c/Project/hpj_main_LFC/ControlMicro/ServiceLayer/Datalog/Test = conv_to_posix_path (C:\Project\hpj_main_LFC\ControlMicro\ServiceLayer\Datalog\Test)
118 1810 [sig] DatalogTest 94016 wait_sig: entering ReadFile loop, my_readsig 0xA0, my_sendsig 0xA4
The build works on another machinne.
Here the strace output:
3531 3531 [main] DatalogTest (2868) **********************************************
100 3631 [main] DatalogTest (2868) Program name: C:\Jenkins-workspace\Lodam\Embedded\LFC\ControlMicro\ServiceLayer\Datalog\Test\DatalogTest.exe (windows pid 2868)
46 3677 [main] DatalogTest (2868) OS version: Windows NT-6.1
38 3715 [main] DatalogTest (2868) **********************************************
383 4098 [main] DatalogTest (2868) sigprocmask: 0 = sigprocmask (0, 0x6123D468, 0x610FBA10)
303 4401 [main] DatalogTest 2868 open_shared: name shared.5, n 5, shared 0x60FF0000 (wanted 0x60FF0000), h 0x80, *m 6
64 4465 [main] DatalogTest 2868 heap_init: heap base 0x80000000, heap top 0x80000000, heap size 0x18000000 (402653184)
66 4531 [main] DatalogTest 2868 open_shared: name S-1-5-21-1408293143-2956554002-1949004742-2274.1, n 1, shared 0x60FE0000 (wanted 0x60FE0000), h 0x78, *m 6
46 4577 [main] DatalogTest 2868 user_info::create: opening user shared for 'S-1-5-21-1408293143-2956554002-1949004742-2274' at 0x60FE0000
44 4621 [main] DatalogTest 2868 user_info::create: user shared version 6467403B
71 4692 [main] DatalogTest 2868 fhandler_pipe::create: name \\.\pipe\cygwin-c5e39b7a9d22bafb-2868-sigwait, size 164, mode PIPE_TYPE_MESSAGE
283 4975 [main] DatalogTest 2868 fhandler_pipe::create: pipe read handle 0x94
67 5042 [main] DatalogTest 2868 fhandler_pipe::create: CreateFile: name \\.\pipe\cygwin-c5e39b7a9d22bafb-2868-sigwait
184 5226 [main] DatalogTest 2868 fhandler_pipe::create: pipe write handle 0x98
62 5288 [main] DatalogTest 2868 dll_crt0_0: finished dll_crt0_0 initialization
654 5942 [sig] DatalogTest 2868 wait_sig: entering ReadFile loop, my_readsig 0x94, my_sendsig 0x98
180 6122 [main] DatalogTest 2868 mount_info::conv_to_posix_path: conv_to_posix_path (C:\Jenkins-workspace\Lodam\Embedded\LFC\ControlMicro\ServiceLayer\Datalog\Test, no-keep-rel, no-add-slash)
83 6205 [main] DatalogTest 2868 normalize_win32_path: C:\Jenkins-workspace\Lodam\Embedded\LFC\ControlMicro\ServiceLayer\Datalog\Test = normalize_win32_path (C:\Jenkins-workspace\Lodam\Embedded\LFC\ControlMicro\ServiceLayer\Datalog\Test)
52 6257 [main] DatalogTest 2868 mount_info::conv_to_posix_path: /cygdrive/c/Jenkins-workspace/Lodam/Embedded/LFC/ControlMicro/ServiceLayer/Datalog/Test = conv_to_posix_path (C:\Jenkins-workspace\Lodam\Embedded\LFC\ControlMicro\ServiceLayer\Datalog\Test)
83 6340 [main] DatalogTest 2868 sigprocmask: 0 = sigprocmask (0, 0x800180A8, 0x610FBA10)
202 6542 [main] DatalogTest 2868 _cygwin_istext_for_stdio: fd 0: not open
46 6588 [main] DatalogTest 2868 _cygwin_istext_for_stdio: fd 1: not open
40 6628 [main] DatalogTest 2868 _cygwin_istext_for_stdio: fd 2: not open
136 6764 [main] DatalogTest (2868) open_shared: name cygpid.2868, n 2868, shared 0x60FD0000 (wanted 0x60FD0000), h 0xC0, *m 2
57 6821 [main] DatalogTest 2868 pinfo::thisproc: myself dwProcessId 2868
42 6863 [main] DatalogTest 2868 time: 1370262553 = time(0)
2768 9631 [main] DatalogTest 2868 environ_init: GetEnvironmentStrings returned 0xCE4D48
87 9718 [main] DatalogTest 2868 environ_init: 0x80028290: !::=::\
77 9795 [main] DatalogTest 2868 environ_init: 0x800282A0: ALLUSERSPROFILE=C:\ProgramData
etc.
On both machines:
$ gcc --version
gcc (GCC) 4.5.3
On machine with hang:
uname -r
1.7.18(0.263/5/3)
Windows version:
Windows 7 Professional, Service Pack 1
On other machine:
$ uname -r
1.7.18(0.263/5/3)
Windows Server 2008 R2 Enterprise, Service Pack 1

Related

ccache failed to create temp files in /var/cache/ccache/ , permission denied. On Gentoo Linux

System Info:
OS : Gentoo Linux x86_64
Kernel : Linux 5.4.38
CPU : Intel core i7-7820HQ
RAM : 16GiB
CC : GCC 9.3.0
This problem always happens when I install the emerge software.
My ccache directory is mounted on /dev/sda2, which is a primary partition in btrfs.
The corresponding directory permissions have been set.
/etc/fstab I posted below.
This is one of error messages:
==> COMPILING "OBJ/amd64-linux-cc/pic/fcons.o"
+ x86_64-pc-linux-gnu-gcc -fpic -march=native -O2 -pipe -finput-charset=ISO-8859-1 -fexec-charset=UTF-8 -DSCHILY_BUILD -IOBJ/amd64-linux-cc/pic -I../incs/amd64-linux-cc -I../include -Istdio -DUSE_SCANSTACK -DPORT_ONLY -D_GNU_SOURCE -c -o OBJ/amd64-linux-cc/pic/fcons.o stdio/fcons.c
ccache: error: Failed to create temporary file for /var/cache/ccache/7/d/f/cc59f6a892af180b36bf0d7b73f8c-148524.o.tmp.stdout: Permission denied
make[2]: *** [../RULES/r-gmake.obj:51: OBJ/amd64-linux-cc/pic/fcons.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/app-cdr/cdrtools-3.02_alpha09-r2/work/cdrtools-3.02/libschily'
make[1]: *** [../RULES/rules.mks:23: all] Error 2
make[1]: Leaving directory '/var/tmp/portage/app-cdr/cdrtools-3.02_alpha09-r2/work/cdrtools-3.02/libschily'
make: *** [RULES/rules1.dir:25: all] Error 2
* ERROR: app-cdr/cdrtools-3.02_alpha09-r2::gentoo failed (compile phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=app-cdr/cdrtools-3.02_alpha09-r2::gentoo'`,
* the complete build log and the output of `emerge -pqv '=app-cdr/cdrtools-3.02_alpha09-r2::gentoo'`.
* The complete build log is located at '/var/tmp/portage/app-cdr/cdrtools-3.02_alpha09-r2/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/app-cdr/cdrtools-3.02_alpha09-r2/temp/environment'.
* Working directory: '/var/tmp/portage/app-cdr/cdrtools-3.02_alpha09-r2/work/cdrtools-3.02'
* S: '/var/tmp/portage/app-cdr/cdrtools-3.02_alpha09-r2/work/cdrtools-3.02'
Failed to emerge app-cdr/cdrtools-3.02_alpha09-r2, Log file:
'/var/tmp/portage/app-cdr/cdrtools-3.02_alpha09-r2/temp/build.log'
ccache config & status:
(default) base_dir =
(environment) cache_dir = /var/cache/ccache
(/var/cache/ccache/ccache.conf) cache_dir_levels = 3
(/var/cache/ccache/ccache.conf) compiler = gcc
(/var/cache/ccache/ccache.conf) compiler_check = %compiler% -v
(/var/cache/ccache/ccache.conf) compression = true
(/var/cache/ccache/ccache.conf) compression_level = 1
(default) cpp_extension =
(default) debug = false
(default) depend_mode = false
(default) direct_mode = true
(default) disable = false
(default) extra_files_to_hash =
(default) hard_link = false
(default) hash_dir = true
(default) ignore_headers_in_manifest =
(default) keep_comments_cpp = false
(default) limit_multiple = 0.8
(default) log_file =
(default) max_files = 0
(/var/cache/ccache/ccache.conf) max_size = 100.0G
(/var/cache/ccache/ccache.conf) path = /usr/bin:/usr/local/bin
(default) pch_external_checksum = false
(default) prefix_command =
(default) prefix_command_cpp =
(default) read_only = false
(default) read_only_direct = false
(default) recache = false
(default) run_second_cpp = true
(default) sloppiness =
(default) stats = true
(default) temporary_dir =
(default) umask =
cache directory /var/cache/ccache
primary config /var/cache/ccache/ccache.conf
secondary config (readonly) /etc/ccache.conf
stats updated Sat May 23 16:40:07 2020
cache hit (direct) 4029
cache hit (preprocessed) 860
cache miss 19704
cache hit rate 19.88 %
called for link 3119
called for preprocessing 2708
multiple source files 2
compiler produced stdout 4
compiler produced empty output 30
compile failed 1624
preprocessor error 247
couldn't find the compiler 2
bad compiler arguments 464
autoconf compile/link 5507
unsupported compiler option 835
unsupported code directive 4
could not write to output file 90
no input file 1576
cleanups performed 0
files in cache 52712
cache size 1.2 GB
max cache size 100.0 GB
some info of /var/cache/ccache:
drwxrwsr-x 1 root portage 66 May 23 16:40 0
drwxrwsr-x 1 root portage 66 May 23 16:38 1
drwxrwsr-x 1 root portage 66 May 23 16:39 2
drwxrwsr-x 1 root portage 66 May 23 16:38 3
drwxrwsr-x 1 root portage 66 May 23 16:38 4
drwxrwsr-x 1 root portage 66 May 23 16:38 5
drwxrwsr-x 1 root portage 66 May 23 16:38 6
drwxrwsr-x 1 root portage 66 May 23 16:38 7
drwxrwsr-x 1 root portage 66 May 23 16:38 8
drwxrwsr-x 1 root portage 66 May 23 16:38 9
drwxrwsr-x 1 root portage 66 May 23 16:38 a
drwxrwsr-x 1 root portage 66 May 23 16:38 b
drwxrwsr-x 1 root portage 66 May 23 16:38 c
-rwxrwxr-x 1 root portage 209 May 23 11:17 ccache.conf
drwxrwsr-x 1 root portage 66 May 23 16:38 d
drwxrwsr-x 1 root portage 66 May 23 16:40 e
drwxrwsr-x 1 root portage 66 May 23 16:38 f
drwxrwsr-x 1 portage portage 0 May 23 16:38 tmp
fstab :
UUID=EA7D-E1DB /boot vfat defaults,noatime,discard 0 2
UUID=4f174448-dcef-4e12-ae0a-f5c79cfe3da6 none swap sw,discard 0 0
UUID=1bb4ace3-1fba-4068-bea7-e7d307d56fa3 / btrfs noatime,discard 0 1
UUID=81210f26-8349-4aed-9ad4-55626fc10be9 /home btrfs noatime,discard 0 1
UUID=c8f65f22-8271-4457-a891-4e877fb2b98c /var/cache/ccache btrfs noatime,discard 0 1
make.conf :
COMMON_FLAGS="-march=native -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
PORTDIR="/var/db/repos/gentoo"
DISTDIR="/var/cache/distfiles"
PKGDIR="/var/cache/binpkgs"
LC_MESSAGES=C
MAKEOPTS="-j2 -l2"
GENTOO_MIRRORS="https://mirrors.tuna.tsinghua.edu.cn/gentoo"
INPUT_DEVICES="libinput evdev vmmouse touchpad joystick synaptics"
VIDEO_CARDS="nvidia"
USE_PYTHON="3.7"
PYTHON_TARGETS="python3_7"
USE="static-libs systemd dbus policykit udisks acpi bluetooth X alsa qt5 gtk kde wayland pulseaudio mysql networkmanager thunderbolt zsh-completion apparmor -ssh"
CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"
PORTAGE_ELOG_CLASSES="log"
PORTAGE_ELOG_SYSTEM="save"
FEATURES="ccache nostrip"
CCACHE_DIR="/var/cache/ccache"

Child process is not generating core ONLY for SIGBUS error and became Zombie process

My child process is trying to access an PCI address space. It works fine most of the times.
But, sometimes the child process is going to zombie state. dmesg logs shows the following bus error.
[ 501.134156] Caused by (from MCSR=10008): Bus - Read Data Bus Error
[ 501.134169] Oops: Machine check, sig: 7 [#1]
There is no core file generated in this case.
[Linux:/]$ ps -axl | grep tes1
4 0 6805 32495 20 0 0 0 exit Zl ? 0:05 [test1] <defunct>
[Linux:/]$
Core is generated for SIGSEGV error by the child process. So I assume it has nothing to do with permission/ulimit settings.
Can someone help me to understand why core is not getting generated in this case?
Child Process:
--------------
[Linux:/]$ cat /proc/6805/status
Name: test1
State: Z (zombie)
Tgid: 6805
Pid: 6805
PPid: 32495
TracerPid: 0
Uid: 0 0 0 0
Gid: 0 0 0 0
FDSize: 0
Groups:
Threads: 2
SigQ: 18/13007
SigPnd: 0000000002000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000001006
SigCgt: 0000000182000200
CapInh: 0000000000000000
CapPrm: 0000001fffffffff
CapEff: 0000001fffffffff
CapBnd: 0000001fffffffff
Seccomp: 0
Cpus_allowed: 3
Cpus_allowed_list: 0-1
voluntary_ctxt_switches: 8998
nonvoluntary_ctxt_switches: 857
Stack:
-------
[Linux:/]$ cat /proc/6805/stack
[<00000000>] (nil)
[<c0008640>] __switch_to+0xc0/0x160
[<c004b4f4>] do_exit+0x5d4/0xa70
[<c000c694>] die+0x224/0x310
[<c000ce44>] machine_check_exception+0x124/0x1e0
[<c00123bc>] ret_from_mcheck_exc+0x0/0x14c
[Linux:/]$
Parent Process:
---------------
[Linux:/]$ cat /proc/32495/status
Name: test
State: S (sleeping)
Tgid: 32495
Pid: 32495
PPid: 21911
TracerPid: 0
Uid: 0 0 0 0
Gid: 0 0 0 0
FDSize: 256
Groups:
VmPeak: 4820 kB
VmSize: 4820 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 2548 kB
VmRSS: 2548 kB
VmData: 1284 kB
VmStk: 132 kB
VmExe: 900 kB
VmLib: 1976 kB
VmPTE: 24 kB
VmSwap: 0 kB
Threads: 1
SigQ: 19/13007
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000010000
SigIgn: 0000000000001006
SigCgt: 0000000043816ef9
CapInh: 0000000000000000
CapPrm: 0000001fffffffff
CapEff: 0000001fffffffff
CapBnd: 0000001fffffffff
Seccomp: 0
Cpus_allowed: 3
Cpus_allowed_list: 0-1
voluntary_ctxt_switches: 274
nonvoluntary_ctxt_switches: 145
[Linux:/]$
I understand that the PCI hardware which is mmaped, is not responding. So, it is appropriate that only the kernel to deal with the error.
The error won't be propagated to user level, because this is not software fault. So, We do not get a core dump (either kernel or user space), since it is not a software failure.
The Machine check exception handler in the kernel tells what the hardware failure was, and what address/data is relevant (depending on the cause) - Need to be investigated from the hardware perspective further.

Unable to install socket.io on my windows using npm

I have tried to install the socket.io on my windows 7.
I have given try to almost all installation ways. I want to make global installation using npm. I dont want to use approach of local include. I want that package installed globally.
I have attached the trail of npm-debug.log file content here. If you need complete file then tell me I can provide you.
Help will be appreciated.
203 silly lockFile 83592abd-ient-socket-io-client-0-9-16-tgz https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.16.tgz
204 verbose lock https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.16.tgz C:\Users\ehussain\AppData\Roaming\npm-cache\83592abd-ient-socket-io-client-0-9-16-tgz.lock
205 verbose read json C:\Users\ehussain\AppData\Roaming\npm-cache\redis\0.7.3\package\package.json
206 verbose addRemoteTarball [ 'https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.16.tgz',
206 verbose addRemoteTarball '4da7515c5e773041d1b423970415bcc430f35fc6' ]
207 silly lockFile 10399cfa-redis-0-7-3 redis#0.7.3
208 silly lockFile 10399cfa-redis-0-7-3 redis#0.7.3
209 info retry fetch attempt 1 at 17:58:56
210 verbose fetch to= C:\Users\ehussain\AppData\Local\Temp\npm-6332\1375705736510-0.42393520870245993\tmp.tgz
211 http GET https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.16.tgz
212 http 200 https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.16.tgz
213 http 304 https://registry.npmjs.org/base64id/0.1.0
214 silly registry.get cb [ 304,
214 silly registry.get { server: 'CouchDB/1.3.0 (Erlang OTP/R15B03)',
214 silly registry.get etag: '"CTLQBM2XI54YVEFGWA4X7AK4Y"',
214 silly registry.get date: 'Mon, 05 Aug 2013 12:29:04 GMT',
214 silly registry.get 'content-length': '0' } ]
215 verbose etag base64id/0.1.0 from cache
216 verbose read json C:\Users\ehussain\AppData\Roaming\npm-cache\base64id\0.1.0\package\package.json
217 silly lockFile b2185bf4-base64id-0-1-0 base64id#0.1.0
218 silly lockFile b2185bf4-base64id-0-1-0 base64id#0.1.0
219 silly shasum updated bytes 65536
220 silly shasum updated bytes 65536
221 silly shasum updated bytes 65536
222 silly shasum updated bytes 65536
223 silly shasum updated bytes 65536
224 silly shasum updated bytes 65536
225 silly shasum updated bytes 65536
226 silly shasum updated bytes 65536
227 silly shasum updated bytes 65536
228 silly shasum updated bytes 65536
229 silly shasum updated bytes 65536
230 silly shasum updated bytes 65536
231 silly shasum updated bytes 65536
232 silly shasum updated bytes 65536
233 silly shasum updated bytes 65536
234 silly shasum updated bytes 30201
235 info shasum ab2e3004bdbd9f9e1023846ebad926c5e2f162cd
235 info shasum C:\Users\ehussain\AppData\Local\Temp\npm-6332\1375705736510-0.42393520870245993\tmp.tgz
236 silly lockFile 83592abd-ient-socket-io-client-0-9-16-tgz https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.16.tgz
237 silly lockFile 83592abd-ient-socket-io-client-0-9-16-tgz https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.16.tgz
238 silly lockFile c81dc0af-socket-io-client-0-9-16 socket.io-client#0.9.16
239 silly lockFile c81dc0af-socket-io-client-0-9-16 socket.io-client#0.9.16
240 verbose about to build C:\Users\ehussain\AppData\Roaming\npm\node_modules\socket.io
241 info C:\Users\ehussain\AppData\Roaming\npm\node_modules\socket.io unbuild
242 verbose from cache C:\Users\ehussain\AppData\Roaming\npm\node_modules\socket.io\package.json
243 info preuninstall socket.io#0.9.16
244 info uninstall socket.io#0.9.16
245 verbose true,C:\Users\ehussain\AppData\Roaming\npm\node_modules,C:\Users\ehussain\AppData\Roaming\npm\node_modules unbuild socket.io#0.9.16
246 info postuninstall socket.io#0.9.16
247 error Error: shasum check failed for C:\Users\ehussain\AppData\Local\Temp\npm-6332\1375705736510-0.42393520870245993\tmp.tgz
247 error Expected: 4da7515c5e773041d1b423970415bcc430f35fc6
247 error Actual: ab2e3004bdbd9f9e1023846ebad926c5e2f162cd
247 error at D:\Work\Nodejs\node\node_modules\npm\lib\utils\sha.js:29:20
247 error at ReadStream.<anonymous> (D:\Work\Nodejs\node\node_modules\npm\lib\utils\sha.js:49:5)
247 error at ReadStream.EventEmitter.emit (events.js:117:20)
247 error at _stream_readable.js:870:14
247 error at process._tickCallback (node.js:415:13)
248 error If you need help, you may report this log at:
248 error <http://github.com/isaacs/npm/issues>
248 error or email it to:
248 error <npm-#googlegroups.com>
249 error System Windows_NT 6.1.7601
250 error command "D:\\Work\\Nodejs\\node\\\\node.exe" "D:\\Work\\Nodejs\\node\\node_modules\\npm\\bin\\npm-cli.js" "install" "socket.io" "-g"
251 error cwd D:\Work\Nodejs\node
252 error node -v v0.10.0
253 error npm -v 1.2.14
254 verbose exit [ 1, true ]
Tried it with npm 1.3 and works.
Try clearing npm cache with
npm cache clean
Hope that helps.
when all else fails, clear you cache

VmSize = physical memory + swap?

I have a little question regarding VmSize, in the documentation it's supposed to be the application's usage of memory.
However on my system:
VmSize = physical memory + swap
VmHWM seems more like what the application actually would be using.
[root#sun ~]# free -m
total used free shared buffers cached
Mem: 12012 9223 2788 0 613 1175
-/+ buffers/cache: 7434 4577
Swap: 3967 0 3967
[root#sun ~]# cat /proc/8268/status
Name: mysqld
State: S (sleeping)
Tgid: 8268
Pid: 8268
PPid: 1
TracerPid: 0
Uid: 89 89 89 89
Gid: 89 89 89 89
FDSize: 512
Groups: 89
VmPeak: 15878128 kB
VmSize: 15878128 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 7036312 kB
VmRSS: 7036312 kB
VmData: 15839272 kB
VmStk: 136 kB
VmExe: 10744 kB
VmLib: 6356 kB
VmPTE: 16208 kB
VmSwap: 0 kB
Threads: 265
SigQ: 0/96048
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000087007
SigIgn: 0000000000001000
SigCgt: 00000001800066e9
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: 0000001fffffffff
Seccomp: 0
Cpus_allowed: fff
Cpus_allowed_list: 0-11
Mems_allowed: 00000000,00000001
Mems_allowed_list: 0
voluntary_ctxt_switches: 2567
nonvoluntary_ctxt_switches: 77
Any idea of why?
I try to get the usage of memory for this application in particular but this result doesn't really make sense.
Thanks.
VMsize is the "address space" that the process has in use: the number of available adresses. These addresses do not have to have any physical memory attached to them. (Attached physical memory is the RSS figure)
You can verify this by allocating a chunk of memory with p = malloc(4 * 1024 * 1024);, and not doing anything to *p: the VmSize will increase by 1K pages, but the RSS will be (about) the same. (your program will have more adressable memory, but it does not address it, so the memory does not need to be attached )
VmSize is the sum of all mapped memory (/proc/pid/maps)

JRE crash - A fatal error has been detected by the Java Runtime Environment

I am using an open source JAVA based crawler which juggles millions of URI objects between the memory and disk. Basically the program is memory intensive.
The crash occurs once in a blue moon, I haven't been able to find the reason.
Pasting a part of the error-log, any pointers what possibly is causing this?
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00002b97ee1a07df, pid=1445, tid=1102055744
#
# JRE version: 6.0_18-b07
# Java VM: Java HotSpot(TM) 64-Bit Server VM (16.0-b13 mixed mode linux-amd64 )
# Problematic frame:
# V [libjvm.so+0x6227df]
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
--------------- T H R E A D ---------------
Current thread (0x0000000059db5000): GCTaskThread [stack: 0x0000000041a00000,0x0000000041b01000] [id=1460]
siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x00000000000000d5
Registers:
RAX=0x0000000000000008, RBX=0x0000000059df95f8, RCX=0x0000000000000005, RDX=0x00002aabee55cec0
RSP=0x0000000041affb60, RBP=0x0000000041affbd0, RSI=0x0000000059df95f0, RDI=0x00002aaab5c758b8
R8 =0x000000000000004b, R9 =0x0000000000000001, R10=0x00002aaaafbdfb01, R11=0x00002aabe4c0df38
R12=0x0000000000000001, R13=0x00002aabee55cec0, R14=0x00002aabe4c0e068, R15=0x0000000059df95f0
RIP=0x00002b97ee1a07df, EFL=0x0000000000010297, CSGSFS=0x0000000000000033, ERR=0x0000000000000004
TRAPNO=0x000000000000000e
Top of Stack: (sp=0x0000000041affb60)
0x0000000041affb60: 0000000000000400 0000000059d9bfa0
0x0000000041affb70: 0000000000000005 01002aaab6b05998
0x0000000041affb80: 0000000041affbb0 0000000000000009
.
0x0000000041affd40: 0000000059db5810 0000000059db5820
0x0000000041affd50: 0000000059db5bf8 0000000041affd80
Instructions: (pc=0x00002b97ee1a07df)
0x00002b97ee1a07cf: 41 5e 41 5f c9 c3 48 8b 4a 10 4c 89 fe 4c 89 ea
0x00002b97ee1a07df: ff 91 d0 00 00 00 eb dc 49 8b 55 08 eb c9 4c 89
Stack: [0x0000000041a00000,0x0000000041b01000], sp=0x0000000041affb60, free space=3fe0000000000000018k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x6227df]
V [libjvm.so+0x6230b0]
V [libjvm.so+0x6222d4]
V [libjvm.so+0x23d872]
V [libjvm.so+0x62583b]
V [libjvm.so+0x365dda]
V [libjvm.so+0x5da2af]
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x00002aac4c093800 JavaThread "JEEvictor" daemon [_thread_blocked, id=24783, stack(0x0000000046504000,0x0000000046605000)]
0x000000005a3a2000 JavaThread "JEEvictor" daemon [_thread_blocked, id=24782, stack(0x0000000046605000,0x0000000046706000)]
0x00002aac4c093000 JavaThread "JEEvictor" daemon [_thread_blocked, id=24781, stack(0x0000000046b0a000,0x0000000046c0b000)]
Other Threads:
0x0000000059dfb000 VMThread [stack: 0x0000000041c02000,0x0000000041d03000] [id=1462]
0x0000000059e32800 WatcherThread [stack: 0x00000000423c3000,0x00000000424c4000] [id=1469]
=>0x0000000059db5000 (exited) GCTaskThread [stack: 0x0000000041a00000,0x0000000041b01000] [id=1460]
VM state:at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
[0x0000000059d8b860] Threads_lock - owner thread: 0x0000000059dfb000
[0x0000000059d8bd60] Heap_lock - owner thread: 0x00002aac3c2dd000
Heap
PSYoungGen total 835840K, used 825021K [0x00002aabb3600000, 0x00002aabeffc0000, 0x00002aac33600000)
eden space 809024K, 100% used [0x00002aabb3600000,0x00002aabe4c10000,0x00002aabe4c10000)
from space 26816K, 59% used [0x00002aabe4c10000,0x00002aabe5baf538,0x00002aabe6640000)
to space 27136K, 6% used [0x00002aabee540000,0x00002aabee6ec138,0x00002aabeffc0000)
PSOldGen total 4096448K, used 3687089K [0x00002aaab3600000, 0x00002aabad670000, 0x00002aabb3600000)
object space 4096448K, 90% used [0x00002aaab3600000,0x00002aab946ac6b0,0x00002aabad670000)
PSPermGen total 44608K, used 44199K [0x00002aaaae200000, 0x00002aaab0d90000, 0x00002aaab3600000)
object space 44608K, 99% used [0x00002aaaae200000,0x00002aaab0d29ec0,0x00002aaab0d90000)
Dynamic libraries:
40000000-40009000 r-xp 00000000 fd:00 1116699 /usr/java/jdk1.6.0_18/bin/java
40108000-4010a000 rwxp 00008000 fd:00 1116699 /usr/java/jdk1.6.0_18/bin/java
40384000-40387000 ---p 40384000 00:00 0
40387000-40485000 rwxp 40387000 00:00 0
40647000-4064a000 ---p 40647000 00:00 0
4064a000-40748000 rwxp 4064a000 00:00 0
2aac4cb1b000-2aac50000000 ---p 2aac4cb1b000 00:00 0
2b97eda60000-2b97eda61000 rwxp 2b97eda60000 00:00 0
2b97eda71000-2b97eda72000 rwxp 2b97eda71000 00:00 0
2b97eda72000-2b97eda79000 r-xp 00000000 fd:00 1119007 /usr/java/jdk1.6.0_18/jre/lib/amd64/jli/libjli.so
2b97eda79000-2b97edb7a000 ---p 00007000 fd:00 1119007 /usr/java/jdk1.6.0_18/jre/lib/amd64/jli/libjli.so
2b97edb7a000-2b97edb7c000 rwxp 00008000 fd:00 1119007 /usr/java/jdk1.6.0_18/jre/lib/amd64/jli/libjli.so
2b97edb7c000-2b97edb7e000 rwxp 2b97edb7c000 00:00 0
2b97edb7e000-2b97ee332000 r-xp 00000000 fd:00 1119054 /usr/java/jdk1.6.0_18/jre/lib/amd64/server/libjvm.so
2b97ee332000-2b97ee432000 ---p 007b4000 fd:00 1119054 /usr/java/jdk1.6.0_18/jre/lib/amd64/server/libjvm.so
2b97ee432000-2b97ee5bc000 rwxp 007b4000 fd:00 1119054 /usr/java/jdk1.6.0_18/jre/lib/amd64/server/libjvm.so
2b97ee5bc000-2b97ee5f5000 rwxp 2b97ee5bc000 00:00 0
7fffc4df8000-7fffc4e0e000 rwxp 7ffffffe9000 00:00 0 [stack]
ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0 [vdso]
VM Arguments:
jvm_args: -Dheritrix.home=/heritrix/heritrix-3.1.0 -Djava.protocol.handler.pkgs=org.archive.net -Dheritrix.out=/heritrix/heritrix-3.1.0/heritrix_out.log -Xmx6144M
java_command: org.archive.crawler.Heritrix -p 8544 -b / -a user:pass
Launcher Type: SUN_STANDARD
Environment Variables:
JAVA_HOME=/usr/java/default
PATH=/apps/pig-0.9.0/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/lpp/mmfs/bin:/home/ppra/bin:/usr/lpp/mmfs/bin:/usr/lpp/mmfs/bin
LD_LIBRARY_PATH=/usr/java/jdk1.6.0_18/jre/lib/amd64/server:/usr/java/jdk1.6.0_18/jre/lib/amd64:/usr/java/jdk1.6.0_18/jre/../lib/amd64
SHELL=/bin/bash
--------------- S Y S T E M ---------------
OS:Red Hat Enterprise Linux Server release 5.4 (Tikanga)
uname:Linux 2.6.18-164.11.1.el5 #1 SMP Wed Jan 6 13:26:04 EST 2010 x86_64
libc:glibc 2.5 NPTL 2.5
rlimit: STACK 10240k, CORE 0k, NPROC 268287, NOFILE 1024, AS infinity
load average:1.31 0.80 0.67
CPU:total 16 (8 cores per cpu, 1 threads per core) family 6 model 29 stepping 1, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1
Memory: 4k page, physical 32960544k(162620k free), swap 6291448k(6290568k free)
vm_info: Java HotSpot(TM) 64-Bit Server VM (16.0-b13) for linux-amd64 JRE (1.6.0_18-b07), built on Dec 17 2009 13:42:22 by "java_re" with gcc 3.2.2 (SuSE Linux)
time: Sat Aug 4 07:27:56 2012
elapsed time: 242358 seconds
Well, SIGSEGV denotes a segfault. Likely you are either trying to read something that wasn't ever initialized, or the garbage collector is screwing you.

Resources