[M3devel] garbage collection problem on LINUXLIBC6?

Daniel Alejandro Benavides D. dabenavidesd at yahoo.es
Wed May 28 04:10:05 CEST 2008


Dear developers:
I have finally understood that the issue was related with the terminal emulator from which I launched the M3 executables. All M3 executables are fine and working well.
Thanks for your attention.

--- 24/5/08, Daniel Alejandro Benavides D. <dabenavidesd at yahoo.es> wrote:
De: Daniel Alejandro Benavides D. <dabenavidesd at yahoo.es>
Asunto: Re: [M3devel] garbage collection problem on LINUXLIBC6?
Para: m3devel at elegosoft.com
Fecha: sábado, 24 mayo, 2008 12:29

Hi:
I recently have compiled the cm3 system with good results on a 2-core machine on LINUXLIBC6, kubuntu of 32 bits. It runs gui applications of cm3 with no problems at all.
I think maybe the issue is related with something about the operating system, or at least the machine, I didn't check this until now.

Thanks

--- 19/5/08, Daniel Alejandro Benavides D. <dabenavidesd at yahoo.es> wrote:
De: Daniel Alejandro Benavides D. <dabenavidesd at yahoo.es>
Asunto: Re: [M3devel] garbage collection problem on LINUXLIBC6?
Para: m3devel at elegosoft.com, "Randy Coleburn"
 <rcoleburn at scires.com>
Fecha: lunes, 19 mayo, 2008 12:02

Hi again:
and the process is using the cpu very much (using top command)

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 9758 daniel    20   0 33644 3836 2684 R 60.0  0.7   1:05.17 draw

Thanks in advance.


--- 19/5/08, Daniel Alejandro Benavides D. <dabenavidesd at yahoo.es> wrote:
De: Daniel Alejandro
 Benavides D. <dabenavidesd at yahoo.es>
Asunto: Re: [M3devel] garbage collection problem on LINUXLIBC6?
Para: m3devel at elegosoft.com, "Randy Coleburn" <rcoleburn at scires.com>
Fecha: lunes, 19 mayo, 2008 11:52

Hi Randy:
In my case, the program just doesn't start, maybe after some minutes yes, but obviously this is abnormal.
When I start mentor @M3tracelinker, I got after a lot of output the following lines and it just doesn't start after it:
  ../src/color/Color.i3(3)
  ../src/runtime/common/RTHooks.i3(3)
RunMainBody: exec: ../src/color/ColorNameTable.i3(3)
RunMainBody: exec: ../src/color/ColorNameF.i3(3)
RunMainBody: exec:
 ../src/color/ColorNa

But if I put @M3nogc @M3tracelinker the program starts and the output is:
RunMainBody: ../LINUXLIBC6/MentorBundle.m3(2)
  ../LINUXLIBC6/MentorBundle.i3(5)
  ../src/rw/TextWr.i3(3)
  ../src/rw/Wr.i3(3)
 
 ../src/thread/Common/Thread.i3(3)
  ../src/text/Text.i3(3)
  ../src/bundleintf/BundleRep.i3(3)
  ../src/bundleintf/Bundle.i3(3)
 
 ../src/runtime/common/RTHooks.i3(3)
RunMainBody: exec: ../LINUXLIBC6/MentorBundle.m3(3)
RunMainBody: exec: ../LINUXLIBC6/MentorBundle.i3(3)
RunMainBody: exec: ../src/Main.m3(3)

However when examining a simple gui program, the stdout shows the same  out for @M3tracelinker with or without garbage collection

  ../src/split/TextVBT.i3(5)
  ../src/runtime/common/RTHooks.i3(3)
RunMainBody: exec: ../src/split/TextVBTClass.i3(3)
RunMainBody: exec: ../src/split/TextVBT.m3(3)
RunMainBody: exec: ../src/split/TextVBT.i3(3)
RunMainBody: exec: ../src/Draw.m3(3)

If I run the program under m3gdb without parametres, breaking on RTLinker.RunMainBody, I got:
Breakpoint 3, RunMainBody (m=16_b7e108c0)
    at ../src/runtime/common/RTLinker.m3:349
349       VAR desc, desc2: InitPtr;  imp: RT0.ImportPtr;  m2:
 RT0.ModulePtr;
(m3gdb)
Continuando.

Breakpoint 3, RunMainBody (m=16_b7e10ba0)
    at ../src/runtime/common/RTLinker.m3:349
349       VAR desc, desc2: InitPtr;  imp: RT0.ImportPtr;  m2: RT0.ModulePtr;
(m3gdb)
Continuando.

Breakpoint 3, RunMainBody (m=16_b7e0b660)
    at ../src/runtime/common/RTLinker.m3:349
349       VAR desc, desc2: InitPtr;  imp: RT0.ImportPtr;  m2: RT0.ModulePtr;
(m3gdb)
Continuando.


[Nuevo Thread -1234015344 (LWP 9706)]
[Thread -1234015344 (LWP 9706) exited]

And the program hangs there.
And again the same situation on the stack trace when killing the process inside m3gdb (also got a segment violation on m3gdb):

(m3gdb) where
#0  0xb7fbf410 in __kernel_vsyscall ()
#1  0xb7108ae7 in pthread_kill () from
 /lib/tls/i686/cmov/libpthread.so.0
#2  0xb737c397 in SignalThread (act=16_08055d88, state=Stopping)
    at ../src/thread/PTHREAD/ThreadPThread.m3:1058
#3  0xb737c6dc in StopWorld () at ../src/thread/PTHREAD/ThreadPThread.m3:1142
#4  0xb737b9e7 in SuspendOthers ()
    at ../src/thread/PTHREAD/ThreadPThread.m3:905
#5  0xb7355244 in CollectSomeInStateZero ()
    at ../src/runtime/common/RTCollector.m3:755
#6  0xb7355203 in CollectSome () at ../src/runtime/common/RTCollector.m3:729
#7  0xb7354c24 in CollectEnough () at ../src/runtime/common/RTCollector.m3:656
#8  0xb73586c1 in AllocTraced (def=16_b7dfbfb4, dataSize=456, dataAlignment=4,
    initProc=Static link does not lead to a valid frame.
) at ../src/runtime/common/RTCollector.m3:1462
#9  0xb734af25 in GetTracedObj (def=16_b7dfbfb4)
    at
 ../src/runtime/common/RTAllocator.m3:206
#10 0xb734a9b0 in AllocateTracedObj (defn=16_b7dfbfb4)
    at ../src/runtime/common/RTAllocator.m3:131
#11 0xb7d63df5 in Connect (inst=NIL, trsl=NIL) at ../src/xvbt/XClientF.m3:495
#12 0xb7d66717 in DoConnect (self=16_b6f41d5c, inst=NIL, localOnly=FALSE,
    t=NIL) at ../src/xvbt/XClientF.m3:637
#13 0xb7d46c23 in DoConnect (self=16_b6f41d5c, inst=NIL, localOnly=FALSE,
    t=NIL) at ../src/xvbt/XClient.m3:1495
#14 0xb7d9962c in Connect (inst=NIL, localOnly=FALSE)
---Type <return> to continue, or q <return> to quit---
    at ../src/vbt/TrestleClass.m3:30
#15 0xb7df2117 in Default () at ../src/trestle/Trestle.m3:838
#16 0xb7ded789 in PreAttach (v=16_b6f41cf8, trsl=NIL)
    at ../src/trestle/Trestle.m3:264
#17 0xb7deb95b in Install (v=16_b6f41cf8, applName=NIL, inst=NIL,
Fallo de
 segmentación


Maybe could be some gcc backend issue?
I would like to know if others have the same problem.
Thanks.
  
--- 19/5/08, Randy Coleburn <rcoleburn at scires.com> wrote:
De: Randy Coleburn <rcoleburn at scires.com>
Asunto: Re: [M3devel] garbage collection problem on LINUXLIBC6?
Para: m3devel at elegosoft.com
Fecha: lunes, 19 mayo, 2008 10:08


 
Daniel, I have this same problem on GUI applications created on cm3 v4.1.  If I don't put "@M3novm" on the command line, the programs crash during startup.  It has something to do with the garbage collector.  In my testing of cm3 d5.7.0 on Windows XP, I have not run into the problem yet, so I think Tony has fixed it with his new garbage collector, at least on Windows.
Regards,
Randy

>>> "Daniel Alejandro Benavides D." <dabenavidesd at yahoo.es> 5/18/2008 6:39 PM >>>




Dear developers:
I'm running a new installed cm3 on an ubuntu 8.04 32 bits, and I can't run anything with gui if I don't use @M3nogc
The rest of the applications, the compiler, and m3browser seem to work without problems ¿?
I'm debugging mentor but I just got this until now:
Breakpoint 5, Init () at ../src/color/ColorName.m3:207
207           IF table.put (NormalizeName (Basic [i].name), i) THEN
(m3gdb) where
#0  Init () at ../src/color/ColorName.m3:207
#1  0xb7c7b7ff in ColorName (mode=1) at ../src/color/ColorName.m3:214
#2  0xb70e2389 in RunMainBody (m=16_b7ca2fa0) at ../src/runtime/common/RTLinker.m3:399
#3  0xb70e2055 in RunMainBody (m=16_b7d38100) at ../src/runtime/common/RTLinker.m3:379
#4  0xb70e2055 in RunMainBody (m=16_b7d2fe20) at ../src/runtime/common/RTLinker.m3:379
#5  0xb70e2055 in RunMainBody (m=16_b7d34480) at
 ../src/runtime/common/RTLinker.m3:379
#6  0xb70e2055 in RunMainBody (m=16_b7d30d60) at ../src/runtime/common/RTLinker.m3:379
#7  0xb70e2055 in RunMainBody (m=16_b7d4d620) at ../src/runtime/common/RTLinker.m3:379
#8  0xb70e2055 in RunMainBody (m=16_b7e31d80) at ../src/runtime/common/RTLinker.m3:379
#9  0xb70e2055 in RunMainBody (m=16_b7e33220) at ../src/runtime/common/RTLinker.m3:379
#10 0xb70e2055 in RunMainBody (m=16_b7e36d40) at ../src/runtime/common/RTLinker.m3:379
#11 0xb70e2055 in RunMainBody (m=16_b7e364e0) at ../src/runtime/common/RTLinker.m3:379
#12 0xb70e2055 in RunMainBody (m=16_b7e36ba0) at ../src/runtime/common/RTLinker.m3:379
#13 0xb70e2055 in RunMainBody (m=16_b7e32cc0) at ../src/runtime/common/RTLinker.m3:379
#14 0xb70e2055 in RunMainBody (m=16_b7e32900) at ../src/runtime/common/RTLinker.m3:379
#15 0xb70e2055 in RunMainBody (m=16_08255600) at ../src/runtime/common/RTLinker.m3:379
#16
 0xb70e2055 in RunMainBody (m=16_08256040) at ../src/runtime/common/RTLinker.m3:379
#17 0xb70e2055 in RunMainBody (m=16_08312aa0) at ../src/runtime/common/RTLinker.m3:379
#18 0xb70e0dff in AddUnitI (m=16_08312aa0) at ../src/runtime/common/RTLinker.m3:113
#19 0xb70e0e8d in AddUnit (b={"Main_M3", Declared at: ../src/Main.m3:164}) at ../src/runtime/common/RTLinker.m3:122
#20 0x0806df1e in main (argc=3, argv=0xbfa03774, envp=0xbfa03784) at _m3main.mc:4
#21 0xb6d44450 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#22 0x0806de71 in _start ()
(m3gdb) cont
Continuando.

Breakpoint 5, Init () at ../src/color/ColorName.m3:207
207           IF table.put (NormalizeName (Basic [i].name), i) THEN
(m3gdb) cont
and the process hangs there when debugging mentor.

I have checked  Juno under m3gdb after have killed it and got:

(m3gdb) where
#0 
 0xb7fb0410 in __kernel_vsyscall ()
#1  0xb7018ae7 in pthread_kill () from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb728c397 in SignalThread (act=16_0813c120, state=Stopping) at ../src/thread/PTHREAD/ThreadPThread.m3:1058
#3  0xb728c55e in StopWorld () at ../src/thread/PTHREAD/ThreadPThread.m3:1116
#4  0xb728b9e7 in SuspendOthers () at ../src/thread/PTHREAD/ThreadPThread.m3:905
#5  0xb7265244 in CollectSomeInStateZero () at ../src/runtime/common/RTCollector.m3:755
#6  0xb7265203 in CollectSome () at ../src/runtime/common/RTCollector.m3:729
#7  0xb7264c24 in CollectEnough () at ../src/runtime/common/RTCollector.m3:656
#8  0xb72686c1 in AllocTraced (def=16_b7be1400, dataSize=12, dataAlignment=4, initProc=NIL)
    at ../src/runtime/common/RTCollector.m3:1462
#9  0xb725ad8f in GetTracedRef (def=16_b7be1400) at ../src/runtime/common/RTAllocator.m3:191
#10 0xb725a987
 in AllocateTracedRef (defn=16_b7be1400) at ../src/runtime/common/RTAllocator.m3:126
#11 0xb7b5d8fb in Put (tbl=16_b6e50438, key=8047, val=244) at ../LINUXLIBC6/IntIntTbl.m3 => ../src/table/Table.mg:127
#12 0xb7dd4e2c in Set (a='>', b='o', c=244, bothCases=FALSE, reversed=TRUE) at ../src/etext/KeyFilter.m3:288
#13 0xb7dd521c in Set (a='o', b='>', c=244, bothCases=FALSE, reversed=FALSE) at ../src/etext/KeyFilter.m3:304
#14 0xb7dd5882 in KeyFilter (mode=1) at ../src/etext/KeyFilter.m3:437
#15 0xb7273389 in RunMainBody (m=16_b7e51da0) at ../src/runtime/common/RTLinker.m3:399
#16 0xb7273055 in RunMainBody (m=16_b7e547e0) at ../src/runtime/common/RTLinker.m3:379
#17 0xb7273055 in RunMainBody (m=16_b7e56c00) at ../src/runtime/common/RTLinker.m3:379
#18 0xb7273055 in RunMainBody (m=16_b7e54240) at ../src/runtime/common/RTLinker.m3:379
#19 0xb7273055 in RunMainBody (m=16_b7e537e0) at
 ../src/runtime/common/RTLinker.m3:379
#20 0xb7273055 in RunMainBody (m=16_080b85a0) at ../src/runtime/common/RTLinker.m3:379
#21 0xb7271dff in AddUnitI (m=16_080b85a0) at ../src/runtime/common/RTLinker.m3:113
#22 0xb7271e8d in AddUnit (b={"Juno_M3", Declared at: ../src/Juno.m3:1974}) at ../src/runtime/common/RTLinker.m3:122
#23 0x0805120e in main (argc=1, argv=0xbf96ff14, envp=0xbf96ff1c) at _m3main.mc:4
#24 0xb6ed5450 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#25 0x08051161 in _start ()


When killing mentor under m3gdb it shows like the same back trace:
(m3gdb) where
#0  0xb70fb39a in SignalThread (act=16_0834ff08, state=Stopping) at ../src/thread/PTHREAD/ThreadPThread.m3:1058
#1  0xb70fb6dc in StopWorld () at ../src/thread/PTHREAD/ThreadPThread.m3:1142
#2  0xb70fa9e7 in SuspendOthers () at ../src/thread/PTHREAD/ThreadPThread.m3:905
#3  0xb70d4244 in CollectSomeInStateZero
 () at ../src/runtime/common/RTCollector.m3:755
#4  0xb70d4203 in CollectSome () at ../src/runtime/common/RTCollector.m3:729
#5  0xb70d3c24 in CollectEnough () at ../src/runtime/common/RTCollector.m3:656
#6  0xb70d76c1 in AllocTraced (def=16_b712d934, dataSize=24, dataAlignment=4, initProc=Static link does not lead to a valid frame.
)
    at ../src/runtime/common/RTCollector.m3:1462
#7  0xb70c9f25 in GetTracedObj (def=16_b712d934) at ../src/runtime/common/RTAllocator.m3:206
#8  0xb70c99b0 in AllocateTracedObj (defn=16_b712d934) at ../src/runtime/common/RTAllocator.m3:131
#9  0xb710d586 in New (a={'a','z','u','r','e','4'}) at ../src/text/Text8Short.m3:16
#10 0xb710ce87 in New (a={'a','z','u','r','e','4'}) at ../src/text/Text8.m3:18
#11 0xb710ba9d in FromChars (a={'a','z','u','r','e','4'}) at ../src/text/Text.m3:206
#12 0xb7c7a62f in NormalizeName (a=16_b7ca378c) at
 ../src/color/ColorName.m3:83
#13 0xb7c7b789 in Init () at ../src/color/ColorName.m3:207
#14 0xb7c7b7ff in ColorName (mode=1) at ../src/color/ColorName.m3:214
#15 0xb70e2389 in RunMainBody (m=16_b7ca2fa0) at ../src/runtime/common/RTLinker.m3:399
#16 0xb70e2055 in RunMainBody (m=16_b7d38100) at ../src/runtime/common/RTLinker.m3:379
#17 0xb70e2055 in RunMainBody (m=16_b7d2fe20) at ../src/runtime/common/RTLinker.m3:379
#18 0xb70e2055 in RunMainBody (m=16_b7d34480) at ../src/runtime/common/RTLinker.m3:379
#19 0xb70e2055 in RunMainBody (m=16_b7d30d60) at ../src/runtime/common/RTLinker.m3:379
#20 0xb70e2055 in RunMainBody (m=16_b7d4d620) at ../src/runtime/common/RTLinker.m3:379
#21 0xb70e2055 in RunMainBody (m=16_b7e31d80) at ../src/runtime/common/RTLinker.m3:379
#22 0xb70e2055 in RunMainBody (m=16_b7e33220) at ../src/runtime/common/RTLinker.m3:379
#23 0xb70e2055 in RunMainBody (m=16_b7e36d40) at
 ../src/runtime/common/RTLinker.m3:379
#24 0xb70e2055 in RunMainBody (m=16_b7e364e0) at ../src/runtime/common/RTLinker.m3:379
#25 0xb70e2055 in RunMainBody (m=16_b7e36ba0) at ../src/runtime/common/RTLinker.m3:379
#26 0xb70e2055 in RunMainBody (m=16_b7e32cc0) at ../src/runtime/common/RTLinker.m3:379
#27 0xb70e2055 in RunMainBody (m=16_b7e32900) at ../src/runtime/common/RTLinker.m3:379
#28 0xb70e2055 in RunMainBody (m=16_08255600) at ../src/runtime/common/RTLinker.m3:379
#29 0xb70e2055 in RunMainBody (m=16_08256040) at ../src/runtime/common/RTLinker.m3:379
#30 0xb70e2055 in RunMainBody (m=16_08312aa0) at ../src/runtime/common/RTLinker.m3:379
#31 0xb70e0dff in AddUnitI (m=16_08312aa0) at ../src/runtime/common/RTLinker.m3:113
#32 0xb70e0e8d in AddUnit (b={"Main_M3", Declared at: ../src/Main.m3:164}) at ../src/runtime/common/RTLinker.m3:122
#33 0x0806df1e in main (argc=3, argv=0xbfa03774, envp=0xbfa03784) at _m3main.mc:4
#34
 0xb6d44450 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#35 0x0806de71 in _start ()

Thanks in advance




Enviado desde Correo Yahoo!
La bandeja de entrada más inteligente.








      
Enviado desde Correo Yahoo!
La bandeja de entrada más inteligente.









      
Enviado desde Correo Yahoo!
La bandeja de entrada más inteligente.









      
Enviado desde Correo Yahoo!
La bandeja de entrada más inteligente.



      ______________________________________________ 
Enviado desde Correo Yahoo! La bandeja de entrada más inteligente.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080528/be162f1e/attachment-0002.html>


More information about the M3devel mailing list