Probably some information below is irrelevant but in case it isn’t:
> - the name and version of your OS and compiler
OS X (Yosemite 10.10.2) -> boot2docker (VirtualBox with TinyCore) -> inside docker container
It’s a weird chain but probably just having docker available will reproduce it easily.
docker_at_boot2docker:~$ uname -a
Linux boot2docker 3.18.5-tinycore64 #1 SMP Sun Feb 1 06:02:30 UTC 2015 x86_64 GNU/Linux
> - your skalibs sysdeps file
https://gist.githubusercontent.com/glerchundi/28e074b0baf90d8f41c5/raw/f2198cae1155e9cb3c2a21b22acee2a7c897766d/skalibs-sysdeps
I use this container as a s6 builder,
https://github.com/glerchundi/container-s6-builder. I already mentioned in the last thread but in case you would like to check it yourself. static libs with static libc using musl.
> - if possible, a system call trace output of s6-fdholderd.
Of course,
https://gist.githubusercontent.com/glerchundi/c05ec8a40073493a8428/raw/4668e3b3e682b46c514a709329a8ac4d1db95fff/s6-fdholderd-segfault
> - To do that, add “strace -v”, or whatever your tracer’s invocation command is ...
I didn’t consider any tracer as mine, until now ;)
All understood.
With this final sentence all the pieces started to fit: "s6-fdholderd is just there to keep the reading end of the fifo open in case s6-log dies."
Hope it helps,
On Wed, Feb 18, 2015 at 3:58 PM, Laurent Bercot
<ska-supervision_at_skarnet.org> wrote:
> 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
> /service/mysqld-log-general/fifo
>> 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.
> --
> Laurent
Received on Wed Feb 18 2015 - 15:51:42 UTC