segmentation fault - Port Upstart Script to Systemd

I cam currently building a miniroot with an Ubuntu 15.10 base. Therefore I want to use systemd.My standard script '/etc/init.d/script' is found and executed by systemd.However I also do have a conf for this script located at /etc/init/script.conf is not executed. Therefore I write this systemd script[Unit]Description=Job that starts the in /usr/bin/local/Requires=script.serviceAfter=script.service[Service]Type=forkingExecStart=/sbin/getty -l /usr/local/bin/ -n 38400 tty6[Install]WantedBy=multi-user.targetthis script...Read more

scipy - sparse matrix python segmentation fault

I am getting segmentation fault when I multiply a scipy sparse matrix by its transpose. I've searched all over the Internet but could not find any answer. Any help is appreciated.>>> import cPickle>>> fs = open('vec.pickle', 'rb')>>> vec = cPickle.load(fs)>>> vec<3020x512 sparse matrix of type '<type 'numpy.float64'>' with 26008 stored elements in Compressed Sparse Column format>>>> vec.max()10.0>>> vec.min()0.0>>> vec * vec.TSegmentation fault: 11I do not think this is ...Read more

segmentation fault while erasing set

first, the following code produce a segmentatin fault and I dont know why. float currX; float currY; int id = 0; for(;it != s.end();){ it_copy = it; pair<float,float> p = *it; currX = p.first; currY = p.second; currTresh = thresh; while(currTresh > 0 && it_copy != s.end()){ pair<float,float> inner_p = *it_copy; currTresh--; if((inner_p.first-currX)<=secondThresh && abs(currY-inner_p.second)<=secondThresh...Read more

segmentation fault - Rust: Segfault when executing specific line of code from a dynamically loaded library

Im writing a simple plugin-based system in Rust to gain some skills and experience using the language. My system dynamically loads libraries and executes them at runtime to initialize each plugin. Im running into an interesting segfault issue when executing code from a dynamically-loaded library.This is the code to load and run the plugin init function: (this bit works fine)pub fn register_plugins<'rp>(&'rp mut self){ let p1 = match DynamicLibrary::open(Some("")) { Ok(lib) => lib, Err(err...Read more

cross compiling - Segmentation fault when running darknet classifier on Nao

I'm trying to run darknet imagenet classifier on Nao, but it crashes with a segfault.With the YOLO config (./darknet detect cfg/yolo.cfg yolo.weights data/dog.jpg), darknet runs, but trying to run classifier (./darknet classifier predict cfg/ cfg/extraction.cfg extraction.weights data/dog.jpg) only produces a segfault :$ ./darknet classifier predict cfg/ cfg/extraction.cfg extraction.weights data/dog.jpglayer filters size input output 0 conv 64 7 x 7 / 2 224 x 224 x ...Read more

cluster computing - segmention fault using openMPI jobs with SLURM

I have a problem when trying tu use slurm SBATCH jobs or SRUN jobs with MPI over infiniband.OpenMPI is installed, and if I launch the following test program (called hello) with mpirun -n 30 ./hello it works. // compilation: mpicc -o helloMPI helloMPI.c#include <mpi.h>#include <stdio.h>int main ( int argc, char * argv [] ){ int myrank, nproc; MPI_Init ( &argc, &argv ); MPI_Comm_size ( MPI_COMM_WORLD, &nproc ); MPI_Comm_rank ( MPI_COMM_WORLD, &myrank ); printf ( "hello from rank %d of %d\n", myrank, nproc ); ...Read more

MPI Segmentation Fault in MPI_Comm_rank()

I am a beginner in MPI and this code seems to generate a segmentation luDecomposeP(double *LU, int n){ int i, j, k; int sendcount, recvcount, remaining, rank, numProcs, status; double *row, *rowFinal, *start, factor; MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &numProcs); MPI_Bcast(&n, 1, MPI_INT, 0, MPI_COMM_WORLD); row = (double *)malloc(n*sizeof(double)); rowFinal = (double *)malloc(n*n*sizeof(double)); for(i=0; i<n-1; i++) { if(rank == 0) { ...Read more

segmentation fault - gmock Segmentationfault on EXPECT_CALL

On cygwin, EXPECT_CALL gives segmentation fault. Back trace shows:Program received signal SIGSEGV, Segmentation fault.0x004538e2 in join (ptr=0x61230494 <vtable for pthread_key+12>, this=0x8003aedc) at ./gtest/include/gtest/internal/gtest-linked_ptr.h:113113 while (p->next_ != ptr) p = p->next_;(gdb) bt#0 0x004538e2 in join (ptr=0x61230494 <vtable for pthread_key+12>, this=0x8003aedc) at ./gtest/include/gtest/internal/gtest-linked_ptr.h:113#1 copy<testing::internal::ExpectationBase> ( ptr=0x61230490 &l...Read more

Segmentation fault in rails / activesupport 3.1 and ruby 1.9.2

I upgraded a rails application to rails 3.1 (rc4) and now get random segmentation faults in activesupport. These faults happen when starting the application (rails s) or running tests (e.g. rake spec). The weird thing is that:Sometimes all goes well and the segmentation fault does not happenWhen the fault happens, it is always in activesupport, but not always in the same part of it. See below for three different outputs:/home/corne/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0.rc /lib/active_support/core_ext/class/attribute.rb:66: [BUG] Se...Read more

SDL Seg Fault in blitting loop

Okay, so I have this code which just iterates through my object array blitting what needs to be blitted:void Render(){ for(int Index = 0; Index < MAX_OBJECT_INSTANCES; Index++) { if(Game::ObjectArray[Index].IsActive() == false){} else { if(Game::ObjectArray[Index].IsHidden() == false) { SDL_BlitSurface(Game::ObjectArray[Index].CurrentSprite, NULL, Buffer::Screen, &Game::ObjectArray[Index].Position); } } }}I had a look in the call stack and I found this:0...Read more

segmentation fault - Why doesn't this Rust program crash?

Consider this Rust program:fn main() { let mut z : Vec<Vec<(bool,f64)>> = Vec::with_capacity(10); unsafe { z.set_len(10); } z[0] = vec!((true,1.)); println!("{:?}", z[0]);} should attempt to drop z[0] when we set it, and since z[0] is uninitialized it should crash the program. However, it runs fine. Why?...Read more

segmentation fault - reading input, then writing to file

I am trying to write out a matrix to a .txt file using 4 modules the modules are:input.f90 reads input from a .txt filenavierstokes_loser.f90 creates the matrix (I will add some do loops here but, first I just need it to print)resultatplot.f90 take in the matrix from navierstokes_loser then prints it to .txt filemain.f90 combines all the modules and runs the programWhen I run the program I get Program received signal SIGSEGV: Segmentation fault - invalid memory reference.What am I doing wrong?input.f90 module inputimplicit nonecontainssubrout...Read more

Segmentation fault when executing binary in runc container

I'm having a particular issue with a runc container. I have a bash script (running as root) that's executing the following:$ setcap cap_net_bind_service=+ep ${PACKAGE_DIR}/bin/my-binary$ chpst -u vcap:vcap "${PACKAGE_DIR}/bin/my-binary" --config "${JOB_DIR}/config/config.json"every time, when it runs at container start it fails with this output: 5116 Segmentation fault chpst -u vcap:vcap "${PACKAGE_DIR}/bin/my-binary" --config "${JOB_DIR}/config/config.json"However:When I ssh or shell into the container and run the command by hand,it will ...Read more

segmentation fault - PHP 7 trying to destroy resource obtained from C-extension produces segfault

Have written a C-extension for PHP 5 and now am upgrading it to PHP 7.I have modified all API calls as per new demands from zend framework so that the code compiles.Placed my .so file in the extension location and php-fpm service starts operation.Basically I request for a custom hashtable(legacy code) from within my C extension, convert it to a zval and use it within php and then as the scope ends, its destructor should be called but there is ome problem here and we see a segmentation fault.Here is my code C - file:static int le_myResource;#def...Read more