General :: Non-atomic Scokect Write And EAGAIN Error In RHEL 5.4?
Aug 26, 2010
Introduction : We have a C++ application in RHEL 5.4 platform. We are using TCP/IP socket programming as well to send and receive some sort of messages. We are using socket write and read command for this purpose and we are getting some run-time write issues in between. By doing various debugging and strace operations, we came to the conclusion that issue happens in some write attempts as follows.
Detailed Description : In the simplest case, consider I have a server and a client. Server writes some messages using write command and client is supposed to read the same data.Major code snippets in Server side is as follows [It is not feasible to extract the actual files and application codes as a whole, below are just the major commands used in server side]:
sockfd = socket(AF_INET, SOCK_STREAM, 0);
int reuse=1;
setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR,& reuse, sizeof(reuse));
[code]....
View 3 Replies
ADVERTISEMENT
Apr 12, 2011
I'm only somewhat new to linux but I still don't have a real grasp of it's deep innards and I had a fairly outlandish idea that I'm wondering whether is possible/plausible or not.I want to run a game server on CentOS that has a very high dependency on fast writes-to-disk. Disk writes are pretty much the single bottleneck in this server.First I looked at allowing a high queue of writes to pile up before it flushes them to the disk, but I read that this causes fsync, which is still used commonly, to take a very long time.
I've been thinking about the possibility of running the server on a RAM disk, but I still want changes to be saved to non-volatile storage. Not all at once, but have it actively write the changes to disk. The hope is that this would smooth out the peaks and valleys of write activity and improve overall performance, but I have not seen this idea discussed anywhere.
So my question is, is there any plausible way to continuously copy writes to a RAM disk to a physical drive without slowing down the speed of the writes to the RAM drive below the speed of said RAM? Or is there a better way to obtain this sort of performance, short of investing in expensive equipment?
View 1 Replies
View Related
Apr 5, 2010
I use serial port. I get serial EAGAIN error. I open serial port with below settings.
do I have any error with settings.
static int fd=-1;
bool openPort(int baudrate, const char * ThePort) {
unsigned long BAUD;
struct termios port_settings;
[Code].....
View 3 Replies
View Related
May 19, 2010
have two shared variables a,b which are related to each other.When multiple applications share these shared variables, access to them needs to be an atomic operation, otherwise the relation may break. So to ensure mutual exclusion, I'll put their modification under a critical section protected by lock.
Code:
critical_code
{
P(mutex)
a := something
b := something
V(mutex)
}
Lets say my hardware/OS/compiler supports atomic variables. Then I modified my above code as follows.
Code:
code
{
atomic a := something
atomic b := something
}
Can this code ensure mutual exclusion, when accessed by multiple applications?
View 2 Replies
View Related
Sep 1, 2010
According to [URL], gcc 4.3 supports atomic built-in function "GCC can now use load-linked, store-conditional and sync instructions to implement atomic built-in functions such as __sync_fetch_and_add" However, I am still using gcc 3.4 on my Redhat EL4. How do I get this built-in function installed?
View 2 Replies
View Related
Apr 27, 2009
I have 4 partitions in my system, out of which two(sda1, sda2) have windows on them. I have installed RHEL 4 32 - bit on sda3 and after that , installed installed RHEL 64-bit on to a partition sda 5. Now i am unable to boot into RHEL 32-bit. The error i am getting is Error 13: Invalid or unsupported executable format.
View 1 Replies
View Related
Mar 7, 2011
I am trying to do secure VNC over SSH to a remote linux server from my windows PC, but running into this error.
Error: Unable to connect to host: Connection refused (10061)
View 4 Replies
View Related
May 26, 2010
shut down my RHEL 4 system with an error still present in the /etc/fstab file. Current symptom: When I now try to boot, everything hangs when "Enabling swap space". Highly likely, the reason is the failure to "Mount local filesystems" in the previous step (i.e. "mount point 0 does not exist" = error due to my incorrect line in the /etc/fstab file).Question: Is there any way that I can still boot my system, such that I can remove the incorrect line in the /etc/fstab file?
View 6 Replies
View Related
Feb 14, 2011
we are facing the problem related to Kernel panic in linux . Could u send me details of kernel panic . Why the kernel panic occur and how to resolve this problen
View 2 Replies
View Related
Oct 7, 2010
i had faced error like "select driver diskette" after language selection option. i am using acer laptop having 32 bit windows 7 os.
View 2 Replies
View Related
Jan 28, 2011
I'm trying to update Red hat but am getting an when running transaction test. Heres what I get after running "yum update"
Transaction Summary
=============================================================================
Install 28 Package(s)
Update 358 Package(s)
Remove 0 Package(s)
[code]....
Transaction Check Error: file /usr/share/man/man2/remap_file_pages.2.gz from install of man-pages-2.39-17.el5 conflicts with file from package eal3-certification-doc-1.1-2 file /usr/lib/cups/filter/textonly from install of cups-1.3.7-26.el5 conflicts with file from package redhat-config-printer-0.6.47.3.23-1
View 1 Replies
View Related
Feb 17, 2010
I am using Sandisk 2GB micro SD card on ARM processor EP9307A. The card is detected, mounted.
I can read data from the SD card. But cannot write to it. There is no error when I attempt to write to the Card. It appears as if its working fine. But after umount and re-mount, the data written is gone.
Here is the log when the SD card is detected:
# insmod drv
card size = 1977614336, sector size = 31, wp_grp_size = 127, wp_grp_enable = y
S:00001000 M:fffff000
What is the significance of Write Group Protect Enable (wp_grp_enable=y). Is it the case that the SD card is write protected.
Using CMD9 : SEND_CSD , I can read the Card Specific Data (CSD).
I have tried CMD27 : PROGRAM_CSD , to CLEAR wr_grp_enable : No effect seen.
I have tried CMD29 : CLEAR_WRITE_PROT ,: No effect seen.
Where is the issue,
1. I could not send commands properly.
2. Card cannot be set free from WRITE_PROTECT.
3. Something else.
View 2 Replies
View Related
Oct 22, 2009
I have installed RHEL-5 on a 64-bit machine recently, and want to install java. Earlier when I did "java -version", it showed jre1.4.0. But for my application , I need jre 1.5.0 or later, so I decided to download jre1.6. I am the root user here and I downloaded the jre1.6 as rpm.bin as well as simple .bin format.
But the problem is that when I tried executing any of them, I am getting below error message :
" ./jre-6u16-linux-x64-rpm.bin: line 368: ./install.sfx.20520: cannot execute binary file"
Moreover, now when I tried "java -version", it is not showing any thing.
Could anybody suggest me how can I resolve this deadlock situation, as I need to install my other application at the earliest.
View 9 Replies
View Related
May 1, 2011
can not ping from host (RHEL 6) to RHEL 5 in (virtual)? I have stopped iptables on both machines. But still not able to ping from host machine to virtual.
View 1 Replies
View Related
Mar 12, 2011
When I'm recompiling apache and php, it doesn't go through and I get this error:
Code:
checking for atomic.h... no
/usr/include/mysql/my_global.h:364:24: error: asm/atomic.h: No such file or directory
[code]....
View 5 Replies
View Related
Dec 23, 2009
I am trying to download RHEL 5.4 AS version for testing..But under [URL] There is no specific link for AS version or ES version..How can I detect which iso is for AS and which one for ES..? There are separate links for AS and ES version for RHEL 4.x version but why is it not available for RHEL 5.x versions?
View 3 Replies
View Related
May 13, 2011
I need to insure the "writer" to named shared memory (small size, 160 bytes) completes his task such that the many "readers" always get the latest data. The machine is a multi-processor (8 CPU, 24 Gig RAM), non-real time system. The system has multiple processes that are also multi-threaded. Thankfully, there is only 1 "writer" and many "readers". There is no semaphore or mutex locking. "Readers" must not block each other and especially not block the "writer".
By design, it is expected from time to time a "reader" will be in the middle of reading when the "writer" begins to update the data. I want to protect against the case of the "writer" being interrupted and a "reader" completes it's read before the "writer" wakes up and completes it's changes. In this case the "reader" will get corrupt data, some new and some old.
View 7 Replies
View Related
Jan 13, 2010
Is there anyway in Linux that can achieve atomic increment/decrement for an integer variable without being interrupted? It means that the thread should not chance for other thread to run until theincrement/decrement is completed.
View 11 Replies
View Related
Mar 12, 2010
we are running a Red Hat Enterprise Linux ES release 3 (Taroon Upd 5) Kernel 2.4.21-32.ELsmp since several years. The server hosts an old ERP system who will be replaced at the end of the year.However it is necessary that some collegues are able to write some files to that server regulary. Since we are running Windows 7 on several machines, those users aren't anymore able to write to the samba share. Getting files from the share works fine.
But the problem seems not to be situated at the samba service because also the transfer using SSH (WINSCP) from any Win7 system to the server doesn't work.During testing we recogniced that transfering files smaller then 1kb works fine ... any file greater then 1kb ends up in an connection abort. This works with samba and also using SSH.All the workarounds editing some registry entries in Win7 for improving the interoperability between vista / win7 and samba don't work for us ... and also seem not to be the source of the problem.Is there a general known incompatibility between our RHEL version / kernel and Windows 7 regarding file transfers?
View 6 Replies
View Related
Jan 31, 2010
I have this hdd and another with XP in it but when ever I chnage to UBuntu, the clock goes out of whack and, makes me manually change it whereas in my XP I have an atomic clock installed that I just click on 'Ping' and she's right. I've looked at heaps of downloads for similar on here but, I haven't found a free one other than a trial type that I'm not interested in, that works so, why is Linux so difficult in this regard? I will accept all the help I can get on here because I like the thought of being able to get away from Microsoft.
View 2 Replies
View Related
Mar 6, 2010
I wasn't sure if this is the right place to ask or comment on this, but since it's about Apache web server I thought it should work. I finally figured out how to set up and bring up the site using virtual hosts in Apache, though at the moment it's just for my localhost install.
I set them up so I can have a place to play with possible new themes and/or test out the Drupal 7 alpha / beta releases without messing up my current configuration. I decided to look at the error logs for the currently configured site and it had a lot of messages similar to the following:
[Sat Mar 06 09:45:39 2010] [error] [client 127.0.0.1] ModSecurity: Unable to retrieve collection (name "ip", key "127.0.0.1"). Use SecDataDir to define data directory first. [hostname "site.local"] [uri "/"] [unique_id "ZnUHgsCoAAEAABdzR2QAAAAB"]
View 4 Replies
View Related
Jul 14, 2011
I just installed RHEL 6.1 and saw this when trying to compile ntfsprogs:
Code: [root@Alpo-Computer ntfsprogs-2.0.0]# ./configure checking build system type... Invalid configuration `x86_64-unknown-linux-': machine `x86_64-unknown-linux' not recognized configure: error: /bin/sh ./config.sub x86_64-unknown-linux- failed
View 14 Replies
View Related
Jun 5, 2010
I open an ODS file and edit it and save, fine. But sometimes and for no readily apparent reason it refuses to save the document with the error message:"Error saving the document <filename>: Write error. The file could not be written". I have upgraded my version of OpenOffice but the issue remains. Once it starts with that error the only way to save the file is to actually abandon my change and restart OOffice. Today I lost an hours stuff as the auto save was also failing but not giving me any warning it was failing. I'm not sure if this is an OpenOffice, file system, Fedora or permissions issue though I've not noticed anything similar with other applications. Have set permissions to 777 but still get the error.
View 3 Replies
View Related
Aug 17, 2010
i finally decided to updgrade from Hardy Heron to Lucid Lynx. for this i made a backup of my old install, then i couldnt find my Lucid CD so i used a Karmic one to partition my old ext3 to ext4. There were some errors but after trying a few times it worked. Installed Karmic, rebooted (worked fine), downloaded all updates - (did NOT reboot to let updates take effect) and upgraded to Lucid.
Everything went fine so far. Now when i try to boot into Lucid the system hangs, i've also got a windowsXP partition on there so i tried booting that, first grub tells me Error 29: Disk write error then trying again windows seems to boot but it takes much longer than it should and seems to hang.
Then i tried Karmic and Lucid LiveCD (which i found in the meantime) none of the LiveCDs make it to boot after about 20 minutes. (previously they worked fine)looking at the errors it seems to be something about the harddrive. Why the harddrive would stop the LiveCD booting is a mystery to me but the same messages appear when i select Recovery from the Grub menu so i guess the problem is related.
[Code]...
View 3 Replies
View Related
Jan 4, 2011
df -h [URL] I did the following command to find everything is in /usr or /var, then tracked it down to /usr/lib and /usr/share as the main offenders, but out of all the directories none are more than 1mb or so.
du -sh /* | sort -gr | head -n 5
I tried to uninstall firefox, which is what got me in this mess in the first place, the log claims it will remove ~240 mb but failes on a "E: Write error - write (28 No space left on device)" [URL] If I could juggle something onto an external hard drive so I can uninstall firefox I would be out of the wood. Failing that I believe a new install is in order.
View 1 Replies
View Related
Feb 17, 2010
I want to write a shell script which will simultaneously collect OS user information and write in an individual text files.Can anyone tell me the syntax of the script.N.B. The user name will be mentioned in an array within the shell script.
View 8 Replies
View Related
Feb 3, 2011
difference between rhel 5 and rhel 6 - basic difference.
View 3 Replies
View Related
Nov 18, 2009
i have old RHEL 3 system which has kernel 2.4 installed into it. I wasnt to upgrade it to RHEL 5.x so i downloaded a kernel 2.6 package but was not able to compile it.
View 1 Replies
View Related
Dec 13, 2010
I am trying to install vnc on RHEL 5. but while installation i am getting below error:
View 1 Replies
View Related
Jul 15, 2010
I am doing the DNS configuration for the first time. Error in named configuration:
zone localdomain/IN: loaded serial 42
zone localhost/IN: loaded serial 42
zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
file1:9: unknown RR type 'example.com.'
file1:11: unknown RR type 'red.exmple.com.'
zone example.com/IN: loading master file file1: unknown class/type
[Code]....
View 1 Replies
View Related