bnolan / capt

Command line tool for creating backbone.js applications
294 stars 21 forks source link

segfault on ubuntu 10.10 #8

Open danielzzz opened 13 years ago

danielzzz commented 13 years ago

hi, I am getting a segfault when trying to start capt server or capt watch with the latest version of capt. "capt new" works just fine.

danielzzz commented 13 years ago

Capt:

bnolan commented 13 years ago

Are you getting a stacktrace - or just a segfault? Are you in the project directory when running capt? I'm using node v0.4.1, I'll try upgrade to 0.4.7 and see if I can repro.

danielzzz commented 13 years ago

just a segfault. I tried with v0.4.1 but I am also getting a segfault. maybe it's something related to my system config, but no idea how to trace it :(

sleeper commented 13 years ago

Same here. I managed to get a core dump and a stack trace (presumably the core comes from node exec):

fred@aleph:~/dev/sarin3$ capt server Capt:

warning: Can't read pathname for load map: Input/output error. Reading symbols from /lib/tls/i686/cmov/librt.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/tls/i686/cmov/librt.so.1 Reading symbols from /lib/i686/cmov/libssl.so.0.9.8...(no debugging symbols found)...done. Loaded symbols for /lib/i686/cmov/libssl.so.0.9.8 Reading symbols from /lib/i686/cmov/libcrypto.so.0.9.8...(no debugging symbols found)...done. Loaded symbols for /lib/i686/cmov/libcrypto.so.0.9.8 Reading symbols from /lib/tls/i686/cmov/libdl.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/tls/i686/cmov/libdl.so.2 Reading symbols from /lib/tls/i686/cmov/libutil.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/tls/i686/cmov/libutil.so.1 Reading symbols from /usr/lib/libstdc++.so.6...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libstdc++.so.6 Reading symbols from /lib/tls/i686/cmov/libm.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/tls/i686/cmov/libm.so.6 Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libgcc_s.so.1 Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...(no debugging symbols found)...done. Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0 Reading symbols from /lib/tls/i686/cmov/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/tls/i686/cmov/libc.so.6 Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /lib/libz.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libz.so.1 Reading symbols from /home/fred/opt/lib/node/.npm/glob/2.0.6/package/build/default/glob.node...done. Loaded symbols for /home/fred/opt/lib/node/.npm/glob/2.0.6/package/build/default/glob.node Core was generated by `node /home/fred/opt/bin/capt server'. Program terminated with signal 11, Segmentation fault.

0 0x081b99eb in v8::internal::Builtin_HandleApiCall(v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>) ()

(gdb)

sleeper commented 13 years ago

Additionally:

g++ -v Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu Thread model: posix gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)

sleeper commented 13 years ago

Note also that the same is happening when running 'capt watch'

mkuklis commented 13 years ago

I ran few tests on Ubuntu and tried to track the problem down. I suspect there may be an issue with a glob: for path in Glob(Path.join(@cwd, pathspec))

the segfault happens for cases when path doesn't contain actual files for example: Glob(Path.join(@cwd, 'public/stylesheets/*.css')) Glob(Path.join(@cwd, 'public/stylesheets/*.less'))