Search Results

Search found 159 results on 7 pages for 'glibc'.

Page 6/7 | < Previous Page | 2 3 4 5 6 7  | Next Page >

  • Double Free inside of a destructor upon adding to a vector

    - by Shawn B
    Hey, I am working on a drum machine, and am having problems with vectors. Each Sequence has a list of samples, and the samples are ordered in a vector. However, when a sample is push_back on the vector, the sample's destructor is called, and results in a double free error. Here is the Sample creation code: class XSample { public: Uint8 Repeat; Uint8 PlayCount; Uint16 Beats; Uint16 *Beat; Uint16 BeatsPerMinute; XSample(Uint16 NewBeats,Uint16 NewBPM,Uint8 NewRepeat); ~XSample(); void GenerateSample(); void PlaySample(); }; XSample::XSample(Uint16 NewBeats,Uint16 NewBPM,Uint8 NewRepeat) { Beats = NewBeats; BeatsPerMinute = NewBPM; Repeat = NewRepeat-1; PlayCount = 0; printf("XSample Construction\n"); Beat = new Uint16[Beats]; } XSample::~XSample() { printf("XSample Destruction\n"); delete [] Beat; } And the 'Dynamo' code that creates each sample in the vector: class XDynamo { public: std::vector<XSample> Samples; void CreateSample(Uint16 NewBeats,Uint16 NewBPM,Uint8 NewRepeat); }; void XDynamo::CreateSample(Uint16 NewBeats,Uint16 NewBPM,Uint8 NewRepeat) { Samples.push_back(XSample(NewBeats,NewBPM,NewRepeat)); } Here is main(): int main() { XDynamo Dynamo; Dynamo.CreateSample(4,120,2); Dynamo.CreateSample(8,240,1); return 0; } And this is what happens when the program is run: Starting program: /home/shawn/dynamo2/dynamo [Thread debugging using libthread_db enabled] XSample Construction XSample Destruction XSample Construction XSample Destruction *** glibc detected *** /home/shawn/dynamo2/dynamo: double free or corruption (fasttop): 0x0804d008 *** However, when the delete [] is removed from the destructor, the program runs perfectly. What is causing this? Any help is greatly appreciated.

    Read the article

  • Epoll in EPOLLET mode returning 2 EPOLLIN before reading from the socket

    - by Arkaitz Jimenez
    The epoll manpage says that a fd registered with EPOLLET(edge triggered) shouldn't notify twice EPOLLIN if no read has been done. So after an EPOLLIN you need to empty the buffer before epoll_wait being able to return a new EPOLLIN on new data. However I'm experiencing problems with this approach as I'm seeing duplicated EPOLLIN events for untouched fds. This is the strace output, 0x200 is EPOLLRDHUP that is not defined yet in my glibc headers but defined in the kernel. 30285 epoll_ctl(3, EPOLL_CTL_ADD, 9, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP|EPOLLET|0x2000, {u32=9, u64=9}}) = 0 30285 epoll_wait(3, {{EPOLLIN, {u32=9, u64=9}}}, 10, -1) = 1 30285 epoll_wait(3, {{EPOLLIN, {u32=9, u64=9}}}, 10, -1) = 1 30285 epoll_wait(3, <unfinished ...> 30349 epoll_ctl(3, EPOLL_CTL_DEL, 9, NULL) = 0 30306 recv(9, "7u\0\0\10\345\241\312\t\20\f\32\r\10\27\20\2\30\200\10 \31(C0\17\32\r\10\27\20\2\30"..., 20000, 0) = 20000 30349 epoll_ctl(3, EPOLL_CTL_DEL, 9, NULL) = -1 ENOENT (No such file or directory) 30305 recv(9, " \31(C0\17\32\r\10\27\20\2\30\200\10 \31(C0\17\32\r\10\27\20\2\30\200\10 \31("..., 20000, 0) = 10011 So, after adding fd number 9 I do receive 2 consecutive EPOLLIN events before having recving the file descriptor, the syscall trace shows how I do delete the fd before reading but it should only happen once, one per event. So either I am not reading the manpage properly or something is now working here.

    Read the article

  • linux new/delete, malloc/free large memory blocks

    - by brian_mk
    Hi folks, We have a linux system (kubuntu 7.10) that runs a number of CORBA Server processes. The server software uses glibc libraries for memory allocation. The linux PC has 4G physical memory. Swap is disabled for speed reasons. Upon receiving a request to process data, one of the server processes allocates a large data buffer (using the standard C++ operator 'new'). The buffer size varies depening upon a number of parameters but is typically around 1.2G Bytes. It can be up to about 1.9G Bytes. When the request has completed, the buffer is released using 'delete'. This works fine for several consecutive requests that allocate buffers of the same size or if the request allocates a smaller size than the previous. The memory appears to be free'd ok - otherwise buffer allocation attempts would eventually fail after just a couple of requests. In any case, we can see the buffer memory being allocated and freed for each request using tools such as KSysGuard etc. The problem arises when a request requires a buffer larger than the previous. In this case, operator 'new' throws an exception. It's as if the memory that has been free'd from the first allocation cannot be re-allocated even though there is sufficient free physical memory available. If I kill and restart the server process after the first operation, then the second request for a larger buffer size succeeds. i.e. killing the process appears to fully release the freed memory back to the system. Can anyone offer an explanation as to what might be going on here? Could it be some kind of fragmentation or mapping table size issue? I am thinking of replacing new/delete with malloc/free and use mallopt to tune the way the memory is being released to the system. BTW - I'm not sure if it's relevant to our problem, but the server uses Pthreads that get created and destroyed on each processing request. Cheers, Brian.

    Read the article

  • What could cause these Apache crash errors ?

    - by jacobanderssen
    Hello guys. I had a server crash several days ago. I use Cacti to keep stats: at the time when the server crashed, a huge spike from Load 1 to Load 200 occurred, with over 800 processes in the run queue ( from 300 average). Upon checking /var/log/httpd I notice this: * glibc detected /usr/sbin/httpd: double free or corruption (out): 0x00002b8f3142c2f0 ** Followed by alot of these: [Sat Mar 13 19:20:20 2010] [warn] child process 3090 still did not exit, sending a SIGTERM [Sat Mar 13 19:20:20 2010] [warn] child process 3091 still did not exit, sending a SIGTERM Followed by this: ======= Backtrace: ========= /lib64/libc.so.6[0x2b8f1463c2ef] /lib64/libc.so.6(cfree+0x4b)[0x2b8f1463c73b] /usr/lib64/libapr-1.so.0(apr_pool_destroy+0x131)[0x2b8f13f98821] /usr/sbin/httpd[0x2b8f126df47e] /usr/sbin/httpd[0x2b8f126df4ab] /lib64/libpthread.so.0[0x2b8f141b87c0] /etc/httpd/modules/mod_file_cache.so[0x2b8f1cdf00fb] ======= Memory map: ======== And finally a lot of these: [Sat Mar 13 19:20:27 2010] [error] could not make child process 733 exit, attempting to continue anyway [Sat Mar 13 19:20:27 2010] [error] could not make child process 24560 exit, attempting to continue anyway [Sat Mar 13 19:20:27 2010] [error] could not make child process 31384 exit, attempting to continue anyway I am also noticing one or two lines like this: [Mon Mar 15 01:17:26 2010] [notice] child pid 20765 exit signal Segmentation fault (11) Please help me shed some light on this. Thanks !

    Read the article

  • C headers: compiler specific vs library specific?

    - by leonbloy
    Is there some clear-cut distinction between standard C *.h header files that are provided by the C compiler, as oppossed to those which are provided by a standard C library? Is there some list, or some standard locations? Motivation: int this answer I got a while ago, regarding a missing unistd.h in the latest TinyC compiler, the author argued that unistd.h (contrarily to sys/unistd.h) should not be provided by the compiler but by your C library. I could not make much sense of that response (for one thing shouldn't that also apply to, say, stdio.h?) but I'm still wondering about it. Is that correct? Where is some authoritative reference for this? Looking in other compilers, I see that other "self contained" POSIX C compilers that are hosted in Windows (like the GCC toolchain that comes with MinGW, in several incarnations; or Digital Mars compiler), include all header files. And in a standard Linux distribution (say, Centos 5.10) I see that the gcc package provides a few header files (eg, stdbool.h, syslimits.h) in /usr/lib/gcc/i386-redhat-linux/4.1.1/include/, and the glibc-headers package provides the majority of the headers in /usr/include/ (including stdio.h, /usr/include/unistd.h and /usr/include/sys/unistd.h). So, in neither case I see support for the above claim.

    Read the article

  • A trivial Python SWIG error question

    - by Alex
    I am trying to get Python running with swig to do C/C++. I am running the tutorial here, 'building a python module'. When I do the call gcc -c example.c example_wrap.c -I /my_correct_path/python2.5 I get an error: my_correct_path/python2.5/pyport.h:761:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)." example_wrap.c: In function 'SWIG_Python_ConvertFunctionPtr': example_wrap.c:2034: warning: initialization discards qualifiers from pointer target type example_wrap.c: In function 'SWIG_Python_FixMethods': example_wrap.c:3232: warning: initialization discards qualifiers from pointer target type It actually does create an example.o file, but it doesn't work. I am using python2.5 not 2.1 as in the example, is this a problem? The error (everything else is just a 'warning') says something about wrong platform. This is a 64bit machine; is this a problem? Is my gcc configured wrong for my machine? How do I get past this? UPDATE: I am still having problems. How do I actually implement this "fix"?

    Read the article

  • whether rand_r is real thread safe?

    - by terry
    Well, rand_r function is supposed to be a thread safe function. However, by its implementation, I cannot believe it could make itself not change by other threads. Suppose that two threads will invoke rand_r in the same time with the same variable seed. So read-write race will occur. The code rand_r implemented by glibc is listed below. Anybody knows why rand_r is called thread safe? int rand_r (unsigned int *seed) { unsigned int next = *seed; int result; next *= 1103515245; next += 12345; result = (unsigned int) (next / 65536) % 2048; next *= 1103515245; next += 12345; result <<= 10; result ^= (unsigned int) (next / 65536) % 1024; next *= 1103515245; next += 12345; result <<= 10; result ^= (unsigned int) (next / 65536) % 1024; *seed = next; return result; }

    Read the article

  • R from java with no graphics: is it worth moving to JRI

    - by LH
    I have a system set up that's been happily running R from a java servlet, spawning processed & hooking into the process's stdin, stdout, and stderr streams, as in the second andwer to this question. After a system upgrade (that included glibc), the input is no longer reaching the R process.* Until now, 'R --vanilla --slave -f [file] ...' was working fine for me. I also have no swing dependencies right now, so I'm somewhat reluctant to add them. (I may actually not be able to add swing dependencies; am I right that using REngine automatically brings swing in? The examples import all of swing.) Are there advantages to switching to JRI? What changes would I need to make to my R script? (It currently reads from stdin and writes to stdout). I'm not finding the provided examples terribly helpful for how to use JRI in this situation. Thanks for your help & comments. *I can't even tell if the problem is data being written too soon or too late, but that's a separate issue/question; if I move to JRI I'm hoping it all becomes moot.

    Read the article

  • Getting a `free()` error when deallocating with `delete` in the backtrace

    - by wonko
    I got the following error from gdb: *** glibc detected *** /.root0/autohome/u132/hsreekum/ipopt/ipopt/debug/Ipopt/examples/ex3/ex3: free(): invalid next size (fast): 0x0000000120052b60 *** Here's the backtrace: #0 0x000000555626b264 in raise () from /lib/libc.so.6 #1 0x000000555626cc6c in abort () from /lib/libc.so.6 #2 0x00000055562a7b9c in __libc_message () from /lib/libc.so.6 #3 0x00000055562aeabc in malloc_printerr () from /lib/libc.so.6 #4 0x00000055562b036c in free () from /lib/libc.so.6 #5 0x000000555561ddd0 in Ipopt::TNLPAdapter::~TNLPAdapter () from /home/ba01/u132/hsreekum/ipopt/ipopt/build/lib/libipopt.so.1 #6 0x00000055556a9910 in Ipopt::GradientScaling::~GradientScaling () from /home/ba01/u132/hsreekum/ipopt/ipopt/build/lib/libipopt.so.1 #7 0x00000055557241b8 in Ipopt::OrigIpoptNLP::~OrigIpoptNLP () from /home/ba01/u132/hsreekum/ipopt/ipopt/build/lib/libipopt.so.1 #8 0x00000055556ae7f0 in Ipopt::IpoptAlgorithm::~IpoptAlgorithm () from /home/ba01/u132/hsreekum/ipopt/ipopt/build/lib/libipopt.so.1 #9 0x0000005555602278 in Ipopt::IpoptApplication::~IpoptApplication () from /home/ba01/u132/hsreekum/ipopt/ipopt/build/lib/libipopt.so.1 #10 0x0000005555614428 in FreeIpoptProblem () from /home/ba01/u132/hsreekum/ipopt/ipopt/build/lib/libipopt.so.1 #11 0x0000000120001610 in main () at ex3.c:169` And here's the code for Ipopt::TNLPAdapter::~TNLPAdapter () TNLPAdapter::~TNLPAdapter() { delete [] full_x_; delete [] full_lambda_; delete [] full_g_; delete [] jac_g_; delete [] c_rhs_; delete [] jac_idx_map_; delete [] h_idx_map_; delete [] x_fixed_map_; delete [] findiff_jac_ia_; delete [] findiff_jac_ja_; delete [] findiff_jac_postriplet_; delete [] findiff_x_l_; delete [] findiff_x_u_; } My question is : why does free() throw an error when ~TNLPAdapter() uses delete[]? Also, I would like to step through ~TNLPAdapter() so I can see which deallocation causes the error. I believe the error occurs in the external library (IPOPT) but I have compiled it with debug flags on ; is this sufficient?

    Read the article

  • How do I install Geomatica?

    - by Chethan S.
    I wanted to try the latest version(trial) of Geomatica, Geomatica 2012 on Ubuntu 11.10 beta. When I tried to run the bin file I got a whole list of dependencies. It also seems that it is a RPM package. Instead of going through each entry manually, is there any easy way to search and install a list of dependencies? Here is the list what I got - rpm: RPM should not be used directly install RPM packages, use Alien instead! rpm: However assuming you know what you are doing... error: Failed dependencies: glibc >= 2.9 is needed by geomatica-2012-12.0-0.x86_64 libstdc++43 is needed by geomatica-2012-12.0-0.x86_64 libgcc43 is needed by geomatica-2012-12.0-0.x86_64 libgomp43 is needed by geomatica-2012-12.0-0.x86_64 libgfortran43 is needed by geomatica-2012-12.0-0.x86_64 openmotif-libs >= 2.3.1 is needed by geomatica-2012-12.0-0.x86_64 /bin/sh is needed by geomatica-2012-12.0-0.x86_64 libatk-1.0.so.0()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libcairo.so.2()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libcrypto.so.0.9.8()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libcrypt.so.1()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libc.so.6()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libc.so.6(GLIBC_2.2.5)(64bit) is needed by geomatica-2012-12.0-0.x86_64 libc.so.6(GLIBC_2.3.2)(64bit) is needed by geomatica-2012-12.0-0.x86_64 libc.so.6(GLIBC_2.3.4)(64bit) is needed by geomatica-2012-12.0-0.x86_64 libc.so.6(GLIBC_2.3)(64bit) is needed by geomatica-2012-12.0-0.x86_64 libc.so.6(GLIBC_2.7)(64bit) is needed by geomatica-2012-12.0-0.x86_64 libdl.so.2()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libdl.so.2(GLIBC_2.2.5)(64bit) is needed by geomatica-2012-12.0-0.x86_64 libexpat.so.1()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libfontconfig.so.1()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libgcc_s.so.1()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libgcc_s.so.1(GCC_3.0)(64bit) is needed by geomatica-2012-12.0-0.x86_64 libgcc_s.so.1(GCC_4.0.0)(64bit) is needed by geomatica-2012-12.0-0.x86_64 libgdk_pixbuf-2.0.so.0()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libgdk-x11-2.0.so.0()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libgd.so.2()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libgfortran.so.3()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libgfortran.so.3(GFORTRAN_1.0)(64bit) is needed by geomatica-2012-12.0-0.x86_64 libgio-2.0.so.0()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libglib-2.0.so.0()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libGL.so.1()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libgmodule-2.0.so.0()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libgobject-2.0.so.0()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libgomp.so.1()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libgomp.so.1(GOMP_1.0)(64bit) is needed by geomatica-2012-12.0-0.x86_64 libgomp.so.1(OMP_1.0)(64bit) is needed by geomatica-2012-12.0-0.x86_64 libgthread-2.0.so.0()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libgtk-x11-2.0.so.0()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libjpeg.so.62()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libm.so.6()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libm.so.6(GLIBC_2.2.5)(64bit) is needed by geomatica-2012-12.0-0.x86_64 libnsl.so.1()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libpango-1.0.so.0()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libpangocairo-1.0.so.0()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libpangoft2-1.0.so.0()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libpng12.so.0()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libpng12.so.0(PNG12_0)(64bit) is needed by geomatica-2012-12.0-0.x86_64 libpthread.so.0()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libpthread.so.0(GLIBC_2.2.5)(64bit) is needed by geomatica-2012-12.0-0.x86_64 libpthread.so.0(GLIBC_2.3.2)(64bit) is needed by geomatica-2012-12.0-0.x86_64 libpthread.so.0(GLIBC_2.3.4)(64bit) is needed by geomatica-2012-12.0-0.x86_64 libpython2.6.so.1.0()(64bit) is needed by geomatica-2012-12.0-0.x86_64 librt.so.1()(64bit) is needed by geomatica-2012-12.0-0.x86_64 librt.so.1(GLIBC_2.2.5)(64bit) is needed by geomatica-2012-12.0-0.x86_64 libSM.so.6()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libssl.so.0.9.8()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libstdc++.so.6()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libstdc++.so.6(CXXABI_1.3.1)(64bit) is needed by geomatica-2012-12.0-0.x86_64 libstdc++.so.6(CXXABI_1.3)(64bit) is needed by geomatica-2012-12.0-0.x86_64 libstdc++.so.6(GLIBCXX_3.4)(64bit) is needed by geomatica-2012-12.0-0.x86_64 libstdc++.so.6(GLIBCXX_3.4.9)(64bit) is needed by geomatica-2012-12.0-0.x86_64 libtiff.so.3()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libutil.so.1()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libX11.so.6()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libXinerama.so.1()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libXm.so.4()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libXt.so.6()(64bit) is needed by geomatica-2012-12.0-0.x86_64 libXxf86vm.so.1()(64bit) is needed by geomatica-2012-12.0-0.x86_64

    Read the article

  • Stack Overflow problem in a recursive program in C

    - by Adi
    Hi all, I am getting a stack overflow in one of the recursive functions i am running.. Here is the code.. void* buddyMalloc(int req_size) { // Do something here return buddy_findout(original_index,req_size); // This is the recursive call } void *buddy_findout(int current_index,int req_size) { char *selected = NULL; if(front!=NULL) { if(current_index==original_index) { // Do something here return selected; } else { // Do Something here return buddy_findout(current_index+1,req_size); } } else { return buddy_findout(current_index-1,req_size); } } Consider the initial value of index to be 4. and it first do index-1 till it reaches 0 index. and then it comes back to index 4 by incrementing..This is wht i want to implement. But it gives a stack overflow with memory map in the command prompt : Here is the output from my shell : * glibc detected * ./473_mem: free(): invalid pointer: 0x00c274c0 * ======= Backtrace: ========= /lib/tls/i686/cmov/libc.so.6[0xb50ff1] /lib/tls/i686/cmov/libc.so.6[0xb526f2] /lib/tls/i686/cmov/libc.so.6(cfree+0x6d)[0xb557cd] ./473_mem[0x8048b44] ./473_mem[0x8048b74] ./473_mem[0x8048b74] ./473_mem[0x8048944] ./473_mem[0x8048c87] ./473_mem[0x8048d31] ./473_mem[0x8048f79] /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0xafcb56] ./473_mem[0x8048671] ======= Memory map: ======== 0017c000-00198000 r-xp 00000000 08:01 5224 /lib/libgcc_s.so.1 00198000-00199000 r--p 0001b000 08:01 5224 /lib/libgcc_s.so.1 00199000-0019a000 rw-p 0001c000 08:01 5224 /lib/libgcc_s.so.1 00260000-00284000 r-xp 00000000 08:01 1927 /lib/tls/i686/cmov/libm-2.10.1.so 00284000-00285000 r--p 00023000 08:01 1927 /lib/tls/i686/cmov/libm-2.10.1.so 00285000-00286000 rw-p 00024000 08:01 1927 /lib/tls/i686/cmov/libm-2.10.1.so 006cd000-006e8000 r-xp 00000000 08:01 6662 /lib/ld-2.10.1.so 006e8000-006e9000 r--p 0001a000 08:01 6662 /lib/ld-2.10.1.so 006e9000-006ea000 rw-p 0001b000 08:01 6662 /lib/ld-2.10.1.so 00aa9000-00aaa000 r-xp 00000000 00:00 0 [vdso] 00ae6000-00c24000 r-xp 00000000 08:01 1900 /lib/tls/i686/cmov/libc-2.10.1.so 00c24000-00c25000 ---p 0013e000 08:01 1900 /lib/tls/i686/cmov/libc-2.10.1.so 00c25000-00c27000 r--p 0013e000 08:01 1900 /lib/tls/i686/cmov/libc-2.10.1.so 00c27000-00c28000 rw-p 00140000 08:01 1900 /lib/tls/i686/cmov/libc-2.10.1.so 00c28000-00c2b000 rw-p 00000000 00:00 0 08048000-0804a000 r-xp 00000000 00:14 2176 /media/windows-share/OS/Project2/473_mem 0804a000-0804b000 r--p 00001000 00:14 2176 /media/windows-share/OS/Project2/473_mem 0804b000-0804c000 rw-p 00002000 00:14 2176 /media/windows-share/OS/Project2/473_mem 08483000-084a4000 rw-p 00000000 00:00 0 [heap] b7600000-b7621000 rw-p 00000000 00:00 0 b7621000-b7700000 ---p 00000000 00:00 0 b7716000-b7819000 rw-p 00000000 00:00 0 b7827000-b782a000 rw-p 00000000 00:00 0 bfb96000-bfbab000 rw-p 00000000 00:00 0 [stack] Aborted Thanks in advance adi

    Read the article

  • bin_at in dlmalloc

    - by chunhui
    In glibc malloc.c or dlmalloc It said "repositioning tricks"As in blew, and use this trick in bin_at. bins is a array,the space is allocated when av(struct malloc_state) is allocated.doesn't it? the sizeof(bin[i]) is less then sizeof(struct malloc_chunk*)? Who can describe this trick for me? I can't understand the bin_at macro.why they get the bins address use this method?how it works? Very thanks,and sorry for my poor English. /* To simplify use in double-linked lists, each bin header acts as a malloc_chunk. This avoids special-casing for headers. But to conserve space and improve locality, we allocate only the fd/bk pointers of bins, and then use repositioning tricks to treat these as the fields of a malloc_chunk*. */ typedef struct malloc_chunk* mbinptr; /* addressing -- note that bin_at(0) does not exist */ #define bin_at(m, i) \ (mbinptr) (((char *) &((m)->bins[((i) - 1) * 2])) \ - offsetof (struct malloc_chunk, fd)) The malloc_chunk struct like this: struct malloc_chunk { INTERNAL_SIZE_T prev_size; /* Size of previous chunk (if free). */ INTERNAL_SIZE_T size; /* Size in bytes, including overhead. */ struct malloc_chunk* fd; /* double links -- used only if free. */ struct malloc_chunk* bk; /* Only used for large blocks: pointer to next larger size. */ struct malloc_chunk* fd_nextsize; /* double links -- used only if free. */ struct malloc_chunk* bk_nextsize; }; And the bin type like this: typedef struct malloc_chunk* mbinptr; struct malloc_state { /* Serialize access. */ mutex_t mutex; /* Flags (formerly in max_fast). */ int flags; #if THREAD_STATS /* Statistics for locking. Only used if THREAD_STATS is defined. */ long stat_lock_direct, stat_lock_loop, stat_lock_wait; #endif /* Fastbins */ mfastbinptr fastbinsY[NFASTBINS]; /* Base of the topmost chunk -- not otherwise kept in a bin */ mchunkptr top; /* The remainder from the most recent split of a small request */ mchunkptr last_remainder; /* Normal bins packed as described above */ mchunkptr bins[NBINS * 2 - 2]; /* Bitmap of bins */ unsigned int binmap[BINMAPSIZE]; /* Linked list */ struct malloc_state *next; #ifdef PER_THREAD /* Linked list for free arenas. */ struct malloc_state *next_free; #endif /* Memory allocated from the system in this arena. */ INTERNAL_SIZE_T system_mem; INTERNAL_SIZE_T max_system_mem; };

    Read the article

  • C++ Program Always Crashes While doing a std::string assign

    - by bbazso
    I have been trying to debug a crash in my application that crashes (i.e. asserts a * glibc detected free(): invalid pointer: 0x000000000070f0c0 **) while I'm trying to do a simple assign to a string. Note that I'm compiling on a linux system with gcc 4.2.4 with an optimization level set to -O2. With -O0 the application no longer crashes. E.g. std::string abc; abc = "testString"; but if I changed the code as follows it no longer crashes std::string abc("testString"); So again I scratched my head! But the interesting pattern was that the crash moved later on in the application, AGAIN at another string. I found it weird that the application was continuously crashing on a string assign. A typical crash backtrace would look as follows: #0 0x00007f2c2663bfb5 in raise () from /lib64/libc.so.6 (gdb) bt #0 0x00007f2c2663bfb5 in raise () from /lib64/libc.so.6 #1 0x00007f2c2663dbc3 in abort () from /lib64/libc.so.6 #2 0x00000000004d8cb7 in people_streamingserver_sighandler (signum=6) at src/peoplestreamingserver.cpp:487 #3 <signal handler called> #4 0x00007f2c2663bfb5 in raise () from /lib64/libc.so.6 #5 0x00007f2c2663dbc3 in abort () from /lib64/libc.so.6 #6 0x00007f2c26680ce0 in ?? () from /lib64/libc.so.6 #7 0x00007f2c270ca7a0 in std::string::assign (this=0x7f2c21bc8d20, __str=<value optimized out>) at /home/bbazso/ThirdParty/sources/gcc-4.2.4/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:238 #8 0x00007f2c21bd874a in PEOPLESProtocol::GetStreamName (this=<value optimized out>, pRawPath=0x2342fd8 "rtmp://127.0.0.1/mp4:pop.mp4", lStreamName=@0x7f2c21bc8d20) at /opt/trx-HEAD/gcc/4.2.4/lib/gcc/x86_64-pc-linux-gnu/4.2.4/../../../../include/c++/4.2.4/bits/basic_string.h:491 #9 0x00007f2c21bd9daa in PEOPLESProtocol::SignalProtocolCreated (pProtocol=0x233a4e0, customParameters=@0x7f2c21bc8de0) at peoplestreamer/src/peoplesprotocol.cpp:240 This was really weird behavior and so I started to poke around further in my application to see if there was some sort of memory corruption (either heap or stack) error that could be occurring that could be causing this weird behavior. I even checked for ptr corruptions and came up empty handed. In addition to visual inspection of the code I also tried the following tools: Valgrind using both memcheck and exp-ptrcheck electric fence libsafe I compiled with -fstack-protector-all in gcc I tried MALLOC_CHECK_ set to 2 I ran my code through lint checks as well as cppcheck (to check for mistakes) And I stepped through the code using gdb So I tried a lot of stuff and still came up empty handed. So I was wondering if it could be something like a linker issue or a library issue of some sort that could be causing this problem. Are there any know issues with the std::string that make is susceptible to crashing in -O2 or maybe it has nothing to do with the optimization level? But the only pattern that I can see thus far in my problem is that it always seems to crash on a string and so I was wondering if anyone knew of any issues that my be causing this type of behavior. Thanks a lot!

    Read the article

  • Implications of trying to double free memory space in C

    - by SidNoob
    Here' my piece of code: #include <stdio.h> #include<stdlib.h> struct student{ char *name; }; int main() { struct student s; s.name = malloc(sizeof(char *)); // I hope this is the right way... printf("Name: "); scanf("%[^\n]", s.name); printf("You Entered: \n\n"); printf("%s\n", s.name); free(s.name); // This will cause my code to break } All I know is that dynamic allocation on the 'heap' needs to be freed. My question is, when I run the program, sometimes the code runs successfully. i.e. ./struct Name: Thisis Myname You Entered: Thisis Myname I tried reading this I've concluded that I'm trying to double-free a piece of memory i.e. I'm trying to free a piece of memory that is already free? (hope I'm correct here. If Yes, what could be the Security Implications of a double-free?) While it fails sometimes as its supposed to: ./struct Name: CrazyFishMotorhead Rider You Entered: CrazyFishMotorhead Rider *** glibc detected *** ./struct: free(): invalid next size (fast): 0x08adb008 *** ======= Backtrace: ========= /lib/tls/i686/cmov/libc.so.6(+0x6b161)[0xb7612161] /lib/tls/i686/cmov/libc.so.6(+0x6c9b8)[0xb76139b8] /lib/tls/i686/cmov/libc.so.6(cfree+0x6d)[0xb7616a9d] ./struct[0x8048533] /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0xb75bdbd6] ./struct[0x8048441] ======= Memory map: ======== 08048000-08049000 r-xp 00000000 08:01 288098 /root/struct 08049000-0804a000 r--p 00000000 08:01 288098 /root/struct 0804a000-0804b000 rw-p 00001000 08:01 288098 /root/struct 08adb000-08afc000 rw-p 00000000 00:00 0 [heap] b7400000-b7421000 rw-p 00000000 00:00 0 b7421000-b7500000 ---p 00000000 00:00 0 b7575000-b7592000 r-xp 00000000 08:01 788956 /lib/libgcc_s.so.1 b7592000-b7593000 r--p 0001c000 08:01 788956 /lib/libgcc_s.so.1 b7593000-b7594000 rw-p 0001d000 08:01 788956 /lib/libgcc_s.so.1 b75a6000-b75a7000 rw-p 00000000 00:00 0 b75a7000-b76fa000 r-xp 00000000 08:01 920678 /lib/tls/i686/cmov/libc-2.11.1.so b76fa000-b76fc000 r--p 00153000 08:01 920678 /lib/tls/i686/cmov/libc-2.11.1.so b76fc000-b76fd000 rw-p 00155000 08:01 920678 /lib/tls/i686/cmov/libc-2.11.1.so b76fd000-b7700000 rw-p 00000000 00:00 0 b7710000-b7714000 rw-p 00000000 00:00 0 b7714000-b7715000 r-xp 00000000 00:00 0 [vdso] b7715000-b7730000 r-xp 00000000 08:01 788898 /lib/ld-2.11.1.so b7730000-b7731000 r--p 0001a000 08:01 788898 /lib/ld-2.11.1.so b7731000-b7732000 rw-p 0001b000 08:01 788898 /lib/ld-2.11.1.so bffd5000-bfff6000 rw-p 00000000 00:00 0 [stack] Aborted So why is it that my code does work sometimes? i.e. the compiler is not able to detect at times that I'm trying to free an already freed memory. Has it got to do something with my stack/heap size?

    Read the article

  • Is it OK to put a standard, pure C header #include directive inside a namespace?

    - by mic_e
    I've got a project with a class log in the global namespace (::log). So, naturally, after #include <cmath>, the compiler gives an error message each time I try to instantiate an object of my log class, because <cmath> pollutes the global namespace with lots of three-letter methods, one of them being the logarithm function log(). So there are three possible solutions, each having their unique ugly side-effects. Move the log class to it's own namespace and always access it with it's fully qualified name. I really want to avoid this because the logger should be as convenient as possible to use. Write a mathwrapper.cpp file which is the only file in the project that includes <cmath>, and makes all the required <cmath> functions available through wrappers in a namespace math. I don't want to use this approach because I have to write a wrapper for every single required math function, and it would add additional call penalty (cancelled out partially by the -flto compiler flag) The solution I'm currently considering: Replace #include <cmath> by namespace math { #include "math.h" } and then calculating the logarithm function via math::log(). I have tried it out and it does, indeed, compile, link and run as expected. It does, however, have multiple downsides: It's (obviously) impossible to use <cmath>, because the <cmath> code accesses the functions by their fully qualified names, and it's deprecated to use in C++. I've got a really, really bad feeling about it, like I'm gonna get attacked and eaten alive by raptors. So my question is: Is there any recommendation/convention/etc that forbid putting include directives in namespaces? Could anything go wrong with diferent C standard library implementations (I use glibc), different compilers (I use g++ 4.7, -std=c++11), linking? Have you ever tried doing this? Are there any alternate ways to banish the math functions from the global namespace? I've found several similar questions on stackoverflow, but most were about including other C++ headers, which obviously is a bad idea, and those that weren't made contradictory statements about linking behaviour for C libraries. Also, would it be beneficial to additionally put the #include <math.h> inside extern "C" {}?

    Read the article

  • how to uninstall mariadb and re-install mysql ? Mysql install turns into mariadb install

    - by Suma
    I recently upgraded my centos system via the desktop. mistake! I had mariadb, phpmyadmin working just fine before - but after the upgrade they stopped. I frantically googled and tried to follow some tutorials about mariadb * mysql reinstall untill I came to this one: http://centosforge.com/node/how-replace-mysql-mariadb-centos-6-including-mysql-uninstall-instructions-and-yum-install I executed this command to remove all of mysql: yum remove mysql-server mysql-libs mysql-devel mysql* and then tried to reinstall mysql: as below - it crashes with errors as follows: ***************************************************************** [root@localhost ~]# yum install mysql-server mysql mysql-devel ***************************************************************** Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.serverspace.co.uk * extras: centos.serverspace.co.uk * rpmforge: www.mirrorservice.org * updates: mirror.rmg.io Setting up Install Process Package mysql-server is obsoleted by MariaDB-server, trying to install MariaDB-server-5.5.29-1.i686 instead Package mysql is obsoleted by MariaDB-server, trying to install MariaDB-server-5.5.29-1.i686 instead Package mysql-devel is obsoleted by MariaDB-devel, trying to install MariaDB-devel-5.5.29-1.i686 instead Resolving Dependencies --> Running transaction check ---> Package MariaDB-devel.i686 0:5.5.29-1 set to be updated --> Processing Dependency: MariaDB-common for package: MariaDB-devel ---> Package MariaDB-server.i686 0:5.5.29-1 set to be updated --> Processing Dependency: libssl.so.10 for package: MariaDB-server --> Processing Dependency: libcrypto.so.10 for package: MariaDB-server --> Running transaction check ---> Package MariaDB-common.i686 0:5.5.29-1 set to be updated --> Processing Dependency: MariaDB-compat for package: MariaDB-common ---> Package MariaDB-server.i686 0:5.5.29-1 set to be updated --> Processing Dependency: libssl.so.10 for package: MariaDB-server --> Processing Dependency: libcrypto.so.10 for package: MariaDB-server --> Running transaction check ---> Package MariaDB-compat.i686 0:5.5.29-1 set to be updated ---> Package MariaDB-server.i686 0:5.5.29-1 set to be updated --> Processing Dependency: libssl.so.10 for package: MariaDB-server --> Processing Dependency: libcrypto.so.10 for package: MariaDB-server --> Finished Dependency Resolution MariaDB-server-5.5.29-1.i686 from mariadb has depsolving problems --> Missing Dependency: libcrypto.so.10 is needed by package MariaDB-server-5.5.29-1.i686 (mariadb) MariaDB-server-5.5.29-1.i686 from mariadb has depsolving problems --> Missing Dependency: libssl.so.10 is needed by package MariaDB-server-5.5.29-1.i686 (mariadb) Error: Missing Dependency: libcrypto.so.10 is needed by package MariaDB-server-5.5.29-1.i686 (mariadb) Error: Missing Dependency: libssl.so.10 is needed by package MariaDB-server-5.5.29-1.i686 (mariadb) You could try using --skip-broken to work around the problem You could try running: package-cleanup --problems package-cleanup --dupes rpm -Va --nofiles --nodigest [root@localhost ~] If I now try to install libssl.10, i get asked to install glibc libraries. 2.17 and 2.7 - other discussions have said to stay clear of the as this will explode my system - I tried download 2.17 and it's huge - took ages to unzip. Could someone please help me to completelty remove maraidb and install mysql - so that I don't get the above errors and pushed over to mariadb when I run: yum install mysql-server mysql mysql-devel There are tons of material on how to install mariadb - but none i found so far that plainly explains how to go backwards to mysql.

    Read the article

  • MongoDB Crashed,Not able to start it again

    - by Kevin Parker
    Mongodb fail to start after showing this error...and not able to start it again..?Can u help me find out? *** glibc detected *** /usr/lib/mongodb/mongo: corrupted double-linked list: 0x000000000f750b50 *** Mon Nov 26 19:01:29 mongo got signal 11 (Segmentation fault), stack trace: ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x788d6)[0x2b2db94198d6] /lib/x86_64-linux-gnu/libc.so.6(+0x7a841)[0x2b2db941b841] /lib/x86_64-linux-gnu/libc.so.6(cfree+0x73)[0x2b2db941f603] /usr/lib/mongodb/mongo(_ZN5boost6detail17sp_counted_impl_pIN5mongo7BSONObj6HolderEE7disposeEv+0x12)[0x45bd92] /usr/lib/mongodb/mongo(_ZN5boost6detail12shared_countD2Ev+0x49)[0x45d319] /lib/x86_64-linux-gnu/libc.so.6(exit+0xe1)[0x2b2db93da961] /usr/lib/mongodb/mongo(_Z10quitNicelyi+0x53)[0x458043] /lib/x86_64-linux-gnu/libpthread.so.0(+0xfc60)[0x2b2db753fc60] /lib/x86_64-linux-gnu/libc.so.6(kill+0x7)[0x2b2db93d4fe7] /lib/libreadline.so.6(+0x25888)[0x2b2db889b888] /lib/libreadline.so.6(rl_getc+0x5e)[0x2b2db889d9de] /lib/libreadline.so.6(rl_read_key+0xf8)[0x2b2db889e0c8] /lib/libreadline.so.6(readline_internal_char+0x61)[0x2b2db8889061] /lib/libreadline.so.6(readline+0x55)[0x2b2db88895b5] /usr/lib/mongodb/mongo(_Z13shellReadlinePKci+0x8a)[0x45694a] /usr/lib/mongodb/mongo(_Z5_mainiPPc+0x1506)[0x45a1a6] /usr/lib/mongodb/mongo(main+0x26)[0x45b1d6] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xff)[0x2b2db93bfeff] /usr/lib/mongodb/mongo[0x456449] ======= Memory map: ======== 00400000-0055c000 r-xp 00000000 fd:03 32385496 /usr/lib/mongodb/mongo 0075c000-00762000 r--p 0015c000 fd:03 32385496 /usr/lib/mongodb/mongo 00762000-00765000 rw-p 00162000 fd:03 32385496 /usr/lib/mongodb/mongo 00765000-00767000 rw-p 00765000 00:00 0 0f74e000-0f961000 rw-p 0f74e000 00:00 0 [heap] 2b2db730d000-2b2db732e000 r-xp 00000000 fd:03 32112840 /lib/x86_64-linux-gnu/ld-2.13.so 2b2db732e000-2b2db7331000 rw-p 2b2db732e000 00:00 0 2b2db7331000-2b2db7351000 rwxp 2b2db7331000 00:00 0 2b2db752d000-2b2db752e000 r--p 00020000 fd:03 32112840 /lib/x86_64-linux-gnu/ld-2.13.so 2b2db752e000-2b2db7530000 rw-p 00021000 fd:03 32112840 /lib/x86_64-linux-gnu/ld-2.13.so 2b2db7530000-2b2db7548000 r-xp 00000000 fd:03 32112843 /lib/x86_64-linux-gnu/libpthread-2.13.so 2b2db7548000-2b2db7748000 ---p 00018000 fd:03 32112843 /lib/x86_64-linux-gnu/libpthread-2.13.so 2b2db7748000-2b2db7749000 r--p 00018000 fd:03 32112843 /lib/x86_64-linux-gnu/libpthread-2.13.so 2b2db7749000-2b2db774a000 rw-p 00019000 fd:03 32112843 /lib/x86_64-linux-gnu/libpthread-2.13.so 2b2db774a000-2b2db774e000 rw-p 2b2db774a000 00:00 0 2b2db774e000-2b2db7836000 r-xp 00000000 fd:03 32380634 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.14 2b2db7836000-2b2db7a35000 ---p 000e8000 fd:03 32380634 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.14 2b2db7a35000-2b2db7a3d000 r--p 000e7000 fd:03 32380634 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.14 2b2db7a3d000-2b2db7a3f000 rw-p 000ef000 fd:03 32380634 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.14 2b2db7a3f000-2b2db7a55000 rw-p 2b2db7a3f000 00:00 0 2b2db7a55000-2b2db7a58000 r-xp 00000000 fd:03 32244866 /usr/lib/libboost_system.so.1.42.0 2b2db7a58000-2b2db7c57000 ---p 00003000 fd:03 32244866 /usr/lib/libboost_system.so.1.42.0 2b2db7c57000-2b2db7c58000 r--p 00002000 fd:03 32244866 /usr/lib/libboost_system.so.1.42.0 2b2db7c58000-2b2db7c59000 rw-p 00003000 fd:03 32244866 /usr/lib/libboost_system.so.1.42.0 2b2db7c59000-2b2db7c6d000 r-xp 00000000 fd:03 32244882 /usr/lib/libboost_thread.so.1.42.0 2b2db7c6d000-2b2db7e6c000 ---p 00014000 fd:03 32244882 /usr/lib/libboost_thread.so.1.42.0 2b2db7e6c000-2b2db7e6e000 r--p 00013000 fd:03 32244882 /usr/lib/libboost_thread.so.1.42.0 2b2db7e6e000-2b2db7e6f000 rw-p 00015000 fd:03 32244882 /usr/lib/libboost_thread.so.1.42.0 2b2db7e6f000-2b2db7e83000 r-xp 00000000 fd:03 32244880 /usr/lib/libboost_filesystem.so.1.42.0 2b2db7e83000-2b2db8082000 ---p 00014000 fd:03 32244880 Mon Nov 26 19:01:29 mongo got signal 6 (Aborted), stack trace: Mon Nov 26 19:01:29 0x45e03f 0x457694 0x2b2db93d4d80 0x2b2db93d4d05 0x2b2db93d8ab6 0x2b2db940fa9b 0x2b2db94198d6 0x2b2db941b841 0x2b2db941f603 0x45bd92 0x45d319 0x2b2db93da961 0x458043 0x2b2db753fc60 0x2b2db93d4fe7 0x2b2db889b888 0x2b2db889d9de 0x2b2db889e0c8 0x2b2db8889061 0x2b2db88895b5 /usr/lib/mongodb/mongo(_ZN5mongo15printStackTraceERSo+0x1f) [0x45e03f] /usr/lib/mongodb/mongo(_Z12quitAbruptlyi+0x324) [0x457694] /lib/x86_64-linux-gnu/libc.so.6(+0x33d80) [0x2b2db93d4d80] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x2b2db93d4d05] /lib/x86_64-linux-gnu/libc.so.6(abort+0x186) [0x2b2db93d8ab6] /lib/x86_64-linux-gnu/libc.so.6(+0x6ea9b) [0x2b2db940fa9b] /lib/x86_64-linux-gnu/libc.so.6(+0x788d6) [0x2b2db94198d6] /lib/x86_64-linux-gnu/libc.so.6(+0x7a841) [0x2b2db941b841] /lib/x86_64-linux-gnu/libc.so.6(cfree+0x73) [0x2b2db941f603] /usr/lib/mongodb/mongo(_ZN5boost6detail17sp_counted_impl_pIN5mongo7BSONObj6HolderEE7disposeEv+0x12) [0x45bd92] /usr/lib/mongodb/mongo(_ZN5boost6detail12shared_countD2Ev+0x49) [0x45d319] /lib/x86_64-linux-gnu/libc.so.6(exit+0xe1) [0x2b2db93da961] /usr/lib/mongodb/mongo(_Z10quitNicelyi+0x53) [0x458043] /lib/x86_64-linux-gnu/libpthread.so.0(+0xfc60) [0x2b2db753fc60] /lib/x86_64-linux-gnu/libc.so.6(kill+0x7) [0x2b2db93d4fe7] /lib/libreadline.so.6(+0x25888) [0x2b2db889b888] /lib/libreadline.so.6(rl_getc+0x5e) [0x2b2db889d9de] /lib/libreadline.so.6(rl_read_key+0xf8) [0x2b2db889e0c8] /lib/libreadline.so.6(readline_internal_char+0x61) [0x2b2db8889061] /lib/libreadline.so.6(readline+0x55) [0x2b2db88895b5] Any One have any idea?Why MongoDb Crashed? OS:ubuntu 11.04 2.6.32-pony6-3 RAM:2 GB

    Read the article

  • multi-user rvm gem install failure when called from CloudFormation::Init

    - by Peter Mounce
    I've taken an Amazon Linux AMI (based on CentOS) and installed RVM (1.10.3) to it in multi-user fashion (see {1} below). I used that to install ruby 1.9.3-p125, rubygems 1.8.17, and bundler 1.1 as the baseline requirements for most things I'm going to be using the instances for. I've captured that instance to an AMI, and am now launching it via CloudFormation, with some CloudFormation::Init commands. One of them is to use s3cmd to pull down a private gem from S3, and the next one, the one that fails, is to install that gem. It fails with an error message 2012-03-15 16:53:20,201 [ERROR] Command 20_install_gems (/usr/local/rvm/rubies/ruby-1.9.3-p125/bin/gem install ./*.gem) failed 2012-03-15 16:53:20,202 [DEBUG] Command 20_install_gems output: /usr/local/rvm/rubies/ruby-1.9.3-p125/bin/gem:12:in `require': no such file to load -- rubygems (LoadError) from /usr/local/rvm/rubies/ruby-1.9.3-p125/bin/gem:12 Now, that happens during the cfn-init execution - I assume, but haven't checked yet, that cfn-init is being run with an environment different from that of ec2-user (there are no other users on the instance). If I run gem install mygem.gem in an interactive session then that works fine. So, my question really, is what should I do to make this work for cfn-init? Have I correctly set up rvm as multi-user? I've confirmed that cfn-init is being run as the root user, with his restricted environment. How should I source the /etc/profile.d/rvm.sh into root's sessions? {1} My semi-automated rvm installation steps (run in interactive session as ec2-user): sudo bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer ) sudo gpasswd -a ec2-user rvm # iconv-devel is baked into centos' glibc sudo yum install -y autoconf automake bison bzip2 gcc-c++ git libffi-devel libtool libxml2-devel libxslt-devel libyaml-devel make openssl-devel patch readline readline-devel zlib zlib-devel source /etc/profile.d/rvm.sh rvm list known # in a new session: rvm install ruby-1.9.3-p125 rvm use 1.9.3 --default gem update --system # gems required by public_web-awareness gem install aws-sdk bundler cocaine sinatra echo -e "gem: --no-ri --no-rdoc\n" > /home/ec2-user/.gemrc # delete unnecessary documentation files rm -rf `gem env gemdir`/doc sudo -s sudo echo -e "gem: --no-ri --no-rdoc\n" > /etc/skel/.gemrc sudo echo -e "gem: --no-ri --no-rdoc\n" > /etc/gemrc # ctrl + d out of the sudo session Some environment information: [ec2-user@ip ~]$ echo $PATH /usr/local/rvm/gems/ruby-1.9.3-p125/bin:/usr/local/rvm/gems/ruby-1.9.3-p125@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p125/bin:/usr/local/rvm/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:/home/ec2-user/bin [ec2-user@ip ~]$ echo $GEM_HOME /usr/local/rvm/gems/ruby-1.9.3-p125 [ec2-user@ip ~]$ echo $GEM_PATH /usr/local/rvm/gems/ruby-1.9.3-p125:/usr/local/rvm/gems/ruby-1.9.3-p125@global [ec2-user@ip ~]$ echo $BUNDLE_PATH [ec2-user@ip ~]$ gem list *** LOCAL GEMS *** aws-sdk (1.3.6) bundler (1.1.0) cocaine (0.2.1) httparty (0.8.1) json (1.6.5) multi_json (1.1.0) multi_xml (0.4.1) nokogiri (1.5.1, 1.5.0) rack (1.4.1) rack-protection (1.2.0) rake (0.9.2) sinatra (1.3.2) tilt (1.3.3) uuidtools (2.1.2) yamler (0.1.0)

    Read the article

  • Setting up home DNS with Ubuntu Server

    - by Zeophlite
    I have a webserver (with static IP 192.168.1.5), and I want to have my machines on my local network to be able to access it without modifying /etc/hosts (or equivalent for Windows/OSX). My router has Primary DNS server 192.168.1.5 Secondary DNS server 8.8.8.8 (Google's public DNS). Nginx is set up to server websites externally as *.example.com Internally, I want *.example.local to point to the server. My webserver has BIND9 installed, but I'm unsure of the settings. I've been through various contradicting tutorials, and so most of my settings have been clobbered. I've stripped out the lines which I'm confused about. The tutorials I looked at are http://tech.surveypoint.com/blog/installing-a-local-dns-server-behind-a-hardware-router/ and http://ubuntuforums.org/showthread.php?t=236093 . They mostly differ on what should be put in /etc/bind/zones/db.example.local and /etc/bind/zones/db.192, so I've left the conflicting lines out below. Can someone suggest what the correct lines are to give my above behaviour (namely *.example.local pointing to 192.168.1.5)? /etc/network/interfaces auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.5 netmask 255.255.255.0 broadcast 192.168.1.255 gateway 192.168.1.254 /etc/hostname avalon /etc/resolv.conf # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN /etc/bind/named.conf.options options { directory "/var/cache/bind"; forwarders { 8.8.8.8; 8.8.4.4; }; dnssec-validation auto; auth-nxdomain no; # conform to RFC1035 listen-on-v6 { any; }; }; /etc/bind/named.conf.local zone "example.local" { type master; file "/etc/bind/zones/db.example.local"; }; zone "1.168.192.in-addr.arpa" { type master; file "/etc/bind/zones/db.192"; }; /etc/bind/zones/db.example.local $TTL 604800 @ IN SOA avalon.example.local. webadmin.example.local. ( 5 ; Serial, increment each edit 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL /etc/bind/zones/db.192 $TTL 604800 @ IN SOA avalon.example.local. webadmin.example.local. ( 4 ; Serial, increment each edit 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ; What do I need to add to the above files so that on a laptop on the internal network, I can type in webapp.example.local, and be served by my webserver? EDIT I made several changes to the above files on the webserver. /etc/network/interfaces (end of file) dns-nameservers 127.0.0.1 dns-search example.local /etc/bind/zones/db.example.local (end of file) @ IN NS avalon.example.local. @ IN A 192.168.1.5 avalon IN A 192.168.1.5 webapp IN A 192.168.1.5 www IN CNAME 192.168.1.5 /etc/bind/zones/db.192 (end of file) IN NS avalon.example.local. 73 IN PTR avalon.example.local. As a side note, my spare Win7 machine was able to connect directly to webapp.example.local, but for a Ubuntu 13.10 machine, I had to make the following changes as well (not on the webserver, but on a separate machine): /etc/nsswitch.conf before hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 after hosts: files dns /etc/NetworkManager/NetworkManager.conf before dns=dnsmasq after #dns=dnsmasq The issue remains that its not wildcard DNS, and so I have to add entries to /etc/bind/zones/db.example.local for webapp1, webapp2, ...

    Read the article

  • DHCPv6: Provide IPv6 information in your local network

    Even though IPv6 might not be that important within your local network it might be good to get yourself into shape, and be able to provide some details of your infrastructure automatically to your network clients. This is the second article in a series on IPv6 configuration: Configure IPv6 on your Linux system DHCPv6: Provide IPv6 information in your local network Enabling DNS for IPv6 infrastructure Accessing your web server via IPv6 Piece of advice: This is based on my findings on the internet while reading other people's helpful articles and going through a couple of man-pages on my local system. IPv6 addresses for everyone (in your network) Okay, after setting up the configuration of your local system, it might be interesting to enable all your machines in your network to use IPv6. There are two options to solve this kind of requirement... Either you're busy like a bee and you go around to configure each and every system manually, or you're more the lazy and effective type of network administrator and you prefer to work with Dynamic Host Configuration Protocol (DHCP). Obviously, I'm of the second type. Enabling dynamic IPv6 address assignments can be done with a new or an existing instance of a DHCPd. In case of Ubuntu-based installation this might be isc-dhcp-server. The isc-dhcp-server allows address pooling for IP and IPv6 within the same package, you just have to run to independent daemons for each protocol version. First, check whether isc-dhcp-server is already installed and maybe running your machine like so: $ service isc-dhcp-server6 status In case, that the service is unknown, you have to install it like so: $ sudo apt-get install isc-dhcp-server Please bear in mind that there is no designated installation package for IPv6. Okay, next you have to create a separate configuration file for IPv6 address pooling and network parameters called /etc/dhcp/dhcpd6.conf. This file is not automatically provided by the package, compared to IPv4. Again, use your favourite editor and put the following lines: $ sudo nano /etc/dhcp/dhcpd6.conf authoritative;default-lease-time 14400; max-lease-time 86400;log-facility local7;subnet6 2001:db8:bad:a55::/64 {    option dhcp6.name-servers 2001:4860:4860::8888, 2001:4860:4860::8844;    option dhcp6.domain-search "ios.mu";    range6 2001:db8:bad:a55::100 2001:db8:bad:a55::199;    range6 2001:db8:bad:a55::/64 temporary;} Next, save the file and start the daemon as a foreground process to see whether it is going to listen to requests or not, like so: $ sudo /usr/sbin/dhcpd -6 -d -cf /etc/dhcp/dhcpd6.conf eth0 The parameters are explained quickly as -6 we want to run as a DHCPv6 server, -d we are sending log messages to the standard error descriptor (so you should monitor your /var/log/syslog file, too), and we explicitely want to use our newly created configuration file (-cf). You might also use the command switch -t to test the configuration file prior to running the server. In my case, I ended up with a couple of complaints by the server, especially reporting that the necessary lease file wouldn't exist. So, ensure that the lease file for your IPv6 address assignments is present: $ sudo touch /var/lib/dhcp/dhcpd6.leases$ sudo chown dhcpd:dhcpd /var/lib/dhcp/dhcpd6.leases Now, you should be good to go. Stop your foreground process and try to run the DHCPv6 server as a service on your system: $ sudo service isc-dhcp-server6 startisc-dhcp-server6 start/running, process 15883 Check your log file /var/log/syslog for any kind of problems. Refer to the man-pages of isc-dhcp-server and you might check out Chapter 22.6 of Peter Bieringer's IPv6 Howto. The instructions regarding DHCPv6 on the Ubuntu Wiki are not as complete as expected and it might not be as helpful as this article or Peter's HOWTO. But see for yourself. Does the client get an IPv6 address? Running a DHCPv6 server on your local network surely comes in handy but it has to work properly. The following paragraphs describe briefly how to check the IPv6 configuration of your clients, Linux - ifconfig or ip command First, you have enable IPv6 on your Linux by specifying the necessary directives in the /etc/network/interfaces file, like so: $ sudo nano /etc/network/interfaces iface eth1 inet6 dhcp Note: Your network device might be eth0 - please don't just copy my configuration lines. Then, either restart your network subsystem, or enable the device manually using the dhclient command with IPv6 switch, like so: $ sudo dhclient -6 You would either use the ifconfig or (if installed) the ip command to check the configuration of your network device like so: $ sudo ifconfig eth1eth1      Link encap:Ethernet  HWaddr 00:1d:09:5d:8d:98            inet addr:192.168.160.147  Bcast:192.168.160.255  Mask:255.255.255.0          inet6 addr: 2001:db8:bad:a55::193/64 Scope:Global          inet6 addr: fe80::21d:9ff:fe5d:8d98/64 Scope:Link          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 Looks good, the client has an IPv6 assignment. Now, let's see whether DNS information has been provided, too. $ less /etc/resolv.conf # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTENnameserver 2001:4860:4860::8888nameserver 2001:4860:4860::8844nameserver 192.168.1.2nameserver 127.0.1.1search ios.mu Nicely done. Windows - netsh Per description on TechNet the netsh is defined as following: "Netsh is a command-line scripting utility that allows you to, either locally or remotely, display or modify the network configuration of a computer that is currently running. Netsh also provides a scripting feature that allows you to run a group of commands in batch mode against a specified computer. Netsh can also save a configuration script in a text file for archival purposes or to help you configure other servers." And even though TechNet states that it applies to Windows Server (only), it is also available on Windows client operating systems, like Vista, Windows 7 and Windows 8. In order to get or even set information related to IPv6 protocol, we have to switch the netsh interface context prior to our queries. Open a command prompt in Windows and run the following statements: C:\Users\joki>netshnetsh>interface ipv6netsh interface ipv6>show interfaces Select the device index from the Idx column to get more details about the IPv6 address and DNS server information (here: I'm going to use my WiFi device with device index 11), like so: netsh interface ipv6>show address 11 Okay, address information has been provided. Now, let's check the details about DNS and resolving host names: netsh interface ipv6> show dnsservers 11 Okay, that looks good already. Our Windows client has a valid IPv6 address lease with lifetime information and details about the configured DNS servers. Talking about DNS server... Your clients should be able to connect to your network servers via IPv6 using hostnames instead of IPv6 addresses. Please read on about how to enable a local named with IPv6.

    Read the article

  • How to access GNU Xnee

    - by Gaurav Butola
    I have installed GNU Xnee (Gnee an OS X automator alternative) from the Software Centre but now I cant find it anywhere in the menus. Here is the output when I run gnee in the terminal gaurav@gaurav-HCL-ME-Laptop:~$ gnee (gnee:6864): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated (gnee:6864): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated (gnee:6864): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated (gnee:6864): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated (gnee:6864): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated (gnee:6864): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated (gnee:6864): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated (gnee:6864): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated (gnee:6864): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated (gnee:6864): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated *** glibc detected *** gnee: free(): invalid next size (fast): 0x08afb638 *** ======= Backtrace: ========= /lib/libc.so.6(+0x6c501)[0x53de501] /lib/libc.so.6(+0x6dd70)[0x53dfd70] /lib/libc.so.6(cfree+0x6d)[0x53e2e5d] gnee[0x804c9f5] /lib/libc.so.6(__libc_start_main+0xe7)[0x5388ce7] gnee[0x804c571] ======= Memory map: ======== 00110000-00112000 r-xp 00000000 08:01 2755679 /usr/lib/libgmodule-2.0.so.0.2600.0 00112000-00113000 r--p 00002000 08:01 2755679 /usr/lib/libgmodule-2.0.so.0.2600.0 00113000-00114000 rw-p 00003000 08:01 2755679 /usr/lib/libgmodule-2.0.so.0.2600.0 00116000-0011a000 r-xp 00000000 08:01 2755370 /usr/lib/libXtst.so.6.1.0 0011a000-0011b000 r--p 00003000 08:01 2755370 /usr/lib/libXtst.so.6.1.0 0011b000-0011c000 rw-p 00004000 08:01 2755370 /usr/lib/libXtst.so.6.1.0 0011c000-00176000 r-xp 00000000 08:01 2755432 /usr/lib/libbonoboui-2.so.0.0.0 00176000-00177000 r--p 00059000 08:01 2755432 /usr/lib/libbonoboui-2.so.0.0.0 00177000-00179000 rw-p 0005a000 08:01 2755432 /usr/lib/libbonoboui-2.so.0.0.0 00179000-001c8000 r-xp 00000000 08:01 2755428 /usr/lib/libbonobo-2.so.0.0.0 001c8000-001c9000 ---p 0004f000 08:01 2755428 /usr/lib/libbonobo-2.so.0.0.0 001c9000-001cc000 r--p 0004f000 08:01 2755428 /usr/lib/libbonobo-2.so.0.0.0 001cc000-001d3000 rw-p 00052000 08:01 2755428 /usr/lib/libbonobo-2.so.0.0.0 001d3000-00200000 r-xp 00000000 08:01 2754521 /usr/lib/libgconf-2.so.4.1.5 00200000-00201000 ---p 0002d000 08:01 2754521 /usr/lib/libgconf-2.so.4.1.5 00201000-00202000 r--p 0002d000 08:01 2754521 /usr/lib/libgconf-2.so.4.1.5 00202000-00204000 rw-p 0002e000 08:01 2754521 /usr/lib/libgconf-2.so.4.1.5 00204000-0021c000 r-xp 00000000 08:01 2755405 /usr/lib/libatk-1.0.so.0.3209.1 0021c000-0021d000 ---p 00018000 08:01 2755405 /usr/lib/libatk-1.0.so.0.3209.1 0021d000-0021e000 r--p 00018000 08:01 2755405 /usr/lib/libatk-1.0.so.0.3209.1 0021e000-0021f000 rw-p 00019000 08:01 2755405 /usr/lib/libatk-1.0.so.0.3209.1 0021f000-00243000 r-xp 00000000 08:01 2756035 /usr/lib/libpangoft2-1.0.so.0.2800.1 00243000-00244000 r--p 00023000 08:01 2756035 /usr/lib/libpangoft2-1.0.so.0.2800.1 00244000-00245000 rw-p 00024000 08:01 2756035 /usr/lib/libpangoft2-1.0.so.0.2800.1 00245000-00248000 r-xp 00000000 08:01 393403 /lib/libuuid.so.1.3.0 00248000-00249000 r--p 00002000 08:01 393403 /lib/libuuid.so.1.3.0 00249000-0024a000 rw-p 00003000 08:01 393403 /lib/libuuid.so.1.3.0 0024a000-0024c000 r-xp 00000000 08:01 2755415 /usr/lib/libavahi-glib.so.1.0.2 0024c000-0024d000 r--p 00001000 08:01 2755415 /usr/lib/libavahi-glib.so.1.0.2 0024d000-0024e000 rw-p 00002000 08:01 2755415 /usr/lib/libavahi-glib.so.1.0.2 0024e000-00250000 r-xp 00000000 08:01 393661 /lib/libutil-2.12.1.so 00250000-00251000 r--p 00001000 08:01 393661 /lib/libutil-2.12.1.so 00251000-00252000 rw-p 00002000 08:01 393661 /lib/libutil-2.12.1.so 00254000-00255000 r-xp 00000000 00:00 0 [vdso] 00255000-0026c000 r-xp 00000000 08:01 2755647 /usr/lib/libgdk_pixbuf-2.0.so.0.2200.0 0026c000-0026d000 r--p 00017000 08:01 2755647 /usr/lib/libgdk_pixbuf-2.0.so.0.2200.0 0026d000-0026e000 rw-p 00018000 08:01 2755647 /usr/lib/libgdk_pixbuf-2.0.so.0.2200.0 0026e000-002ad000 r-xp 00000000 08:01 2756031 /usr/lib/libpango-1.0.so.0.2800.1 002ad000-002ae000 ---p 0003f000 08:01 2756031 /usr/lib/libpango-1.0.so.0.2800.1 002ae000-002af000 r--p 0003f000 08:01 2756031 /usr/lib/libpango-1.0.so.0.2800.1 002af000-002b0000 rw-p 00040000 08:01 2756031 /usr/lib/libpango-1.0.so.0.2800.1 002b0000-002be000 r-xp 00000000 08:01 2755342 /usr/lib/libXext.so.6.4.0 002be000-002bf000 r--p 0000d000 08:01 2755342 /usr/lib/libXext.so.6.4.0 002bf000-002c0000 rw-p 0000e000 08:01 2755342 /usr/lib/libXext.so.6.4.0 002c0000-002c4000 r-xp 00000000 08:01 2755317 /usr/lib/libORBitCosNaming-2.so.0.1.0 002c4000-002c5000 r--p 00003000 08:01 2755317 /usr/lib/libORBitCosNaming-2.so.0.1.0 002c5000-002c6000 rw-p 00004000 08:01 2755317 /usr/lib/libORBitCosNaming-2.so.0.1.0 002c7000-002d9000 r-xp 00000000 08:01 2755430 /usr/lib/libbonobo-activation.so.4.0.0 002d9000-002da000 r--p 00012000 08:01 2755430 /usr/lib/libbonobo-activation.so.4.0.0 002da000-002db000 rw-p 00013000 08:01 2755430 /usr/lib/libbonobo-activation.so.4.0.0 002db000-002dc000 rw-p 00000000 00:00 0 002dc000-00370000 r-xp 00000000 08:01 2755645 /usr/lib/libgdk-x11-2.0.so.0.2200.0 00370000-00372000 r--p 00094000 08:01 2755645 /usr/lib/libgdk-x11-2.0.so.0.2200.0 00372000-00373000 rw-p 00096000 08:01 2755645 /usr/lib/libgdk-x11-2.0.so.0.2200.0 00373000-0038d000 r-xp 00000000 08:01 2755689 /usr/lib/libgnome-keyring.so.0.1.1 0038d000-0038e000 r--p 00019000 08:01 2755689 /usr/lib/libgnome-keyring.so.0.1.1 0038e000-0038f000 rw-p 0001a000 08:01 2755689 /usr/lib/libgnome-keyring.so.0.1.1 0038f000-00395000 r-xp 00000000 08:01 2755619 /usr/lib/libgailutil.so.18.0.1 00395000-00396000 r--p 00005000 08:01 2755619 /usr/lib/libgailutil.so.18.0.1 00396000-00397000 rw-p 00006000 08:01 2755619 /usr/lib/libgailutil.so.18.0.1 00397000-003ac000 r-xp 00000000 08:01 2755300 /usr/lib/libICE.so.6.3.0 003ac000-003ad000 r--p 00014000 08:01 2755300 /usr/lib/libICE.so.6.3.0 003ad000-003ae000 rw-p 00015000 08:01 2755300 /usr/lib/libICE.so.6.3.0 003ae000-003b0000 rw-p 00000000 00:00 0 003b0000-003f0000 r-xp 00000000 08:01 2755715 /usr/lib/libgobject-2.0.so.0.2600.0 003f0000-003f1000 r--p 00040000 08:01 2755715 /usr/lib/libgobject-2.0.so.0.2600.0 003f1000-003f2000 rw-p 00041000 08:01 2755715 /usr/lib/libgobject-2.0.so.0.2600.0 003f2000-0040f000 r-xp 00000000 08:01 2755524 /usr/lib/libdbus-glib-1.so.2.1.0 0040f000-00410000 r--p 0001c000 08:01 2755524 /usr/lib/libdbus-glib-1.so.2.1.0 00410000-00411000 rw-p 0001d000 08:01 2755524 /usr/lib/libdbus-glib-1.so.2.1.0 00411000-00413000 r-xp 00000000 08:01 2755352 /usr/lib/libXinerama.so.1.0.0 00413000-00414000 r--p 00001000 08:01 2755352 /usr/lib/libXinerama.so.1.0.0 00414000-00415000 rw-p 00002000 08:01 2755352 /usr/lib/libXinerama.so.1.0.0 00416000-0045f000 r-xp 00000000 08:01 2755313 /usr/lib/libORBit-2.so.0.1.0 0045f000-00467000 r--p 00049000 08:01 2755313 /usr/lib/libORBit-2.so.0.1.0 00467000-00469000 rw-p 00051000 08:01 2755313 /usr/lib/libORBit-2.so.0.1.0 00469000-00551000 r-xp 00000000 08:01 2755661 /usr/lib/libgio-2.0.so.0.2600.0 00551000-00553000 r--p 000e7000 08:01 2755661 /usr/lib/libgio-2.0.so.0.2600.0 00553000-00554000 rw-p 000e9000 08:01 2755661 /usr/lib/libgio-2.0.so.0.2600.0 00554000-00555000 rw-p 00000000 00:00 0 00555000-00578000 r-xp 00000000 08:01 393365 /lib/libpng12.so.0.44.0 00578000-00579000 r--p 00022000 08:01 393365 /lib/libpng12.so.0.44.0 00579000-0057a000 rw-p 00023000 08:01 393365 /lib/libpng12.so.0.44.0 0057d000-0057f000 r-xp 00000000 08:01 393656 /lib/libdl-2.12.1.so 0057f000-00580000 r--p 00001000 08:01 393656 /lib/libdl-2.12.1.soAborted

    Read the article

  • DNS no longer works after server reboot

    - by Burning the Codeigniter
    Strangely enough, when I reboot my Ubuntu 12.04 server, the DNS no longer works, which makes the domain unavailable to access to my site. Normally the DNS should be working after a reboot, but this doesn't happen anymore. I use nginx to serve content, but nginx is already configured to work with my domains. What are the typical practises must I do after a reboot and how can I solve this issue I experience? I already have BIND, networking and resolvconf to boot when the server boots up. ; <<>> DiG 9.8.1-P1 <<>> mysite.com ;; global options: +cmd ;; connection timed out; no servers could be reached This is my output with dig $ttl 38400 mysite.com. IN SOA ns1.mysite.com. webmaster.mysite.com. ( 1055026205 6H 1H 5D 20M ) mysite.com. IN A xx.xx.xx.xx # Server IP *.mysite.com. IN A xx.xx.xx.xx # Server IP www.mysite.com. IN CNAME mysite.com. ns1.mysite.com. IN A xx.xx.xx.xx # Server 2nd IP ns2.mysite.com. IN A xx.xx.xx.xx # Server 3rd IP mysite.com. IN NS ns1.mysite.com. mysite.com. IN NS ns2.mysite.com. mail.mysite.com. IN MX 1 mysite.com. This is the contents of /etc/resolv.conf # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 85.17.150.123 nameserver 85.17.96.69 nameserver 62.212.64.122 search localdomain After using more dig commands, outputs: ; <<>> DiG 9.7.3-P3 <<>> @85.17.150.123 mysite.com ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 24847 ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; WARNING: recursion requested but not available ;; QUESTION SECTION: ;mysite.com. IN A ;; Query time: 2145 msec ;; SERVER: 85.17.150.123#53(85.17.150.123) ;; WHEN: Mon Nov 5 16:31:32 2012 ;; MSG SIZE rcvd: 30 ; <<>> DiG 9.7.3-P3 <<>> @85.17.96.69 mysite.com ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 27879 ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; WARNING: recursion requested but not available ;; QUESTION SECTION: ;mysite.com. IN A ;; Query time: 949 msec ;; SERVER: 85.17.96.69#53(85.17.96.69) ;; WHEN: Mon Nov 5 16:32:59 2012 ;; MSG SIZE rcvd: 30 ; <<>> DiG 9.7.3-P3 <<>> @62.212.64.122 mysite.com ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 29293 ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; WARNING: recursion requested but not available ;; QUESTION SECTION: ;mysite.com. IN A ;; Query time: 825 msec ;; SERVER: 62.212.64.122#53(62.212.64.122) ;; WHEN: Mon Nov 5 16:33:39 2012 ;; MSG SIZE rcvd: 30 With Google DNS (8.8.8.8): ; <<>> DiG 9.7.3-P3 <<>> @8.8.8.8 mysite.com ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 38498 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;mysite.com. IN A ;; Query time: 3982 msec ;; SERVER: 8.8.8.8#53(8.8.8.8) ;; WHEN: Mon Nov 5 16:37:27 2012 ;; MSG SIZE rcvd: 30

    Read the article

  • Why does apt-get install Skype easily while aptitude complains about MAJOR dependency errors?

    - by Prateek
    I was trying to install Skype on Ubuntu 13.04, from the Canonical repositories. With apt-get it worked easily, while aptitude had a huge problem with dependencies and proposed a complicated solution. Why is this so? Why doesn't aptitude offer whatever apt-get does as a potential solution? Here is the output of both: apt-get install skype: Reading package lists... Building dependency tree... Reading state information... The following extra packages will be installed: gcc-4.7-base:i386 libasound2 libasound2:i386 libasound2-plugins:i386 libasyncns0:i386 libaudio2:i386 libavahi-client3:i386 libavahi-common-data:i386 libavahi-common3:i386 libc6:i386 libcomerr2:i386 libcups2:i386 libdbus-1-3 libdbus-1-3:i386 libdbusmenu-qt2:i386 libdrm-intel1 libdrm-intel1:i386 libdrm-nouveau2 libdrm-nouveau2:i386 libdrm-radeon1 libdrm-radeon1:i386 libdrm2 libdrm2:i386 libexpat1:i386 libffi6:i386 libflac8:i386 libfontconfig1:i386 libfreetype6:i386 libgcc1:i386 libgcrypt11 libgcrypt11:i386 libgl1-mesa-dri libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 libglapi-mesa:i386 libglib2.0-0:i386 libgnutls26 libgnutls26:i386 libgpg-error0:i386 libgssapi-krb5-2:i386 libgstreamer-plugins-base0.10-0:i386 libgstreamer0.10-0:i386 libice6:i386 libjack-jackd2-0:i386 libjbig0:i386 libjpeg-turbo8:i386 libjpeg8:i386 libjson0:i386 libk5crypto3:i386 libkeyutils1:i386 libkrb5-3:i386 libkrb5support0:i386 liblcms1:i386 libllvm3.2:i386 liblzma5:i386 libmng1:i386 libmysqlclient18:i386 libogg0:i386 liborc-0.4-0:i386 libp11-kit0:i386 libpciaccess0:i386 libpcre3:i386 libpng12-0:i386 libpulse0:i386 libqt4-dbus libqt4-dbus:i386 libqt4-declarative libqt4-declarative:i386 libqt4-designer libqt4-help libqt4-network libqt4-network:i386 libqt4-opengl libqt4-opengl:i386 libqt4-script libqt4-script:i386 libqt4-scripttools libqt4-sql libqt4-sql:i386 libqt4-sql-mysql:i386 libqt4-sql-sqlite libqt4-svg libqt4-test libqt4-xml libqt4-xml:i386 libqt4-xmlpatterns libqt4-xmlpatterns:i386 libqtcore4 libqtcore4:i386 libqtgui4 libqtgui4:i386 libqtwebkit4:i386 libsamplerate0:i386 libselinux1:i386 libsm6:i386 libsndfile1:i386 libspeexdsp1:i386 libsqlite3-0:i386 libssl1.0.0 libssl1.0.0:i386 libstdc++6:i386 libtasn1-3:i386 libtiff5 libtiff5:i386 libtxc-dxtn-s2tc0:i386 libuuid1:i386 libvorbis0a:i386 libvorbisenc2:i386 libwrap0:i386 libx11-6 libx11-6:i386 libx11-xcb1 libx11-xcb1:i386 libxau6:i386 libxcb-dri2-0 libxcb-dri2-0:i386 libxcb-glx0 libxcb-glx0:i386 libxcb1 libxcb1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6 libxext6:i386 libxfixes3 libxfixes3:i386 libxi6 libxi6:i386 libxml2 libxml2:i386 libxrender1 libxrender1:i386 libxslt1.1:i386 libxss1:i386 libxt6 libxt6:i386 libxv1 libxv1:i386 libxxf86vm1 libxxf86vm1:i386 mysql-common qdbus skype-bin:i386 sni-qt:i386 zlib1g:i386 Suggested packages: nas:i386 glibc-doc:i386 locales:i386 rng-tools rng-tools:i386 libglide3 libglide3:i386 gnutls-bin gnutls-bin:i386 krb5-doc:i386 krb5-user:i386 libvisual-0.4-plugins:i386 gstreamer-codec-install:i386 gnome-codec-install:i386 gstreamer0.10-tools:i386 gstreamer0.10-plugins-base:i386 jackd2:i386 liblcms-utils:i386 pulseaudio:i386 libqt4-declarative-folderlistmodel libqt4-declarative-gestures libqt4-declarative-particles libqt4-declarative-shaders qt4-qmlviewer libqt4-declarative-folderlistmodel:i386 libqt4-declarative-gestures:i386 libqt4-declarative-particles:i386 libqt4-declarative-shaders:i386 qt4-qmlviewer:i386 libqt4-dev libqt4-dev:i386 libthai0:i386 libicu48:i386 qt4-qtconfig qt4-qtconfig:i386 Recommended packages: libtxc-dxtn0:i386 xml-core:i386 The following NEW packages will be installed gcc-4.7-base:i386 libasound2:i386 libasound2-plugins:i386 libasyncns0:i386 libaudio2:i386 libavahi-client3:i386 libavahi-common-data:i386 libavahi-common3:i386 libc6:i386 libcomerr2:i386 libcups2:i386 libdbus-1-3:i386 libdbusmenu-qt2:i386 libdrm-intel1:i386 libdrm-nouveau2:i386 libdrm-radeon1:i386 libdrm2:i386 libexpat1:i386 libffi6:i386 libflac8:i386 libfontconfig1:i386 libfreetype6:i386 libgcc1:i386 libgcrypt11:i386 libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 libglapi-mesa:i386 libglib2.0-0:i386 libgnutls26:i386 libgpg-error0:i386 libgssapi-krb5-2:i386 libgstreamer-plugins-base0.10-0:i386 libgstreamer0.10-0:i386 libice6:i386 libjack-jackd2-0:i386 libjbig0:i386 libjpeg-turbo8:i386 libjpeg8:i386 libjson0:i386 libk5crypto3:i386 libkeyutils1:i386 libkrb5-3:i386 libkrb5support0:i386 liblcms1:i386 libllvm3.2:i386 liblzma5:i386 libmng1:i386 libmysqlclient18:i386 libogg0:i386 liborc-0.4-0:i386 libp11-kit0:i386 libpciaccess0:i386 libpcre3:i386 libpng12-0:i386 libpulse0:i386 libqt4-dbus:i386 libqt4-declarative:i386 libqt4-network:i386 libqt4-opengl:i386 libqt4-script:i386 libqt4-sql:i386 libqt4-sql-mysql:i386 libqt4-xml:i386 libqt4-xmlpatterns:i386 libqtcore4:i386 libqtgui4:i386 libqtwebkit4:i386 libsamplerate0:i386 libselinux1:i386 libsm6:i386 libsndfile1:i386 libspeexdsp1:i386 libsqlite3-0:i386 libssl1.0.0:i386 libstdc++6:i386 libtasn1-3:i386 libtiff5:i386 libtxc-dxtn-s2tc0:i386 libuuid1:i386 libvorbis0a:i386 libvorbisenc2:i386 libwrap0:i386 libx11-6:i386 libx11-xcb1:i386 libxau6:i386 libxcb-dri2-0:i386 libxcb-glx0:i386 libxcb1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386 libxi6:i386 libxml2:i386 libxrender1:i386 libxslt1.1:i386 libxss1:i386 libxt6:i386 libxv1:i386 libxxf86vm1:i386 mysql-common skype skype-bin:i386 sni-qt:i386 zlib1g:i386 The following packages will be upgraded: libasound2 libdbus-1-3 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libgcrypt11 libgl1-mesa-dri libgnutls26 libqt4-dbus libqt4-declarative libqt4-designer libqt4-help libqt4-network libqt4-opengl libqt4-script libqt4-scripttools libqt4-sql libqt4-sql-sqlite libqt4-svg libqt4-test libqt4-xml libqt4-xmlpatterns libqtcore4 libqtgui4 libssl1.0.0 libtiff5 libx11-6 libx11-xcb1 libxcb-dri2-0 libxcb-glx0 libxcb1 libxext6 libxfixes3 libxi6 libxml2 libxrender1 libxt6 libxv1 libxxf86vm1 qdbus 41 upgraded, 105 newly installed, 0 to remove and 138 not upgraded. Need to get 85.9 MB/89.2 MB of archives. After this operation, 204 MB of additional disk space will be used. Do you want to continue [Y/n]? aptitude install skype: Reading package lists... Building dependency tree... Reading state information... Reading extended state information... Initialising package states... The following NEW packages will be installed: gcc-4.7-base:i386{a} libasound2:i386{a} libasound2-plugins:i386{a} libasyncns0:i386{a} libaudio2:i386{a} libavahi-client3:i386{a} libavahi-common-data:i386{a} libavahi-common3:i386{a} libc6:i386{a} libcomerr2:i386{a} libcups2:i386{a} libdbus-1-3:i386{a} libdbusmenu-qt2:i386{a} libdrm-intel1:i386{a} libdrm-nouveau2:i386{a} libdrm-radeon1:i386{a} libdrm2:i386{a} libexpat1:i386{a} libffi6:i386{a} libflac8:i386{a} libfontconfig1:i386{a} libfreetype6:i386{a} libgcc1:i386{a} libgcrypt11:i386{a} libgl1-mesa-dri:i386{a} libgl1-mesa-glx:i386{a} libglapi-mesa:i386{a} libglib2.0-0:i386{a} libgnutls26:i386{a} libgpg-error0:i386{a} libgssapi-krb5-2:i386{a} libgstreamer-plugins-base0.10-0:i386{a} libgstreamer0.10-0:i386{a} libice6:i386{a} libjack-jackd2-0:i386{a} libjbig0:i386{a} libjpeg-turbo8:i386{a} libjpeg8:i386{a} libjson0:i386{a} libk5crypto3:i386{a} libkeyutils1:i386{a} libkrb5-3:i386{a} libkrb5support0:i386{a} liblcms1:i386{a} libllvm3.2:i386{a} liblzma5:i386{a} libmng1:i386{a} libmysqlclient18:i386{a} libogg0:i386{a} liborc-0.4-0:i386{a} libp11-kit0:i386{a} libpciaccess0:i386{a} libpcre3:i386{a} libpng12-0:i386{a} libpulse0:i386{a} libqt4-dbus:i386{a} libqt4-declarative:i386{a} libqt4-network:i386{a} libqt4-opengl:i386{a} libqt4-script:i386{a} libqt4-sql:i386{a} libqt4-sql-mysql:i386{a} libqt4-xml:i386{a} libqt4-xmlpatterns:i386{a} libqtcore4:i386{a} libqtgui4:i386{a} libqtwebkit4:i386{a} libsamplerate0:i386{a} libselinux1:i386{a} libsm6:i386{a} libsndfile1:i386{a} libspeexdsp1:i386{a} libsqlite3-0:i386{a} libssl1.0.0:i386{a} libstdc++6:i386{a} libtasn1-3:i386{a} libtiff5:i386{a} libtxc-dxtn-s2tc0:i386{a} libuuid1:i386{a} libvorbis0a:i386{a} libvorbisenc2:i386{a} libwrap0:i386{a} libx11-6:i386{a} libx11-xcb1:i386{a} libxau6:i386{a} libxcb-dri2-0:i386{a} libxcb-glx0:i386{a} libxcb1:i386{a} libxdamage1:i386{a} libxdmcp6:i386{a} libxext6:i386{a} libxfixes3:i386{a} libxi6:i386{a} libxml2:i386{a} libxrender1:i386{a} libxslt1.1:i386{a} libxss1:i386{a} libxt6:i386{a} libxv1:i386{a} libxxf86vm1:i386{a} mysql-common{a} skype skype-bin:i386{a} sni-qt:i386{a} zlib1g:i386{a} The following packages will be upgraded: libasound2 libdbus-1-3 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libgcrypt11 libgl1-mesa-dri libgnutls26 libqt4-dbus libqt4-declarative libqt4-network libqt4-opengl libqt4-script libqt4-sql libqt4-xml libqt4-xmlpatterns libqtcore4 libqtgui4 libssl1.0.0 libtiff5 libx11-6 libx11-xcb1 libxcb-dri2-0 libxcb-glx0 libxcb1 libxext6 libxfixes3 libxi6 libxml2 libxrender1 libxt6 libxv1 libxxf86vm1 qdbus 35 packages upgraded, 105 newly installed, 0 to remove and 144 not upgraded. Need to get 81.7 MB/85.0 MB of archives. After unpacking 204 MB will be used. The following packages have unmet dependencies: libqt4-test : Depends: libqtcore4 (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. libqt4-designer : Depends: libqt4-script (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. Depends: libqt4-xml (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. Depends: libqtcore4 (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. Depends: libqtgui4 (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. libqt4-sql-sqlite : Depends: libqt4-sql (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. Depends: libqtcore4 (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. libqt4-help : Depends: libqt4-network (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. Depends: libqt4-sql (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. Depends: libqtcore4 (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. Depends: libqtgui4 (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. libqt4-svg : Depends: libqtcore4 (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. Depends: libqtgui4 (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. libqt4-scripttools : Depends: libqt4-script (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. Depends: libqtcore4 (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. Depends: libqtgui4 (= 4:4.8.4+dfsg-0ubuntu9) but 4:4.8.4+dfsg-0ubuntu9.2 is to be installed. The following actions will resolve these dependencies: Remove the following packages: 1) account-plugin-aim 2) account-plugin-facebook 3) account-plugin-flickr 4) account-plugin-generic-oauth 5) account-plugin-google 6) account-plugin-jabber 7) account-plugin-salut 8) account-plugin-twitter 9) account-plugin-windows-live 10) account-plugin-yahoo 11) empathy 12) friends 13) friends-dispatcher 14) friends-facebook 15) friends-twitter 16) gir1.2-signon-1.0 17) gnome-control-center-signon 18) libaccount-plugin-1.0-0 19) libfriends0 20) libqt4-designer 21) libqt4-help 22) libqt4-scripttools 23) libqt4-sql-sqlite 24) libqt4-svg 25) libqt4-test 26) libsignon-glib1 27) mcp-account-manager-uoa 28) nautilus-sendto-empathy 29) python-qt4 30) shotwell 31) signon-plugin-oauth2 32) signon-plugin-password 33) signon-ui 34) signond 35) ubuntu-sso-client-qt 36) ubuntuone-control-panel-qt 37) unity-lens-friends 38) unity-lens-photos 39) unity-scope-gdrive 40) webaccounts-extension-common 41) xul-ext-webaccounts Leave the following dependencies unresolved: 42) mcp-account-manager-uoa recommends gnome-control-center-signon 43) mcp-account-manager-uoa recommends account-plugin-aim 44) mcp-account-manager-uoa recommends account-plugin-jabber 45) mcp-account-manager-uoa recommends account-plugin-google 46) mcp-account-manager-uoa recommends account-plugin-facebook 47) mcp-account-manager-uoa recommends account-plugin-windows-live 48) mcp-account-manager-uoa recommends account-plugin-yahoo 49) mcp-account-manager-uoa recommends account-plugin-salut 50) ubuntu-desktop recommends empathy 51) ubuntu-desktop recommends libqt4-sql-sqlite 52) ubuntu-desktop recommends shotwell 53) ubuntu-desktop recommends ubuntuone-control-panel-qt 54) ubuntu-desktop recommends xul-ext-webaccounts 55) unity recommends unity-lens-photos 56) unity recommends unity-lens-friends 57) unity-lens-files recommends unity-scope-gdrive 58) libqt4-sql recommends libqt4-sql-mysql | libqt4-sql-odbc | libqt4-sql-ps Accept this solution? [Y/n/q/?] And in case this helps, aptitude show skype: Package: skype State: not installed Version: 4.2.0.11-0ubuntu0.12.04.2 Priority: extra Section: net Maintainer: Steve Langasek <[email protected]> Architecture: amd64 Uncompressed Size: 62.5 k Depends: skype-bin Conflicts: skype Description: client for Skype VOIP and instant messaging service Skype is software that enables the world's conversations. Millions of individuals and businesses use Skype to make free video and voice calls, send instant messages and share files with other Skype users. Every day, people also use Skype to make low-cost calls to landlines and mobiles. * Make free Skype-to-Skype calls to anyone else, anywhere in the world. * Call to landlines and mobiles at great rates. * Group chat with up to 200 people or conference call with up to 25 others. * Free to download.

    Read the article

  • hello-1.mod.c:14: warning: missing initializer (near initialization for '__this_module.arch.unw_sec_init')

    - by Sompom
    I am trying to write a module for an sbc1651. Since the device is ARM, this requires a cross-compile. As a start, I am trying to compile the "Hello Kernel" module found here. This compiles fine on my x86 development system, but when I try to cross-compile I get the below error. /home/developer/HelloKernel/hello-1.mod.c:14: warning: missing initializer /home/developer/HelloKernel/hello-1.mod.c:14: warning: (near initialization for '__this_module.arch.unw_sec_init') Since this is in the .mod.c file, which is autogenerated I have no idea what's going on. The mod.c file seems to be generated by the module.h file. As far as I can tell, the relevant parts are the same between my x86 system's module.h and the arm kernel header's module.h. Adding to my confusion, this problem is either not googleable (by me...) or hasn't happened to anyone before. Or I'm just doing something clueless that anyone with any sense wouldn't do. The cross-compiler I'm using was supplied by Freescale (I think). I suppose it could be a problem with the compiler. Would it be worth trying to build the toolchain myself? Obviously, since this is a warning, I could ignore it, but since it's so strange, I am worried about it, and would like to at least know the cause... Thanks very much, Sompom Here are the source files hello-1.mod.c #include <linux/module.h> #include <linux/vermagic.h> #include <linux/compiler.h> MODULE_INFO(vermagic, VERMAGIC_STRING); struct module __this_module __attribute__((section(".gnu.linkonce.this_module"))) = { .name = KBUILD_MODNAME, .init = init_module, #ifdef CONFIG_MODULE_UNLOAD .exit = cleanup_module, #endif .arch = MODULE_ARCH_INIT, }; static const struct modversion_info ____versions[] __used __attribute__((section("__versions"))) = { { 0x3972220f, "module_layout" }, { 0xefd6cf06, "__aeabi_unwind_cpp_pr0" }, { 0xea147363, "printk" }, }; static const char __module_depends[] __used __attribute__((section(".modinfo"))) = "depends="; hello-1.c (modified slightly from the given link) /* hello-1.c - The simplest kernel module. * * Copyright (C) 2001 by Peter Jay Salzman * * 08/02/2006 - Updated by Rodrigo Rubira Branco <[email protected]> */ /* Kernel Programming */ #ifndef MODULE #define MODULE #endif #ifndef LINUX #define LINUX #endif #ifndef __KERNEL__ #define __KERNEL__ #endif #include <linux/module.h> /* Needed by all modules */ #include <linux/kernel.h> /* Needed for KERN_ALERT */ static int hello_init_module(void) { printk(KERN_ALERT "Hello world 1.\n"); /* A non 0 return means init_module failed; module can't be loaded.*/ return 0; } static void hello_cleanup_module(void) { printk(KERN_ALERT "Goodbye world 1.\n"); } module_init(hello_init_module); module_exit(hello_cleanup_module); MODULE_LICENSE("GPL"); Makefile export ARCH:=arm export CCPREFIX:=/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-linux- export CROSS_COMPILE:=${CCPREFIX} TARGET := hello-1 WARN := -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-sign-compare -Wno-unused -Werror UNUSED_FLAGS := -std=c99 -pedantic EXTRA_CFLAGS := -O2 -DMODULE -D__KERNEL__ ${WARN} ${INCLUDE} KDIR ?= /home/developer/src/ltib-microsys/ltib/rpm/BUILD/linux-2.6.35.3 ifneq ($(KERNELRELEASE),) # kbuild part of makefile obj-m := $(TARGET).o else # normal makefile default: clean $(MAKE) -C $(KDIR) M=$$PWD .PHONY: clean clean: -rm built-in.o -rm $(TARGET).ko -rm $(TARGET).ko.unsigned -rm $(TARGET).mod.c -rm $(TARGET).mod.o -rm $(TARGET).o -rm modules.order -rm Module.symvers endif

    Read the article

  • CodePlex Daily Summary for Monday, January 24, 2011

    CodePlex Daily Summary for Monday, January 24, 2011Popular ReleasesDeveloper Guidance - Onboarding Windows Phone 7: Fuel Tracker Source: Release NotesThis project is almost complete. We'll be making small updates to the code and documentation over the next week or so. We look forward to your feedback. This documentation and accompanying sample application will get you started creating a complete application for Windows Phone 7. You will learn about common developer issues in the context of a simple fuel-tracking application named Fuel Tracker. Some of the tasks that you will learn include the following: Creating a UI that...Password Generator: 2.2: Parallel password generation Password strength calculation ( Same method used by Microsoft here : https://www.microsoft.com/protect/fraud/passwords/checker.aspx ) Minor code refactoringProcess Enactment Tool Framework: PET 1.2.3: Bug fixing release. Introduced installer. General Upgraded to Visual Studio 2010 Created installer PET Wizard Fixed log bug if PET is placed in read-only folder SharePoint Tool Provider Fixed provider crash in case SharePoint.dll is not availableVisual Studio 2010 Architecture Tooling Guidance: Spanish - Architecture Guidance: Francisco Fagas http://geeks.ms/blogs/ffagas, Microsoft Most Valuable Professional (MVP), localized the Visual Studio 2010 Quick Reference Guidance for the Spanish communities, based on http://vsarchitectureguide.codeplex.com/releases/view/47828. Release Notes The guidance is available in a xps-only (default) or complete package. The complete package contains the files in xps, pdf and Office 2007 formats. 2011-01-24 Publish version 1.0 of the Spanish localized bits.ASP.NET MVC Project Awesome, jQuery Ajax helpers (controls): 1.6.2: A rich set of helpers (controls) that you can use to build highly responsive and interactive Ajax-enabled Web applications. These helpers include Autocomplete, AjaxDropdown, Lookup, Confirm Dialog, Popup Form, Popup and Pager the html generation has been optimized, the html page size is much smaller nowSSH.NET Library: 2011.1.24: No new features in this release, only fixes to issues reported by users: Fixes Fix SFTP path resolution to allow for client to work with glibc and BSD based servers. Close handle when file download completes Fix reusing command object to execute different commands.Facebook Graph Toolkit: Facebook Graph Toolkit 0.6: new Facebook Graph objects: Application, Page, Post, Comment Improved Intellisense documentation new Graph Api connections: albums, photos, posts, feed, home, friends JSON Toolkit upgraded to version 0.9 (beta release) with bug fixes and new features bug fixed: error when handling empty JSON arrays bug fixed: error when handling JSON array with square or large brackets in the message bug fixed: error when handling JSON obejcts with double quotation in the message bug fixed: erro...Microsoft All-In-One Code Framework: Visual Studio 2008 Code Samples 2011-01-23: Code samples for Visual Studio 2008BloodSim: BloodSim - 1.4.0.0: This version requires an update for WControls.dll. - Removed option to use Old Rune Strike - Fixed an issue that was causing Ratings to not properly update when running Progressive simulations - Ability data is now loaded from an XML file in the BloodSim directory that is user editable. This data will be reloaded each time a fresh simulation is run. - Added toggle for showing Graph window. When unchecked, output data will instead be saved to a text file in the BloodSim directory based on the...MVVM Light Toolkit: MVVM Light Toolkit V3 SP1 (3): Instructions for installation: http://www.galasoft.ch/mvvm/installing/manually/ Includes the hotfix templates for Windows Phone 7 development. This is only relevant if you didn't already install the hotfix described at http://blog.galasoft.ch/archive/2010/07/22/mvvm-light-hotfix-for-windows-phone-7-developer-tools-beta.aspx.Community Forums NNTP bridge: Community Forums NNTP Bridge V42: Release of the Community Forums NNTP Bridge to access the social and anwsers MS forums with a single, open source NNTP bridge. This release has added some features / bugfixes: Bugfix: Decoding of Subject now also supports multi-line subjects (occurs only if you have very long subjects with non-ASCII characters)Minecraft Tools: Minecraft Topographical Survey 1.3: MTS requires version 4 of the .NET Framework - you must download it from Microsoft if you have not previously installed it. This version of MTS adds automatic block list updates, so MTS will recognize blocks added in game updates properly rather than drawing them in bright pink. New in this version of MTS: Support for all new blocks added since the Halloween update Auto-update of blockcolors.xml to support future game updates A splash screen that shows while the program searches for upd...StyleCop for ReSharper: StyleCop for ReSharper 5.1.14996.000: New Features: ============= This release is just compiled against the latest release of JetBrains ReSharper 5.1.1766.4 Previous release: A considerable amount of work has gone into this release: Huge focus on performance around the violation scanning subsystem: - caching added to reduce IO operations around reading and merging of settings files - caching added to reduce creation of expensive objects Users should notice condsiderable perf boost and a decrease in memory usage. Bug Fixes...jqGrid ASP.Net MVC Control: Version 1.2.0.0: jqGrid 3.8 support jquery 1.4 support New and exciting features Many bugfixes Complete separation from the jquery, & jqgrid codeMediaScout: MediaScout 3.0 Preview 4: Update ReleaseCoding4Fun Tools: Coding4Fun.Phone.Toolkit v1: Coding4Fun.Phone.Toolkit v1MFCMAPI: January 2011 Release: Build: 6.0.0.1024 Full release notes at SGriffin's blog. If you just want to run the tool, get the executable. If you want to debug it, get the symbol file and the source. The 64 bit build will only work on a machine with Outlook 2010 64 bit installed. All other machines should use the 32 bit build, regardless of the operating system. Facebook BadgeAutoLoL: AutoLoL v1.5.4: Added champion: Renekton Removed automatic file association Fix: The recent files combobox didn't always open a file when an item was selected Fix: Removing a recently opened file caused an errorDotNetNuke® Community Edition: 05.06.01: Major Highlights Fixed issue to remove preCondition checks when upgrading to .Net 4.0 Fixed issue where some valid domains were failing email validation checks. Fixed issue where editing Host menu page settings assigns the page to a Portal. Fixed issue which caused XHTML validation problems in 5.6.0 Fixed issue where an aspx page in any subfolder was inaccessible. Fixed issue where Config.Touch method signature had an unintentional breaking change in 5.6.0 Fixed issue which caused...iTracker Asp.Net Starter Kit: Version 3.0.0: This is the inital release of the version 3.0.0 Visual Studio 2010 (.Net 4.0) remake of the ITracker application. I connsider this a working, stable application but since there are still some features missing to make it "complete" I'm leaving it listed as a "beta" release. I am hoping to make it feature complete for v3.1.0 but anything is possible.New ProjectsAIMP2 .NET Interop Plugin: AIMP2 .NET Interop Plugin allows to write plugin for AIMP2 with managed code (C#, VB and so on).asp.net c# website: hot millions project is an asp.net c# sql express website where you can login and book and order your menu items. This project is built in Visual studio 2008 with asp.net c# sql express editionAutomatic Build Updater: A small tool with scripts to show the recent build of your program on your homepage or blog. It works fully automatically and is easy to use. Works with each IDE which supports Build-Events.BurakoNET: Burako OnLineDelNet: Tool created in C # to automate the development process. With this tool, you do not need to spend time with the creation of classes of connection, data access layer, view or update data with Windows Forms. Everything is here, ready.Droid Builder: Droid Builder is a WPF based application that can help Android ROM maker to create customized ROM. The basic functions of Droid Build are: 1. Deodex 2. Packaging 3. Signing In future, Droid Builder will provide more function on Android ROM customization.eatables: Eatables 2011Food information system: Food information system makes it easier for content providers to deliver information about food producers, contents and information about quality, recipes, allergy and other considerations to the consumers. ForceHttps: Very simple httpModule to ensure that all http requests are https. 1. Drop the dll into your website's bin directory 2. Update httpModules section of your web.config to reference the dll 3. Make sure your Web Server can handle SSL requests for the URL ALL http requests will be redirected as https.Frolic Game Engine for .NET: The Frolic game engine is an attempt at creating a retained style game engine that is agnostic to the rendering technology, allowing for easier inplementations of rendering engines for various graphics layers.Import VCF to MS Outlook: simple tools to import many *.vcf files to default contact in MS OutlookLe blog à TiK: Le blog à TiK is a blog engine written for the Windows Azure platformLearning CPP: Learning CPP.MinConsole: A minimilastic console application with configurable logging and debuggingMineSweeperChallenge: C# programming exercise. Simulates a given number of minesweeper games using a given ISweeper implementation (or use the step by step mode to study how the ISweeper implementations work). Create your own implementation and see how it compares to other implementations.MvcCss: MvcCss brings the convention-based simplicity of MVC to CSS.Natur Map Editor: Natur allows you to easily create and manage maps in 3D using the Xna framework. As you build your map, you can enter simulation mode at any time; this will activate bounds, physics, and any game logic such as animations and triggers.OneGames Open Framework: Projeto open-source da OneGames de desenvolvimento de jogos 2D com a engine SpriteCraft(tm).QQFindX: QQFindXsadd.practical.approach: SADD workshop is a project testorage to demonstrate practical approach of sadd while Lessons Learned site was developing. ?????? ???? ?????????? ??????????? ??? ?? ???????? ?????????? SADD ??? ???????? ????? "????????? ??????", ??????????? ????????? ??????????????? ?????? ?????.Seesmic Feed Reader: A simple plugin for Seesmic Desktop 2 that allows you to read syndication feeds (Rss 2.0 and Atom 1.0) inside Seesmic.Simple Farseer physics platform: Sample described on rabidlion.comSIN Generator: Social Insurance Number (SIN) Generator is a utility designed to generate SIN numbers to testing application software. It uses SIN generation algorithm provided on fakenamegenerator.com It is developed in C# and is meant for application testing ONLY!UsingLib: A library of automatically removed utilities: 1.Changing cursor to hourglass in Windows Forms 2.Logging It's developed in C#WP7Contrib: WP7 Contrib is a set of components to help build WP7 Apps. It can be plugged into MVVM Light or used as separate components in your App. Our goal is to provide a set of tools and patterns that help WP7 developers.

    Read the article

< Previous Page | 2 3 4 5 6 7  | Next Page >