What is code 137 / how to gracefully shut down via SIGTERM?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

What is code 137 / how to gracefully shut down via SIGTERM?

Herby Vojčík
Hi,

I had to find out how to automatically deploy the backend written in
Pharo, and so far it uses docker-compose stop to stop the instance (and
later docker-compose up -d to get everything up again).

I noticed the stop phase takes a while and ends with status code 137. I
presume it ended forcefully and not gracefully.

What is the idiomatic way to wait on SIGTERM and close the process
gracefully?

Thanks, Herby

Reply | Threaded
Open this post in threaded view
|

Re: What is code 137 / how to gracefully shut down via SIGTERM?

EstebanLM
Hi,

I don’t know if is useful in your case, but you made me remember I made a small tool to trap unix signals within Pharo. I uploaded then to github. 


is very easy to use and it will allow you to trap any signal and do what you want ;)

Esteban


On 28 Oct 2017, at 13:39, Herby Vojčík <[hidden email]> wrote:

Hi,

I had to find out how to automatically deploy the backend written in Pharo, and so far it uses docker-compose stop to stop the instance (and later docker-compose up -d to get everything up again).

I noticed the stop phase takes a while and ends with status code 137. I presume it ended forcefully and not gracefully.

What is the idiomatic way to wait on SIGTERM and close the process gracefully?

Thanks, Herby


Reply | Threaded
Open this post in threaded view
|

Re: What is code 137 / how to gracefully shut down via SIGTERM?

wernerk
In reply to this post by Herby Vojčík
Hi Herby,
eventually you might want to look at
https://github.com/moby/moby/issues/1063
but then i dont know anything about these things.
werner

On 10/28/2017 01:39 PM, Herby Vojčík wrote:

> Hi,
>
> I had to find out how to automatically deploy the backend written in
> Pharo, and so far it uses docker-compose stop to stop the instance
> (and later docker-compose up -d to get everything up again).
>
> I noticed the stop phase takes a while and ends with status code 137.
> I presume it ended forcefully and not gracefully.
>
> What is the idiomatic way to wait on SIGTERM and close the process
> gracefully?
>
> Thanks, Herby
>
>


Reply | Threaded
Open this post in threaded view
|

Re: What is code 137 / how to gracefully shut down via SIGTERM?

Herby Vojčík
In reply to this post by EstebanLM
Esteban Lorenzano wrote:
> Hi,
>
> I don’t know if is useful in your case, but you made me remember I made
> a small tool to trap unix signals within Pharo. I uploaded then to github.
>
> https://github.com/estebanlm/pharo-posix-signal
>
> is very easy to use and it will allow you to trap any signal and do what
> you want ;)

Thanks, looks that it'll help.

> Esteban
>
>
>> On 28 Oct 2017, at 13:39, Herby Vojčík <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>> Hi,
>>
>> I had to find out how to automatically deploy the backend written in
>> Pharo, and so far it uses docker-compose stop to stop the instance
>> (and later docker-compose up -d to get everything up again).
>>
>> I noticed the stop phase takes a while and ends with status code 137.
>> I presume it ended forcefully and not gracefully.
>>
>> What is the idiomatic way to wait on SIGTERM and close the process
>> gracefully?
>>
>> Thanks, Herby
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: What is code 137 / how to gracefully shut down via SIGTERM?

Herby Vojčík
In reply to this post by wernerk
werner kassens wrote:
> Hi Herby,
> eventually you might want to look at
> https://github.com/moby/moby/issues/1063
> but then i dont know anything about these things.

Hopefully they have this solved already... but I learned 137 means
"killed". generally; did not know. :-)

> werner

Herby

Reply | Threaded
Open this post in threaded view
|

Re: What is code 137 / how to gracefully shut down via SIGTERM?

Bruce O'Neel-2
In reply to this post by Herby Vojčík
Hi,

Posix requires that if the process is killed the return status is greater than 128.

What is convention on linux systems is that if the process is sent a signal then the signal number is added to 128.  Therefore 137 is SIGKILL (kill -9).  SIGTERM is 143, SIGABRT is 134, SIGSEGV is 139, and so on.  I've not seen an exception to this but there could be.

Signals off of my closest linux system look like:

#define SIGHUP           1

#define SIGINT           2

#define SIGQUIT          3

#define SIGILL           4

#define SIGTRAP          5

#define SIGABRT          6

#define SIGIOT           6

#define SIGBUS           7

#define SIGFPE           8

#define SIGKILL          9

#define SIGUSR1         10

#define SIGSEGV         11

#define SIGUSR2         12

#define SIGPIPE         13

#define SIGALRM         14

#define SIGTERM         15



SIGHUP is the phone hung up.  SIGINT is interrupt (^C) SIGILL is you tried to execute an illegal instruction, SIGBUS is Bus error, normally you tried to read a 32 bit value on a non-32 bit boundary and uncommon on x86, SIGFPE is a floating point error, SIGKILL is too bad, you're dead, SIGSEGV is you tried to read/write memory that was not allowed, and SIGTERM is the normal "please exit" signal.

cheers

bruce


29 October 2017 14:09 Herby Vojčík <[hidden email]> wrote:
werner kassens wrote:
> Hi Herby,
> eventually you might want to look at
> https://github.com/moby/moby/issues/1063
> but then i dont know anything about these things.

Hopefully they have this solved already... but I learned 137 means
"killed". generally; did not know. :-)

> werner

Herby


Hi,
Reply | Threaded
Open this post in threaded view
|

Re: What is code 137 / how to gracefully shut down via SIGTERM?

Herby Vojčík
Bruce O'Neel wrote:

> Hi,
>
> Posix requires that if the process is killed the return status is
> greater than 128.
>
> What is convention on linux systems is that if the process is sent a
> signal then the signal number is added to 128.  Therefore 137 is SIGKILL
> (kill -9).  SIGTERM is 143, SIGABRT is 134, SIGSEGV is 139, and so on.
>   I've not seen an exception to this but there could be.
>
> Signals off of my closest linux system look like:
>
> #define SIGHUP           1
> #define SIGINT           2
> #define SIGQUIT          3
> #define SIGILL           4
> #define SIGTRAP          5
> #define SIGABRT          6
> #define SIGIOT           6
> #define SIGBUS           7
> #define SIGFPE           8
> #define SIGKILL          9
> #define SIGUSR1         10
> #define SIGSEGV         11
> #define SIGUSR2         12
> #define SIGPIPE         13
> #define SIGALRM         14
> #define SIGTERM         15

Scary, because Esteban's sigtrapping package has them defined a bit
differently:

{ #category : #'class initialization' }
POSIXSignal class >> initialize [
        SIGHUP := 1.
        SIGINT := 2.
        SIGQUIT := 3.
        SIGILL := 4.
        SIGTRAP := 5.
        SIGABRT := 6.
        SIGPOLL := 7.
        SIGIOT := SIGABRT.
        SIGEMT := 7.
        SIGFPE := 8.
        SIGKILL := 9.
        SIGBUS := 10.
        SIGSEGV := 11.
        SIGSYS := 12.
        SIGPIPE := 13.
        SIGALRM := 14.
        SIGTERM := 15.
        SIGURG := 16.
        SIGSTOP := 17.
        SIGTSTP := 18.
        SIGCONT := 19.
        SIGCHLD := 20.
        SIGTTIN := 21.
        SIGTTOU := 22.
        SIGIO := 23.
        SIGXCPU := 24.
        SIGXFSZ := 25.
        SIGVTALRM := 26.
        SIGPROF := 27.
        SIGWINCH := 28.
        SIGINFO := 29.
        SIGUSR1 := 30.
        SIGUSR2 := 31.
]

Reply | Threaded
Open this post in threaded view
|

Re: What is code 137 / how to gracefully shut down via SIGTERM?

Bruce O'Neel-2
In reply to this post by Herby Vojčík
Hi,

Well, not so scary.  That's the mac list.  From a not so recent mac with Xcode 7 installed it looks like the below.

The good news here is that the common signals have the same numbers.  And how often do you get an SIGXCPU?

cheers

bruce

#define SIGHUP  1       /* hangup */

#define SIGINT  2       /* interrupt */

#define SIGQUIT 3       /* quit */

#define SIGILL  4       /* illegal instruction (not reset when caught) */

#define SIGTRAP 5       /* trace trap (not reset when caught) */

#define SIGABRT 6       /* abort() */

#if  (defined(_POSIX_C_SOURCE) && !defined(_DARWIN_C_SOURCE))

#define SIGPOLL 7       /* pollable event ([XSR] generated, not supported) */

#else   /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */

#define SIGIOT  SIGABRT /* compatibility */

#define SIGEMT  7       /* EMT instruction */

#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */

#define SIGFPE  8       /* floating point exception */

#define SIGKILL 9       /* kill (cannot be caught or ignored) */

#define SIGBUS  10      /* bus error */

#define SIGSEGV 11      /* segmentation violation */

#define SIGSYS  12      /* bad argument to system call */

#define SIGPIPE 13      /* write on a pipe with no one to read it */

#define SIGALRM 14      /* alarm clock */

#define SIGTERM 15      /* software termination signal from kill */

#define SIGURG  16      /* urgent condition on IO channel */

#define SIGSTOP 17      /* sendable stop signal not from tty */

#define SIGTSTP 18      /* stop signal from tty */

#define SIGCONT 19      /* continue a stopped process */

#define SIGCHLD 20      /* to parent on child stop or exit */

#define SIGTTIN 21      /* to readers pgrp upon background tty read */

#define SIGTTOU 22      /* like TTIN for output if (tp->t_local&LTOSTOP) */

#if  (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))

#define SIGIO   23      /* input/output possible signal */

#endif

#define SIGXCPU 24      /* exceeded CPU time limit */

#define SIGXFSZ 25      /* exceeded file size limit */

#define SIGVTALRM 26    /* virtual time alarm */

#define SIGPROF 27      /* profiling time alarm */

#if  (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))

#define SIGWINCH 28     /* window size changes */

#define SIGINFO 29      /* information request */

#endif

#define SIGUSR1 30      /* user defined signal 1 */

#define SIGUSR2 31      /* user defined signal 2 */


31 October 2017 14:56 Herby Vojčík <[hidden email]> wrote:
Bruce O'Neel wrote:
> Hi,
>
> Posix requires that if the process is killed the return status is
> greater than 128.
>
> What is convention on linux systems is that if the process is sent a
> signal then the signal number is added to 128. Therefore 137 is SIGKILL
> (kill -9). SIGTERM is 143, SIGABRT is 134, SIGSEGV is 139, and so on.
> I've not seen an exception to this but there could be.
>
> Signals off of my closest linux system look like:
>
> #define SIGHUP 1
> #define SIGINT 2
> #define SIGQUIT 3
> #define SIGILL 4
> #define SIGTRAP 5
> #define SIGABRT 6
> #define SIGIOT 6
> #define SIGBUS 7
> #define SIGFPE 8
> #define SIGKILL 9
> #define SIGUSR1 10
> #define SIGSEGV 11
> #define SIGUSR2 12
> #define SIGPIPE 13
> #define SIGALRM 14
> #define SIGTERM 15

Scary, because Esteban's sigtrapping package has them defined a bit
differently:

{ #category : #'class initialization' }
POSIXSignal class >> initialize [
SIGHUP := 1.
SIGINT := 2.
SIGQUIT := 3.
SIGILL := 4.
SIGTRAP := 5.
SIGABRT := 6.
SIGPOLL := 7.
SIGIOT := SIGABRT.
SIGEMT := 7.
SIGFPE := 8.
SIGKILL := 9.
SIGBUS := 10.
SIGSEGV := 11.
SIGSYS := 12.
SIGPIPE := 13.
SIGALRM := 14.
SIGTERM := 15.
SIGURG := 16.
SIGSTOP := 17.
SIGTSTP := 18.
SIGCONT := 19.
SIGCHLD := 20.
SIGTTIN := 21.
SIGTTOU := 22.
SIGIO := 23.
SIGXCPU := 24.
SIGXFSZ := 25.
SIGVTALRM := 26.
SIGPROF := 27.
SIGWINCH := 28.
SIGINFO := 29.
SIGUSR1 := 30.
SIGUSR2 := 31.
]

Reply | Threaded
Open this post in threaded view
|

Re: What is code 137 / how to gracefully shut down via SIGTERM?

Herby Vojčík
Bruce O'Neel wrote:
> Hi,
>
> Well, not so scary.  That's the mac list.  From a not so recent mac with
> Xcode 7 installed it looks like the below.
>
> The good news here is that the common signals have the same numbers.
>   And how often do you get an SIGXCPU?

I was think of SIGUSR1, can be used to useful things (IIRC nginx or
apache reload when sent), but that one is not common. :-( Of course,
SIGTERM/SIGINT/SIGHUP are, so, yes, these are most important.

Herby

> cheers
>
> bruce
>
> #define SIGHUP  1       /* hangup */
>
> #define SIGINT  2       /* interrupt */
>
> #define SIGQUIT 3       /* quit */
>
> #define SIGILL  4       /* illegal instruction (not reset when caught) */
>
> #define SIGTRAP 5       /* trace trap (not reset when caught) */
>
> #define SIGABRT 6       /* abort() */
>
> #if  (defined(_POSIX_C_SOURCE) && !defined(_DARWIN_C_SOURCE))
>
> #define SIGPOLL 7       /* pollable event ([XSR] generated, not
> supported) */
>
> #else   /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
>
> #define SIGIOT  SIGABRT /* compatibility */
>
> #define SIGEMT  7       /* EMT instruction */
>
> #endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
>
> #define SIGFPE  8       /* floating point exception */
>
> #define SIGKILL 9       /* kill (cannot be caught or ignored) */
>
> #define SIGBUS  10      /* bus error */
>
> #define SIGSEGV 11      /* segmentation violation */
>
> #define SIGSYS  12      /* bad argument to system call */
>
> #define SIGPIPE 13      /* write on a pipe with no one to read it */
>
> #define SIGALRM 14      /* alarm clock */
>
> #define SIGTERM 15      /* software termination signal from kill */
>
> #define SIGURG  16      /* urgent condition on IO channel */
>
> #define SIGSTOP 17      /* sendable stop signal not from tty */
>
> #define SIGTSTP 18      /* stop signal from tty */
>
> #define SIGCONT 19      /* continue a stopped process */
>
> #define SIGCHLD 20      /* to parent on child stop or exit */
>
> #define SIGTTIN 21      /* to readers pgrp upon background tty read */
>
> #define SIGTTOU 22      /* like TTIN for output if (tp->t_local&LTOSTOP) */
>
> #if  (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
>
> #define SIGIO   23      /* input/output possible signal */
>
> #endif
>
> #define SIGXCPU 24      /* exceeded CPU time limit */
>
> #define SIGXFSZ 25      /* exceeded file size limit */
>
> #define SIGVTALRM 26    /* virtual time alarm */
>
> #define SIGPROF 27      /* profiling time alarm */
>
> #if  (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
>
> #define SIGWINCH 28     /* window size changes */
>
> #define SIGINFO 29      /* information request */
>
> #endif
>
> #define SIGUSR1 30      /* user defined signal 1 */
>
> #define SIGUSR2 31      /* user defined signal 2 */
>
>
> /31 October 2017 14:56 Herby Vojčík <[hidden email]> wrote:/
>
>     Bruce O'Neel wrote:
>      > Hi,
>      >
>      > Posix requires that if the process is killed the return status is
>      > greater than 128.
>      >
>      > What is convention on linux systems is that if the process is sent a
>      > signal then the signal number is added to 128. Therefore 137 is
>     SIGKILL
>      > (kill -9). SIGTERM is 143, SIGABRT is 134, SIGSEGV is 139, and so
>     on.
>      > I've not seen an exception to this but there could be.
>      >
>      > Signals off of my closest linux system look like:
>      >
>      > #define SIGHUP 1
>      > #define SIGINT 2
>      > #define SIGQUIT 3
>      > #define SIGILL 4
>      > #define SIGTRAP 5
>      > #define SIGABRT 6
>      > #define SIGIOT 6
>      > #define SIGBUS 7
>      > #define SIGFPE 8
>      > #define SIGKILL 9
>      > #define SIGUSR1 10
>      > #define SIGSEGV 11
>      > #define SIGUSR2 12
>      > #define SIGPIPE 13
>      > #define SIGALRM 14
>      > #define SIGTERM 15
>
>     Scary, because Esteban's sigtrapping package has them defined a bit
>     differently:
>
>     { #category : #'class initialization' }
>     POSIXSignal class >> initialize [
>     SIGHUP := 1.
>     SIGINT := 2.
>     SIGQUIT := 3.
>     SIGILL := 4.
>     SIGTRAP := 5.
>     SIGABRT := 6.
>     SIGPOLL := 7.
>     SIGIOT := SIGABRT.
>     SIGEMT := 7.
>     SIGFPE := 8.
>     SIGKILL := 9.
>     SIGBUS := 10.
>     SIGSEGV := 11.
>     SIGSYS := 12.
>     SIGPIPE := 13.
>     SIGALRM := 14.
>     SIGTERM := 15.
>     SIGURG := 16.
>     SIGSTOP := 17.
>     SIGTSTP := 18.
>     SIGCONT := 19.
>     SIGCHLD := 20.
>     SIGTTIN := 21.
>     SIGTTOU := 22.
>     SIGIO := 23.
>     SIGXCPU := 24.
>     SIGXFSZ := 25.
>     SIGVTALRM := 26.
>     SIGPROF := 27.
>     SIGWINCH := 28.
>     SIGINFO := 29.
>     SIGUSR1 := 30.
>     SIGUSR2 := 31.
>     ]
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: What is code 137 / how to gracefully shut down via SIGTERM?

David T. Lewis
In reply to this post by Herby Vojčík
On Sat, Oct 28, 2017 at 01:39:56PM +0200, Herby Voj????k wrote:

> Hi,
>
> I had to find out how to automatically deploy the backend written in
> Pharo, and so far it uses docker-compose stop to stop the instance (and
> later docker-compose up -d to get everything up again).
>
> I noticed the stop phase takes a while and ends with status code 137. I
> presume it ended forcefully and not gracefully.
>
> What is the idiomatic way to wait on SIGTERM and close the process
> gracefully?
>
> Thanks, Herby

Try this:

  mySemaphore := OSProcess accessor forwardSigTerm.
  mySemaphore wait. "wait eg in a process until SIGTERM is detected"

Typically you would use #forwardSigTerm to set up the signal handler,
then start a Smalltalk process that waits on the semaphore and does
whatever you want to do when the Unix signal is detected.

You can do signal forwarding for any Unix signal, the #forwardSigTerm
is just a convenience method.

Dave

Reply | Threaded
Open this post in threaded view
|

Re: What is code 137 / how to gracefully shut down via SIGTERM?

Herby Vojčík
In reply to this post by EstebanLM
Esteban Lorenzano wrote:
> Hi,
>
> I don’t know if is useful in your case, but you made me remember I made
> a small tool to trap unix signals within Pharo. I uploaded then to github.
>
> https://github.com/estebanlm/pharo-posix-signal

Cannot load it.

See attachment.

Tried the on the current Pharo6.1-win.

Herby

cannot-load-posixsignal.png (341K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: What is code 137 / how to gracefully shut down via SIGTERM?

EstebanLM
heh, I made a mistake in the README.md (fixed now)
Correct install is: 

Metacello new 
  repository: '<a href="github://estebanlm/pharo-posix-signal/src" class="">github://estebanlm/pharo-posix-signal/src';
  baseline: 'POSIXSignal';
  load.

Esteban

On 1 Nov 2017, at 00:56, Herby Vojčík <[hidden email]> wrote:

Esteban Lorenzano wrote:
Hi,

I don’t know if is useful in your case, but you made me remember I made
a small tool to trap unix signals within Pharo. I uploaded then to github.

https://github.com/estebanlm/pharo-posix-signal

Cannot load it.

See attachment.

Tried the on the current Pharo6.1-win.

Herby
<cannot-load-posixsignal.png>

Reply | Threaded
Open this post in threaded view
|

Re: What is code 137 / how to gracefully shut down via SIGTERM?

Herby Vojčík
In reply to this post by EstebanLM
Esteban Lorenzano wrote:
> Hi,
>
> I don’t know if is useful in your case, but you made me remember I made
> a small tool to trap unix signals within Pharo. I uploaded then to github.
>
> https://github.com/estebanlm/pharo-posix-signal
>
> is very easy to use and it will allow you to trap any signal and do what
> you want ;)

Not as easy as it seems, ran this on docker image herbysk/pharo:64_61
(based on the one from that day Iceberg was backported):

========================================================================

root@2367caef3dac:/# cat s.st
| trap |
Iceberg enableMetacelloIntegration: true; remoteTypeSelector: #httpsUrl.
Metacello new
   repository: 'github://estebanlm/pharo-posix-signal/src';
   baseline: 'POSIXSignal';
   load.
trap := POSIXSignal SIGINT. trap installWith: [ :signal |  'Trapped!!'
crLog ].
trap := POSIXSignal SIGTERM. trap installWith: [ :signal |  'TERM!!'
crLog ].
root@2367caef3dac:/# pharo /opt/pharo/Pharo.image ${PWD}/s.st --no-quit
pthread_setschedparam failed: Operation not permitted
This VM uses a separate heartbeat thread to update its internal clock
and handle events.  For best operation, this thread should run at a
higher priority, however the VM was unable to change the priority.  The
effect is that heavily loaded systems may experience some latency
issues.  If this occurs, please create the appropriate configuration
file in /etc/security/limits.d/ as shown below:

cat <<END | sudo tee /etc/security/limits.d/pharo.conf
*      hard    rtprio  2
*      soft    rtprio  2
END

and report to the pharo mailing list whether this improves behaviour.

You will need to log out and log back in for the limits to take effect.
For more information please see
https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/tag/r3732#linux

UndefinedObject>>DoIt (POSIXSignal is Undeclared)

UndefinedObject>>DoIt (POSIXSignal is Undeclared)

Fetched -> BaselineOfPOSIXSignal-GitHub.1509525907 ---
https://github.com/estebanlm/pharo-posix-signal.git[master] ---
/opt/pharo/pharo-local/iceberg/estebanlm/pharo-posi
x-signal/src (Libgit)
Loaded -> BaselineOfPOSIXSignal-GitHub.1509525907 ---
https://github.com/estebanlm/pharo-posix-signal.git[master] ---
/opt/pharo/pharo-local/iceberg/estebanlm/pharo-posix
-signal/src (Libgit)
Loading baseline of BaselineOfPOSIXSignal...
Fetched -> POSIXSignal-GitHub.1509525907 ---
https://github.com/estebanlm/pharo-posix-signal.git[master] ---
/opt/pharo/pharo-local/iceberg/estebanlm/pharo-posix-signal/s
rc (Libgit)
Loaded -> POSIXSignal-GitHub.1509525907 ---
https://github.com/estebanlm/pharo-posix-signal.git[master] --- cache
....finished baseline^C
Segmentation fault Wed Nov  1 19:03:27 2017


/opt/pharo/pharo-vm/lib/pharo/5.0-201707201942/pharo
Pharo VM version: 5.0-201707201942  Thu Jul 20 20:40:54 UTC 2017 gcc
4.6.3 [Production Spur 64-bit VM]
Built from: CoInterpreter VMMaker.oscog-eem.2254 uuid:
4f2c2cce-f4a2-469a-93f1-97ed941df0ad Jul 20 2017
With: StackToRegisterMappingCogit VMMaker.oscog-eem.2252 uuid:
2f3e9b0e-ecd3-4adf-b092-cce2e2587a5c Jul 20 2017
Revision: VM: 201707201942
https://github.com/OpenSmalltalk/opensmalltalk-vm.git $ Date: Thu Jul 20
12:42:21 2017 -0700 $ Plugins: 201707201942 https://github.com/OpenSma
lltalk/opensmalltalk-vm.git $
Build host: Linux testing-gce-74d10329-bbfd-42e5-8995-b0e3a68c73cb
3.13.0-115-generic #162~precise1-Ubuntu SMP Fri Mar 24 16:47:06 UTC 2017
x86_64 x86_64 x86_64 GNU/Linux
plugin path: /opt/pharo/pharo-vm/lib/pharo/5.0-201707201942 [default:
/opt/pharo/pharo-vm/lib/pharo/5.0-201707201942/]


C stack backtrace & registers:
         rax 0x2c1da080 rbx 0x2c1d9f10 rcx 0x2c1da138 rdx 0x2c1d9fc8
         rdi 0x2c1d9ce8 rsi 0x2c1d9ce8 rbp 0x2c1d9e58 rsp 0x2c1da1f0
         r8  0x2c1d9728 r9  0x2c1d97e0 r10 0x2c1d9898 r11 0x2c1d9950
         r12 0x2c1d9a08 r13 0x2c1d9ac0 r14 0x2c1d9b78 r15 0x2c1d9c30
         rip 0x2c1da2a8
*[0x7ffc2c1da2a8]
/opt/pharo/pharo-vm/lib/pharo/5.0-201707201942/pharo[0x41ccd1]
/opt/pharo/pharo-vm/lib/pharo/5.0-201707201942/pharo[0x41d05f]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f155abba390]
[0x7f155b151000]
[0x0]


Smalltalk stack dump:
     0x7ffc2c1de400 M ProcessorScheduler class>idleProcess 0x2f982d8:
a(n) ProcessorScheduler class
     0x7ffc2c1de440 I [] in ProcessorScheduler class>startUp 0x2f982d8:
a(n) ProcessorScheduler class
     0x7ffc2c1de480 I [] in BlockClosure>newProcess 0x60396e8: a(n)
BlockClosure

Most recent primitives
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
primUTCMicrosecondsClock
signal
primSignal:atUTCMicroseconds:
wait
millisecondClockValue
millisecondClockValue
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
millisecondClockValue
yield
millisecondClockValue
signal
primUTCMicrosecondsClock
primSignal:atUTCMicroseconds:
wait
wait
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
primUTCMicrosecondsClock
signal
primSignal:atUTCMicroseconds:
wait
millisecondClockValue
millisecondClockValue
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
millisecondClockValue
yield
millisecondClockValue
signal
primUTCMicrosecondsClock
primSignal:atUTCMicroseconds:
wait
wait
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
primUTCMicrosecondsClock
signal
primSignal:atUTCMicroseconds:
wait
millisecondClockValue
millisecondClockValue
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
millisecondClockValue
yield
millisecondClockValue
signal
primUTCMicrosecondsClock
primSignal:atUTCMicroseconds:
wait
wait
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
primUTCMicrosecondsClock
signal
primSignal:atUTCMicroseconds:
wait
millisecondClockValue
millisecondClockValue
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
millisecondClockValue
yield
millisecondClockValue
signal
primUTCMicrosecondsClock
primSignal:atUTCMicroseconds:
wait
wait
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
primUTCMicrosecondsClock
signal
primSignal:atUTCMicroseconds:
wait
millisecondClockValue
millisecondClockValue
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
millisecondClockValue
yield
millisecondClockValue
signal
primUTCMicrosecondsClock
primSignal:atUTCMicroseconds:
wait
wait
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:

stack page bytes 8192 available headroom 5576 minimum unused headroom 6000

         (Segmentation fault)
/usr/local/bin/pharo: line 11:   175 Aborted
"$DIR"/"pharo-vm/pharo" --nodisplay "$@"
root@2367caef3dac:/#

====================================

Same result in 32bit :-(

Herby

Reply | Threaded
Open this post in threaded view
|

Re: What is code 137 / how to gracefully shut down via SIGTERM?

Herby Vojčík
Herby Vojčík wrote:
> Not as easy as it seems, ran this on docker image herbysk/pharo:64_61
61_64, of course.