Hi Sabine,


2018-03-05 17:14 GMT+01:00 Sabine Manaa <manaa.sab...@gmail.com>:
> Hi Alistair,
>
> thank you! The message (pthread_setschedparam failed: Operation not
> permitted)  is gone now. So Question 1 is solved.
>
> But the crashes (Question 2) are remaining. After calling several
> OSSubprocess commands, Pharo crashes without PharoDebug.log.
>
> Anyone having an Idea what I could do?

I can suggest two options:

- Trying with OSProcess to see if you still get the crash or not
(unless your code requires too much refactoring; mine carries around
both code and can run on both OSProcess or OSSubprocess, with
automatic detection of which one is loaded previously in the
Baseline).

- Trying with the Pharo 7 vm instead of the 61 vm. Switching to the 7
vm solved issues on 64 bits at a point.

Regards,

Thierry


>
> Sabine
>
>
>
>
> 2018-03-05 13:07 GMT+01:00 Alistair Grant <akgrant0...@gmail.com>:
>>
>> Hi Sabine,
>>
>> The docket container will need to be privileged to adjust thread priority.
>>
>>
>> Cheers,
>> Alistair
>> (on phone)
>>
>> On 5 Mar. 2018 12:44, "Sabine Manaa" <manaa.sab...@gmail.com> wrote:
>>
>> We want to run Pharo6 with Ubuntu 16.04 Linux (in a Docker Image) and use
>> OSSubprocess.
>>
>> For this, we use this vm: https://get.pharo.org/61+vmT
>>
>> [1] tells me: "If you are installing under Linux, then you must use a
>> threaded heartbeat VM"
>>
>> We also created a file /etc/security/limits.d/pharo.conf and put the
>> parameters in like described in the message [2] when startup. Also we log
>> out and in.
>>
>> Question 1: the message (pthread_setschedparam failed: Operation not
>> permitted) comes again to the console each time we use OSSubprocess. As
>> far
>> as I understand, it should disappear. Does this mean, that we did not edit
>> the pharo.conf correctly?
>>
>> Question 2: after several uses of OSSubprocess within our application,
>> Pharo
>> crashes (no PharoDebug.log) with the following messages [3].
>> How can we avoid this, what are we doing wrong?
>>
>> Question 3: sometimes (!) when we load (exactly the same code loaded with
>> a
>> script), we also get a crash, see [4]. Bug? wrong vm?
>>
>> I am unhappy with this and it takes a lot of time. What are we doing
>> wrong?
>> We want to run Pharo6 with OSSubprocess in Linux within a docker image for
>> our staging environment.
>>
>> Help very welcome :-)
>> Sabine
>>
>>
>> [1]https://github.com/marianopeck/OSSubprocess
>>
>> [2](https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/tag/r3732#linux)
>>
>> [3]crash message
>>  *** buffer overflow detected ***:
>> /spf/build/pharo-vm/lib/pharo/5.0-201707201942/pharo terminated
>> ======= Backtrace: =========
>> /lib/i386-linux-gnu/libc.so.6(+0x67377)[0xf75f3377]
>> /lib/i386-linux-gnu/libc.so.6(__fortify_fail+0x68)[0xf7683708]
>> /lib/i386-linux-gnu/libc.so.6(+0xf58f8)[0xf76818f8]
>> /lib/i386-linux-gnu/libc.so.6(+0xf75fa)[0xf76835fa]
>>
>> /spf/build/pharo-vm/lib/pharo/5.0-201707201942/pharo(aioEnable+0x31)[0x80c9811]
>> /spf/build/pharo-vm/lib/pharo/5.0-201707201942/pharo[0x81215ee]
>> [0xa1010e0]
>> [0xa1c2bb8]
>> [0xa15f50c]
>> ....a lot more
>>
>>
>>
>> [4] PharoDebug.log
>> HERE_BE_DRAGONS_HERE
>> KeyNotFound: key #arg1 not found in Dictionary
>> 5 March 2018 11:31:51.792142 am
>>
>> VM: unix - i686 - linux-gnu - CoInterpreter VMMaker.oscog-eem.2254 uuid:
>> 4f2c2cce-f4a2-469a-93f1-97ed941df0ad Jul 20 2017
>> StackToRegisterMappingCogit VMMaker.oscog-eem.2252 uuid:
>> 2f3e9b0e-ecd3-4adf-b092-cce2e2587a5c Jul 20 2017
>> VM: 201707201942 https://github.com/OpenSmalltalk/opensmalltalk-vm.git $
>> Date: Thu Jul 20 12:42:21 2017 -0700 $ Plugins: 201707201942
>> https://github.com/OpenSmalltalk/opensmalltalk-vm.git $
>>
>> Image: Pharo6.0 [Latest update: #60536]
>>
>> Dictionary>>errorKeyNotFound:
>>         Receiver: a Dictionary(#arg3->1 #tmp2->2 )
>>         Arguments and temporary variables:
>>                 aKey:   #arg1
>>         Receiver's instance variables:
>>                 tally:  2
>>                 array:  {nil. nil. #arg3->1. #tmp2->2. nil}
>>
>>
>> [ self errorKeyNotFound: key ] in Dictionary>>at:
>>         Receiver: a Dictionary(#arg3->1 #tmp2->2 )
>>         Arguments and temporary variables:
>>                 key:    #arg1
>>         Receiver's instance variables:
>>                 tally:  2
>>                 array:  {nil. nil. #arg3->1. #tmp2->2. nil}
>>
>>
>> Dictionary>>at:ifAbsent:
>>         Receiver: a Dictionary(#arg3->1 #tmp2->2 )
>>         Arguments and temporary variables:
>>                 arg1:   #arg1
>>                 arg2:   [ self errorKeyNotFound: key ]
>>                 tmp1:   nil
>>         Receiver's instance variables:
>>                 tally:  2
>>                 array:  {nil. nil. #arg3->1. #tmp2->2. nil}
>>
>>
>> Dictionary>>at:
>>         Receiver: a Dictionary(#arg3->1 #tmp2->2 )
>>         Arguments and temporary variables:
>>                 key:    #arg1
>>         Receiver's instance variables:
>>                 tally:  2
>>                 array:  {nil. nil. #arg3->1. #tmp2->2. nil}
>>
>>
>> IRPushClosureCopy>>indexForVarNamed:
>>         Receiver: pushClosureCopyCopiedValues: #() args: #(#arg3)
>>         Arguments and temporary variables:
>>                 aName:  #arg1
>>         Receiver's instance variables:
>>                 sourceNode:     RBBlockNode([ :arg3 |
>> | tmp2 |
>> tmp2 := arg3.
>> tmp2
>>         nextPutAll: arg...etc...
>>                 bytecodeIndex:  nil
>>                 sequence:       an IRSequence (1)
>>                 destination:    an IRSequence (3)
>>                 successor:      nil
>>                 numArgs:        nil
>>                 blockSequence:  an IRSequence (2)
>>                 tempMap:        a Dictionary(#arg3->1 #tmp2->2 )
>>                 copiedValues:   #()
>>                 lastBlockSequence:      an IRSequence (2)
>>                 arguments:      #(#arg3)
>>
>>
>> IRTranslatorV2>>visitPushTemp:
>>         Receiver: an IRTranslatorV2
>>         Arguments and temporary variables:
>>                 tmp:    pushTemp: #arg1
>>         Receiver's instance variables:
>>                 gen:    an IRBytecodeGenerator
>>                 currentScope:   a Stack(pushClosureCopyCopiedValues: #()
>> args: #(#arg3) an
>> IRMeth...etc...
>>                 trailer:        a CompiledMethodTrailer
>>                 tempVectorStack:        a Stack()
>>                 compilationContext:     a CompilationContext
>>
>>
>> IRPushTemp>>accept:
>>         Receiver: pushTemp: #arg1
>>         Arguments and temporary variables:
>>                 aVisitor:       an IRTranslatorV2
>>         Receiver's instance variables:
>>                 sourceNode:     RBArgumentNode(arg1)
>>                 bytecodeIndex:  nil
>>                 sequence:       an IRSequence (2)
>>                 name:   #arg1
>>
>>
>> IRTranslatorV2(IRVisitor)>>visitNode:
>>         Receiver: an IRTranslatorV2
>>         Arguments and temporary variables:
>>                 elem:   pushTemp: #arg1
>>         Receiver's instance variables:
>>                 gen:    an IRBytecodeGenerator
>>                 currentScope:   a Stack(pushClosureCopyCopiedValues: #()
>> args: #(#arg3) an
>> IRMeth...etc...
>>                 trailer:        a CompiledMethodTrailer
>>                 tempVectorStack:        a Stack()
>>                 compilationContext:     a CompilationContext
>>
>>
>> IRTranslatorV2>>visitInstruction:
>>         Receiver: an IRTranslatorV2
>>         Arguments and temporary variables:
>>                 instr:  pushTemp: #arg1
>>         Receiver's instance variables:
>>                 gen:    an IRBytecodeGenerator
>>                 currentScope:   a Stack(pushClosureCopyCopiedValues: #()
>> args: #(#arg3) an
>> IRMeth...etc...
>>                 trailer:        a CompiledMethodTrailer
>>                 tempVectorStack:        a Stack()
>>                 compilationContext:     a CompilationContext
>>
>>
>> [ :arg2 | self visitInstruction: arg2 ] in
>> IRTranslatorV2(IRVisitor)>>visitSequence:
>>         Receiver: an IRTranslatorV2
>>         Arguments and temporary variables:
>>                 arg1:   an IRSequence (2)
>>                 arg2:   pushTemp: #arg1
>>         Receiver's instance variables:
>>                 gen:    an IRBytecodeGenerator
>>                 currentScope:   a Stack(pushClosureCopyCopiedValues: #()
>> args: #(#arg3) an
>> IRMeth...etc...
>>                 trailer:        a CompiledMethodTrailer
>>                 tempVectorStack:        a Stack()
>>                 compilationContext:     a CompilationContext
>>
>>
>> OrderedCollection>>do:
>>         Receiver: an OrderedCollection(pushTemp: #arg3 popIntoTemp: #tmp2
>> pushTemp:
>> #tmp2 pushDup pushTemp: ...etc...
>>         Arguments and temporary variables:
>> <<error during printing>
>>         Receiver's instance variables:
>>                 array:  an Array(pushTemp: #arg3 popIntoTemp: #tmp2
>> pushTemp: #tmp2
>> pushDup push...etc...
>>                 firstIndex:     1
>>                 lastIndex:      25
>>
>>
>> IRSequence>>do:
>>         Receiver: an IRSequence (2)
>>         Arguments and temporary variables:
>>                 aBlock:         [ :arg2 | self visitInstruction: arg2 ]
>>         Receiver's instance variables:
>>                 sequence:       an OrderedCollection(pushTemp: #arg3
>> popIntoTemp: #tmp2
>> pushTemp: #tm...etc...
>>                 orderNumber:    2
>>                 method:         an IRMethod
>>
>>
>> IRTranslatorV2(IRVisitor)>>visitSequence:
>>         Receiver: an IRTranslatorV2
>>         Arguments and temporary variables:
>>                 arg1:   an IRSequence (2)
>>         Receiver's instance variables:
>>                 gen:    an IRBytecodeGenerator
>>                 currentScope:   a Stack(pushClosureCopyCopiedValues: #()
>> args: #(#arg3) an
>> IRMeth...etc...
>>                 trailer:        a CompiledMethodTrailer
>>                 tempVectorStack:        a Stack()
>>                 compilationContext:     a CompilationContext
>>
>>
>> IRTranslatorV2>>visitSequence:
>>         Receiver: an IRTranslatorV2
>>         Arguments and temporary variables:
>>                 instructionSequence:    an IRSequence (2)
>>         Receiver's instance variables:
>>                 gen:    an IRBytecodeGenerator
>>                 currentScope:   a Stack(pushClosureCopyCopiedValues: #()
>> args: #(#arg3) an
>> IRMeth...etc...
>>                 trailer:        a CompiledMethodTrailer
>>                 tempVectorStack:        a Stack()
>>                 compilationContext:     a CompilationContext
>>
>>
>> IRSequence>>accept:
>>         Receiver: an IRSequence (2)
>>         Arguments and temporary variables:
>>                 aVisitor:       an IRTranslatorV2
>>         Receiver's instance variables:
>>                 sequence:       an OrderedCollection(pushTemp: #arg3
>> popIntoTemp: #tmp2
>> pushTemp: #tm...etc...
>>                 orderNumber:    2
>>                 method:         an IRMethod
>>
>>
>> IRTranslatorV2(IRVisitor)>>visitNode:
>>         Receiver: an IRTranslatorV2
>>         Arguments and temporary variables:
>>                 elem:   an IRSequence (2)
>>         Receiver's instance variables:
>>                 gen:    an IRBytecodeGenerator
>>                 currentScope:   a Stack(pushClosureCopyCopiedValues: #()
>> args: #(#arg3) an
>> IRMeth...etc...
>>                 trailer:        a CompiledMethodTrailer
>>                 tempVectorStack:        a Stack()
>>                 compilationContext:     a CompilationContext
>>
>>
>> [ :arg2 | self visitNode: arg2 ] in IRTranslatorV2(IRVisitor)>>visitNodes:
>>         Receiver: an IRTranslatorV2
>>         Arguments and temporary variables:
>>                 arg1:   a SortedCollection(an IRSequence (1) an IRSequence
>> (2) an
>> IRSequence (3) ...etc...
>>                 arg2:   an IRSequence (2)
>>         Receiver's instance variables:
>>                 gen:    an IRBytecodeGenerator
>>                 currentScope:   a Stack(pushClosureCopyCopiedValues: #()
>> args: #(#arg3) an
>> IRMeth...etc...
>>                 trailer:        a CompiledMethodTrailer
>>                 tempVectorStack:        a Stack()
>>                 compilationContext:     a CompilationContext
>>
>>
>> SortedCollection(OrderedCollection)>>do:
>>         Receiver: a SortedCollection(an IRSequence (1) an IRSequence (2)
>> an
>> IRSequence (3) an IRSequence (4)...etc...
>>         Arguments and temporary variables:
>> <<error during printing>
>>         Receiver's instance variables:
>>                 array:  an Array(an IRSequence (1) an IRSequence (2) an
>> IRSequence (3) an
>> IRSequ...etc...
>>                 firstIndex:     1
>>                 lastIndex:      7
>>                 sortBlock:      [ :arg2 :arg3 | arg2 orderNumber <= arg3
>> orderNumber ]
>>
>>
>> IRTranslatorV2(IRVisitor)>>visitNodes:
>>         Receiver: an IRTranslatorV2
>>         Arguments and temporary variables:
>>                 arg1:   a SortedCollection(an IRSequence (1) an IRSequence
>> (2) an
>> IRSequence (3) ...etc...
>>         Receiver's instance variables:
>>                 gen:    an IRBytecodeGenerator
>>                 currentScope:   a Stack(pushClosureCopyCopiedValues: #()
>> args: #(#arg3) an
>> IRMeth...etc...
>>                 trailer:        a CompiledMethodTrailer
>>                 tempVectorStack:        a Stack()
>>                 compilationContext:     a CompilationContext
>>
>>
>> IRTranslatorV2>>visitSequences:
>>         Receiver: an IRTranslatorV2
>>         Arguments and temporary variables:
>>                 arg1:   a SortedCollection(an IRSequence (1) an IRSequence
>> (2) an
>> IRSequence (3) ...etc...
>>         Receiver's instance variables:
>>                 gen:    an IRBytecodeGenerator
>>                 currentScope:   a Stack(pushClosureCopyCopiedValues: #()
>> args: #(#arg3) an
>> IRMeth...etc...
>>                 trailer:        a CompiledMethodTrailer
>>                 tempVectorStack:        a Stack()
>>                 compilationContext:     a CompilationContext
>>
>>
>> IRTranslatorV2>>visitMethod:
>>         Receiver: an IRTranslatorV2
>>         Arguments and temporary variables:
>>                 anIr:   an IRMethod
>>         Receiver's instance variables:
>>                 gen:    an IRBytecodeGenerator
>>                 currentScope:   a Stack(pushClosureCopyCopiedValues: #()
>> args: #(#arg3) an
>> IRMeth...etc...
>>                 trailer:        a CompiledMethodTrailer
>>                 tempVectorStack:        a Stack()
>>                 compilationContext:     a CompilationContext
>>
>>
>> IRMethod>>accept:
>>         Receiver: an IRMethod
>>         Arguments and temporary variables:
>>                 aVisitor:       an IRTranslatorV2
>>         Receiver's instance variables:
>>                 sourceNode:     logError: arg1 inContext: arg2
>>         self
>>                 logStdErrorDuring: [ :arg3 |...etc...
>>                 startSequence:  an IRSequence (1)
>>                 numArgs:        2
>>                 properties:     nil
>>                 tempMap:        a Dictionary(#arg1->1 #arg2->2 )
>>                 pragmas:        an OrderedCollection()
>>                 additionalLiterals:     an OCLiteralSet(#ifNotNil:)
>>                 compiledMethod:         nil
>>                 compilationContext:     a CompilationContext
>>                 irPrimitive:    primitive 0
>>
>>
>>
>>
>>
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html
>>
>>
>

Reply via email to