uname -a Linux sig-desktop 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009 i686 GNU/Linux
The image i run was not Cog-ready:
sig@sig-desktop:~/cogvm$ ./squeak ~/squeak/NativeBoost.image
Segmentation fault
Smalltalk stack dump: 0xbfa58d68 M GradientFillStyle>scaledAlphaMix:of:with: 2039648948: a(n) GradientFillStyle 0xbfa58dbc M [] in GradientFillStyle>computePixelRampOfSize: 2039648948: a(n) GradientFillStyle 0xbfa58ddc M SortedCollection(OrderedCollection)>do: 2039649272: a(n) SortedCollection 0xbfa58e14 I GradientFillStyle>computePixelRampOfSize: 2039648948: a(n) GradientFillStyle 0xbfa58e38 I [] in GradientFillStyle class>initPixelRampCache 2012018000: a(n) GradientFillStyle class 0xbfa58e68 M LRUCache>at: 2016558228: a(n) LRUCache 0xbfa58e84 M GradientFillStyle>pixelRamp 2039636440: a(n) GradientFillStyle
But this image was not Cog-ready.
Okay, i copied a cog-ready image:
sig@sig-desktop:~/cogvm$ ./squeak ./Squeak4.2-10382-alpha.image Segmentation fault sig@sig-desktop:~/cogvm$
What's interesting, that its have about 70% probability to crash almost instantry, it just blinking a newly-created host window, and then ending up with segfault. In another 30% of cases its not crashing immediately and opens a host window. But once i try do something, like resizing the window, it crashing.
And what is bad, that i can't even get a stack dump. This is all it prints:
sig@sig-desktop:~/cogvm$ ./squeak ./Squeak4.2-10382-alpha.image Segmentation fault sig@sig-desktop:~/cogvm$ ./squeak ./Squeak4.2-10382-alpha.image Segmentation fault sig@sig-desktop:~/cogvm$ ./squeak ./Squeak4.2-10382-alpha.image
I tried multiple couple different images:
sig@sig-desktop:~/cogvm$ ./squeak ./PharoCore-1.2-12159.image Segmentation fault sig@sig-desktop:~/cogvm$ ./squeak ./PharoCore-1.2-12159.image Segmentation fault sig@sig-desktop:~/cogvm$ ./squeak ./PharoCore-1.2-12159.image Segmentation fault sig@sig-desktop:~/cogvm$ ./squeak ./PharoCore-1.2-12159.image Segmentation fault
it starts, but then once i try to do something like clicking a mouse in window, it crashing.
I am also tried to use gdb to find where the problem , after attaching to running process:
gdb -p 25413
and continuing:
(gdb) cont Continuing.
It is then at some moment prints following:
Cannot find user-level thread for LWP 25416: generic error (gdb) bt Target is executing. (gdb) info threads 2 Thread 0x77857b70 (LWP 25416) (running) * 1 Thread 0xb78976c0 (LWP 25413) (running)
At that moment VM no longer responsive , while gdb still thinks that it running.. weird.
I am also rebuilt VM with full debug into (as specified in HowToBuild) hoping to get some more info, but got the same results :(
Even core dump can't help much:
Core was generated by `./lib/squeak/3.9-7/squeak PharoCore-1.2-12159.image'. Program terminated with signal 11, Segmentation fault. #0 0x009012db in ?? () (gdb) bt #0 0x009012db in ?? () #1 0x00906fc0 in ?? () #2 <signal handler called> #3 0x00754701 in ?? () #4 0x00755470 in ?? () #5 0x0074d80e in ?? () #6 0x00bec7ee in ?? () (gdb) info threads 2 Thread 12620 0x08085c02 in ?? () * 1 Thread 12623 0x009012db in ?? ()
While prebuilt VM , downloaded from http://www.mirandabanda.org/files/Cog/VM/VM.r2316/coglinux.tgz
works well. Any comments on this issue?
I am currently upgrading my ubuntu install. Maybe with newer gdb i can at least see where it segfaults.
Okay, i found where the problem (if anyone interested).
A HowToBuild file says use following command to configure it: ../../platforms/unix/config/configure CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -DDEBUGVM=0" LIBS=-lpthread
The last one "LIBS=-lpthread" caused repeating -lpthread twice in makefiles:
LIBS= -lutil -ldl -lpthread -lm -lnsl -lpthread
Interesting that it builds w/o any errors/warnings, but crashing soon after few interactions after image startup. And i think this was the source of gdb confusion as well.
So, the solution is simply NOT put "LIBS=-lpthread" in configure command.
P.S. now, please repeat it for me again: C is better than ...XYZ ? :)
Thanks, Igor. I'm integrating this advice into unixbuild/HowToBuild.
On Tue, Oct 5, 2010 at 3:31 PM, Igor Stasenko siguctua@gmail.com wrote:
Okay, i found where the problem (if anyone interested).
A HowToBuild file says use following command to configure it: ../../platforms/unix/config/configure CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -DDEBUGVM=0" LIBS=-lpthread
The last one "LIBS=-lpthread" caused repeating -lpthread twice in makefiles:
LIBS= -lutil -ldl -lpthread -lm -lnsl -lpthread
Interesting that it builds w/o any errors/warnings, but crashing soon after few interactions after image startup. And i think this was the source of gdb confusion as well.
So, the solution is simply NOT put "LIBS=-lpthread" in configure command.
P.S. now, please repeat it for me again: C is better than ...XYZ ? :)
-- Best regards, Igor Stasenko AKA sig.
vm-dev@lists.squeakfoundation.org