[Mono-list] Can run mono once and only once ( From strange to bizzare and beyond ).

simozzer SimonMoscrop at hotmail.com
Tue Aug 19 09:38:13 EDT 2008

Wow this is becoming freaky. 

Further to the lockup which I previously reported I've just discovered this
strange behaviour: If I run my mono HelloWorld.exe through gdb and leave it
paused at the first breakpoint (gdb receives a  - I can then run mono
HelloWorld.exe as many times as i like outside the debugger. As soon as I
let the version being debugged run till completion I can no longer run mono
HelloWorld.exe without it locking up.

There's something strange going on in the termination code but I cannot work
out what. I'd like to report a bug but i would like it to be reproducable -
has anyone else experienced these wierd little lockups?




Thanks for your reply. I'm afraid my lack of c, gdb and linux debugging
knowledge is letting me down here.

It appears that the attribute structure is allocated in the few lines just
before the lock occurs. At first glance it does not appear that the program
is trying to reuse the same structure on second run (it should be a new

( code snippet from mono_thread_get_stack_bounds)
pthread_attr_t attr;
guint8 *current = (guint8*)&attr;

I'm going to try rebooting and stepping through the first (succesfull) run
to see if I can trace what is happening with the attr structure on the first
run - unless you have any other suggestions?

Dallman, John-2 wrote:
>> I've narrowed it down to a call in threads.c, line 766:
>> pthread_getattr_np(pthread_self(), &attr).
>> I'm still no wiser though. Does anyone have any insight as to why this
>> call might be causing some kind of deadlock?
> Look very carefully at what happens with that attribute resource
> structure.
> Is it getting re-used for the second call that causes the deadlock? How
> is
> it allocated? 
> -- 
> John Dallman
> Parasolid Porting Engineer
> Siemens PLM Software
> 46 Regent Street, Cambridge, CB2 1DP
> United Kingdom
> Tel: +44-1223-371554
> john.dallman at siemens.com
> www.siemens.com/plm

View this message in context: http://www.nabble.com/Can-run-mono-once-and-only-once-%28EEE-PC%29--tp18821807p19048886.html
Sent from the Mono - General mailing list archive at Nabble.com.

More information about the Mono-list mailing list