On 2018-07-06 05:32 -0400, Michael Shell wrote:
> On Fri, 06 Jul 2018 15:44:19 +0800
> Xi Ruoyao <[email protected]> wrote:
> 
> 
> > There is message from systemd crash handler (showing a SIGABRT and dumping
> > core), but there is no welcome message.  So the problem should be in
> > mount_cgroup_controllers.
> > 
> > There IS a way to debug systemd - adding log_info into systemd source code
> > to output key variables and debug messages.  I was one of the ACM/ICPC
> > contestants who are very familiar with this ``debugging technique".  This
> > technique often outperforms GDB in programming contests. :)
> 
> 
>   Xi,
> 
> That is really good stuff to know! However, I don't understand what you
> mean by "adding log_info into systemd source code". How exactly do you
> do that? e.g., a debug option the source configure script, a manual
> alteration of source code (and how/where), etc.

log_info() is a systemd internal function.  The usage of it is like printf.
It outputs to system log and screen.

For example I can insert

    log_info("I am still alive!!!");

into systemd source code somewhere.  If I can see the message, I'll know
systemd doesn't crash before the line I inserted.  Then I can actually do
a bisect to know which source code line actually crashes.

And I can also output systemd variables like

    log_info("foo = %d", foo);
 
> If it is a cgroup issue, it is required that the kernel be built with:
> 
> CONFIG_CGROUPS (it is OK to disable all controllers)

If /proc/cgroups does not exist, there will be an error message

    "Failed to enumerate cgroup controllers: No such file or directory"

Systemd seems to handle errors well (most of time).  SIGABRT is strange.
Someone said "-D_FORTIY_SOURCE=2" may cause systemd to SIGABRT.
-- 
Xi Ruoyao <[email protected]>
School of Aerospace Science and Technology, Xidian University
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to