public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/27658] New: Swallowed spawn error (due to "Cannot allocate memory") causes unrelated problems later in build process (pass2)
@ 2021-03-28 14:20 bugzilla.sourceware at mailstor dot net
  2021-04-03  3:09 ` [Bug translator/27658] " fche at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: bugzilla.sourceware at mailstor dot net @ 2021-03-28 14:20 UTC (permalink / raw)
  To: systemtap

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug translator/27658] Swallowed spawn error (due to "Cannot allocate memory") causes unrelated problems later in build process (pass2)
  2021-03-28 14:20 [Bug translator/27658] New: Swallowed spawn error (due to "Cannot allocate memory") causes unrelated problems later in build process (pass2) bugzilla.sourceware at mailstor dot net
@ 2021-04-03  3:09 ` fche at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: fche at redhat dot com @ 2021-04-03  3:09 UTC (permalink / raw)
  To: systemtap

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

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
                 CC|                            |fche at redhat dot com

--- Comment #1 from Frank Ch. Eigler <fche at redhat dot com> ---
Interesting case.

Adjusted buildrun.cxx typequery operations to preserve stderr regardless of
verbosity settings.  For both kernel and userspace @cast() operations, errors
such as misspelled header files or (probably) spawn errors should now show up.

commit 3070d243936f should fix this, I hope with no serious side effects

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-03  3:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-28 14:20 [Bug translator/27658] New: Swallowed spawn error (due to "Cannot allocate memory") causes unrelated problems later in build process (pass2) bugzilla.sourceware at mailstor dot net
2021-04-03  3:09 ` [Bug translator/27658] " fche at redhat dot com

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).