|
From: Colin P. A. <co...@co...> - 2008-02-29 13:29:48
|
As of today (I don't know when I last compiled it sucessfully),
gestalt (but not gexslt) seg-faults at start up, when compiled with
gec + boehm gc 7.0, but not without gec, nor when compiled with ISE
6.1.
This seems very strange. It requires both eposix and boehm gc to
produce the error (gexslt compiled with boehm gc does not produce the
error), but does not depend upon any eposix facilities being used
(just typing the command name - expecting the usage message, is
sufficent to seg-fault).
So I suspected a library change. doing an ldd on the executbles gives:
[colin@susannah gestalt]$ ldd ./gestalt
linux-vdso.so.1 => (0x00007fff8bbfe000)
libm.so.6 => /lib64/libm.so.6 (0x0000003eb4a00000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003eb5200000)
librt.so.1 => /lib64/librt.so.1 (0x0000003eb7200000)
libc.so.6 => /lib64/libc.so.6 (0x0000003eb4600000)
/lib64/ld-linux-x86-64.so.2 (0x0000003eb3400000)
[colin@susannah gestalt]$ ldd ~/gobo/bin/gexslt
linux-vdso.so.1 => (0x00007fff075fe000)
libm.so.6 => /lib64/libm.so.6 (0x0000003eb4a00000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003eb5200000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003ebec00000)
libc.so.6 => /lib64/libc.so.6 (0x0000003eb4600000)
/lib64/ld-linux-x86-64.so.2 (0x0000003eb3400000)
so the difference is that gestalt has librt whereas gexslt has
libgcc_s.
Librt has not been updated for a long time, and in any case, it is
linked in even without the boehm gc.
So I can't think of what might be the problem. Anyone have any ideas?
--
Colin Adams
Preston Lancashire
|
|
From: Eric B. <er...@go...> - 2008-02-29 13:57:22
|
Colin Paul Adams wrote: > As of today (I don't know when I last compiled it sucessfully), > gestalt (but not gexslt) seg-faults at start up, when compiled with > gec + boehm gc 7.0, but not without gec, nor when compiled with ISE > 6.1. > > This seems very strange. It requires both eposix and boehm gc to > produce the error (gexslt compiled with boehm gc does not produce the > error), but does not depend upon any eposix facilities being used > (just typing the command name - expecting the usage message, is > sufficent to seg-fault). > > So I suspected a library change. doing an ldd on the executbles gives: > > [colin@susannah gestalt]$ ldd ./gestalt > linux-vdso.so.1 => (0x00007fff8bbfe000) > libm.so.6 => /lib64/libm.so.6 (0x0000003eb4a00000) > libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003eb5200000) > librt.so.1 => /lib64/librt.so.1 (0x0000003eb7200000) > libc.so.6 => /lib64/libc.so.6 (0x0000003eb4600000) > /lib64/ld-linux-x86-64.so.2 (0x0000003eb3400000) > [colin@susannah gestalt]$ ldd ~/gobo/bin/gexslt > linux-vdso.so.1 => (0x00007fff075fe000) > libm.so.6 => /lib64/libm.so.6 (0x0000003eb4a00000) > libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003eb5200000) > libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003ebec00000) > libc.so.6 => /lib64/libc.so.6 (0x0000003eb4600000) > /lib64/ld-linux-x86-64.so.2 (0x0000003eb3400000) > > so the difference is that gestalt has librt whereas gexslt has > libgcc_s. > > Librt has not been updated for a long time, and in any case, it is > linked in even without the boehm gc. > > So I can't think of what might be the problem. Anyone have any ideas? Can you also run ldd on the executable of gestalt compiled with ISE 6.1? -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
|
From: Colin P. A. <co...@co...> - 2008-02-29 14:54:03
|
>>>>> "Eric" == Eric Bezault <er...@go...> writes:
> [colin@susannah gestalt]$ ldd ./gestalt
> linux-vdso.so.1 => (0x00007fff8bbfe000)
> libm.so.6 => /lib64/libm.so.6 (0x0000003eb4a00000)
> libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003eb5200000)
> librt.so.1 => /lib64/librt.so.1 (0x0000003eb7200000)
> libc.so.6 => /lib64/libc.so.6 (0x0000003eb4600000)
> /lib64/ld-linux-x86-64.so.2 (0x0000003eb3400000)
> [colin@susannah gestalt]$ ldd ~/gobo/bin/gexslt
> linux-vdso.so.1 => (0x00007fff075fe000)
> libm.so.6 => /lib64/libm.so.6 (0x0000003eb4a00000)
> libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003eb5200000)
> libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003ebec00000)
> libc.so.6 => /lib64/libc.so.6 (0x0000003eb4600000)
> /lib64/ld-linux-x86-64.so.2 (0x0000003eb3400000)
>
Eric> Can you also run ldd on the executable of gestalt compiled
Eric> with ISE 6.1?
[colin@susannah gestalt]$ ldd gestalt
linux-vdso.so.1 => (0x00007fff3fdfe000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003eb5200000)
librt.so.1 => /lib64/librt.so.1 (0x0000003eb7200000)
libm.so.6 => /lib64/libm.so.6 (0x0000003eb4a00000)
libc.so.6 => /lib64/libc.so.6 (0x0000003eb4600000)
/lib64/ld-linux-x86-64.so.2 (0x0000003eb3400000)
So its the same as when compiled with gec.
--
Colin Adams
Preston Lancashire
|
|
From: Eric B. <er...@go...> - 2008-02-29 19:36:10
|
Colin Paul Adams wrote: >>>>>> "Berend" == Berend de Boer <be...@po...> writes: > >>>>>> "Colin" == Colin Paul Adams <co...@co...> writes: > Colin> As of today (I don't know when I last compiled it Librt has > Colin> not been updated for a long time, and in any case, it is > Colin> linked in even without the boehm gc. > > Berend> You could try linking without. > > That works, but is not a solution. > > Colin> So I can't think of what might be the problem. Anyone have > Colin> any ideas? > > Berend> What I can think of is that eposix isn't 64 bit aware. I > Berend> have never tested it on a 64 bit platform, not having > Berend> access to one. Hopefully in a couple of months. > > Well it has been working satisfactorily for over a month. You can try to check-out the code from a couple of weeks ago (both Gobo and gestalt), bootstrap Gobo and see if it works. If it works, then we have to see if the problem comes from the code evolution, or from gec's evolution. -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
|
From: Eric B. <er...@go...> - 2008-03-01 07:36:17
|
Colin Paul Adams wrote:
> As of today (I don't know when I last compiled it sucessfully),
> gestalt (but not gexslt) seg-faults at start up, when compiled with
> gec + boehm gc 7.0, but not without gec, nor when compiled with ISE
> 6.1.
>
> This seems very strange. It requires both eposix and boehm gc to
> produce the error (gexslt compiled with boehm gc does not produce the
> error), but does not depend upon any eposix facilities being used
> (just typing the command name - expecting the usage message, is
> sufficent to seg-fault).
> So I can't think of what might be the problem. Anyone have any ideas?
If the problem comes from gec, it might be a consequence of that:
* When gec compiles an application with the Boehm GC, it now generates
code that will let the GC trigger the feature `dispose' when objects
are reclaimed.
You can try to edit the file $GOBO/tool/gec/runtime/c/ge_gc.h and
replace line 68:
#define GE_register_dispose(obj, disp)
GC_REGISTER_FINALIZER((void*)(obj), (void (*) (void*, void*))
&GE_boehm_dispose, (void*)(disp), NULL, NULL)
by:
#define GE_register_dispose(obj, disp) /* do nothing */
and then recompile gestalt.
--
Eric Bezault
mailto:er...@go...
http://www.gobosoft.com
|
|
From: Colin P. A. <co...@co...> - 2008-03-01 08:04:55
|
>>>>> "Eric" == Eric Bezault <er...@go...> writes:
Eric> If the problem comes from gec, it might be a consequence of
Eric> that:
Eric> * When gec compiles an application with the Boehm GC, it
Eric> now generates code that will let the GC trigger the feature
Eric> `dispose' when objects are reclaimed.
Eric> You can try to edit the file
Eric> $GOBO/tool/gec/runtime/c/ge_gc.h and replace line 68:
Eric> #define GE_register_dispose(obj, disp)
Eric> GC_REGISTER_FINALIZER((void*)(obj), (void (*) (void*,
Eric> void*)) &GE_boehm_dispose, (void*)(disp), NULL, NULL)
Eric> by:
Eric> #define GE_register_dispose(obj, disp) /* do nothing */
Eric> and then recompile gestalt.
This works.
But note that I do not have the problem on my 32-bit system (I
tried both before and after an svn update), so it might be a problem
with Boehm gc 7.0 on 64-bit systems. I will try a newer version.
--
Colin Adams
Preston Lancashire
|
|
From: Colin P. A. <co...@co...> - 2008-03-01 09:09:00
|
Are these two alternative versions of ge_gc.h to try, or are they two different files? -- Colin Adams Preston Lancashire |
|
From: Eric B. <er...@go...> - 2008-03-01 09:11:42
|
Colin Paul Adams wrote: > Are these two alternative versions of ge_gc.h to try, or are they two > different files? There is ge_gc.h and ge_gc.c. They should be tried together. -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
|
From: Eric B. <er...@go...> - 2008-03-01 08:11:01
|
Colin Paul Adams wrote: >>>>>> "Eric" == Eric Bezault <er...@go...> writes: > > Eric> If the problem comes from gec, it might be a consequence of > Eric> that: > > Eric> * When gec compiles an application with the Boehm GC, it > Eric> now generates code that will let the GC trigger the feature > Eric> `dispose' when objects are reclaimed. > > Eric> You can try to edit the file > Eric> $GOBO/tool/gec/runtime/c/ge_gc.h and replace line 68: > > Eric> #define GE_register_dispose(obj, disp) > Eric> GC_REGISTER_FINALIZER((void*)(obj), (void (*) (void*, > Eric> void*)) &GE_boehm_dispose, (void*)(disp), NULL, NULL) > > Eric> by: > > Eric> #define GE_register_dispose(obj, disp) /* do nothing */ > > Eric> and then recompile gestalt. > > This works. So it's either a problem in the way I use Boehm's finalizer registration (in particular I pass a function pointer where a void* is expected!), or a problem in Boehm's finalization, or a problem in the implementation of `dispose'. I would favor the first alternative considering that what you say below. > But note that I do not have the problem on my 32-bit system (I > tried both before and after an svn update), so it might be a problem > with Boehm gc 7.0 on 64-bit systems. I will try a newer version. OK. -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
|
From: Colin P. A. <co...@co...> - 2008-03-01 08:26:32
|
>>>>> "Eric" == Eric Bezault <er...@go...> writes:
Eric> So it's either a problem in the way I use Boehm's finalizer
Eric> registration (in particular I pass a function pointer where
Eric> a void* is expected!), or a problem in Boehm's finalization,
Eric> or a problem in the implementation of `dispose'. I would
Eric> favor the first alternative considering that what you say
Eric> below.
>> But note that I do not have the problem on my 32-bit system (I
>> tried both before and after an svn update), so it might be a
>> problem with Boehm gc 7.0 on 64-bit systems. I will try a newer
>> version.
That doesn't work (I used the 24th February version of 7.1 alpha).
--
Colin Adams
Preston Lancashire
|
|
From: Eric B. <er...@go...> - 2008-03-01 08:54:03
|
Colin Paul Adams wrote: >>>>>> "Eric" == Eric Bezault <er...@go...> writes: > > Eric> So it's either a problem in the way I use Boehm's finalizer > Eric> registration (in particular I pass a function pointer where > Eric> a void* is expected!), or a problem in Boehm's finalization, > Eric> or a problem in the implementation of `dispose'. I would > Eric> favor the first alternative considering that what you say > Eric> below. > > >> But note that I do not have the problem on my 32-bit system (I > >> tried both before and after an svn update), so it might be a > >> problem with Boehm gc 7.0 on 64-bit systems. I will try a newer > >> version. > > That doesn't work (I used the 24th February version of 7.1 alpha). Please try to use the two files attached. -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
|
From: Colin P. A. <co...@co...> - 2008-03-01 09:32:27
|
>>>>> "Eric" == Eric Bezault <er...@go...> writes:
Eric> Please try to use the two files attached.
Same problem as before.
--
Colin Adams
Preston Lancashire
|
|
From: Eric B. <er...@go...> - 2008-03-01 09:36:02
|
Colin Paul Adams wrote: >>>>>> "Eric" == Eric Bezault <er...@go...> writes: > > Eric> Please try to use the two files attached. > > Same problem as before. Now, if you remove the line 21: ((void (*)(EIF_REFERENCE))disp)((EIF_REFERENCE)C); in the file ge_gc.c that I sent you? -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
|
From: Colin P. A. <co...@co...> - 2008-03-01 09:44:43
|
>>>>> "Eric" == Eric Bezault <er...@go...> writes:
Eric> Colin Paul Adams wrote:
>>>>>>> "Eric" == Eric Bezault <er...@go...> writes:
>>
Eric> Please try to use the two files attached.
>>
>> Same problem as before.
Eric> Now, if you remove the line 21:
Eric> ((void (*)(EIF_REFERENCE))disp)((EIF_REFERENCE)C);
Eric> in the file ge_gc.c that I sent you?
Now it works again.
--
Colin Adams
Preston Lancashire
|
|
From: Eric B. <er...@go...> - 2008-03-01 10:04:59
|
Colin Paul Adams wrote: >>>>>> "Eric" == Eric Bezault <er...@go...> writes: > > Eric> Colin Paul Adams wrote: > >>>>>>> "Eric" == Eric Bezault <er...@go...> writes: > >> > Eric> Please try to use the two files attached. > >> > >> Same problem as before. > > Eric> Now, if you remove the line 21: > > Eric> ((void (*)(EIF_REFERENCE))disp)((EIF_REFERENCE)C); > > Eric> in the file ge_gc.c that I sent you? > > Now it works again. OK. So I wanted to be smart, and as a consequence mix void* and function pointers. I guess I will have to use brute force and generate an extra C function for each `dispose' routine in order to accept an extra argument. Can you do one more test? Replace in ge_gc.h the line 68: #define GE_register_dispose(obj, disp) GC_REGISTER_FINALIZER((void*)(obj), (void (*) (void*, void*)) &GE_boehm_dispose, (void*)(disp), NULL, NULL) by: #define GE_register_dispose(obj, disp) GC_REGISTER_FINALIZER((void*)(obj), (void (*) (void*, void*)) disp, NULL, NULL, NULL) -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
|
From: Colin P. A. <co...@co...> - 2008-03-01 10:25:27
|
>>>>> "Eric" == Eric Bezault <er...@go...> writes:
Eric> Can you do one more test? Replace in ge_gc.h the line 68:
Is that with or without the erased line 21 in ge_gc.c?
--
Colin Adams
Preston Lancashire
|
|
From: Eric B. <er...@go...> - 2008-03-01 10:29:35
|
Colin Paul Adams wrote: >>>>>> "Eric" == Eric Bezault <er...@go...> writes: > > Eric> Can you do one more test? Replace in ge_gc.h the line 68: > > Is that with or without the erased line 21 in ge_gc.c? Either way, it will not be called anyway. -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
|
From: Colin P. A. <co...@co...> - 2008-03-01 10:37:26
|
>>>>> "Eric" == Eric Bezault <er...@go...> writes:
Eric> Colin Paul Adams wrote:
>>>>>>> "Eric" == Eric Bezault <er...@go...> writes:
>>
Eric> Can you do one more test? Replace in ge_gc.h the line 68:
>>
>> Is that with or without the erased line 21 in ge_gc.c?
Eric> Either way, it will not be called anyway.
Same problem still.
--
Colin Adams
Preston Lancashire
|
|
From: Eric B. <er...@go...> - 2008-03-01 11:42:47
|
Colin Paul Adams wrote: >>>>>> "Eric" == Eric Bezault <er...@go...> writes: > > Eric> Colin Paul Adams wrote: > >>>>>>> "Eric" == Eric Bezault <er...@go...> writes: > >> > Eric> Can you do one more test? Replace in ge_gc.h the line 68: > >> > >> Is that with or without the erased line 21 in ge_gc.c? > > Eric> Either way, it will not be called anyway. > > Same problem still. Here are two new files ge_gc.h and ge_gc.c. Please tell me whether it still crashes or if messages of the form "Calling dispose!" are displayed on the console. -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
|
From: Colin P. A. <co...@co...> - 2008-03-01 11:51:51
|
>>>>> "Eric" == Eric Bezault <er...@go...> writes:
Eric> Here are two new files ge_gc.h and ge_gc.c. Please tell me
Eric> whether it still crashes or if messages of the form "Calling
Eric> dispose!" are displayed on the console.
For the simple invocation (which results in displaying the usage
message, due to missing compulsory arguments), I get one "Calling
dispose!" message, and it works properly.
I then did it with a real transformation, and I get three such
messages, and it works properly.
--
Colin Adams
Preston Lancashire
|
|
From: Colin P. A. <co...@co...> - 2008-03-01 21:20:49
|
>>>>> "Eric" == Eric Bezault <er...@go...> writes:
Eric> Can you put some debug printing, as shown above, and
Current = 1CDB9E0
Class ID = 350
Dispose = 7BE320
Line 1
Segmentation fault
--
Colin Adams
Preston Lancashire
|
|
From: Eric B. <er...@go...> - 2008-03-01 12:01:35
|
Colin Paul Adams wrote: >>>>>> "Eric" == Eric Bezault <er...@go...> writes: > > Eric> Here are two new files ge_gc.h and ge_gc.c. Please tell me > Eric> whether it still crashes or if messages of the form "Calling > Eric> dispose!" are displayed on the console. > > For the simple invocation (which results in displaying the usage > message, due to missing compulsory arguments), I get one "Calling > dispose!" message, and it works properly. > > I then did it with a real transformation, and I get three such > messages, and it works properly. OK, it means that the problem is not in the way I invoke the Boehm's finalizer registration. I think that the crash occurs within one of the Eiffel `dispose' routines. -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
|
From: Colin P. A. <co...@co...> - 2008-03-01 12:22:09
|
>>>>> "Eric" == Eric Bezault <er...@go...> writes:
Eric> OK, it means that the problem is not in the way I invoke the
Eric> Boehm's finalizer registration. I think that the crash
Eric> occurs within one of the Eiffel `dispose' routines.
The only implementations in Gestalt (other than the default in MEMORY) are in the
following classes:
STDC_SIGNAL_SWITCH
STDC_HANDLE
STDC_EXIT_SWITCH
which are all from ePOSIX.
This explains why both boehm gc and epsoix libraries had to be
present.
So I shall take the issue up with Berend.
Does that mean I should now refreseh ge_gc.h and ge_gc.c from subversion?
--
Colin Adams
Preston Lancashire
|
|
From: Eric B. <er...@go...> - 2008-03-01 12:52:24
|
Colin Paul Adams wrote: >>>>>> "Eric" == Eric Bezault <er...@go...> writes: > > Eric> OK, it means that the problem is not in the way I invoke the > Eric> Boehm's finalizer registration. I think that the crash > Eric> occurs within one of the Eiffel `dispose' routines. > > The only implementations in Gestalt (other than the default in MEMORY) are in the > following classes: > > STDC_SIGNAL_SWITCH > STDC_HANDLE > STDC_EXIT_SWITCH > > which are all from ePOSIX. > This explains why both boehm gc and epsoix libraries had to be > present. > > So I shall take the issue up with Berend. > > Does that mean I should now refreseh ge_gc.h and ge_gc.c from subversion? Before doing that, I would suggest using the following two files ge_gc.h and ge_gc.c, and comment out the body of the `dispose' routine in the 3 classes that you mentioned and call `do_nothing' in these 3 `dispose' routines instead. (You have to call `do_nothing' otherwise the whole `dispose' routine will be optimized out by gec.) -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
|
From: Colin P. A. <co...@co...> - 2008-03-01 13:19:16
|
>>>>> "Eric" == Eric Bezault <er...@go...> writes:
Eric> Before doing that, I would suggest using the following two
Eric> files ge_gc.h and ge_gc.c, and comment out the body of the
Eric> `dispose' routine in the 3 classes that you mentioned and
Eric> call `do_nothing' in these 3 `dispose' routines instead.
Eric> (You have to call `do_nothing' otherwise the whole `dispose'
Eric> routine will be optimized out by gec.)
I now get the segmentation fault again (no other messages).
--
Colin Adams
Preston Lancashire
|