Co crash with FFI

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

Co crash with FFI

Mariano Martinez Peck
 
Hi. Using CogMT + ThreadedIA32FFIPlugin, I crash every time I run SqueakDBX tests. I compiled the VM with debug flags but couldn't find anything weird.
The VM I compiled is  'Croquet Closure Cog VM [CoInterpreter VMMaker-oscog-IgorStasenko.54]'
In addition, (if I did it correctly), I tested CogMT but using FFIPlugin, but still a crash.
Please let me know if there is something else I can do.

Cheers

Mariano


ubuntu@ubuntu-desktop:~/Pharo/vm/cogVM/blessed/results$ gdb CogMTVM
GNU gdb (GDB) 7.0-ubuntu
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/ubuntu/Pharo/vm/cogVM/blessed/results/CogMTVM...done.
(gdb) run /home/ubuntu/Pharo/imagenes/PharoOneClick2.dbx.image
Starting program: /home/ubuntu/Pharo/vm/cogVM/blessed/results/CogMTVM /home/ubuntu/Pharo/imagenes/PharoOneClick2.dbx.image
[Thread debugging using libthread_db enabled]
ioFindExternalFunctionIn(display_X11, 0x8c6670):
  /home/ubuntu/Pharo/vm/cogVM/blessed/results/CogMTVM: undefined symbol: display_X11
ioFindExternalFunctionIn(sound_OSS, 0x8c6670):
  /home/ubuntu/Pharo/vm/cogVM/blessed/results/CogMTVM: undefined symbol: sound_OSS
ioFindExternalFunctionIn(sound_MacOSX, 0x8c6670):
  /home/ubuntu/Pharo/vm/cogVM/blessed/results/CogMTVM: undefined symbol: sound_MacOSX
ioFindExternalFunctionIn(sound_Sun, 0x8c6670):
  /home/ubuntu/Pharo/vm/cogVM/blessed/results/CogMTVM: undefined symbol: sound_Sun
ioFindExternalFunctionIn(sound_pulse, 0x8c6670):
  /home/ubuntu/Pharo/vm/cogVM/blessed/results/CogMTVM: undefined symbol: sound_pulse
ioFindExternalFunctionIn(sound_ALSA, 0x8c6670):
  /home/ubuntu/Pharo/vm/cogVM/blessed/results/CogMTVM: undefined symbol: sound_ALSA
ioLoadModule(/home/ubuntu/Pharo/vm/cogVM/blessed/results/vm-sound-ALSA):
  /home/ubuntu/Pharo/vm/cogVM/blessed/results/vm-sound-ALSA: undefined symbol: snd_mixer_selem_has_playback_volume
ioLoadModule(./vm-sound-ALSA):
  ./vm-sound-ALSA: undefined symbol: snd_mixer_selem_has_playback_volume
ioLoadModule(vm-sound-ALSA):
  vm-sound-ALSA: cannot open shared object file: No such file or directory
ioFindExternalFunctionIn(sound_null, 0x8c6670):
  /home/ubuntu/Pharo/vm/cogVM/blessed/results/CogMTVM: undefined symbol: sound_null
warning, processHasThreadId flag is unset; cannot function as a threaded VM if so.
uxAllocateMemory: pageSize 0x1000 (4096), mask 0xfffff000
uxAllocateMemory: /dev/zero descriptor -1
uxAllocateMemory: min heap 35504344, desired 54378776
uxAllocateMemory: mapping 0x40000000 bytes (1024 Mbytes)
[New Thread 0x77faab70 (LWP 4075)]
warning: Process doesn't have threadId; VM will not thread
warning: Process doesn't have threadId; VM will not thread
warning: Process doesn't have threadId; VM will not thread
warning: Process doesn't have threadId; VM will not thread
warning: Process doesn't have threadId; VM will not thread
warning: Process doesn't have threadId; VM will not thread
warning: Process doesn't have threadId; VM will not thread
warning: Process doesn't have threadId; VM will not thread
warning: Process doesn't have threadId; VM will not thread
warning: Process doesn't have threadId; VM will not thread
[New Thread 0x777a9b70 (LWP 4077)]
[Thread 0x777a9b70 (LWP 4077) exited]
[New Thread 0x777a9b70 (LWP 4078)]
[Thread 0x777a9b70 (LWP 4078) exited]
[New Thread 0x76fa8b70 (LWP 4079)]
[Thread 0x76fa8b70 (LWP 4079) exited]
[New Thread 0x777a9b70 (LWP 4080)]
[Thread 0x777a9b70 (LWP 4080) exited]
[New Thread 0x777a9b70 (LWP 4081)]
[Thread 0x777a9b70 (LWP 4081) exited]
[New Thread 0x777a9b70 (LWP 4082)]
[Thread 0x777a9b70 (LWP 4082) exited]
[New Thread 0x777a9b70 (LWP 4083)]
[Thread 0x777a9b70 (LWP 4083) exited]
[New Thread 0x777a9b70 (LWP 4084)]
[Thread 0x777a9b70 (LWP 4084) exited]
[New Thread 0x777a9b70 (LWP 4085)]
[Thread 0x777a9b70 (LWP 4085) exited]
[New Thread 0x777a9b70 (LWP 4086)]
[Thread 0x777a9b70 (LWP 4086) exited]
[New Thread 0x777a9b70 (LWP 4087)]
[Thread 0x777a9b70 (LWP 4087) exited]
[New Thread 0x76fa8b70 (LWP 4088)]
[Thread 0x76fa8b70 (LWP 4088) exited]
[New Thread 0x76fa8b70 (LWP 4089)]
[Thread 0x76fa8b70 (LWP 4089) exited]
[New Thread 0x76fa8b70 (LWP 4090)]
[Thread 0x76fa8b70 (LWP 4090) exited]
[New Thread 0x76fa8b70 (LWP 4091)]
[Thread 0x76fa8b70 (LWP 4091) exited]
[New Thread 0x76fa8b70 (LWP 4092)]
[Thread 0x76fa8b70 (LWP 4092) exited]
[New Thread 0x76fa8b70 (LWP 4093)]
[Thread 0x76fa8b70 (LWP 4093) exited]
[New Thread 0x76fa8b70 (LWP 4094)]
[Thread 0x76fa8b70 (LWP 4094) exited]

last object overwritten

C stack backtrace:
/home/ubuntu/Pharo/vm/cogVM/blessed/results/CogMTVM[0x809fac4]
/home/ubuntu/Pharo/vm/cogVM/blessed/results/CogMTVM(error+0x1f)[0x809fd81]
/home/ubuntu/Pharo/vm/cogVM/blessed/results/CogMTVM[0x807513f]
/home/ubuntu/Pharo/vm/cogVM/blessed/results/CogMTVM(createClosureNumArgsnumCopiedstartpc+0x79)[0x807d810]
/home/ubuntu/Pharo/vm/cogVM/blessed/results/CogMTVM[0x806a7ad]
[0x77fab5f9]
/home/ubuntu/Pharo/vm/cogVM/blessed/results/CogMTVM[0x8094038]
/home/ubuntu/Pharo/vm/cogVM/blessed/results/CogMTVM[0x8094f24]
/home/ubuntu/Pharo/vm/cogVM/blessed/results/CogMTVM(interpret+0x1a)[0x808d9ee]
/home/ubuntu/Pharo/vm/cogVM/blessed/results/CogMTVM(main+0x467)[0x80a153e]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0x2c3b56]
/home/ubuntu/Pharo/vm/cogVM/blessed/results/CogMTVM[0x805cf51]


Smalltalk stack dump:
0xbff6757c M DBXConnection>open 2041076120: a(n) DBXConnection
0xbff6759c M DBXOptionsTest>testMultipleStatmentsDMLAndSQL 2040650584: a(n) DBXOptionsTest
0xbff675b4 M DBXOptionsTest(TestCase)>performTest 2040650584: a(n) DBXOptionsTest
0xbff675cc M [] in DBXOptionsTest(TestCase)>runCase 2040650584: a(n) DBXOptionsTest
0xbff675ec M BlockClosure>ensure: 2041046896: a(n) BlockClosure
0xbff67608 M DBXOptionsTest(TestCase)>runCase 2040650584: a(n) DBXOptionsTest
0xbff67624 M [] in TestResult>runCase: 2040603244: a(n) TestResult
0xbff67640 M BlockClosure>on:do: 2041045340: a(n) BlockClosure
0xbff67660 M TestResult>runCase: 2040603244: a(n) TestResult
0xbff6767c M DBXOptionsTest(TestCase)>run: 2040650584: a(n) DBXOptionsTest
0xbff67698 M TestRunner>runTest: 2037383412: a(n) TestRunner
0xbff676bc I [] in TestRunner>runSuite: 2037383412: a(n) TestRunner
0xbff676f4 M [] in OrderedCollection(Collection)>do:displayingProgress:every: 2040650324: a(n) OrderedCollection
0xbff67714 M OrderedCollection>do: 2040650324: a(n) OrderedCollection
0xbff6774c I [] in OrderedCollection(Collection)>do:displayingProgress:every: 2040650324: a(n) OrderedCollection
0xbff5f154 M [] in ProgressInitiationException>defaultMorphicAction 2040674072: a(n) ProgressInitiationException
0xbff5f170 M BlockClosure>on:do: 2040675664: a(n) BlockClosure
0xbff5f1a0 I [] in ProgressInitiationException>defaultMorphicAction 2040674072: a(n) ProgressInitiationException
0xbff5f1c0 M BlockClosure>ensure: 2040675528: a(n) BlockClosure
0xbff5f1ec I ProgressInitiationException>defaultMorphicAction 2040674072: a(n) ProgressInitiationException
0xbff5f20c I MorphicUIManager>progressInitiationExceptionDefaultAction: 2040674304: a(n) MorphicUIManager
0xbff5f230 I ProgressInitiationException>defaultAction 2040674072: a(n) ProgressInitiationException
0xbff5f254 I UndefinedObject>handleSignal: 2013966340: a(n) UndefinedObject
0xbff5f27c I MethodContext(ContextPart)>handleSignal: 2040654700: a(n) MethodContext
0xbff5f2a0 I ProgressInitiationException(Exception)>signal 2040674072: a(n) ProgressInitiationException
0xbff5f2c0 I ProgressInitiationException>display:at:from:to:during: 2040674072: a(n) ProgressInitiationException
0xbff5f2f4 I ProgressInitiationException class>display:at:from:to:during: 2014888328: a(n) ProgressInitiationException class
0xbff5f328 I ByteString(String)>displayProgressAt:from:to:during: 2024460308: a(n) ByteString
0xbff5f364 I OrderedCollection(Collection)>do:displayingProgress:every: 2040650324: a(n) OrderedCollection
0xbff5f390 I OrderedCollection(Collection)>do:displayingProgress: 2040650324: a(n) OrderedCollection
0xbff5f3c0 I [] in TestRunner>basicRunSuite:do: 2037383412: a(n) TestRunner
0xbff5f3e0 M BlockClosure>ensure: 2040673860: a(n) BlockClosure
0xbff5f404 I TestRunner>basicRunSuite:do: 2037383412: a(n) TestRunner
0xbff5f42c I TestRunner>runSuite: 2037383412: a(n) TestRunner
0xbff5f448 M TestRunner>runAll 2037383412: a(n) TestRunner
0xbff5f468 I PluggableButtonMorph>performAction 2037402932: a(n) PluggableButtonMorph
0xbff5f484 M [] in PluggableButtonMorph>mouseUp: 2037402932: a(n) PluggableButtonMorph
0xbff5f4a8 M Array(SequenceableCollection)>do: 2040603100: a(n) Array
0xbff5f4c8 M PluggableButtonMorph>mouseUp: 2037402932: a(n) PluggableButtonMorph
0xbff5f4e4 M PluggableButtonMorph(Morph)>handleMouseUp: 2037402932: a(n) PluggableButtonMorph
0xbff5f500 M MouseButtonEvent>sentTo: 2040603060: a(n) MouseButtonEvent
0xbff5f51c M PluggableButtonMorph(Morph)>handleEvent: 2037402932: a(n) PluggableButtonMorph
0xbff5f538 M PluggableButtonMorph(Morph)>handleFocusEvent: 2037402932: a(n) PluggableButtonMorph
0xbff5f560 M [] in HandMorph>sendFocusEvent:to:clear: 2015348564: a(n) HandMorph
0xbff5f57c M [] in PasteUpMorph>becomeActiveDuring: 2016422820: a(n) PasteUpMorph
0xbff5f598 M BlockClosure>on:do: 2040603008: a(n) BlockClosure
0xbff5f5c4 M PasteUpMorph>becomeActiveDuring: 2016422820: a(n) PasteUpMorph
0xbff5f5e8 M HandMorph>sendFocusEvent:to:clear: 2015348564: a(n) HandMorph
0xbff5f610 M HandMorph>sendEvent:focus:clear: 2015348564: a(n) HandMorph
0xbff5f634 M HandMorph>sendMouseEvent: 2015348564: a(n) HandMorph
0xbff5f658 M HandMorph>handleEvent: 2015348564: a(n) HandMorph
0xbff5f684 M HandMorph>processEvents 2015348564: a(n) HandMorph
0xbff5f69c M [] in WorldState>doOneCycleNowFor: 2017797024: a(n) WorldState
0xbff5f6c0 M Array(SequenceableCollection)>do: 2013980016: a(n) Array
0xbff5f6dc M WorldState>handsDo: 2017797024: a(n) WorldState
0xbff5f6f8 M WorldState>doOneCycleNowFor: 2017797024: a(n) WorldState
0xbff5f714 M WorldState>doOneCycleFor: 2017797024: a(n) WorldState
0xbff5f730 M PasteUpMorph>doOneCycle 2016422820: a(n) PasteUpMorph
0xbff5f750 I [] in Project class>? 2017269776: a(n) Project class
2016664036 s [] in BlockClosure>?

Most recent primitives
stringHash:initialHash:
stringHash:initialHash:
basicNew
basicNew
apiQuery:query:length:
millisecondClockValue
signal
primSignal:atMilliseconds:
millisecondClockValue
wait
primGetNextEvent:
millisecondClockValue
wait
signal
millisecondClockValue
primSignal:atMilliseconds:
millisecondClockValue
wait
signal
wait
basicNew:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
species
basicNew:
replaceFrom:to:with:startingAt:
replaceFrom:to:with:startingAt:
species
basicNew:
replaceFrom:to:with:startingAt:
replaceFrom:to:with:startingAt:
species
basicNew:
replaceFrom:to:with:startingAt:
replaceFrom:to:with:startingAt:
stringHash:initialHash:
basicNew:
at:put:
basicNew:
basicNew
integerAt:put:size:signed:
integerAt:put:size:signed:
apiQueryResult:handle:timeout:chunk:
stringHash:initialHash:
stringHash:initialHash:
apiQueryRowsAffected:
stringHash:initialHash:
basicNew
apiQueryFinalize:
stringHash:initialHash:
stringHash:initialHash:
basicNew
basicNew:
at:put:
basicNew:
basicNew
integerAt:put:size:signed:
integerAt:put:size:signed:
apiQueryResult:handle:timeout:chunk:
stringHash:initialHash:
stringHash:initialHash:
basicNew
basicNew
apiQuery:query:length:
basicNew:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
species
basicNew:
replaceFrom:to:with:startingAt:
replaceFrom:to:with:startingAt:
species
basicNew:
replaceFrom:to:with:startingAt:
replaceFrom:to:with:startingAt:
species
basicNew:
replaceFrom:to:with:startingAt:
replaceFrom:to:with:startingAt:
stringHash:initialHash:
basicNew:
at:put:
basicNew:
basicNew
integerAt:put:size:signed:
integerAt:put:size:signed:
apiQueryResult:handle:timeout:chunk:
stringHash:initialHash:
stringHash:initialHash:
apiQueryRowsAffected:
stringHash:initialHash:
basicNew
apiQueryFinalize:
stringHash:initialHash:
stringHash:initialHash:
basicNew
basicNew:
at:put:
basicNew:
basicNew
integerAt:put:size:signed:
integerAt:put:size:signed:
apiQueryResult:handle:timeout:chunk:
stringHash:initialHash:
stringHash:initialHash:
basicNew
basicNew
apiQuery:query:length:
basicNew:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
species
basicNew:
replaceFrom:to:with:startingAt:
replaceFrom:to:with:startingAt:
species
basicNew:
replaceFrom:to:with:startingAt:
replaceFrom:to:with:startingAt:
species
basicNew:
replaceFrom:to:with:startingAt:
replaceFrom:to:with:startingAt:
stringHash:initialHash:
basicNew:
at:put:
basicNew:
basicNew
integerAt:put:size:signed:
integerAt:put:size:signed:
apiQueryResult:handle:timeout:chunk:
stringHash:initialHash:
stringHash:initialHash:
apiQueryRowsAffected:
stringHash:initialHash:
basicNew
apiQueryFinalize:
stringHash:initialHash:
stringHash:initialHash:
basicNew
basicNew:
at:put:
basicNew:
basicNew
integerAt:put:size:signed:
integerAt:put:size:signed:
apiQueryResult:handle:timeout:chunk:
stringHash:initialHash:
stringHash:initialHash:
basicNew
basicNew
apiQuery:query:length:
millisecondClockValue
signal
primSignal:atMilliseconds:
millisecondClockValue
wait
primGetNextEvent:
millisecondClockValue
wait
signal
millisecondClockValue
primSignal:atMilliseconds:
millisecondClockValue
wait
signal
wait
basicNew:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
byteAt:put:
species
basicNew:
replaceFrom:to:with:startingAt:
replaceFrom:to:with:startingAt:
species
basicNew:
replaceFrom:to:with:startingAt:
replaceFrom:to:with:startingAt:
species
basicNew:
replaceFrom:to:with:startingAt:
replaceFrom:to:with:startingAt:
stringHash:initialHash:
basicNew:
at:put:
basicNew:
basicNew
integerAt:put:size:signed:
integerAt:put:size:signed:
apiQueryResult:handle:timeout:chunk:
stringHash:initialHash:
stringHash:initialHash:
apiQueryRowsAffected:
stringHash:initialHash:
basicNew
apiQueryFinalize:
stringHash:initialHash:
stringHash:initialHash:
basicNew
basicNew:
at:put:
basicNew:
basicNew
integerAt:put:size:signed:
integerAt:put:size:signed:
apiQueryResult:handle:timeout:chunk:
stringHash:initialHash:
stringHash:initialHash:
apiUnbind:
stringHash:initialHash:
apiFinalize:
stringHash:initialHash:
perform:
basicNew
basicNew
basicNew
compare:with:collated:
basicNew
basicNew
basicNew:
at:put:
apiInitialize:backend:host:port:
stringHash:initialHash:
stringHash:initialHash:
at:put:
basicNew:
at:put:
apiGetOption:option:value:

Program received signal SIGABRT, Aborted.
0x00d02422 in __kernel_vsyscall ()
(gdb)


--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: Co crash with FFI

Igor Stasenko
 
warning: Process doesn't have threadId; VM will not thread

this message indicating that you using an images which don't support
threading per process basis (or yielding are not enabled by default).

It should be there in latest Pharo-Core1.3 images , see
Process threadId ivar
and
SmalltalkImage>>processPreemptionYields: aBoolean


--
Best regards,
Igor Stasenko AKA sig.
Reply | Threaded
Open this post in threaded view
|

Re: Co crash with FFI

Mariano Martinez Peck
 


On Mon, Apr 18, 2011 at 1:19 PM, Igor Stasenko <[hidden email]> wrote:

warning: Process doesn't have threadId; VM will not thread

this message indicating that you using an images which don't support
threading per process basis (or yielding are not enabled by default).

It should be there in latest Pharo-Core1.3 images , see
Process threadId ivar
and
SmalltalkImage>>processPreemptionYields: aBoolean


Thanks Igor. Yes, I know that. But if I don't set that, I guess it should not crash but just work non-multithread, should it ?

In fact, that crash only happens in Linux. In Mac, the same VM with the same FFI plugin and same tests doesn't crash.

cheers

Mariano
 

--
Best regards,
Igor Stasenko AKA sig.



--
Mariano
http://marianopeck.wordpress.com