Branch: refs/heads/master
Home: https://github.com/ClusterLabs/libqb
Commit: 926e851fbbb8d1864cf79a5b23e5d7faa0bbb09d
https://github.com/ClusterLabs/libqb/commit/926e851fbbb8d1864cf79a5b23e5d7f…
Author: Chrissie Caulfield <ccaulfie(a)redhat.com>
Date: 2018-11-12 (Mon, 12 Nov 2018)
Changed paths:
M .travis.yml
M configure.ac
M include/qb/qblog.h
M lib/log.c
M libqb.spec.in
M tests/Makefile.am
R tests/functional/GNUmakefile
R tests/functional/Makefile.am
R tests/functional/log.am
R tests/functional/log_callsite_bench_gen.py
R tests/functional/log_client.c
R tests/functional/log_external/Makefile.am
R tests/functional/log_interlib.c
R tests/functional/log_interlib_client.c
R tests/functional/log_internal/Makefile.am
R tests/functional/log_test_client.err
R tests/functional/log_test_client.sh
R tests/functional/log_test_interlib_client.err
R tests/functional/log_test_interlib_client.sh
R tests/functional/log_test_mock.sh
R tests/functional/syslog-stdout.py
Log Message:
-----------
log: Remove more dead code from linker callsites (#331)
Thanks for the review
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
Branch: refs/heads/master
Home: https://github.com/ClusterLabs/libqb
Commit: 7556204b27100712b6dda7a7c53bdf21186a6bc2
https://github.com/ClusterLabs/libqb/commit/7556204b27100712b6dda7a7c53bdf2…
Author: Chrissie Caulfield <ccaulfie(a)redhat.com>
Date: 2018-11-09 (Fri, 09 Nov 2018)
Changed paths:
M examples/simplelog.c
M include/qb/qblog.h
M lib/Makefile.am
M lib/log.c
M lib/log_blackbox.c
M lib/log_file.c
M lib/log_format.c
M lib/log_int.h
M lib/log_syslog.c
M lib/log_thread.c
M tests/check_log.c
Log Message:
-----------
Add the option of hi-res (millisecond) timestamps (#329)
* log: Add high-resolution timestamp option for log files
This adds the %T option to the log format for millisecond timestamps. There's a feature test macro QB_FEATURE_LOG_HIRES_TIMESTAMPS so that applications know that they are available.
Because this changes the internal logging API, applications that use custom loggers will also need to change their custom logging destinations to take a struct timespec instead of a time_t. The above feature test macro will help in deciding which is appropriate.
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
Branch: refs/heads/master
Home: https://github.com/ClusterLabs/libqb
Commit: 0e2d4d6130eba4fc1320e3a376cde79dbd90fb56
https://github.com/ClusterLabs/libqb/commit/0e2d4d6130eba4fc1320e3a376cde79…
Author: Chrissie Caulfield <ccaulfie(a)redhat.com>
Date: 2018-11-09 (Fri, 09 Nov 2018)
Changed paths:
M examples/simplelog.c
M include/qb/qblog.h
M lib/Makefile.am
M lib/log.c
M lib/log_blackbox.c
M lib/log_file.c
M lib/log_format.c
M lib/log_int.h
M lib/log_syslog.c
M lib/log_thread.c
M tests/check_log.c
Log Message:
-----------
Add the option of hi-res (millisecond) timestamps (#329)
* log: Add high-resolution timestamp option for log files
This adds the %T option to the log format for millisecond timestamps. There's a feature test macro QB_FEATURE_LOG_HIRES_TIMESTAMPS so that applications know that they are available.
Because this changes the internal logging API, applications that use custom loggers will also need to change their custom logging destinations to take a struct timespec instead of a time_t. The above feature test macro will help in deciding which is appropriate.
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
Branch: refs/heads/master
Home: https://github.com/ClusterLabs/libqb
Commit: 6f6845496a6860441ce8a533e921d9571cee4c30
https://github.com/ClusterLabs/libqb/commit/6f6845496a6860441ce8a533e921d95…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2018-11-08 (Thu, 08 Nov 2018)
Changed paths:
M configure.ac
Log Message:
-----------
[build] fix supported compiler warning detection (#330)
move from AC_PREPROC_IFELSE (strongly discouraged) to AC_COMPILE_IFELSE
our detection system was very weak and recent versions of clang did
show that PREPROC_IFELFE (cpp) would enable warning options that
the compiler does not support (clang).
use a full compilation test to detect what works and what doesn't.
Also expand the warning list to include new / renamed clang options
of equivalents already enabled for older versions of clang and gcc.
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
Branch: refs/heads/master
Home: https://github.com/ClusterLabs/libqb
Commit: b38614e5894bda4b0ce16aa9952bab12481b0fc0
https://github.com/ClusterLabs/libqb/commit/b38614e5894bda4b0ce16aa9952bab1…
Author: Chrissie Caulfield <ccaulfie(a)redhat.com>
Date: 2018-10-26 (Fri, 26 Oct 2018)
Changed paths:
M configure.ac
M include/qb/qblog.h
M lib/Makefile.am
M lib/libqb.pc.in
M lib/log.c
M lib/log_int.h
M lib/log_syslog.c
M tests/check_log.c
Log Message:
-----------
log: Add configure-time option to use systemd journal instead of syslog (#327)
* log: add systemd journal as a logging option
systemd journal can be configured as a logging option
at ./configure time (--enable-systemd-journal).
If libqb is buit with this then the syslog target can be switched
to sending to the journal using
qb_log_ctl(QB_LOG_SYSLOG, QB_LOG_CONF_USE_JOURNAL, 1);
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
Branch: refs/heads/master
Home: https://github.com/ClusterLabs/libqb
Commit: 6032d210d10710a6ae2f25de99a1ede4c9f41628
https://github.com/ClusterLabs/libqb/commit/6032d210d10710a6ae2f25de99a1ede…
Author: Chrissie Caulfield <ccaulfie(a)redhat.com>
Date: 2018-10-16 (Tue, 16 Oct 2018)
Changed paths:
M include/qb/qblog.h
M lib/log.c
M lib/log_file.c
M lib/log_int.h
M lib/log_thread.c
M tests/check_log.c
Log Message:
-----------
log: Add option to re-open a log file (#326)
As this patch also brought up some locking issues with re-configuring the logging while threaded logging was enabled, it also includes locking around qb_log_ctl2() and conversion of in_logger to an atomic.
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
Branch: refs/heads/master
Home: https://github.com/ClusterLabs/libqb
Commit: 44a9379c89e2fd0a2d09df79e2a3eaf1d1b4a5c7
https://github.com/ClusterLabs/libqb/commit/44a9379c89e2fd0a2d09df79e2a3eaf…
Author: Christine Caulfield <ccaulfie(a)redhat.com>
Date: 2018-10-15 (Mon, 15 Oct 2018)
Changed paths:
M lib/skiplist.c
M tests/check_map.c
Log Message:
-----------
skiplist: fix use-after-free in the skiplist traversal
(Patch from poki, only committed under my name because github is being
weird)
This used to happen when an iterator contained a reference on the item
to continue with, which got outdated when such item had been removed in
the interim, though it's original memory would still be -- mistakenly --
accessed. Actually such a condition is exercised with an existing
"test_map_iter_safety(ordered=true)" test, though it likely never run
under valgrind's supervision and standard memory checking harness was
too coarse (perhaps because of low memory pressure or other "lucky"
coincidence). Thankfully, the default, paranoid approach towards dynamic
memory handling in OpenBSD (free(3) call makes small chunks "junked",
i.e., filled with 0xdf bytes, see malloc.conf(5)) resulted in the
explicit segmentation fault when tripping over the happens-to-be-freed
pointer in the assumed iteration chain.
We solve the "out-of-sync iterator" issue with a twist, inverting
the responsibility to carry (and more widely, to contribute in the
propagation of) the up-to-date "forward" pointers, as clearly,
iterating over and over through the items would not be very scalable
(and it was not done, which had resulted in the first place).
So now, when any skiplist item is to be removed, its preceding item
gets the "forward" pointers recomputed as before, but then, they are
copied into "forward" pointers for the item to be removed, original
area containing them is disposed, and this preceding item just points
to the area primarily managed by the to-be-removed item (procedure
dubbed "takeover-and-repoint" in the comment). This itself gets
a special mark so that this area won't be dropped when that item gets
disposed, which rather happens with the disposal of the preceding item
that points to the "forward" memory area at hand and is not marked so.
This is believed to be sufficient to address out-of-band (iterator
based) access versus interim future iteration chain mangling, as these
operate de facto on the non-sparse, linear level of the skiplist.
Alternative approaches include:
turning pointers-to-arrays into pointers-to-pointers-to-arrays to
allow for explicit setting to NULL after free, and sharing this
additional indirection -- this straightforward extension was
attempted first, but shortly after, it became apparent it would
be a nightmare with the current interprocedural dependencies
extra tagging of the structures and adding complexities around
checking the eligibility, like every other manipulation with the
skiplist
completely split life-cycle of "node" and "node->forward", i.e.,
separate reference-counting etc.
Also said test was extended to push the corner case to the limit:
when to-resume-with item in the chain is being figured out, the
predecessors may be consulted (it is in that test), but the very
first predecessor is now removed as well, for good measure, as
it makes for boundary condition ^ 2.
Signed-off-by: Jan Pokorný jpokorny(a)redhat.com
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
Branch: refs/heads/master
Home: https://github.com/ClusterLabs/libqb
Commit: 633f2624a7b42eb8e227e8e0e9f584d80ee3ead2
https://github.com/ClusterLabs/libqb/commit/633f2624a7b42eb8e227e8e0e9f584d…
Author: Chrissie Caulfield <ccaulfie(a)redhat.com>
Date: 2018-09-27 (Thu, 27 Sep 2018)
Changed paths:
M configure.ac
M include/qb/qbconfig.h.in
M include/qb/qblog.h
M lib/Makefile.am
M lib/libqb.pc.in
M lib/log.c
Log Message:
-----------
logging: Remove linker 'magic' and just use statics for logging callsites (#322)
It is my (and several others') opinion that the linker 'magic' used to maintain callsite data in libqb is hugely over complicated and unnecessarily fragile. It's main purpose seems to have been to improve performance but empirical testing shows this to be tiny at best. The overhead of sprintf makes minor optimisations in this code pointless.
With this code removed, libqb allocates callsites using a C static variable at run-time. This sounds bad but in actuality it merely moves the allocation from program load time to the first few milliseconds of program run-time. Applications like corosync and pacemaker spend most of their time in small loops doing the same work over and over again so the overhead doesn't apply and jitter does not occur.
We've tested this with corosync and pacemaker under valgrind and massif and the differences are minimal and even then only show up under artificial stress testing.
For this change I've bumped the soname up to 20 to indicate this is an incompatible change. I'm open to suggestions as to a release number but am currently thinking of 2.0.0
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.