![]() |
| | #1 |
| Registered User Join Date: Jan 2010
Posts: 6
| Zombie and Uninterruptable Sleep Processes Synology Inc. - NEW NAS Experience - Products :: Disk Station DS209j :: Specifications Everytime I run the binary created from cvoicecontrol.c & cvoicecontrol.h, it freezes and creates 1 zombie process and 3 'D' type processes. Thus requiring a reboot. Anyone know how I can begin troubleshooting this? Or can anyone take a look at the source? http://www.kiecza.net/daniel/linux/ or you can get it from most linux package feeds. |
| pomprocker is offline | |
| | #2 |
| Staff software engineer Join Date: Mar 2007 Location: Portland, OR
Posts: 6,014
| I don't know the source of the actual bug, but you should be able to avoid a reboot by killing the zombie's parent process. If the parent process is init, it indicates some kind of kernel-level deadlock.
__________________ "Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot |
| brewbuck is offline | |
| | #3 |
| Registered User Join Date: Jan 2010
Posts: 6
| Yes, I kill the zombie processes parent, and the PPID becomes '1' as init inherits all orphans. ( or maybe the zombie process's parent was 1 all along?) There has got to be something with the pthreads coding...I also heard something about pthreads not working on a NAS, although I have checked and I do have libpthreads.so When this program freezes up , I can't even ctrl+c to get out of it, I have to close the terminal window and start a new one just to run a 'ps aux | grep cvoice' Maybe the pthreads aren't managed well in the code? |
| pomprocker is offline | |
| | #4 |
| Registered User Join Date: Jan 2010
Posts: 6
| I was able to capture this with gdb Program received signal SIG32, Real-time event 32. 0x0ff0183c in ?? () from /opt/lib/libpthread.so.0 |
| pomprocker is offline | |
| | #5 |
| Registered User Join Date: Jan 2010
Posts: 6
| ok i guess gdb doesn't handle threads real well so I passed it this: (gdb) handle SIG32 nostop noprint pass and then got this: Starting program: /usr/local/bin/cvoicecontrol --once hello.cvc [New LWP 20573] Program received signal SIGSEGV, Segmentation fault. [Switching to LWP 20573] 0x0fe161b8 in free () from /lib/libc.so.6 (gdb) bt #0 0x0fe161b8 in free () from /lib/libc.so.6 #1 0x1000a38c in preprocess () #2 0x0fefef6c in ?? () from /opt/lib/libpthread.so.0 #3 0x0fe79bc0 in clone () from /lib/libc.so.6 Backtrace stopped: previous frame inner to this frame (corrupt stack?) |
| pomprocker is offline | |
| | #6 |
| Registered User Join Date: Jan 2010
Posts: 6
| ahh I learned how to compile with -g..big help!! now I see this: Program received signal SIGSEGV, Segmentation fault. [Switching to LWP 23404] 0x1000a4b4 in preprocess () at cvoicecontrol.c:1129 1129 (gdb) bt #0 0x1000a4b4 in preprocess () at cvoicecontrol.c:1129 #1 0x0fefef6c in ?? () from /opt/lib/libpthread.so.0 #2 0x0fe79bc0 in clone () from /lib/libc.so.6 Backtrace stopped: previous frame inner to this frame (corrupt stack?) Line 1129: frame[i] = ((float)((signed short)(buffer[frameI*OFFSET+2*i]|(buffer[frameI*OFFSET+2*i+1]<<8)))) * does this mean anything? Or when I list within gdb: (gdb) list cvoicecontrol.c:1129 1124 /***** prepare a hamming windowed frame from the audio data ... */ 1125 1126 for (i = 0; i < FFT_SIZE; i++) 1127 frame[i] = ((float)((signed short)(buffer[frameI*OFFSET+2*i]|(buffer[frameI*OFFSET+2*i+1]<<8)))) * 1128 hamming_window[i]; 1129 1130 preprocessFrame(frame, feat_vector); /* ... and have it preprocessed */ 1131 1132 /***** put the resulting feature vector in queue2 using the proper status flag*/ 1133 |
| pomprocker is offline | |
| | #7 | |
| Staff software engineer Join Date: Mar 2007 Location: Portland, OR
Posts: 6,014
| Quote:
If the segfault is occuring on that line, then it means one of the three array dereferences is going out of bounds. Either framel or i is going too far or the buffer array was not allocated large enough. Beyond that, it's impossible to tell without seeing more code, and if the rest of the code looks anything like that, I don't really want to see it
__________________ "Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot | |
| brewbuck is offline | |
| | #8 |
| Registered User Join Date: Jan 2010
Posts: 6
| Here is a link to it: Koders Code Search: cvoicecontrol.c - C - GPL I was originally getting problems with free() located within preprocess() as you can see from my earlier posts. Then I commented it out and now having problems with line 1129. Hope you can solve this!! |
| pomprocker is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|