All of lore.kernel.org
 help / color / mirror / Atom feed
* Force Coredump
@ 2003-11-24 13:15 Breno
  2003-11-24 13:31 ` tim
  2003-11-24 14:06 ` Jan-Benedict Glaw
  0 siblings, 2 replies; 5+ messages in thread
From: Breno @ 2003-11-24 13:15 UTC (permalink / raw)
  To: Kernel List

Hi all,

I need force a coredump file. So i tryed :

int *i = 0;
if(*i)
exit(1);

tryed to kill -11 'pid'
...

but i just received a seg. fault message, and doesn´t  create coredump file.

Anybody knows why ?
att
Breno


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

* Re: Force Coredump
  2003-11-24 13:15 Force Coredump Breno
@ 2003-11-24 13:31 ` tim
  2003-11-24 13:48   ` Breno
  2003-11-24 14:06 ` Jan-Benedict Glaw
  1 sibling, 1 reply; 5+ messages in thread
From: tim @ 2003-11-24 13:31 UTC (permalink / raw)
  To: Breno; +Cc: linux-kernel

On Mon, Nov 24, 2003 at 11:15:51AM -0200, Breno wrote:
> Anybody knows why ?

Perhaps you don't have writing access to the directory where the program is placed, or there is already a core file in the same directory, which you don't have writing access to. Another possibility (more likely) is that 'ulimit -c' is set too low. Try typing 'ulimit -c unlimited' and see if that works. This command will produce a core file for every segfault that occurs, which may be inconvenient, so take a note of what ulimit is set to before you change it.

Hope that helps. Good luck.

-- 
Tim Cambrant <tim@cambrant.com> 
GPG KeyID 0x59518702
Fingerprint: 14FE 03AE C2D1 072A 87D0  BC4D FA9E 02D8 5951 8702

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

* Re: Force Coredump
  2003-11-24 13:31 ` tim
@ 2003-11-24 13:48   ` Breno
  2003-11-24 15:13     ` Willy Tarreau
  0 siblings, 1 reply; 5+ messages in thread
From: Breno @ 2003-11-24 13:48 UTC (permalink / raw)
  To: tim; +Cc: linux-kernel

Done , but no coredump file

%ulimit -c unlimited
%./test
Segmention fault
%ls -lisa
test*    test.c


-----test.c ------
#include <stdio.h>

int main()
{
    int *i = 0;
    if(*i)
    exit(1);
}
------------------

test is owned by the same user of directory

att,
Breno
----- Original Message -----
From: <tim@cambrant.com>
To: "Breno" <brenosp@brasilsec.com.br>
Cc: <linux-kernel@vger.kernel.org>
Sent: Monday, November 24, 2003 11:31 AM
Subject: Re: Force Coredump


> On Mon, Nov 24, 2003 at 11:15:51AM -0200, Breno wrote:
> > Anybody knows why ?
>
> Perhaps you don't have writing access to the directory where the program
is placed, or there is already a core file in the same directory, which you
don't have writing access to. Another possibility (more likely) is that
'ulimit -c' is set too low. Try typing 'ulimit -c unlimited' and see if that
works. This command will produce a core file for every segfault that occurs,
which may be inconvenient, so take a note of what ulimit is set to before
you change it.
>
> Hope that helps. Good luck.
>
> --
> Tim Cambrant <tim@cambrant.com>
> GPG KeyID 0x59518702
> Fingerprint: 14FE 03AE C2D1 072A 87D0  BC4D FA9E 02D8 5951 8702
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


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

* Re: Force Coredump
  2003-11-24 13:15 Force Coredump Breno
  2003-11-24 13:31 ` tim
@ 2003-11-24 14:06 ` Jan-Benedict Glaw
  1 sibling, 0 replies; 5+ messages in thread
From: Jan-Benedict Glaw @ 2003-11-24 14:06 UTC (permalink / raw)
  To: Kernel List

[-- Attachment #1: Type: text/plain, Size: 901 bytes --]

On Mon, 2003-11-24 11:15:51 -0200, Breno <brenosp@brasilsec.com.br>
wrote in message <001001c3b28d$183400e0$34dfa7c8@bsb.virtua.com.br>:
> Hi all,
> 
> I need force a coredump file. So i tryed :
> 
> int *i = 0;
> if(*i)
> exit(1);
> 
> tryed to kill -11 'pid'
> ...
> but i just received a seg. fault message, and doesn´t  create coredump file.

That's correct - "kill -l" lists signal no. 11 as SIGSEGV. Most
probably, you'd try SIGABRT which is ment for this purpose. But
remember, you'll need write permissions on the directory as well as a
matching ulimit.

MfG, JBG

-- 
   Jan-Benedict Glaw       jbglaw@lug-owl.de    . +49-172-7608481
   "Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg
    fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!
   ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: Force Coredump
  2003-11-24 13:48   ` Breno
@ 2003-11-24 15:13     ` Willy Tarreau
  0 siblings, 0 replies; 5+ messages in thread
From: Willy Tarreau @ 2003-11-24 15:13 UTC (permalink / raw)
  To: Breno; +Cc: linux-kernel

On Mon, Nov 24, 2003 at 11:48:10AM -0200, Breno wrote:
> Done , but no coredump file
> 
> %ulimit -c unlimited
> %./test
> Segmention fault
> %ls -lisa
> test*    test.c

You also need read permissions on the executable itself (it must be dumpable).
BTW, have you checked /proc/sys/kernel/core* ? Perhaps there's a pattern which
references a directory in which you have no permissions ?

HTH,
Willy


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

end of thread, other threads:[~2003-11-24 15:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-24 13:15 Force Coredump Breno
2003-11-24 13:31 ` tim
2003-11-24 13:48   ` Breno
2003-11-24 15:13     ` Willy Tarreau
2003-11-24 14:06 ` Jan-Benedict Glaw

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.