Re: from multiple sources to multiple destinations using s6-log

From: Laurent Bercot <>
Date: Wed, 18 Feb 2015 15:59:06 +0100

On 18/02/2015 15:31, Gorka Lertxundi wrote:
> s6-fdholderd[20489]: segfault at 104fb ip 000000000040cd03 sp 00007fff8ffca460 error 4 in s6-fdholderd[400000+17000]

  Wow. A segfault is bad indeed.
  Please send me:
  - the name and version of your OS and compiler
  - your skalibs sysdeps file
  - if possible, a system call trace output of s6-fdholderd.
To do that, add "strace -v", or whatever your tracer's invocation
command is, in front of "s6-fdholder-daemon" in your run script;
make sure to add the options to continue tracing after execve()
(it's the default for strace, not sure about the other ones).
strace will then dump its output to your fd-holder service's logger.
ktrace works differently, but you should find the ktrace.out in the
service directory. Not sure about truss.

> - I'm missing something? Segfault seems that something is going really wrong in here.

  You're not missing anything, there's something wrong indeed and I
can't reproduce on my usual platform. I will need all the information
you can give me to debug this.

> - How would be the steps to create&use a pipe and forward log messages to it?

  * mkfifo /service/mysqld-log-general/fifo
  * In /service/mysqld-log-general/run, redirect stdin to fifo before
running s6-log
  * In /service/mysqld/run, or in the appropriate configuration file,
give the right options to mysqld so it writes its general log to

> 1.- s6-mkfifodir or mkpipe?

  Not s6-mkfifodir, a fifodir is not a fifo ;)

> 2.- How to register into the fdholder store?
> obviusly this won't work: s6-ipcserver-socketbinder /my/pipe s6-fdholder-store /etc/s6/fdholder/socket MYPIPE?

  Nope, s6-ipcserver-socketbinder creates a socket, not a pipe.
  Try "redirfd -rnb 0 /my/pipe s6-fdholder-store /etc/s6/fdholder/socket MYPIPE",
once the segfault is fixed...

> 3.- How to pipe from holder to s6-log?

  You don't need to. Just read normally from the fifo.
  s6-fdholderd is just there to keep the reading end of the fifo open
in case s6-log dies.

Received on Wed Feb 18 2015 - 14:59:06 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC