After running dosemu -t terminal is unsane
Brought to you by:
bartoldeman
Hi all,
With current devel I find that after running "dosemu -t" the terminal is not working properly. If I type blind 'stty sane' then normal function returns. I'm sure this was working a little while back and I'm wondering if it's fallout from fixing my PIT timing bug as these messages now appear at exit.
ERROR: HLT on detached thread
ERROR: leavedos called recursively, forgetting the graceful exit!
Hmm, I can't reproduce.
Is the error msg right on startup, or on exit?
How to reproduce?
Hi Stas,
It seems to only occur when running a command non interactively i.e. on the dosemu command line
If I run the same interactively then the terminal settings are restored correctly.
Hope it helps,
Andrew
-D9+hg please
Hi Stas,
Here's the extra log. I just had a thought though, in autoexec.bat I wrap the
unix -e call with callgrind instrumentation on/off calls. At the moment there's no callgrind running so callgrind_control might return non zero. Would that make a difference?
e.g. in autoexec.bat
Just to answer my own question. I commented the 'unix callgrind_control' lines and the terminal insane problem persists.
OK, my optimization seems to opened a race
condition. Now I have to re-introduce the
"unoptimized" version of vm86() too. :(
I still can't reproduce, so please try the
attached patch.
Hi Stas,
I now get an abort. I've attached the new boot_-D9+hg.log
A slightly better one.
Hi Stas,
That fixes it, although it seems to have a slight performance cost. My test program took 158 secs with current devel and 160 secs after applying the patch.
I've attached the log again
Applied, thanks.
No, I don't think this can give a
performance regression. The new helper
only gets called from leavedos().
Maybe some other recent patch did, but
not this one.
Last edit: Stas Sergeev 2014-06-10
Hi Stas,
Later, when profiling under callgrind, I saw this with the latest devel:
I'm not sure if it's reproduceable whilst the dosemu logging is running
Last edit: Andrew Bird 2014-06-10
Could you please reproduce the problem
with the attached patch?
Hmm, this coopthreads are becoming nasty.
Hi Stas,
A shorter test exited with thr->cur_thr=2. I attached the log also
-D9+hg please.
Hi Stas,
Here you go.
Please use the attached logging patch.
Hi Stas,
Here's a thought. Are you sure the thread ID should always be 1? I was playing with helgrind on dosemu a couple of days ago and I seem to remember that the threads were initialised in different orders sometimes?
This is not an ID, this is a recursion
counter. For some reason you have recursion
level of inte6 = 2. This is likely a bug
somewhere. I don't think inte6 should ever
re-enter.
Stas,
Here's the new log.
Thanks.
I added a bit more logging to git.
Please pull and re-do the log
Together with the patch that was here.
But please add a missing \n to the
a.diff that I forgot to add.
Hi Stas,
Here's the new log after pull
Should now be fixed in git.
There are still coopth-unsafe places around,
perhaps. Only a good testing can locate all
of them, even though nothing have popped up
for quite some time.
Hi Stas,
That seems to be okay now. I'll let you know if I come across any others.
Many thanks,
Andrew
Thanks for testing.
dosemu "dir /p"
or
dosemu exitemu
were still unsafe.
Should now be fixed completely.