Russell Bryant
907d974352
Add calls to pthread_attr_destroy().
...
This patch adds a couple of missing calls to pthread_attr_destroy().
There were a couple of instances where pthread_attr_init() was being
used without a cooresponding call to pthread_attr_destroy(). This also
localizes the pthread_attr_t to the function where it is needed instead
of having it persist (the man page specifically states that destroying
the attributes structure has no effect on threads created using the
attributes).
Signed-off-by: Russell Bryant <russell@russellbryant.net>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-02-21 12:14:07 -07:00
Angus Salkeld
4da371f4f7
STATS: increase the space for application names
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Seven Dake <sdake@redhat.com>
2011-02-04 09:44:12 -07:00
Angus Salkeld
a9b436c7a1
IPC: send failure message to client if memory maps fail
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-01-03 21:28:44 +11:00
Jan Friesse
7c8cdfb197
Remove delay in library on corosync shutdown
...
Patch removes 2 seconds delay in library on normal corosync shutdown.
Delay is still present on abnormal shutdown.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@3059 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-10-12 13:03:37 +00:00
Angus Salkeld
3b320c17ae
IPC: return CS_ERR_NO_RESOURCES to library when low on fds.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@3029 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-08-25 01:13:14 +00:00
Steven Dake
5a3c285fbd
Properly detect shutdown of corosync process
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@3022 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-08-17 18:08:13 +00:00
Steven Dake
1135c911cd
Fix problem where flow control could lock up ipc under very heavy load in very
...
rare circumstances.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@3001 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-07-21 17:03:36 +00:00
Steven Dake
cf0d63aa3f
Patch to fix stack protector sig abort that occurs when ipc buffer is too
...
short.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2974 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-06-29 18:15:20 +00:00
Angus Salkeld
b116eaca00
ipc: Fix error handling of mmap util functions.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2972 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-06-29 05:31:44 +00:00
Angus Salkeld
b2a304d8f8
cov (10387, 10397): cleanup memory mapping functions
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2840 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-16 21:35:52 +00:00
Angus Salkeld
d08c6d577f
cov 10399: set the msg_flags to 0 in coroipcs.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2838 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-16 21:33:32 +00:00
Angus Salkeld
45152f0902
cov 10378: fix syntax error.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2829 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-14 02:08:02 +00:00
Angus Salkeld
3ebd6fab52
cov 10379 &10380: check result of open before calling ftruncate.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2823 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-14 02:03:49 +00:00
Jan Friesse
12c5f31a89
Handle some valgrind errors
...
- Memset for res_setup variable in coroipcs:req_setup_send
- Two memset in logsys for buffers
- Problem in corosync_totem_stats_updater where avg_token_holdtime has
size of avg_backlog_calc
- corosync_totem_stats_init where avg_backlog_calc is 32 bits (not 64)
- objdb problem if new_valie_len != object->value_len. In such case
newly allocated memory is not initialized and in some situations,
value_len is not updated.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2787 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-04-23 08:03:05 +00:00
Steven Dake
64d60a26c6
Tone down noisy logging from ipcs system.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2721 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-23 17:16:39 +00:00
Angus Salkeld
20f3331d0e
convert strerror() into strerror_r()
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2665 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-02-25 19:28:36 +00:00
Jan Friesse
5a8200c1cb
Fix corosync shutdown process
...
This patch change corosync shutdown process, so now:
- exit function of service engine is called
- all IPC connections are closed and removed from poll
- service engine is unlocked
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2657 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-02-16 11:29:14 +00:00
Steven Dake
2f24513d87
Fix coroipcs message corruption that occurs when a message fills the remainder
...
of the dispatch buffer with a full message.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2650 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-01-30 23:02:40 +00:00
Jan Friesse
64c6c6f324
Fix malloc deadlock in signal handler
...
This patch solves situations, where malloc is called
inside signal handler. It creates thread, which waits
for semaphore unlock and then starts shutdown sequence.
RHBZ#547511
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2644 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-01-14 12:54:46 +00:00
Angus Salkeld
acf9a8d85f
Correct some ugly indentation.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2563 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-12-03 18:13:52 +00:00
Angus Salkeld
27d383276b
coroipcs: Add a queue_size stats counter to each ipc connection.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2552 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-11-29 18:28:39 +00:00
Angus Salkeld
ce8046f353
coroipcs: add logging for flow control state changes.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2551 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-11-29 18:25:51 +00:00
Angus Salkeld
e5b94a352e
COVERITY 14: free zcb_mapped if memory_map() fails.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2544 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-11-22 06:27:09 +00:00
Angus Salkeld
07072bd0b1
Add a log_printf function to coroipcs so we can pass the log level
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2530 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-18 18:15:24 +00:00
Angus Salkeld
494bf45ebf
Avoid array out of bound error.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2529 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-14 23:05:18 +00:00
Steven Dake
765fa65351
Patch from jflesch to fix segfault when using sysv semaphores that the thread
...
state is checked prior to the semaphore operation, not after it has completed.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2524 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-14 19:06:37 +00:00
Angus Salkeld
97ed934966
Fix the OSX build (broken by stats patches)
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2521 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-13 08:13:53 +00:00
Angus Salkeld
948ca19aa7
Add some missing calls to increment the relevant stats.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2519 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-12 21:56:23 +00:00
Angus Salkeld
4e6e33467d
allow coroipcs to work without calling stats initialization.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2518 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-12 21:50:10 +00:00
Angus Salkeld
afbbc5e5ff
Add connection related statistics to the object db.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2514 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-12 00:36:55 +00:00
Christine Caulfield
898790d501
Return CS_ERR_NOT_EXIST if a client tries to contact a plugin that isn't loaded.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2403 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-07 07:28:25 +00:00
Jan Friesse
55db0b67a2
Fix systems without _POSIX_THREAD_PROCESS_SHARED
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2390 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-19 09:55:49 +00:00
Steven Dake
f558917703
Proper limits checking for message sizes to allow ~1mb max message sizes for corosync.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2388 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-17 18:22:11 +00:00
Steven Dake
ee7ce5e328
Use unnamed shared posix semaphores on platforms which support them.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2379 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-04 00:22:41 +00:00
Jérôme Flesch
483fe491f9
BSD support: Fix EOF handling in coroipcs.c:req_setup_recv() and coroipcs:coroipcs_handler_dispatch()
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2345 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-07-02 07:47:04 +00:00
Steven Dake
c12253097f
Send ERR_SECURITY when invalid security context is provided via ipc clients.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2338 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-07-01 20:04:20 +00:00
Steven Dake
0cf6c6c7db
Add tests for posix scheduling apis to configure.ac and use them to determine
...
if we should set scheduling priorities or not.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2277 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-21 16:33:25 +00:00
Steven Dake
74c0a68ee1
Fix unused variable on linux because of portage work.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2268 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-19 15:53:13 +00:00
Steven Dake
589f889fbe
Patch from Wojtek to fix Solaris segfault with compiler optimization.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2267 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-19 15:42:15 +00:00
Jim Meyering
74a2fa1194
maint: remove trailing blanks
...
By running this command from a git-cloned directory:
git grep -z -l -E '[[:blank:]]+$' | xargs -0 perl -pi -e 's/[ \t]+$//'
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2266 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-19 11:34:50 +00:00
Steven Dake
2d7937de26
Warn user of missing dirs and exit gracefully.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2262 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-19 01:53:24 +00:00
Steven Dake
4620ca4e0b
Ensure Linux, BSD, Solaris, Darwin function with security authentication in
...
IPC system.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2259 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-18 21:32:45 +00:00
Steven Dake
a49937b029
add madvise nosync calls for bsd platform.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2253 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-18 05:53:16 +00:00
Steven Dake
4c4b980d6b
Fix build error from recent solaris porting.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2241 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-15 18:39:50 +00:00
Steven Dake
0389b65725
Port of coroipc system to Solaris.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2238 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-14 11:36:18 +00:00
Steven Dake
13f3f6214d
Patch from Jerome Flesch to correctly reference count on bsd and solaris
...
platforms in the IPC system to avoid cpu spinning.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2237 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-14 10:40:50 +00:00
Steven Dake
ae8fd0a6e0
Fix semun definitions for various platforms.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2228 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-10 14:28:16 +00:00
Steven Dake
0d98fca548
Use PF_LOCAL to match BSD semantics of api calls.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2226 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-09 21:40:44 +00:00
Steven Dake
e94bcd506e
Make coroipcs compile on Solaris.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2212 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 00:55:00 +00:00
Steven Dake
0986c30320
Remove useless APIs from coroipcs.c related to handling of overload
...
conditions.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2146 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-26 01:20:09 +00:00