You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafodion.apache.org by Sandhya Sundaresan <sa...@esgyn.com> on 2015/11/13 01:05:07 UTC

Trafodion and core file location ?

Hi ,

Has anyone thought of a standard location for trafodion core files to
reside ?  There is a programmatic interface we currently have to create a
core file if needed. Today it doesn’t take a location param . I was going
to change it to allow a location to be specified. Specifying a location for
the core files we create may good so we taking up space have a way of not
inadvertently where we shouldn’t be.

 Today it just puts it on ‘pwd’ i.e current directory.

We could  have an envvar to specify a location  for all core files with
current dir being the default.

Any thoughts on this topic ?

Thanks

Sandhya

RE: Trafodion and core file location ?

Posted by Gunnar Tapper <gu...@esgyn.com>.
Hi,

The sysadmin typically configures where to land core files using the
kernel.core_pattern setting in /etc/sysctl.conf. That should be honored
since most tools look to this settings to determine whether any core files
have been generated.

Please refer to man core for more info.

Thanks,

Gunnar

-----Original Message-----
From: Sandhya Sundaresan [mailto:sandhya.sundaresan@esgyn.com]
Sent: Thursday, November 12, 2015 5:05 PM
To: dev@trafodion.incubator.apache.org
Subject: Trafodion and core file location ?

Hi ,

Has anyone thought of a standard location for trafodion core files to
reside ?  There is a programmatic interface we currently have to create a
core file if needed. Today it doesn’t take a location param . I was going
to change it to allow a location to be specified. Specifying a location for
the core files we create may good so we taking up space have a way of not
inadvertently where we shouldn’t be.

 Today it just puts it on ‘pwd’ i.e current directory.

We could  have an envvar to specify a location  for all core files with
current dir being the default.

Any thoughts on this topic ?

Thanks

Sandhya

RE: Trafodion and core file location ?

Posted by Gunnar Tapper <gu...@esgyn.com>.
Hi,

It gets even more interesting if the user uses the controversial tool
systemd tool created by RedHat:
https://wiki.archlinux.org/index.php/Core_dump.

My recommendation is to let the OS take care of core-file placement rather
than do anything special.

Gunnar

-----Original Message-----
From: Selva Govindarajan [mailto:selva.govindarajan@esgyn.com]
Sent: Thursday, November 12, 2015 5:38 PM
To: dev@trafodion.incubator.apache.org
Subject: RE: Trafodion and core file location ?

When an application dumps core by issuing abort() or exit(non_zero_value),
the core location is usually determined by /proc/sys/kernel/core_pattern.
When Trafodion engine explicitly dump core for certain conditions like
dumping ssmp core before bringing down the node, we might be able to control
the location. Ideally, we would want these dumps also to conform to
core_pattern, but might be bit involved to do that.  We might have chosen an
easy route to dump the core at some location.

Selva

-----Original Message-----
From: Dave Birdsall [mailto:dave.birdsall@esgyn.com]
Sent: Thursday, November 12, 2015 4:21 PM
To: dev@trafodion.incubator.apache.org
Subject: RE: Trafodion and core file location ?

Hi,

So, with the current situation, where do core files land? I sometimes see
them in $MY_SQROOT/sql/scripts, and I've also seen them in directories where
I was running sqlci. Is this the norm for the current situation?

Yes, I think it would be great to have a knob to place them where we want
them. Would be easier to find. And ultimately easier to manage both from a
user perspective and a support perspective.

Dave

-----Original Message-----
From: Sandhya Sundaresan [mailto:sandhya.sundaresan@esgyn.com]
Sent: Thursday, November 12, 2015 4:05 PM
To: dev@trafodion.incubator.apache.org
Subject: Trafodion and core file location ?

Hi ,

Has anyone thought of a standard location for trafodion core files to reside
?  There is a programmatic interface we currently have to create a core file
if needed. Today it doesn’t take a location param . I was going to change it
to allow a location to be specified. Specifying a location for the core
files we create may good so we taking up space have a way of not
inadvertently where we shouldn’t be.

 Today it just puts it on ‘pwd’ i.e current directory.

We could  have an envvar to specify a location  for all core files with
current dir being the default.

Any thoughts on this topic ?

Thanks

Sandhya

RE: Trafodion and core file location ?

Posted by Sandhya Sundaresan <sa...@esgyn.com>.
As Selva mentions, we want to , as part of error handling , sometimes want
to  create core dump within Traf code  for certain conditions wehre we
current assert and  return with no information. We sometimes simply cannot
debug without a corefile expecially for some extremem and unusual error
conditions. For these, Trafodion  seabaed layer provides this API
msg_mon_dump_process_name().
This is different from the cases where the process aborts and dies.

So the suggestion from Hans/Gunnar is that  we follow the same pattern as
set by proc/sys/kernel/core_pattern file for these cases  as well that will.
be used mainly by us for debugging . I think that sounds fine to me.  Today
it creates them usually on the current directory and that has to change.

Sandhya
-----Original Message-----
From: Hans Zeller [mailto:hans.zeller@esgyn.com]
Sent: Thursday, November 12, 2015 4:43 PM
To: dev <de...@trafodion.incubator.apache.org>
Subject: Re: Trafodion and core file location ?

Here are some recommendations that I think many of us adopted over the
years:

   - Include process name, pid, user in the core file name.
   - Collect all the cores in a single directory or directory tree (at
   least on production systems).
   - Consider mounting a separate disk partition for that directory tree,
   so that cores can't fill up the main disk and bring down the system.
   - As Gunnar and Selva mentioned, the rules for core file names and
   directories should be established in /proc/sys, not in our code.


Hans

On Thu, Nov 12, 2015 at 4:37 PM, Selva Govindarajan <
selva.govindarajan@esgyn.com> wrote:

> When an application dumps core by issuing abort() or
> exit(non_zero_value), the core location is usually determined by
> /proc/sys/kernel/core_pattern.
> When Trafodion engine explicitly dump core for certain conditions like
> dumping ssmp core before bringing down the node, we might be able to
> control the location. Ideally, we would want these dumps also to
> conform to core_pattern, but might be bit involved to do that.  We
> might have chosen an easy route to dump the core at some location.
>
> Selva
>
> -----Original Message-----
> From: Dave Birdsall [mailto:dave.birdsall@esgyn.com]
> Sent: Thursday, November 12, 2015 4:21 PM
> To: dev@trafodion.incubator.apache.org
> Subject: RE: Trafodion and core file location ?
>
> Hi,
>
> So, with the current situation, where do core files land? I sometimes
> see them in $MY_SQROOT/sql/scripts, and I've also seen them in
> directories where I was running sqlci. Is this the norm for the
> current situation?
>
> Yes, I think it would be great to have a knob to place them where we
> want them. Would be easier to find. And ultimately easier to manage
> both from a user perspective and a support perspective.
>
> Dave
>
> -----Original Message-----
> From: Sandhya Sundaresan [mailto:sandhya.sundaresan@esgyn.com]
> Sent: Thursday, November 12, 2015 4:05 PM
> To: dev@trafodion.incubator.apache.org
> Subject: Trafodion and core file location ?
>
> Hi ,
>
> Has anyone thought of a standard location for trafodion core files to
> reside ?  There is a programmatic interface we currently have to
> create a core file if needed. Today it doesn’t take a location param .
> I was going to change it to allow a location to be specified.
> Specifying a location for the core files we create may good so we
> taking up space have a way of not inadvertently where we shouldn’t be.
>
>  Today it just puts it on ‘pwd’ i.e current directory.
>
> We could  have an envvar to specify a location  for all core files
> with current dir being the default.
>
> Any thoughts on this topic ?
>
> Thanks
>
> Sandhya
>

Re: Trafodion and core file location ?

Posted by Hans Zeller <ha...@esgyn.com>.
Here are some recommendations that I think many of us adopted over the
years:

   - Include process name, pid, user in the core file name.
   - Collect all the cores in a single directory or directory tree (at
   least on production systems).
   - Consider mounting a separate disk partition for that directory tree,
   so that cores can't fill up the main disk and bring down the system.
   - As Gunnar and Selva mentioned, the rules for core file names and
   directories should be established in /proc/sys, not in our code.


Hans

On Thu, Nov 12, 2015 at 4:37 PM, Selva Govindarajan <
selva.govindarajan@esgyn.com> wrote:

> When an application dumps core by issuing abort() or exit(non_zero_value),
> the core location is usually determined by /proc/sys/kernel/core_pattern.
> When Trafodion engine explicitly dump core for certain conditions like
> dumping ssmp core before bringing down the node, we might be able to
> control
> the location. Ideally, we would want these dumps also to conform to
> core_pattern, but might be bit involved to do that.  We might have chosen
> an
> easy route to dump the core at some location.
>
> Selva
>
> -----Original Message-----
> From: Dave Birdsall [mailto:dave.birdsall@esgyn.com]
> Sent: Thursday, November 12, 2015 4:21 PM
> To: dev@trafodion.incubator.apache.org
> Subject: RE: Trafodion and core file location ?
>
> Hi,
>
> So, with the current situation, where do core files land? I sometimes see
> them in $MY_SQROOT/sql/scripts, and I've also seen them in directories
> where
> I was running sqlci. Is this the norm for the current situation?
>
> Yes, I think it would be great to have a knob to place them where we want
> them. Would be easier to find. And ultimately easier to manage both from a
> user perspective and a support perspective.
>
> Dave
>
> -----Original Message-----
> From: Sandhya Sundaresan [mailto:sandhya.sundaresan@esgyn.com]
> Sent: Thursday, November 12, 2015 4:05 PM
> To: dev@trafodion.incubator.apache.org
> Subject: Trafodion and core file location ?
>
> Hi ,
>
> Has anyone thought of a standard location for trafodion core files to
> reside
> ?  There is a programmatic interface we currently have to create a core
> file
> if needed. Today it doesn’t take a location param . I was going to change
> it
> to allow a location to be specified. Specifying a location for the core
> files we create may good so we taking up space have a way of not
> inadvertently where we shouldn’t be.
>
>  Today it just puts it on ‘pwd’ i.e current directory.
>
> We could  have an envvar to specify a location  for all core files with
> current dir being the default.
>
> Any thoughts on this topic ?
>
> Thanks
>
> Sandhya
>

RE: Trafodion and core file location ?

Posted by Selva Govindarajan <se...@esgyn.com>.
When an application dumps core by issuing abort() or exit(non_zero_value),
the core location is usually determined by /proc/sys/kernel/core_pattern.
When Trafodion engine explicitly dump core for certain conditions like
dumping ssmp core before bringing down the node, we might be able to control
the location. Ideally, we would want these dumps also to conform to
core_pattern, but might be bit involved to do that.  We might have chosen an
easy route to dump the core at some location.

Selva

-----Original Message-----
From: Dave Birdsall [mailto:dave.birdsall@esgyn.com]
Sent: Thursday, November 12, 2015 4:21 PM
To: dev@trafodion.incubator.apache.org
Subject: RE: Trafodion and core file location ?

Hi,

So, with the current situation, where do core files land? I sometimes see
them in $MY_SQROOT/sql/scripts, and I've also seen them in directories where
I was running sqlci. Is this the norm for the current situation?

Yes, I think it would be great to have a knob to place them where we want
them. Would be easier to find. And ultimately easier to manage both from a
user perspective and a support perspective.

Dave

-----Original Message-----
From: Sandhya Sundaresan [mailto:sandhya.sundaresan@esgyn.com]
Sent: Thursday, November 12, 2015 4:05 PM
To: dev@trafodion.incubator.apache.org
Subject: Trafodion and core file location ?

Hi ,

Has anyone thought of a standard location for trafodion core files to reside
?  There is a programmatic interface we currently have to create a core file
if needed. Today it doesn’t take a location param . I was going to change it
to allow a location to be specified. Specifying a location for the core
files we create may good so we taking up space have a way of not
inadvertently where we shouldn’t be.

 Today it just puts it on ‘pwd’ i.e current directory.

We could  have an envvar to specify a location  for all core files with
current dir being the default.

Any thoughts on this topic ?

Thanks

Sandhya

RE: Trafodion and core file location ?

Posted by Dave Birdsall <da...@esgyn.com>.
Hi,

So, with the current situation, where do core files land? I sometimes see
them in $MY_SQROOT/sql/scripts, and I've also seen them in directories where
I was running sqlci. Is this the norm for the current situation?

Yes, I think it would be great to have a knob to place them where we want
them. Would be easier to find. And ultimately easier to manage both from a
user perspective and a support perspective.

Dave

-----Original Message-----
From: Sandhya Sundaresan [mailto:sandhya.sundaresan@esgyn.com]
Sent: Thursday, November 12, 2015 4:05 PM
To: dev@trafodion.incubator.apache.org
Subject: Trafodion and core file location ?

Hi ,

Has anyone thought of a standard location for trafodion core files to reside
?  There is a programmatic interface we currently have to create a core file
if needed. Today it doesn’t take a location param . I was going to change it
to allow a location to be specified. Specifying a location for the core
files we create may good so we taking up space have a way of not
inadvertently where we shouldn’t be.

 Today it just puts it on ‘pwd’ i.e current directory.

We could  have an envvar to specify a location  for all core files with
current dir being the default.

Any thoughts on this topic ?

Thanks

Sandhya