Sorry I forgot to print my execution steps:




#> s6-ipcserver-socketbinder /tmp/mysocket s6-fdholder-store 
/etc/s6/fdholder/socket MYSOCKET

s6-fdholder-storec: fatal: unable to store fd: Operation not permitted

#> rm /etc/s6/fdholder/rules/uid/default/env/S6_FDHOLDER_LIST

#> rm /etc/s6/fdholder/rules/uid/default/env/S6_FDHOLDER_STORE_REGEX

#> s6-ipcserver-socketbinder /tmp/mysocket s6-fdholder-store 
/etc/s6/fdholder/socket MYSOCKET

s6-fdholder-storec: fatal: unable to store fd: Operation not permitted




(...segfaulted…)




I also created a test container https://github.com/glerchundi/container-test 
reproducing this behaviour.

On Wed, Feb 18, 2015 at 3:58 PM, Laurent Bercot
<ska-supervis...@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

Reply via email to