Re[44]: [Gc]: GC + Windows Mobile + Threads + Patch for WINCE

Ivan Maidanski ivmai at mail.ru
Sun Nov 1 03:01:35 PST 2009


Hi!
Zeyi Lee <biosli at hotmail.com> wrote:
> Hi,
> Ivan Maidanski <ivmai at ...> writes:
> > >
> > > I test the version with several case on my WINCE box, as following:
> > > Case 1:
> > > -DALL_INTERIOR_POINTERS -DGC_GCJ_SUPPORT -DATOMIC_UNCOLLECTABLE
> > > -DNO_DEBUGGING -DGC_THREADS -DUSE_MUNMAP -DTHREAD_LOCAL_ALLOC
> > > -DPARALLEL_MARK -DGC_ASSERTIONS -DMAKE_BACK_GRAPH -DGC_MIN_MARKERS=2 /link /stack:65536
> > > and -DVERY_SMALL_CONFIG
> > >
> > > I got a Data Abort as below:
> > > -------------------
> > > Data Abort: Thread=8efce000 Proc=8c398520 'test_libgcd_Wince.exe'
> > > AKY=00040001 PC=0001a9d4(test_libgcd_Wince.exe+0x0000a9d4)
> > RA=0001a1e4(test_libgcd_Wince.exe+0x0000a1e4) BVA=2787fc0c FSR=00000007
> > > -------------------
> > > Then the program runs to the end.
> > > ...
> > > Collector appears to work
> > > ------------------------
> >
> > The situation is unclear to me.
> >
> > 1. Could you tell me the backtrace?
>
>  There is no DebugBreak and I don't know where makes the Data Abort.

I don't know neither. Try to set a breakpoint at that PC value (this may be not the same backtrace as which results in data abort but...

>
>
> >
> > 2. Could you tell me the contents of verInfo in GC_setpagesize() (after calling GetVersionEx)?
>
>
>  Yes.
> -------------------------
> -  verInfo {dwOSVersionInfoSize=276 dwMajorVersion=5 dwMinorVersion=1 ...} _OSVERSIONINFOW
> ...

Ok.

> > 3. Does Data Abort also occur without -DMAKE_BACK_GRAPH?
> Yes, without -DMAKE_BACK_GRAPH the Data Abort also occurs.

So, in your project (with your options) Data Abort also occurs, right?
What are the options? (Announce the full list, please.)

Could you tell me the moment from which Data Abort began to occur?

>
> > > Case 2:
> > > I defined MAKE_BACK_GRAPH, VERY_SMALL_CONFIG, stack = 65536, and retest, then I got a Debugbreak.
> > > -----------------
> > > Collecting from unknown thread.
> > > -----------------
> > > The Case 2 I runs in Win32, I got the same DebugBreak.
> > > I send the two backtrace files as attachment.
> >
> > This is unclear too.
> >
> > The backtraces say the thread is called from GC_win32_start_inner() which should also register the
> > thread, so either the thread is unregistered somewhere or thread->id is trashed somewhere. Could you
> > compile it for Win32 adding also -DGC_PRINT_VERBOSE_STATS -DDEBUG_THREADS and tell me the contents of
> > the log file after the last "Initiating full world-stop collection!" line?
>
> I send the debug print as a attachment.

Still unclear...

The log in brief:

About to create a thread from 0xa50

About to create a thread from 0xa50
About to create a thread from 0xa50
About to create a thread from 0xa50

thread 0xad0 starting...

About to create a thread from 0xa50

Pushing stack for 0xa50 from sp 0012FA00 to 00130000 from 0xad0
Pushing stack for 0xad0 from sp 00ADFD58 to 00ADFF9C from 0xad0

thread 0xad4 starting...
thread 0x308 starting...
thread 0xbf4 starting...
thread 0x804 starting...

--> Marking for collection 4 after 84544 allocated bytes

Pushing stack for 0xad4 from sp 00CDFE20 to 00CDFF9C from 0x804
Pushing stack for 0xad4 from sp 00CDFE20 to 00CDFF9C from 0x804

--> Marking for collection 5 after 97856 allocated bytes

Pushing stack for 0xad4 from sp 00CDFE20 to 00CDFF9C from 0xbf4
Pushing stack for 0xad4 from sp 00CDFE20 to 00CDFF9C from 0xbf4

--> Marking for collection 6 after 97784 allocated bytes

Pushing stack for 0xad4 from sp 00CDFE20 to 00CDFF9C from 0xad0
Pushing stack for 0xad4 from sp 00CDFE20 to 00CDFF9C from 0xad0
Collecting from unknown thread.


It seems that an entry (0xad0) in GC_threads is replaced with a duplicate entry 0xad4 at some place. Could you debug GC_new_thread() and see the place which breaks GC_threads[]?

> BTW, I really don't know the debug print meaning.
> Is there any documents about that?

Yes, see doc/Readme.macros. (I've added it today.)

PS.

Hans -
I think THREAD_TABLE_SZ should be 257 (the comment says must be power of 2). Am I missing something?

Bye.


More information about the Gc mailing list