Steven Dake
10fcf89591
Speed up IPC connection process.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2986 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-07-07 21:43:15 +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
Jan Friesse
1d1c3059ad
coroipcc - don't loop forever on EINTR
...
This patch unify behaviour of SYS V semaphores and POSIX semaphores.
POSIX semaphores never return CS_ERR_TRY_AGAIN on EINTR and keeps
waiting. This was fixed for SYS V semaphores in rev. 2303.
Another change is to remove very small probability of hung forever in
coroipcc_dispatch_put.
Last change is removal of duplicate code by adding ipc_sem_wait function.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2907 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-27 08:05:31 +00:00
Angus Salkeld
b1d84f9ecc
cov 10373: check poll return value
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2844 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-05-16 23:35:45 +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
Jan Friesse
171f65578c
Handle POLLNVAL in coroipcc
...
Old code in coroipcc doesn't handle POLLNVAL. It can happen, that some
applications (for example fenced) will stuck forever.
Also poll result is now handled more correctly.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2789 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-04-26 16:16:20 +00:00
Jérôme Flesch
52acd736d0
Coroipcc: Make sure that coroipcc_service_connect() always return a valid cs_error_t
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2748 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-30 07:24:59 +00:00
Steven Dake
3dd78c7aec
Fix error handling to avoid segfaults/leaks on error in coroipcc_service_connect.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2672 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-03-03 19:19:12 +00:00
Jan Friesse
1649931691
Fix freeze of IPC library connection on sem_wait
...
This patch solves library waiting on sem_wait. It doesn't
solve all other problems, which can make corosync not
to exit (malloc race, global lock deadlock, ...)
RHBZ#547511
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2643 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-01-14 08:39:06 +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
Steven Dake
45d68cab47
Fix merge error in previous commit.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2472 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-21 20:08:38 +00:00
Steven Dake
b3f661d295
Patch from Jerome to fix segfault in dispatch functions.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2468 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-21 19:03:16 +00:00
Steven Dake
77e63f0044
Remove warning in coroipcc.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2462 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-20 06:53:10 +00:00
Christine Caulfield
6f3fabe398
Add corosync-quorumtool
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2406 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-09-08 08:14:58 +00:00
Steven Dake
3d05244ca0
Allow finalize routines to occur inside dispatch routines.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2394 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-24 17:50:12 +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
Jérôme Flesch
bfb965554c
Fix value returned by lib/coroipcc_dispatch_get() in case recv() fails
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2386 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-08-17 07:36:17 +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
Steven Dake
90c013d787
Fix segfault when using zcb api of coroipcc under certain loads.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2356 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-07-10 11:49:51 +00:00
Steven Dake
c0ff6ca7e5
Previously if a process was interrupted by a signal it could become unkillable
...
because the operation was retried on signal interrupts.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2303 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-26 21:18:38 +00:00
Steven Dake
ea5d3ba241
Set nosigpipe socket option on platforms that send sigpipes in coroipcc.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2273 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-20 17:34:59 +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
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
a6feabf880
Use PF_UNIX on Solaris platforms instead of PF_LOCAL.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2240 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-14 11:37:53 +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
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
9269c78dba
coroipcc port to Solaris.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2208 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-07 00:42:21 +00:00
Steven Dake
bf624c727d
Implement thread saftey in corosync trunk.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2165 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-29 07:21:21 +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
Steven Dake
1beb0c1fbd
Remove saHandleXXX and friends and use hdb instead.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2125 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-22 17:43:54 +00:00
Fabio M. Di Nitto
a92f69632f
Stop hardcoding /var
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2123 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-22 10:39:43 +00:00
Steven Dake
8126cf7458
Reworking of include file dependencies.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2119 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-22 09:01:30 +00:00
Jim Meyering
904a10ed38
remove all trailing blanks
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2117 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-22 08:03:55 +00:00
Steven Dake
cee464489f
Change shared memory to use mmap() system calls.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2115 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-22 05:41:30 +00:00
Steven Dake
75c4bc0d71
Zero copy feature for IPC transmits. Also integrated into CPG library
...
service.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2114 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-21 23:37:49 +00:00
Steven Dake
6951637ea5
Remove memory leak from new dispatch circular buffer mapped system.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2113 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-21 20:26:12 +00:00
Steven Dake
cd154d63e6
Use spinlocks in library handle references.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2099 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-20 18:03:10 +00:00
Steven Dake
0969721db3
Rework how dispatch functions so service engines work properly.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2079 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-18 07:06:14 +00:00
Jim Meyering
936ace0b58
coroipcc.c: avoid shadowing warning
...
* lib/coroipcc.c: Don't use "read" as param name.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2065 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-15 19:11:54 +00:00
Jim Meyering
a44f4e70e6
coroipcc.h (coroipcc_msg_send_reply_receive): Make res_len size_t.
...
* include/corosync/coroipcc.h (coroipcc_msg_send_reply_receive):
change type of res_len parameter.
* lib/coroipcc.c (coroipcc_reply_receive): Likewise.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2045 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 17:30:02 +00:00
Jim Meyering
36eefbadef
Convert all "int iov_len" decls to "unsigned int iov_len".
...
Used this command:
git grep -l 'int iov_len' \
| xargs perl -pi -e 's/((?:^|,)\s*)(int iov_len)/${1}unsigned $2/'
Here's an approximate (autogenerated by vc-chlog) list of affected
file names and functions/macros:
* README.devmap:
* exec/coroipcs.c (sending_allowed_private_data)
(coroipcs_response_iov_send, msg_send, msg_send_or_queue)
(coroipcs_dispatch_iov_send):
* exec/coroipcs.h (handler_fn_get):
* exec/main.c (deliver_fn, main_mcast):
* exec/main.h (FALSE):
* exec/sync.c (vsf_iface, sync_deliver_fn):
* exec/totemmrp.c (totemsrp_handle_in, pg_deliver_fn)
(totemmrp_deliver_fn, totemmrp_initialize, totemmrp_mcast):
* exec/totemmrp.h (TOTEMMRP_H_DEFINED):
* exec/totemnet.c (iov_len, encrypt_and_sign_worker)
(ucast_sendmsg, mcast_sendmsg, totemnet_token_send):
* exec/totemnet.h (TOTEMNET_FLUSH):
* exec/totempg.c (deliver_fn, totempg_deliver_fn, mcast_msg)
(totempg_groups_initialize, totempg_groups_mcast_joined)
(totempg_groups_joined_reserve):
* exec/totemsrp.c (iov_len, totemsrp_recv, totemsrp_deliver_fn)
(totemsrp_initialize, totemsrp_mcast, token_send):
* exec/totemsrp.h (TOTEMSRP_H_DEFINED):
* exec/vsf_ykd.c (ykd_deliver_fn):
* include/corosync/coroipcc.h (handleInstanceDestructor):
* include/corosync/cpg.h (cpg_callbacks_t):
* include/corosync/engine/coroapi.h (ipc_response_iov_send)
(ipc_dispatch_iov_send, totem_mcast, tpg_init, tpg_joined_mcast)
(tpg_joined_reserve, tpg_groups_mcast, tpg_groups_reserve):
* include/corosync/totem/totempg.h (TOTEMPG_SAFE):
* lib/coroipcc.c (coroipcc_msg_send)
(coroipcc_msg_send_reply_receive)
(coroipcc_msg_send_reply_receive_in_buf):
* lib/cpg.c (cpg_mcast_joined):
* lib/util.h (versionsSupported):
* services/pload.c (send_message):
* services/votequorum.c (conn, quorum_deliver_fn):
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2031 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-08 07:56:45 +00:00
Jim Meyering
41b1ba0e77
remove 3 useless casts
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2005 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-03 20:31:45 +00:00
Jim Meyering
514159407f
coroipcc. h (coroipcc_dispatch_recv): Add a buflen parameter.
...
* lib/coroipcc.c (coroipcc_dispatch_recv): Update definition, and...
(memcpy_swrap): ... add a parameter here, too.
* include/corosync/coroipcc.h (coroipcc_dispatch_recv):
* lib/cfg.c (corosync_cfg_dispatch):
* lib/confdb.c (confdb_dispatch):
* lib/cpg.c (cpg_dispatch, cpg_flow_control_state_get):
* lib/evs.c (evs_dispatch):
* lib/quorum.c (quorum_dispatch):
* lib/votequorum.c (votequorum_dispatch):
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1995 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-03 18:35:04 +00:00
Jim Meyering
9023d045cc
coroipcc.h: add "const" to msg_send_reply_* "iov" parameters
...
* include/corosync/coroipcc.h (coroipcc_msg_send_reply_receive_in_buf):
Make "iov" const.
* lib/coroipcc.c (coroipcc_msg_send): Make iov const.
(coroipcc_msg_send_reply_receive): Likewise.
(coroipcc_msg_send_reply_receive_in_buf): Likewise.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1994 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-03 16:25:43 +00:00
Steven Dake
e77b1e21ad
Make all threads use same scheduling priority even with -p option
...
specified to avoid deadlock in spinlocks.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1912 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-25 18:25:18 +00:00
Christine Caulfield
73a3bd206f
The IPC system smply concatenates SOCKETDIR with run/<socketname> so if
...
th euser forgets to add a trailing slash to the name: eg
./configure --with-socket-dir=/var/run
then the socket is created as /var/runcorosync.ipc
This patch adds the slash into the name generation printf.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1910 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-25 15:38:56 +00:00
Steven Dake
ada9153949
Change strcpy to sprintf to fix compile error.
...
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1908 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-03-24 15:33:55 +00:00