public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Christopher S. Aker" <caker@theshore.net>
To: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Andi Kleen <andi@firstfloor.org>,
	"Bill Rugolsky Jr." <brugolsky@telemetry-investments.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	linux-kernel@vger.kernel.org
Subject: Re: [Feature Request?] Inline compression of process core dumps
Date: Thu, 12 Apr 2007 22:57:37 -0400	[thread overview]
Message-ID: <461EF1A1.3070102@theshore.net> (raw)
In-Reply-To: <20070412193838.ea98238b.randy.dunlap@oracle.com>

Randy Dunlap wrote:
> On Thu, 12 Apr 2007 22:22:18 -0400 Christopher S. Aker wrote:
> 
>> Alan Cox wrote:
>>  > Indeed. So useful that in current kernels you can set the core dump
>>  > path to be
>>  >
>>  > 	"|application"
>>
>> Cool stuff!  However, it's not working (2.6.20.6):
>>
>> 	Core dump to |/home/caker/bin/dumper.pl.4442 pipe failed
>>
>> even though...
>>
>> 	# cat /proc/sys/kernel/core_uses_pid
>> 	0
>> 	# cat /proc/sys/kernel/core_pattern
>> 	|/home/caker/bin/dumper.pl
>>
>> Looking at the code, it seems to me that format_corename() is appending 
>> .pid, regardless if !core_uses_pid and corename[0]=='|', in which case 
>> it creates an invalid path for call_usermodehelper_pipe().
>>
>> Bug in the code, or bug in my methods?
> 
> What are you trying to dump?  is it a multi-thread group app,
> not a "simple" app?  I ask because of this (I'm looking at 2.6.21-rc6)
> <mm_users> reference (not that I know what that is):
> 
> 	if (!pid_in_pattern
>             && (core_uses_pid || atomic_read(&current->mm->mm_users) != 1)) {
> 		rc = snprintf(out_ptr, out_end - out_ptr,
> 			      ".%d", current->tgid);
> 		if (rc > out_end - out_ptr)
> 			goto out;
> 		out_ptr += rc;
> 	}

I saw that too, and unfortunately I don't know what what that condition 
represents, either.  It's the only other element in that if statement 
that could make it take that path, so I'm assuming that's part of the 
problem.

The process is a UML instance (skas mode, so at least a kernel, 
userspace, and io thread), which will generate a single, usable, core 
file just fine with a non-pipe core_pattern...

-Chris


  reply	other threads:[~2007-04-13  2:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-12 15:52 [Feature Request?] Inline compression of process core dumps Christopher S. Aker
2007-04-12 16:09 ` Bill Rugolsky Jr.
2007-04-12 16:18 ` Guillaume Chazarain
2007-04-12 16:28 ` Alan Cox
2007-04-12 16:42   ` Bill Rugolsky Jr.
2007-04-12 17:45     ` Andi Kleen
2007-04-13  2:22       ` Christopher S. Aker
2007-04-13  2:38         ` Randy Dunlap
2007-04-13  2:57           ` Christopher S. Aker [this message]
2007-04-13  4:21             ` Jeff Dike
2007-04-13 10:55             ` Alan Cox
2007-04-13 12:23               ` Andi Kleen
2007-04-13 14:59                 ` Randy Dunlap
2007-04-13 15:43                   ` Andi Kleen
2007-04-13 16:17                   ` Alan Cox
2007-04-13 19:42                     ` Andi Kleen
2007-04-13 12:39         ` Alan Cox
2007-04-13 13:38           ` Christopher S. Aker

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=461EF1A1.3070102@theshore.net \
    --to=caker@theshore.net \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andi@firstfloor.org \
    --cc=brugolsky@telemetry-investments.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    /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