<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Dec 8, 2015 at 5:04 AM, <span dir="ltr"><<a href="mailto:niksa@jurinovic.com" target="_blank">niksa@jurinovic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div style="font-family:'Sans Serif';font-size:10pt;font-weight:400;font-style:normal"><span class="">
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'sans serif';font-size:1em">On Monday, December 07, 2015 11:28:54 PM you wrote:</span></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'sans serif';font-size:1em;font-style:italic">> It might be clearer if you described how exactly the daemon is started and</span></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'sans serif';font-size:1em;font-style:italic">> which cgroup it runs under (according to systemd-cgls). Perhaps you're</span></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'sans serif';font-size:1em;font-style:italic">> starting it directly from the shell, and not via systemctl as intended?</span></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'sans serif';font-size:1em;font-style:italic">> </span></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
</span><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'sans serif';font-size:1.2em">Oracle (database and listener) is started in two different ways:</span></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'sans serif';font-size:1.2em">1. Via root console executing the command:</span></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'courier 10 pitch';font-size:1.2em;font-weight:600"># su - oracle -l -c '${ORACLE_HOME}/bin/dbstart'</span></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'sans serif';font-size:1.2em">If Oracle is started in this way, the processes 'systemd (oracle)' and '(sd-pam) (oracle)' DO NOT appear. And that's the problem. Seems that oracle daemon cannot live without these processes and it dies (shutdown by itself) very soon (after 5-15 minutes working). The lack of these processes is the cause of the crash here.</span></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'sans serif';font-size:1.2em">2. By logging in directly as 'oracle' user to console (tty). In this case the processes 'systemd (oracle)' and '(sd-pam) (oracle)' appear immediately after logging to console. The database and listener is then started executing 'dbstart' from console. This way Oracle never crashes, except if I deliberately kill the two processes as root during the session and Oracle crashes immediately.</span></p></div></blockquote><div><br></div><div>I see. This doesn't kill Oracle by itself, however, it still can cause various other problems. You really should launch daemons through a systemd .service, Oracle is no exception.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-family:'Sans Serif';font-size:10pt;font-weight:400;font-style:normal"><span class="">
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'sans serif';font-size:1em;font-style:italic">> The "systemd --user" process is meant for interactive users (as in, not</span></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'sans serif';font-size:1em;font-style:italic">> system accounts) – it acts as the user's personal service manager. I don't</span></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'sans serif';font-size:1em;font-style:italic">> think lack of that process is the cause here, maybe an effect instead –</span></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'sans serif';font-size:1em;font-style:italic">> killing it is part of logind's cleanup when a user logs out.</span></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
</span><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'sans serif';font-size:1.2em">No, the lack of these processes is the cause of the crash, as I already said above. So far as these processes are running, no fear of Oracle's crash.</span></p></div></blockquote><div><br></div><div>Correlation does not imply causation. These processes do nothing relevant by themselves; their presence only indicates that a systemd-logind _user session_ exists, which is the cause.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-family:'Sans Serif';font-size:10pt;font-style:normal"><span class="" style="font-weight:400">
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'sans serif';font-size:1em;font-style:italic">> What uid does "oracle" have – is it within the system account range</span></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'sans serif';font-size:1em;font-style:italic">> (usually 1–999) or user account (1000–)? I wonder if it's the latter, which</span></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'sans serif';font-size:1em;font-style:italic">> would mean systemd-logind would clean up various things like IPC on</span></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="font-family:'sans serif';font-size:1em;font-style:italic">> logout... (see logind.conf)</span></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
</span><p style="margin:0px;text-indent:0px"><span style="font-family:'courier 10 pitch';font-size:1.2em">[root@proton ~]# id oracle</span></p>
<p style="margin:0px;text-indent:0px"><span style="font-family:'courier 10 pitch';font-size:1.2em">uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54327(asmdba)</span></p></div></blockquote><div><br></div><div>Ok, so the UID is the problem. (These look suspiciously like made-up numbers, but I'm guessing they are centrally-managed accounts, maybe NIS or LDAP.)</div><div><br></div><div>So, since "oracle" has an UID ≥ 1000, and since you probably cannot change that, you should instead <b>disable RemoveIPC= in /etc/systemd/logind.conf</b> to disable the automatic IPC cleanup.</div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Mantas Mikulėnas <<a href="mailto:grawity@gmail.com" target="_blank">grawity@gmail.com</a>></div></div>
</div></div>