Commit Graph

625 Commits

Author SHA1 Message Date
David Vossel
bfafdaeaf5 Feature: Filter logs using regex patter on function, format, or filename 2013-11-15 22:30:00 -06:00
David Vossel
9abb68637d Fix: log: Filtering by function and file must match exactly, no substring matches 2013-10-17 21:44:12 -05:00
David Vossel
00082df49f Low: blackbox: Abort blackbox logging on ringbuffer overwrite reclaim error 2013-10-08 21:59:59 -05:00
David Vossel
2b11b783c7 High: ipcs: Api function allowing server to retrieve client connection's ipc buffer size 2013-10-08 17:11:53 -05:00
David Vossel
47c690dbbc Low: ringbuffer: Abort during chunk reclaim if OVERWRITE flag is set and reclaim fails. 2013-10-03 20:40:12 -05:00
David Vossel
9582a4c60a High: blackbox: unique blackbox ringbuffer files per pid 2013-10-03 19:24:41 -05:00
David Vossel
b327dbec73 Low: ipc_socket: Fixes fd leak in socket ipc client disconnection 2013-09-16 18:38:20 -05:00
Michael van der Westhuizen
57e630f63f Use sizeof to get the correct size of the sockaddr_un sun_path member in a portable way. Fixes corosync on Mac OS X. 2013-09-03 08:44:15 +02:00
David Vossel
1bf8856b00 Merge pull request #87 from anchor/del-during-dispatch-v2
Avoid double-decrement of level->todo
2013-08-20 06:02:00 -07:00
David Vossel
67f63be685 Detect the max signal value that can be used using NSIG macro 2013-08-19 20:44:10 -05:00
Michael Chapman
580ca05de3 Avoid double-decrement of level->todo
If a job's dispatch function deletes the job, we may end up decrementing
the job queue's todo count twice. Verify that the job is on the queue
before decrementing.
2013-08-20 09:30:16 +10:00
Michael van der Westhuizen
4509500e5e Use a system-supplied maximum number of signals on Mac OS X. This gets SIGUSR2 (#31) working. 2013-08-11 21:51:17 +02:00
David Vossel
75f7ed3737 Bump version to 0.16.0 ... do not use version 0.15.0
The use of version-info conflicted with the naming
convention used to represent libqb version numbers. Because
of this the shared library file used for release 0.15.0
did not properly match the release version.  From now on
the version number will be manually set to guarantee consistency
between .so file and release version.
2013-07-25 13:12:02 -05:00
David Vossel
986b92d391 Bump the version to 0.15.0 2013-07-24 18:04:39 -05:00
David Vossel
2a0a0790e9 Low: ipc_socket: Output send event failure as debug instead of error 2013-07-23 22:37:08 -05:00
David Vossel
54ef796126 High: ipc_socket.c: Detect EOF connection on connection STREAM socket 2013-07-23 20:01:41 -05:00
David Vossel
e6c99f6280 Merge pull request #81 from davidvossel/dgram_max_msg
Added ability to estimate kernel's actual max dgram buffer size in a portable way.
2013-07-22 14:04:52 -07:00
David Vossel
a881c14086 Low: ipc_socket.c: Handle the unlikely event of an EAGAIN or EINTR during dgram max size detection 2013-07-22 20:29:24 -05:00
David Vossel
c73f2aa5cc Fixes sem leak 2013-07-22 18:21:23 -05:00
David Vossel
c04e887cf1 fixes double close 2013-07-22 16:58:46 -05:00
David Vossel
f14be872a1 Fixes double close 2013-07-22 16:57:47 -05:00
David Vossel
9102c8d956 Fixes double fd close 2013-07-22 16:54:52 -05:00
David Vossel
bb4958a8c0 Fixes fd leak 2013-07-22 16:11:15 -05:00
David Vossel
a6b41b2738 Fixes use ater free in shm disconnect 2013-07-22 15:56:30 -05:00
David Vossel
73827cfc5a Fixes use after free during ipcs client disconnect 2013-07-22 15:50:04 -05:00
David Vossel
70a7aca77f Remove dead code 2013-07-22 15:43:54 -05:00
David Vossel
65d044be18 High: ipcc: Add abilty to verify dgram kernel buffer size meets max msg value 2013-07-19 18:51:59 -05:00
David Vossel
40e163adba Fixes travis build error 2013-07-19 14:15:34 -05:00
David Vossel
bde8496352 High: ringbuffer: Make max_size of ringbuffer accurate so shm ipc max msg size value is honored 2013-07-18 22:01:29 -05:00
David Vossel
6cf5a3b3db Low: ipcs: For shm ipc, always retry outstanding notifications when next event is sent 2013-07-18 21:59:59 -05:00
David Vossel
71979d7796 Fix: ipcs: Fixes compile time issue reported by travis 2013-07-12 21:58:51 -05:00
David Vossel
0dc7003d08 Low: loop_pool_kqueue: remove potentially noisy dbug statement 2013-07-12 21:21:17 -05:00
David Vossel
6a1186863f Low: ipc_socket: In fbsd send() returns ENOBUFS when dgram queue is full, this should be treated similar to EAGAIN 2013-07-12 19:04:47 -05:00
David Vossel
0e44129344 High: kqueue: Properly enable kqueue filter in poll loop 2013-07-12 19:04:42 -05:00
David Vossel
be975f9de0 Low: ipcs: Attempt to resend outstanding event notifications during event send 2013-07-12 18:45:21 -05:00
David Vossel
ff180f7a55 Fix: ipcs: Disconnect shm ipc connection when poll socket returns error on msg receive 2013-07-01 19:20:51 -05:00
David Vossel
95e48fdb76 Fix: ipcs: Properly disconnect client connection on POLLNVAL or any other error causing connection removal from mainloop.
qb_ipcs_dispatch_connection_request is a callback function registered with
mainloop, or whatever other looping thread implementation is in use.  When
this callback is registered, a reference of the connection object is given
to the mainloop thread.  If this callback ever returns something none zero
the callback (and corresponding fd) is unregistered from the loop automatically,
so we must decrement the reference in this instance.

Since unregistering this callback from mainloop guarantees a disconnect
simply because requests on the fd are no longer processed, it is best
that we completely disconnect the connection (which will handle the unref)
when this callback returns an error... Otherwise since the fd is unregistered
from the mainloop thread, it may not be possible to detect a disconnect
in the future.
2013-07-01 18:46:31 -05:00
David Vossel
abdf8cd94a Simplify internal ipcs ref counting, add comments and document api behavior 2013-06-28 20:27:02 -05:00
David Vossel
8466fba749 Simplifies connection ref counting without changing behavior 2013-06-28 20:26:24 -05:00
David Vossel
a8d4e9fdb5 Fix: refcount leak 2013-06-27 19:33:18 -05:00
David Vossel
a2bdeed3cc Fix: ringbuffer: Add file header version field and detect reading corrupted blackbox files using hash value
In the future, if something changes in the file header we can
increment the version and split up the parsing into separate functions
for backwards compatibility.
2013-06-27 19:32:05 -05:00
yuusuke
9b7b16a865 fix a problem when the character string beyond the number of the maximum characters is passed 2013-06-05 19:35:03 +09:00
Michael van der Westhuizen
652766c002 Add a IPC service context pointer and accessors from both the connection and service level. 2013-05-25 22:57:53 +01:00
Angus Salkeld
359725f4fd Add atomic_int.h to noinst_HEADERS
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-05-13 11:59:42 +10:00
Angus Salkeld
67dc29f48d Use the new atomic ops in the ringbuffer
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-05-13 10:15:55 +10:00
Angus Salkeld
6f382aaade Add internal support for the new __atomic gcc builtins
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-05-13 10:15:55 +10:00
Angus Salkeld
d782f4216b Rename the configure macros from atomic to sync
This is so I can add support for the new atomic's which
are named __atomic.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-05-13 09:45:50 +10:00
Jeremy Fitzhardinge
9b3be0b450 ringbuffer: use atomic ops on ringbuffer chunk magic
The ringbuffer protocol uses the chunk magic number to indicate to the
other side what state a chunk is in.  It's therefore important to use
strongly ordered memory writes to make sure that neither the compiler
nor the CPU change the apparent order of the writes, since that would
result in corrupted messages.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-04-24 11:57:49 +10:00
Angus Salkeld
f54764e1ec IPC: make each connection ref the owning service
This is because the connection functions use the c->service pointer
and this needs to be mirrored in the reference counting.

The service can only be free'd when all connections are destroyed
and the user as unreferenced all previously referenced connections
and the service.

Fixes #62
Thanks to Jan Friesse for the reproducer
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-04-22 12:03:26 +10:00
Andrew Beekhof
f16dca6df9 Indicate when/why qb_rb_force_close() fails to remove share memory files 2013-04-11 13:00:12 +10:00