public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "bugzilla.sourceware at mailstor dot net" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug translator/27658] New: Swallowed spawn error (due to "Cannot allocate memory") causes unrelated problems later in build process (pass2)
Date: Sun, 28 Mar 2021 14:20:39 +0000	[thread overview]
Message-ID: <bug-27658-6586@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=27658

            Bug ID: 27658
           Summary: Swallowed spawn error (due to "Cannot allocate
                    memory") causes unrelated problems later in build
                    process (pass2)
           Product: systemtap
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: bugzilla.sourceware at mailstor dot net
  Target Milestone: ---

I was trying to build (cross-instrument) my script on a rather small VM
(1vCore, 1 GB RAM) (RH 7.9 3.10.0-1160.2.2.el7.x86_64), and was getting rather
cryptic errors about not being able to find task_struct in
'kernel<linux/sched.h>' during pass 2.

When I turned on verbose reporting (-vvv), I've noticed the following lines:

Running env -uARCH -uKBUILD_EXTMOD -uCROSS_COMPILE -uKBUILD_IMAGE
-uKCONFIG_CONFIG -uINSTALL_PATH -uLD_LIBRARY_PATH
PATH=/usr/bin:/bin:/sbin:/bin:/usr/sbin:/usr/bin make -C
/lib/modules/3.10.0-1160.2.2.el7.x86_64/build
M=/tmp/stappngjro/typequery_kmod_1 modules CONFIG_DEBUG_INFO=
CONFIG_STACK_VALIDATION= ARCH=x86_64 V=1 -j2
Spawn error (12): Cannot allocate memory
blacklist regexps:

(and that was rather by chance among 8K+ lines!). When I increased the VM's RAM
to 2 GB, I was able to compile the .ko module just fine, and the relevant lines
of the verbose output became like this:

Running env -uARCH -uKBUILD_EXTMOD -uCROSS_COMPILE -uKBUILD_IMAGE
-uKCONFIG_CONFIG -uINSTALL_PATH -uLD_LIBRARY_PATH
PATH=/usr/bin:/bin:/sbin:/bin:/usr/sbin:/usr/bin make -C
/lib/modules/3.10.0-1160.2.2.el7.x86_64/build
M=/tmp/stapByLMay/typequery_kmod_1 modules CONFIG_DEBUG_INFO=
CONFIG_STACK_VALIDATION= ARCH=x86_64 V=1 -j2
Spawn waitpid result (0x0): 0
Copying /tmp/stapByLMay/typequery_kmod_1/typequery_kmod_1.ko to
/root/.systemtap/cache/8e/typequery_8ec54f395ebe818cb452424245734ea2_792.ko
blacklist regexps:

So either the "env", or more likely the "copy" operation needed more memory
than my small VM could provide, and the process failed, but the error was
swallowed (not reported to me using only "-v" flag), and that failure somehow
caused errors down the road whose messages were rather irrelevant.

I realize it's probably a user error to use systemtap in such a small system
(if some "requirements" reported somewhere specifically asks for bigger RAM),
but still it would have saved me some hours, had that error not been swallowed
(with "-v"), and been more visible!

-- 
You are receiving this mail because:
You are the assignee for the bug.

             reply	other threads:[~2021-03-28 14:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-28 14:20 bugzilla.sourceware at mailstor dot net [this message]
2021-04-03  3:09 ` [Bug translator/27658] " fche at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-27658-6586@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).