Programming :: Sleep Call Causes Whole GNU System To Hang Indefinitely
May 6, 2011
Anyone know the reason why a sleep( ) on a Redhat Linux OS would cause the system to indefinitely hang? It's doing this every 10 or so calls in my program and I have to press the reboot button on my computer. My program is reading from a UDP port that has messages sent to it 20 times per second. When I sleep I assume the internal UDP buffer is getting more and more filled.
View 14 Replies
ADVERTISEMENT
Nov 6, 2010
I have been assigned to implement a system call that report the system statistics over all memory which are
Total Pages in Active LRU list
Total Pages in Inactive LRU List
View 1 Replies
View Related
Feb 4, 2011
i am working on a client server real-time gui application written in C++ for linux os. There is an issue with this application that it makes the system hang. i am not able to sort out the issue as it happens randomly. Sometimes with in half an hour it makes the system hang, sometimes it takes 4 or 5 hours when it receives realtime data. Is there any way to debug this issue. I tried valgrind..but it was not of much use.
View 9 Replies
View Related
Apr 3, 2011
in below program why was new_args[0], rather than the reference the_cmd, passed to the execvp system call?
Code:
/*
A _very_ limited shell program
[code]....
View 2 Replies
View Related
Dec 8, 2010
I have a process that forks, where the childs puts some data of random size and exits while the parent should get the data and does some manipulation.. here I have used a pipe for child to write the data and parent to read the data.. Child simply dumps the data, and the data is of any size even child and parent doesnt know.
I have used select in the parent to see whether there is any data coming on the reading end of the pipe.. if there is a data.. I copy into a buffer.. Im reading the data continusly when the child exits after closing the writing end of pipe. Parent gets blocked on the read part But my question is how parent know the other of pipe is closed when using the select call. In otherwords.. while using select in readfds, how would i know the other end has closed the pipe..
View 2 Replies
View Related
Sep 18, 2010
I am trying to figure out how i would go about finding out where system call is made and error checking is not done. I have code below, if somebody can point me in the right direction where system call is made but error checking is not done.Quote:
#include "shell.h"
#include <stdio.h>
#include <string.h>
[code]....
View 5 Replies
View Related
Aug 30, 2010
I successfully added a new system call in CentOS Kernel but I don't know where to view it! My kernel version is -2.6.32.5
View 2 Replies
View Related
Mar 24, 2011
how to create a new system call Linux? what is the process of creating ?my project is to create a system call for displaying owner of a file..where exactly we have to write the system call code? and where are the places need to change ?
View 5 Replies
View Related
Apr 2, 2009
I want to test my system call that be goint to add to kernel, But when i finish compiling kernel, i found my system call code not work. the code i want to return the system time "struct timespec":
/*----------Start of mycall.c----------*/
#include <linux/linkage.h>
#include <linux/time.h>
#include <linux/kernel.h>
[code]....
so i want a method to test the new system call before compiling kernel.
View 2 Replies
View Related
Apr 2, 2011
i've written small tool in C which makes measurements on my router (OpenWrt White Russian).
It is working as a deamon. If the tool is started manually, everything works fine. If it is started per script on startup, the following system call doesn't work :
Code: sprintf(command,"/bin/cat /root/%s%s | /usr/bin/ssh -p2222 user(at)host -i /root/.ssh/id_rsa "/bin/cat >> result/%s%s"", apmac, source, apmac, dest);
rc = system (command); the returned rc in this case is 256.
first i thought it is a problems with the user rights for the tool, so i have added +s to it. but that didn't help. as i said, when the daemon is started by hand, the system call works fine.
View 1 Replies
View Related
Jul 30, 2011
I am making a library, but I am facing a strange problem while sending data over network using ethernet.
I am sending 39 bytes of the data from one server to slave application but some time slave receives 39 bytes and some time it receives 29 bytes. And when ever slave receives 29 bytes all the memories to which my pointers are pointing get changed. This problem is only when I am sending data from the server to slave, while sending data from slave to server I am facing no such issue.
View 10 Replies
View Related
Sep 8, 2010
I have a script for dd command and i am using it in an application using system() call. Now i want to have the output of the script file (i.e output of dd command) in the application file itself.
View 1 Replies
View Related
Nov 29, 2010
In practice I have a script that call a java program that call a linux system command. The script if I run it, from a shell functions well,so it is not a java problem. The problem come out when i put this script in a crontab schedulation. The result in this case is that java do not execute the system command. I think it depends on crontab
View 4 Replies
View Related
Jan 19, 2011
Cairo-Dock corrupts on suspend resume.My problem is that cairo-dock gets corrupted after I resume from suspend. I've tried to solve this problem but can't find anything more than others suffering from the same dilemma. So I came to conclusion that the easiest way ist to restart cairo-dock. I now have made the working scripts to shut it off and to start it but now the trash applet and home -directory applet won't workIt says :warning : (/build/buildd/cairo-dock-plug-ins-2.2.0~4/shortcuts/src/applet-.c:cd_shortcuts_list_drives:306) and same for rest apps.I am exporting $HOME variable and I have made sure $HOME works so I don't understand. The problem seems to be cairo-dock can't be started with su -m USER -c "exec /home/USER/ohjelmointi/shell/cairo-dock-on.sh &"it just doesn't know how to load something for the applets. But otherwise the settings load fine
View 1 Replies
View Related
Sep 29, 2010
we have a multi threaded program on Linux where one thread is waiting on poll() system call with event set to POLLIN, & another thread has closed the same socket fd (which is passed to poll) , but the poll() did not return, is this the expected behavior? From man page of poll we found that the poll should return POLLNVAL if the socket fd is closed, is my understanding correct or is there any bug in the poll()?In Solaris we observed that the poll system call is returning with POLLNVAL if the socket is closed.
View 3 Replies
View Related
Nov 20, 2010
Does anyone have straightforward simple example document for adding a system call on fedora 14 kernel?
View 12 Replies
View Related
Dec 10, 2010
I have the following code:
Code:
#include <stdio.h>
#include <stdlib.h>
int main() {
system("ps -ef | grep myprocessname");
return 0; }
When I run this program it outputs the following list of running processes:
Code:
root 10279 10275 0 13:02 ? 00:00:00 myprocessname myvar1=value1 myvar2=value2
root 10341 10337 1 13:02 ? 00:00:00 myprocessname myvar1=value1 myvar2=value2
What I want to really do is instead of writing the output to screen I want to read the output and parse the various values value1, value2 etc. What is the best way to do this?
View 4 Replies
View Related
Aug 1, 2010
I'm using gmake (v3.81) to build some c executables. As the first step in the process I run the files through a preprocessor (for embedded SQL). The preprocessor completes successfully, but the gmake reports an error and discontinues buiding the remaining dependencies...
make *** [myfile.c] Error 4
which (according to /usr/include/asm-generic/errno-base.h) means "interrupted System Call". My preprocessor doesn't raise any signals, so I'm not sure what's causing this error.
View 2 Replies
View Related
Feb 27, 2011
i am using Ubuntu 10.04.1 LTS. i only ever contact my ubuntu machine through SSH. everytime i login, i do:
~/downloads/.dropbox-dist/dropboxd &
this launches the dropbox process and all is great. except when i log back into the ubuntu machine via ssh after a few hours, the process no longer exists. how can i get the process to run indefinitely?
View 4 Replies
View Related
Jul 19, 2011
I have several servers running Ubuntu Desktop. These servers are remote access only and do not have a monitor or keyboard attached normally. I'm running into problems with them occasionally getting hung up, after crashing, on the grub recovery mode screen. The only way for me to make them boot up is to hook up a keyboard and hit enter.
My /etc/default/grub file is default:
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
What do I need to change to disable the grub loader screen from coming up automatically ever, or at least to make the timeout work when it does happen?
View 3 Replies
View Related
Aug 4, 2009
I am running fedora 10 on my laptop. I use a usb Western digital "MyBook" 500Gb (ext3). I am using this hard drive since more than 1 year now. Lately I run into a single problem when I read a precise file. The laptop becomes totally unresponsive and I have to manually shutdown the computer. After start-up I can find that the /var/log/message file of my previous session has grown very quickly with "[sdb] Sense Key : No Sense [current]" and "[sdb] Add. Sense: No additional sense information" messages.
I found various similar question on the web, most of the answer were hardware dependent and kernel related. I tried various kernel hoping that my specific problem would be fixed in the next one but with no success (all the kernel since fedora 10 release and two testing one: 2.6.29.5-84.fc10 and 2.6.29.6-93.fc10), I don't have access to a Fedora 11 machine.
I replaced the usb cable and check that the power supply was working correctly.
I am joining part of /var/log/message and the results of lsusb (related to the external hard drive).
View 2 Replies
View Related
Jun 21, 2011
After installing and activating "ATI&AMD proprietary FGLRX graphics driver" ;in Ctrl+Alt+F2" mode, do following steps:sudo pidof X (to get pid number)sudo kill xxxx (xxxx is the pid number)Then , system hang up!If the FGLRX driver is not installed , there is no such problem
View 1 Replies
View Related
Feb 4, 2011
i am working on a client server real-time gui application written in C++ for Redhat. There is an issue with this application that it makes the system hang. i am not able to sort out the issue as it happens randomly. Sometimes with in half an hour it makes the system hang, sometimes it takes 4 or 5 hours when it receives realtime data. Is there any way to debug this issue. I tried valgrind..but it was not of much use..
View 4 Replies
View Related
Sep 15, 2010
nm-applet timeout. I connect to the internet via wifi access. I have this problem that whenever there is a powercut, my wifi router switches off and then nm-applet tries to connect and then after sometime times out i.e. nm-applet gives up on trying to restore the connection.
I want nm-applet to keep trying to restore the connection indefinitely because if the electricity is back lets say after an hour then it should immediately connect without manual intervention.
I did google around trying to search for the configuration parameters but was not able to do so.
View 2 Replies
View Related
Jul 8, 2011
I have a strange problem on my system. When I turn off printer, system hang. Gdm/X exit and I can see a terminal screen with a lot of info (but I can not capture it, except taking a photo). I must press reset button. It's not all times, but at least 50% I shutdown printer. I was looking logs and I can not see any relevant. Maybe this (copy some sections of /var/log/messages, remove other not revelant):
Jul 7 19:43:34 dcr64 kernel: [341172.052076] usb 1-8: new high speed USB device number 7 using ehci_hcd
Jul 7 19:43:34 dcr64 kernel: [341172.185255] usb 1-8: New USB device found, idVendor=03f0, idProduct=4412
Jul 7 19:43:34 dcr64 kernel: [341172.185260] usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Code]...
Sometimes I turn on printer to get a photocopy and turn off later, and system hand, so, it's not necesary to print or scan to get this error.
View 2 Replies
View Related
Jun 23, 2015
If I shutdown from X the system hangs and I have to yank out the power cord. Same on logout.
ctrl+alt+f1 hangs for a few minutes and then starts a terminal; which does not respond to the keyboard.
There are no tty.conf files in /etc/init .
But inittab looks normal to me and includes tty (1-6)
Executing init 6 from a terminal in X will reboot the system
I was thinking this might be a dbus issue, but I am not sure. I also understand some recent issues exist with SysRq sequences. May be a video card issue,,,
Other than normal package upgrades the only changes were a recent change from a VGA to HDMI cable. I can't see why that would matter
Linux Lugh 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u2 x86_64 GNU/Linux
View 6 Replies
View Related
Aug 23, 2011
I am new to opensuse, coming over from debian based systems. However I am having an issue in which my system will not power off on shutdown. Restarts just fine. i get a missing error during shutdown, but there is nothing to relate the error to on that line. Then the shutdown procedes to The System will be halted immediately then hangs. The keyboard powers off and then thats it. All fans are still running. I have searched extensively on this forum and google.
View 9 Replies
View Related
Jan 28, 2011
I am running Ubuntu 10.10 on a Lenovo Thinkpad T61p with 2GB RAM. When I was on Ubuntu 10.04, one day suddenly Azureus hung at the 'loading plugin' screen as it begins. I had to hard reboot my system and it(Azureus) never worked after that so I removed it. Then after a couple of months same thing happened with Adobe Acrobat reader. As soon as I opened any pdf and started to scroll, it hung. System didn't respond and had to hard reboot. I moved to foxit reader Then I upgraded to 10.10 and now mplayer hangs occasionally if I try to switch it to full screen. System stops responding totallyn Where to begin debugging from ? I can't figure out any pattern or any way to reproduce it. I haven't tried Acrobat reader and Azureus on 10.10
View 9 Replies
View Related
May 1, 2011
I have upgraded to 11.04 all seems well except that now the two machines I have upgraded frequently hang while the screensaver is running. (with unity desktop). Is someone working on this? Gateway t-series notebook and a dell mini 9 netbook that are hanging. The netbook seems to be hanging the most.
View 2 Replies
View Related
May 1, 2011
fairly new to linux and tried Slack as a way to force myself to learn. I am running current and when i issue the reboot command it will hang on "Restarting system". If i use the shutdown -r now command it will reboot fine. Any ideas?
View 4 Replies
View Related