Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure journald never blocks on sd_notify() to PID 1 #1745

Merged
merged 11 commits into from Nov 2, 2015

Commits on Oct 31, 2015

  1. systemctl: add a way to explicitly request client-side unit installing

    This adds support for a new environment variable
    SYSTEMCTL_INSTALL_CLIENT_SIDE, that ensures that systemctl executes
    install operations client-side instead of passing them to PID1. This is
    useful in debugging situations, but even beyond that. However, we don't
    want to make it official API, hence let's just make it an undocumented
    environment variable.
    
    Similar, add a second variable, SYSTEMCTL_SKIP_SYSV which allows
    skipping the SysV chkconfig fall-back if set. This is useful for similar
    reasons, and exposed as undocumented as environment variable for similar
    reasons, too.
    poettering committed Oct 31, 2015
    Configuration menu
    Copy the full SHA
    b41b9d2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    96d66d8 View commit details
    Browse the repository at this point in the history
  3. nspawn: fix minor memory leak

    When rebooting nspawn containers about 400 times we'd otherwise hit the
    fd limit and refuse further reboots.
    poettering committed Oct 31, 2015
    Configuration menu
    Copy the full SHA
    3c747da View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9704414 View commit details
    Browse the repository at this point in the history
  5. core: bail our earlier when doing audit

    Let's make sure we don't even try to create the audit socket
    poettering committed Oct 31, 2015
    Configuration menu
    Copy the full SHA
    a1a078e View commit details
    Browse the repository at this point in the history
  6. sysv-generator: modernize

    - Make sure we log each error at least once, and at most once
    
    - Replace FOREACH_WORD loops by extract_first_word() loops
    
    - Use FOREACH_DIRENT() for directory loops
    
    - Use free_and_strdup() where appropriate
    
    - Do not operate on half-loaded SysV files
    
    - Always properly free all memory
    poettering committed Oct 31, 2015
    Configuration menu
    Copy the full SHA
    c279613 View commit details
    Browse the repository at this point in the history
  7. sysctl.d: bump number of queueable AF_UNIX/SOCK_DGRAM datagrams

    The default of 16 is pretty low, let's bump this to accomodate for more
    queued datagrams. This is useful for AF_UNIX/SOCK_DGRAM logging and
    sd_notify() sockets as this allows queuing more datagrams before things
    start to block, thus improving parallelization and logging performance.
    poettering committed Oct 31, 2015
    Configuration menu
    Copy the full SHA
    cacea34 View commit details
    Browse the repository at this point in the history
  8. sd-daemon: increase sd_notify() socket buffer size

    Let's make sure we don't start blocking on sd_notify() earlier than
    necessary, let's bump the socket buffer sizes to 8M.
    
    We already do something similar for our logging socket buffers, hence
    apply a similar bump here.
    poettering committed Oct 31, 2015
    Configuration menu
    Copy the full SHA
    a47806f View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2015

  1. sd-daemon: verify NOTIFY_SOCKET path length

    Better generate a real error then simply connect to the wrong socket.
    poettering committed Nov 1, 2015
    Configuration menu
    Copy the full SHA
    638b56c View commit details
    Browse the repository at this point in the history
  2. journald: never block when sending messages on NOTIFY_SOCKET socket

    Otherwise we might run into deadlocks, when journald blocks on the
    notify socket on PID 1, and PID 1 blocks on IPC to dbus-daemon and
    dbus-daemon blocks on logging to journald. Break this cycle by making
    sure that journald never ever blocks on PID 1.
    
    Note that this change disables support for event loop watchdog support,
    as these messages are sent in blocking style by sd-event. That should
    not be a big loss though, as people reported frequent problems with the
    watchdog hitting journald on excessively slow IO.
    
    Fixes: systemd#1505.
    poettering committed Nov 1, 2015
    Configuration menu
    Copy the full SHA
    e22aa3d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3958325 View commit details
    Browse the repository at this point in the history