What decides where core dump files are created?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












Does /proc/sys/kernel/core_pattern decide where core dump files are created? Mine looks like



$ cat /proc/sys/kernel/core_pattern
|/usr/share/apport/apport %p %s %c %d %P


which I guess means to pipe the core dump to the apport script. Will the apport script write the input core dump to some file? If yes, where will the file be created? (My /var/crash/ doesn't have a core dump file from the following commands, and /var/lib/systemd/coredump/ is always empty for the following commands.)



When the soft limit for core file is 0, there is no core dump file in the current directory. Where is it created? ("If the message says “(core dumped)” then core really was dumped.")



$ ulimit -S -c 
0
$ sleep 10
^bash: line 1: 11837 Quit (core dumped) sleep 10
$ ls core
ls: cannot access 'core': No such file or directory


When I increase the soft limit, why do I get a core dump file in the current working directory?



$ ulimit -S -c 1024;
$ ulimit -S -c;
1024
$ sleep 10
^Quit (core dumped)
$ ls core
core


Thanks.










share|improve this question























  • Does the last part (a core file is created in the current directory if ulimit -c unlimited was set) also happen if you set (as root) systctl kernel.core_pattern='|/bin/true'? (this should cause a process killed with SIGQUIT to report (core dumped), but no core file to be written anywhere).
    – mosvy
    Dec 2 at 4:13







  • 1




    stackoverflow.com/a/18368068/10306503, especially the part about how apport is doing itself the core file creation in cwd
    – mosvy
    Dec 2 at 5:08














up vote
1
down vote

favorite












Does /proc/sys/kernel/core_pattern decide where core dump files are created? Mine looks like



$ cat /proc/sys/kernel/core_pattern
|/usr/share/apport/apport %p %s %c %d %P


which I guess means to pipe the core dump to the apport script. Will the apport script write the input core dump to some file? If yes, where will the file be created? (My /var/crash/ doesn't have a core dump file from the following commands, and /var/lib/systemd/coredump/ is always empty for the following commands.)



When the soft limit for core file is 0, there is no core dump file in the current directory. Where is it created? ("If the message says “(core dumped)” then core really was dumped.")



$ ulimit -S -c 
0
$ sleep 10
^bash: line 1: 11837 Quit (core dumped) sleep 10
$ ls core
ls: cannot access 'core': No such file or directory


When I increase the soft limit, why do I get a core dump file in the current working directory?



$ ulimit -S -c 1024;
$ ulimit -S -c;
1024
$ sleep 10
^Quit (core dumped)
$ ls core
core


Thanks.










share|improve this question























  • Does the last part (a core file is created in the current directory if ulimit -c unlimited was set) also happen if you set (as root) systctl kernel.core_pattern='|/bin/true'? (this should cause a process killed with SIGQUIT to report (core dumped), but no core file to be written anywhere).
    – mosvy
    Dec 2 at 4:13







  • 1




    stackoverflow.com/a/18368068/10306503, especially the part about how apport is doing itself the core file creation in cwd
    – mosvy
    Dec 2 at 5:08












up vote
1
down vote

favorite









up vote
1
down vote

favorite











Does /proc/sys/kernel/core_pattern decide where core dump files are created? Mine looks like



$ cat /proc/sys/kernel/core_pattern
|/usr/share/apport/apport %p %s %c %d %P


which I guess means to pipe the core dump to the apport script. Will the apport script write the input core dump to some file? If yes, where will the file be created? (My /var/crash/ doesn't have a core dump file from the following commands, and /var/lib/systemd/coredump/ is always empty for the following commands.)



When the soft limit for core file is 0, there is no core dump file in the current directory. Where is it created? ("If the message says “(core dumped)” then core really was dumped.")



$ ulimit -S -c 
0
$ sleep 10
^bash: line 1: 11837 Quit (core dumped) sleep 10
$ ls core
ls: cannot access 'core': No such file or directory


When I increase the soft limit, why do I get a core dump file in the current working directory?



$ ulimit -S -c 1024;
$ ulimit -S -c;
1024
$ sleep 10
^Quit (core dumped)
$ ls core
core


Thanks.










share|improve this question















Does /proc/sys/kernel/core_pattern decide where core dump files are created? Mine looks like



$ cat /proc/sys/kernel/core_pattern
|/usr/share/apport/apport %p %s %c %d %P


which I guess means to pipe the core dump to the apport script. Will the apport script write the input core dump to some file? If yes, where will the file be created? (My /var/crash/ doesn't have a core dump file from the following commands, and /var/lib/systemd/coredump/ is always empty for the following commands.)



When the soft limit for core file is 0, there is no core dump file in the current directory. Where is it created? ("If the message says “(core dumped)” then core really was dumped.")



$ ulimit -S -c 
0
$ sleep 10
^bash: line 1: 11837 Quit (core dumped) sleep 10
$ ls core
ls: cannot access 'core': No such file or directory


When I increase the soft limit, why do I get a core dump file in the current working directory?



$ ulimit -S -c 1024;
$ ulimit -S -c;
1024
$ sleep 10
^Quit (core dumped)
$ ls core
core


Thanks.







ubuntu core-dump






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 2 at 3:01

























asked Dec 2 at 2:48









Tim

25.3k72243446




25.3k72243446











  • Does the last part (a core file is created in the current directory if ulimit -c unlimited was set) also happen if you set (as root) systctl kernel.core_pattern='|/bin/true'? (this should cause a process killed with SIGQUIT to report (core dumped), but no core file to be written anywhere).
    – mosvy
    Dec 2 at 4:13







  • 1




    stackoverflow.com/a/18368068/10306503, especially the part about how apport is doing itself the core file creation in cwd
    – mosvy
    Dec 2 at 5:08
















  • Does the last part (a core file is created in the current directory if ulimit -c unlimited was set) also happen if you set (as root) systctl kernel.core_pattern='|/bin/true'? (this should cause a process killed with SIGQUIT to report (core dumped), but no core file to be written anywhere).
    – mosvy
    Dec 2 at 4:13







  • 1




    stackoverflow.com/a/18368068/10306503, especially the part about how apport is doing itself the core file creation in cwd
    – mosvy
    Dec 2 at 5:08















Does the last part (a core file is created in the current directory if ulimit -c unlimited was set) also happen if you set (as root) systctl kernel.core_pattern='|/bin/true'? (this should cause a process killed with SIGQUIT to report (core dumped), but no core file to be written anywhere).
– mosvy
Dec 2 at 4:13





Does the last part (a core file is created in the current directory if ulimit -c unlimited was set) also happen if you set (as root) systctl kernel.core_pattern='|/bin/true'? (this should cause a process killed with SIGQUIT to report (core dumped), but no core file to be written anywhere).
– mosvy
Dec 2 at 4:13





1




1




stackoverflow.com/a/18368068/10306503, especially the part about how apport is doing itself the core file creation in cwd
– mosvy
Dec 2 at 5:08




stackoverflow.com/a/18368068/10306503, especially the part about how apport is doing itself the core file creation in cwd
– mosvy
Dec 2 at 5:08















active

oldest

votes











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f485426%2fwhat-decides-where-core-dump-files-are-created%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f485426%2fwhat-decides-where-core-dump-files-are-created%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)