Process exiting mysteriously on Linux The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceExit Shell Script Based on Process Exit CodeHow do I prompt for Yes/No/Cancel input in a Linux shell script?How to symlink a file in Linux?How do I change permissions for a folder and all of its subfolders and files in one step in Linux?How to change the output color of echo in LinuxHow can I use grep to show just filenames on Linux?How to permanently set $PATH on Linux/Unix?How do I copy folder with files to another folder in Unix/Linux?How do I find all files containing specific text on Linux?Why does the C preprocessor interpret the word “linux” as the constant “1”?

Identify 80s or 90s comics with ripped creatures (not dwarves)

How did passengers keep warm on sail ships?

Can the Right Ascension and Argument of Perigee of a spacecraft's orbit keep varying by themselves with time?

Simulating Exploding Dice

Make it rain characters

How to politely respond to generic emails requesting a PhD/job in my lab? Without wasting too much time

What force causes entropy to increase?

Why doesn't a hydraulic lever violate conservation of energy?

Mortgage adviser recommends a longer term than necessary combined with overpayments

how can a perfect fourth interval be considered either consonant or dissonant?

"... to apply for a visa" or "... and applied for a visa"?

Why don't hard Brexiteers insist on a hard border to prevent illegal immigration after Brexit?

Is it ok to offer lower paid work as a trial period before negotiating for a full-time job?

How to make Illustrator type tool selection automatically adapt with text length

Why not take a picture of a closer black hole?

Is there a writing software that you can sort scenes like slides in PowerPoint?

Deal with toxic manager when you can't quit

What's the point in a preamp?

Was credit for the black hole image misappropriated?

What aspect of planet Earth must be changed to prevent the industrial revolution?

Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?

Is 'stolen' appropriate word?

How many cones with angle theta can I pack into the unit sphere?

Is this wall load bearing? Blueprints and photos attached



Process exiting mysteriously on Linux



The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
The Ask Question Wizard is Live!
Data science time! April 2019 and salary with experienceExit Shell Script Based on Process Exit CodeHow do I prompt for Yes/No/Cancel input in a Linux shell script?How to symlink a file in Linux?How do I change permissions for a folder and all of its subfolders and files in one step in Linux?How to change the output color of echo in LinuxHow can I use grep to show just filenames on Linux?How to permanently set $PATH on Linux/Unix?How do I copy folder with files to another folder in Unix/Linux?How do I find all files containing specific text on Linux?Why does the C preprocessor interpret the word “linux” as the constant “1”?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








-1















I have a process that is started from a script like this



linux> cat script.sh
./my_bin config.cfg
rc=$?
echo "Process exited with return code = $rc"


This script is executed from cron or from a ssh session in terminal, like this



$HOME/script.sh >> $HOME/cron_logs/script.log 2>&1


Sometimes, "my_bin" stops mysteriously. And during those times, even "rc" is missing from script.log



Why would such a thing happen?



I was actually trying to figure out why "my_bin" exits mysteriously, but then dont see any core files, or any logs in dmesg. The logs that "my_bin" generates are not helpful either.










share|improve this question

















  • 2





    The dmesg logs come from the kernel. Look in the other log files in /var/log/**. (This could be the oomkiller killing your application because it is using up all of the available memory ...)

    – Stephen C
    Mar 8 at 12:27











  • @StephenC , one question , in case of oom panic shouldn't rc will be captured in the script in the following line ?

    – PS.
    Mar 8 at 16:00






  • 1





    The OOM killer effectively does a "kill -9" so there won't be a meaningful RC. And it may also be killing the shell process. (It is not a panic. The OOM killer is killing user-space processes ... so that the system doesn't lock up due to severe VM thrashing.)

    – Stephen C
    Mar 8 at 16:49


















-1















I have a process that is started from a script like this



linux> cat script.sh
./my_bin config.cfg
rc=$?
echo "Process exited with return code = $rc"


This script is executed from cron or from a ssh session in terminal, like this



$HOME/script.sh >> $HOME/cron_logs/script.log 2>&1


Sometimes, "my_bin" stops mysteriously. And during those times, even "rc" is missing from script.log



Why would such a thing happen?



I was actually trying to figure out why "my_bin" exits mysteriously, but then dont see any core files, or any logs in dmesg. The logs that "my_bin" generates are not helpful either.










share|improve this question

















  • 2





    The dmesg logs come from the kernel. Look in the other log files in /var/log/**. (This could be the oomkiller killing your application because it is using up all of the available memory ...)

    – Stephen C
    Mar 8 at 12:27











  • @StephenC , one question , in case of oom panic shouldn't rc will be captured in the script in the following line ?

    – PS.
    Mar 8 at 16:00






  • 1





    The OOM killer effectively does a "kill -9" so there won't be a meaningful RC. And it may also be killing the shell process. (It is not a panic. The OOM killer is killing user-space processes ... so that the system doesn't lock up due to severe VM thrashing.)

    – Stephen C
    Mar 8 at 16:49














-1












-1








-1








I have a process that is started from a script like this



linux> cat script.sh
./my_bin config.cfg
rc=$?
echo "Process exited with return code = $rc"


This script is executed from cron or from a ssh session in terminal, like this



$HOME/script.sh >> $HOME/cron_logs/script.log 2>&1


Sometimes, "my_bin" stops mysteriously. And during those times, even "rc" is missing from script.log



Why would such a thing happen?



I was actually trying to figure out why "my_bin" exits mysteriously, but then dont see any core files, or any logs in dmesg. The logs that "my_bin" generates are not helpful either.










share|improve this question














I have a process that is started from a script like this



linux> cat script.sh
./my_bin config.cfg
rc=$?
echo "Process exited with return code = $rc"


This script is executed from cron or from a ssh session in terminal, like this



$HOME/script.sh >> $HOME/cron_logs/script.log 2>&1


Sometimes, "my_bin" stops mysteriously. And during those times, even "rc" is missing from script.log



Why would such a thing happen?



I was actually trying to figure out why "my_bin" exits mysteriously, but then dont see any core files, or any logs in dmesg. The logs that "my_bin" generates are not helpful either.







linux bash






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 8 at 12:16









javedjaved

158111




158111







  • 2





    The dmesg logs come from the kernel. Look in the other log files in /var/log/**. (This could be the oomkiller killing your application because it is using up all of the available memory ...)

    – Stephen C
    Mar 8 at 12:27











  • @StephenC , one question , in case of oom panic shouldn't rc will be captured in the script in the following line ?

    – PS.
    Mar 8 at 16:00






  • 1





    The OOM killer effectively does a "kill -9" so there won't be a meaningful RC. And it may also be killing the shell process. (It is not a panic. The OOM killer is killing user-space processes ... so that the system doesn't lock up due to severe VM thrashing.)

    – Stephen C
    Mar 8 at 16:49













  • 2





    The dmesg logs come from the kernel. Look in the other log files in /var/log/**. (This could be the oomkiller killing your application because it is using up all of the available memory ...)

    – Stephen C
    Mar 8 at 12:27











  • @StephenC , one question , in case of oom panic shouldn't rc will be captured in the script in the following line ?

    – PS.
    Mar 8 at 16:00






  • 1





    The OOM killer effectively does a "kill -9" so there won't be a meaningful RC. And it may also be killing the shell process. (It is not a panic. The OOM killer is killing user-space processes ... so that the system doesn't lock up due to severe VM thrashing.)

    – Stephen C
    Mar 8 at 16:49








2




2





The dmesg logs come from the kernel. Look in the other log files in /var/log/**. (This could be the oomkiller killing your application because it is using up all of the available memory ...)

– Stephen C
Mar 8 at 12:27





The dmesg logs come from the kernel. Look in the other log files in /var/log/**. (This could be the oomkiller killing your application because it is using up all of the available memory ...)

– Stephen C
Mar 8 at 12:27













@StephenC , one question , in case of oom panic shouldn't rc will be captured in the script in the following line ?

– PS.
Mar 8 at 16:00





@StephenC , one question , in case of oom panic shouldn't rc will be captured in the script in the following line ?

– PS.
Mar 8 at 16:00




1




1





The OOM killer effectively does a "kill -9" so there won't be a meaningful RC. And it may also be killing the shell process. (It is not a panic. The OOM killer is killing user-space processes ... so that the system doesn't lock up due to severe VM thrashing.)

– Stephen C
Mar 8 at 16:49






The OOM killer effectively does a "kill -9" so there won't be a meaningful RC. And it may also be killing the shell process. (It is not a panic. The OOM killer is killing user-space processes ... so that the system doesn't lock up due to severe VM thrashing.)

– Stephen C
Mar 8 at 16:49













0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
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',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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%2fstackoverflow.com%2fquestions%2f55063057%2fprocess-exiting-mysteriously-on-linux%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • 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%2fstackoverflow.com%2fquestions%2f55063057%2fprocess-exiting-mysteriously-on-linux%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

AWS Lex not identifying response if by a variable The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceEnforcing custom enumeration in AWS LEX for slot valuesHow to give response based on user response in Amazon Lex?Intercepting AWS Lambda Response to a AWS Lex QueryLex chat bot error: Reached second execution of fulfillment lambda on the same utteranceamazon lex showing invalid responseLambda response send back to Lex slot?Response card in Amazon lexAmazon Lex - Lambda response return HTML to botHow can I solve 424 (Failed Dependency) (python) obtained from Amazon lex?

Алба-Юлія

Захаров Федір Захарович