CentOS 5 :: Xmlrpc-c Server Free String Memory Alloc-ed By Xmlrpc_parse_value
Feb 24, 2010
I have the following function on my xmlrpc server side.
The registration of this function is done as follows from the main function:
The above function makes the server segfault some where on the return path and client gets the response:
Here is what GDB shows when server segfaults....
However if I remove the line "xmlrpc_strfree (node_name);" then server does not segfault and client receives the response correctly. In the xmlrpc-c code it clearly says " Return the string in newly malloc'ed storage that Caller must free." in xmlrpc_data.c::xmlrpc_read_string() which is the function that gets called from xmlrpc_parse_value().
I'm trying to install php-xmlrpc on CentOS 5.5 and is not working, i downloaded the rpm, and tried to install:
Quote:
# rpm -ivh php-xmlrpc-5.1.6-27.el5.i386.rpm error: Failed dependencies: php-common = 5.1.6-27.el5 is needed by php-xmlrpc-5.1.6-27.el5.i386 Then i check for php-common: Quote: # yum install php-common.i386
I would like to install xmlrpc-c . I do: wget -P /tmp [URL] and when i execute: rpmbuild --rebuild /tmp/xmlrpc-c-1.06.18-1.el5.kb.src.rpm i got this error:
Nagios had alerted me that the server had a very high load average exceeding the critical level (17+), when logging onto the server I found that all 4GB of the swap was in use despite the fact that there was 15GB+ of free memory (and that's not even including memory from cache and buffers!) Because it seems all heavily used pages were being stored in swap, the I/O wait on the server became very high, and 4 kswapd daemons were taking up nearly 100% available CPU. This did coincide with an error reported by Bacula during a backup job while changing to a bad tape...
From /var/log/bacula.log: Code: 10-Dec 02:11 bacula-sd JobId 1898: End of medium on Volume "4097" Bytes=434,170,000,000 Blocks=217,084 at 10-Dec-2010 02:11. 10-Dec 02:11 bacula-sd JobId 1898: 3307 Issuing autochanger "unload slot 4097, drive 0" command. 10-Dec 02:12 bacula-sd JobId 1898: 3301 Issuing autochanger "loaded? drive 0" command. 10-Dec 02:12 bacula-sd JobId 1898: 3302 Autochanger "loaded? drive 0", result: nothing loaded. 10-Dec 02:12 bacula-sd JobId 1898: 3304 Issuing autochanger "load slot 4096, drive 0" command. 10-Dec 02:13 bacula-sd JobId 1898: 3305 Autochanger "load slot 4096, drive 0", status is OK. 10-Dec 02:13 bacula-sd JobId 1898: Volume "4096" previously written, moving to end of data. 10-Dec 03:51 bacula-sd JobId 1898: Error: Unable to position to end of data on device "Tape-1" (/dev/IBMtape0n): ERR=dev.c:1384 read e rror on "Tape-1" (/dev/IBMtape0n). ERR=Input/output error.
10-Dec 03:51 bacula-sd JobId 1898: Marking Volume "4096" in Error in Catalog. 10-Dec 03:51 bacula-sd JobId 1898: 3307 Issuing autochanger "unload slot 4096, drive 0" command. 10-Dec 03:58 bacula-sd JobId 1898: 3301 Issuing autochanger "loaded? drive 0" command. 10-Dec 03:58 bacula-sd JobId 1898: 3302 Autochanger "loaded? drive 0", result: nothing loaded. 10-Dec 03:58 bacula-sd JobId 1898: 3304 Issuing autochanger "load slot 4098, drive 0" command. 10-Dec 03:58 bacula-sd JobId 1898: 3305 Autochanger "load slot 4098, drive 0", status is OK. 10-Dec 03:59 bacula-sd JobId 1898: Wrote label to prelabeled Volume "4098" on device "Tape-1" (/dev/IBMtape0n) 10-Dec 03:59 bacula-sd JobId 1898: New volume "4098" mounted on device "Tape-1" (/dev/IBMtape0n) at 10-Dec-2010 03:59. At the same time, these messages starting occuring in /var/log/messages:
Code: Dec 10 03:51:47 07 kernel: Mem-info: Dec 10 03:51:47 07 kernel: Node 0 DMA per-cpu: Dec 10 03:51:47 07 kernel: cpu 0 hot: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 0 cold: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 1 hot: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 1 cold: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 2 hot: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 2 cold: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 3 hot: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 3 cold: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 4 hot: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 4 cold: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 5 hot: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 5 cold: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 6 hot: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 6 cold: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 7 hot: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: cpu 7 cold: high 0, batch 1 used:0 Dec 10 03:51:47 07 kernel: Node 0 DMA32 per-cpu: Dec 10 03:51:47 07 kernel: cpu 0 hot: high 186, batch 31 used:162 Dec 10 03:51:47 07 kernel: cpu 0 cold: high 62, batch 15 used:48 Dec 10 03:51:47 07 kernel: cpu 1 hot: high 186, batch 31 used:0 Dec 10 03:51:47 07 kernel: cpu 1 cold: high 62, batch 15 used:0 Dec 10 03:51:47 07 kernel: cpu 2 hot: high 186, batch 31 used:0 Dec 10 03:51:47 07 kernel: cpu 2 cold: high 62, batch 15 used:0 Dec 10 03:51:47 07 kernel: cpu 3 hot: high 186, batch 31 used:18 Dec 10 03:51:47 07 kernel: cpu 3 cold: high 62, batch 15 used:0 Dec 10 03:51:47 07 kernel: cpu 4 hot: high 186, batch 31 used:159 Dec 10 03:51:47 07 kernel: cpu 4 cold: high 62, batch 15 used:56 ... Dec 10 03:51:47 07 kernel: Node 3 HighMem per-cpu: empty Dec 10 03:51:47 07 kernel: Free pages: 732052kB (0kB HighMem) Dec 10 03:51:47 07 kernel: Active:4232128 inactive:3071288 dirty:158210 writeback:0 unstable:0 free:183320 slab:256840 mapped-file:289545 mapped-anon:3805487 pagetables:13063 Dec 10 03:51:47 07 kernel: Node 0 DMA free:10796kB min:4kB low:4kB high:4kB active:0kB inactive:0kB present:10356kB pages_scanned:0 all_unreclaimable? yes Dec 10 03:51:47 07 kernel: lowmem_reserve[]: 0 3512 9067 9067 Dec 10 03:51:47 07 kernel: Node 0 DMA32 free:213332kB min:2500kB low:3124kB high:3748kB active:1794108kB inactive:1463220kB present:3596296kB pages_scanned:64 all_unreclaimable? no Dec 10 03:51:47 07 kernel: lowmem_reserve[]: 0 0 5555 5555 Dec 10 03:51:47 07 kernel: Node 0 Normal free:41028kB min:3952kB low:4940kB high:5928kB active:3409444kB inactive:1471120kB present:5688320kB pages_scanned:0 all_unreclaimable? no Dec 10 03:51:47 07 kernel: lowmem_reserve[]: 0 0 0 0 Dec 10 03:51:47 07 kernel: Node 0 HighMem free:0kB min:128kB low:128kB high:128kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no Dec 10 03:51:47 07 kernel: lowmem_reserve[]: 0 0 0 0 Dec 10 03:51:47 07 kernel: Node 1 DMA free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no ... Well to cut a long story short, I fixed the problem by disabling the swap partition with 'swapoff'. After about 30 mins all the swap was freed and the server went back to normal. I don't dare reactivate the swap partition and unfortunately as this is a live server which currently has no fail over, I can't reboot either
Server Spec: 4 * Dual-Core AMD Opteron(tm) Processor 8214 32GB DDR2 ECC RAM RHEL 5.5, 2.6.18-194.11.3.el5 SMP x86_64 Running many KVM VMs (All CentOS x64) and kksmd is used. bacula-dir Version: 5.0.0 IBM Tape Drive using lin_tape module version 1.34.0 according to modinfo
And before anybody asks # sysctl vm.swappiness vm.swappiness = 10
I am using malloc and frees a lot in my program. It shows its allocated but when i remove it doesnt show as the memory is removed(I am using the top command to view VIRT memory usage). If this continously grows what would happen to my program (Will it go out of memory?)
I am looking for free database that has low memory usage and innodb and memory like engins that has C API and support trigger and client/server support for using in embedded linux systems.
I just ran into a weird problem with a CentOS 5.5 64-bit server running VirtualBox 3.2.8 (I would run Vmware Server 2.0.2 if not for the well known fact that Vmware doesn't care about its Server line anymore and it doesn't run on CentOS > 5.3 without major splits). I currently have two guests in that VirtualBox setup, a CentOS 5.5 64-bit and a Fedora 13 64-bit. The CentOS 5.5 guest shows less memory available than configured. If, for example, I give the virtual machine 512MB of memory the guest OS only recognizes 380MB. If I give it 768MB it only recognizes 637MB, and so on. I don't have that problem on the Fedora guest - 1024MB configured, 1024MB available.
i tried to configured snmp configuration for opennms monitoring tool to get disk alert ..when i entered the following command i doesint receive any sysobj id can somebody say how can i get my sysobjid in centos 5.4
I'm looking for a way to put a MySQL database in a server's memory. The disks aren't fast enough to keep up with the usage and I don't feel like going for a splitted web&db server yet because of the costs.
Because this involves risks (unless there's a way to read from the memory and write to the memory AND disks?), so I'd prefer that the DB gets copied automatically every hour or so to the local disks.
I would not exactly consider myself a newbie but this is a bit of a newbie question so here it goes.
When I run top I see used memory and free memory. When I first boot the system there is lots of free memory in about a day or two that memory whittles down from 2GB of Free mem(of 4GB) to 20MB and then maintains 20-50MB of free memory. This seems to be consistent across different servers. At first I thought there had to be some major memory leaks but it just seemed to prevalent to not have been noticed before.
I found a better way to gauge memory usage is the use of the free command. Now I am confused though, what is Free memory as it is defined and monitored in top?
I've come across a really strange issue with one of my RHEL servers. The "free" command shows that 7019 MB of memory are actually in use by my system, but when summing up the actual usage (or even virtual usage like the example below) it doesn't add up - the sum is far less than what is reported by "free":
I have xen kernel on a 5.4_64 though it seems to have always done this regardless of version. When I add a virt the control set shows the total machine memory minus what I just allocated to the new virt. This also shows up in the system monitor as total available ram. Problem arises in deleting and making new virts. The memory never reappears as usable after deleting virts. So now after testing several different setups I'm down to 1.4 gigs showing available on the dom0. What can I do to recover this lost memory? I've searched, read, looked every where I could think of and there just doesn't seem to be any information about deleting virts only adding them.
I have a web server with the specs below and my apache server is being a hog using all my RAM 7gigs or 8gigs of ram. When there is a rush of traffic at once my whole server crashes and I have to reboot apache. The way my site is set up I have a tube script and I use the tube script to host videos on my forum I have 1000 videos on the tube script. I brought a bigger server and more ram because of the down time I been having . I am really trying to figure out why its crashing and using so much ram. I installed eAccelerator didn't seem to help with the apache server.
Intel Quad Core Xeon X3430 (4 x 2.40 GHz, 8MB Cache) > 2-bay Supermicro Chassis and Motherboard > 8 GB REG ECC DDR3 (twice your current setup) > 250 GB Enterprise Grade SATA II > 10 TB Bandwidth 1gig Uplink Port > CentOS 64 Bit (Latest Stable)
TOP Command and free -m command screenshots are attached this is with only 160 people online at once
I need to call a function that takes a string array as argument, declared like this:Code:int someFunction(/* some parameters... */, const char* s[]);I'd like to know how to allocate memory for the string array. I know a string is an array of chars and an array is a pointer to the first element, then a string array should simply be a two dimensional char array. But is it a single memory block where all strings are stored consecutively?? Or is it a base vector where each element is a pointer to a separate memory block that contains a single string?More specifically: should I malloc() a single memory block large enough for all the strings? or should I allocate separate blocks for each string plus an extra one for the base vector?
I have a very weird memory issue (as you may have guessed from the title). There's a discrepency between the memory accumulated by the various applications (using "ps -eF" to collect that) and the memory reported by system monitor/"free" Basically, I have around 0.5GB of memory that is not occupied by any application, but is not free as well. (It is not used as cache as well)
When we have Oracle 10g in RedHat, the free memory goes down soon after bootup of the system and never increases. I learnt from various forums that Linux does cache the disk files for the better performance. And when any application requires memory they get the memory and the caching does not block any memory. We want to capture the free memory available for one the harware planning activity.
1) When we use vmstat command, it gives very less free memory. since it caches large size files, the free memory is very low.
2) We tried free command, but how do we know how much actual free memory is available. i.e. excluding the cache usage
I've got a question on free disk space. I'm currently running CentOS 5.5 on in Xenserver virtual environment. We've had an issue with disk space. My question is as follows: - from a ssh connection i run df -h this gives the value of 90% used leaving me with 9GB. If I use system monitor via a VNC connection the free disk space value is 20GB free on the same volume. Which one is correct? I do use SNMP to monitor the same volume and should alert me when < 10% is free I know this works as I set the alert threshold to < 90% I get an alert.
We had servers that worked fine for years. After updated them to the latest version of CentOS (5.2 with latest updates), they keeps on hanging when being scanned by PCI Verdors (a Credit Card security standard). Basically, the scan causes httpd process to eat up all memory, and the server becomes unresponsive. Normal operations resume after the scan stops for 5, 10 minutes. Output from top looks like the following:
When I use top to see memory usage, I have 65gb ram but only 1.3gb of it free and remaining is shown as used. When I ran my program It gives memory insufficiency error. Although no other program is using the remaining 63.7gb ram it is hold. How can I get free the unused ram?
im trying to collect some data. Is there a way to get the free memory stats over the past few days from some file... i looked into the sar log files but they dont have date stamps in them!
I just opened an (unmanaged) VPS account and and have been encountering nothing but problems with trying to get Apache up and running (its something I've done many times before).Basically the inital error was with LDAP not having enough space, so I disabled the related extensions and Apache still would not run. Looking at the log, it contains: (28)No space left on device: Unable to create scoreboard (anonymous shared memory failure)
My mail server stopped working this weekend, when I got in today I restarted and all the emails came through. The panic_log shows: daemon: accept process fork failed: Cannot allocate memory several times over the course of a few minutes. Can anyone give me advice on troubleshooting this one?