[ 
https://issues.apache.org/jira/browse/DISPATCH-130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14390579#comment-14390579
 ] 

Alan Conway commented on DISPATCH-130:
--------------------------------------

There is a historical problem with core dumps and setuid executables, e.g. from 
https://access.redhat.com/solutions/4896 : 

6) With this setup, a core file from the application should result. If this 
does not generate a core, make sure that the application has the correct uid 
and that it does not use setuid to change uid when running. On Red Hat 
Enterprise Linux 3, use the following command to enable the dumping of setuid 
applications:

# echo 1 > /proc/sys/kernel/core_setuid_ok

This kernel setting no longer exists on RHEL6/Fedora 21 but it looks likely the 
the problem is in the way we are setting the UID in qdroutered with --user.

Given the presence of systemd as well, it might be best to get rid of the 
daemonizing logic in qdrouterd and use the daemon() function for sysv init or 
let systemd do daemonizing when systemd is in use.

> qdrouterd with --daemon and --user options does not dump core.
> --------------------------------------------------------------
>
>                 Key: DISPATCH-130
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-130
>             Project: Qpid Dispatch
>          Issue Type: Bug
>          Components: Container
>    Affects Versions: 0.3
>            Reporter: Alan Conway
>            Assignee: Alan Conway
>             Fix For: 0.4
>
>
> If qdroutered is started with --daemon and --user options, and then is killed 
> with SIGABRT or crashes, it does not produce a core file. Note both --daemon 
> and --user are reqiured to produce the problem, either alone does not. Tested 
> on RHEL6 and Fedora 21 as follows:
> Send core files in /tmp, since --daemon will set current directory to /
> {noformat}
> # echo /tmp/core.%e.%p > /proc/sys/kernel/core_pattern
> {noformat}
> Verify we do get a core file with just --daemon
> {noformat}
> # qdrouterd --daemon
> # pkill -e -6 qdrouterd
> qdrouterd killed (pid 11482)
> # ls /tmp/core*
> /tmp/core.qdrouterd.11482
> {noformat}
> Now add --user 
> {noformat}
> # rm /tmp/core*
> # qdrouterd --daemon --user aconway
> # pkill -e -6 qdrouterd
> qdrouterd killed (pid 11432)
> # ls /tmp/core*
> ls: cannot access /tmp/core*: No such file or directory
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to