Re: status of KSE merge

2002-07-05 Thread David Xu

the following patch can fix the bug, but for KSE programs, it may not be a
best solution, KSE programs signal handling is on going...

--- kern_synch.cWed Jul  3 17:15:20 2002
+++ kern_synch.c.newSat Jul  6 10:36:22 2002
@@ -537,8 +537,7 @@
PROC_LOCK(p);
sig = cursig(td);
if (thread_suspend_check(1)) {
-   sig = EINTR;
-   rval = EINTR;
+   sig = SIGSTOP; 
}
mtx_lock_spin(&sched_lock);
PROC_UNLOCK(p);


-David Xu

- Original Message - 
From: "Peter Wemm" <[EMAIL PROTECTED]>
To: "Julian Elischer" <[EMAIL PROTECTED]>
Cc: "FreeBSD current users" <[EMAIL PROTECTED]>
Sent: Saturday, July 06, 2002 3:52 AM
Subject: Re: status of KSE merge 


> Julian Elischer wrote:
> 
> > At this time I have no information on any apps that fail to work (that did
> > work before KSE).
> > 
> > The signal flakiness is still present but at least people can get work
> > done. I will work on this next (though signal experts are welcome to
> > try their hand as well.. (in fact any beginners who want to jump inat the 
> > deep end of the pool can guarantee a near-drowning-experience by trying
> > to understand signals).
> 
> Some news:  syscall restart after signals is broken.  This is responsible
> for a lot of the ^Z/fg problems as well as some applications failing when
> their timer signals cause IO problems.
> 
> Test case:
> peter@overcee[12:49pm]~-125> cat restart.sh
> #! /tmp/44sh
> echo -n "Type something: "
> read foo
> echo "You typed: \"$foo\""
> peter@overcee[12:49pm]~-126> ./restart.sh 
> Type something: foo
> You typed: "foo"
> peter@overcee[12:49pm]~-127> ktrace ./restart.sh 
> Type something: ^Z
> [1]  + Suspended ktrace ./restart.sh
> peter@overcee[12:49pm]~-128> fg
> ktrace ./restart.sh
> You typed: ""
> peter@overcee[12:49pm]~-129> kdump -R
> [...]
>   1091 44sh 0.61 CALL  write(0x1,0x80c4000,0x10)
>   1091 44sh 0.29 GIO   fd 1 wrote 16 bytes
>"Type something: "
>   1091 44sh 0.000198 RET   write 16/0x10
>   1091 44sh 0.000187 CALL  read(0,0xbfbff2f3,0x1)
>   1091 44sh 3.054434 RET   read -1 errno 4 Interrupted system call
>   1091 44sh 0.000695 CALL  write(0x1,0x80c4000,0xe)
>   1091 44sh 0.25 GIO   fd 1 wrote 14 bytes
>"You typed: ""
>"
>   1091 44sh 0.000254 RET   write 14/0xe
> [..]
> 
> The errno 4 - interrupted system call should not happen.  read returns
> ERESTART internally on the signal catch, and the syscall() function in trap.c
> is supposed to back up the eip which causes the syscall to be rerun.
> 
> I have not looked at the code yet.  This is responsible for things like
> vipw failing after ^Z/fg (editor=vi), mergemaster failing on ^Z/fg etc.
> (it was mergemaster that tipped me off on this.)
> 
> Applications that use interval timers would be suffering from this pretty
> badly.
> 
> Cheers,
> -Peter
> --
> Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> "All of this is for nothing if we don't go to the stars" - JMS/B5




__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: status of KSE merge

2002-07-05 Thread Peter Wemm

Julian Elischer wrote:

> At this time I have no information on any apps that fail to work (that did
> work before KSE).
> 
> The signal flakiness is still present but at least people can get work
> done. I will work on this next (though signal experts are welcome to
> try their hand as well.. (in fact any beginners who want to jump inat the 
> deep end of the pool can guarantee a near-drowning-experience by trying
> to understand signals).

Some news:  syscall restart after signals is broken.  This is responsible
for a lot of the ^Z/fg problems as well as some applications failing when
their timer signals cause IO problems.

Test case:
peter@overcee[12:49pm]~-125> cat restart.sh
#! /tmp/44sh
echo -n "Type something: "
read foo
echo "You typed: \"$foo\""
peter@overcee[12:49pm]~-126> ./restart.sh 
Type something: foo
You typed: "foo"
peter@overcee[12:49pm]~-127> ktrace ./restart.sh 
Type something: ^Z
[1]  + Suspended ktrace ./restart.sh
peter@overcee[12:49pm]~-128> fg
ktrace ./restart.sh
You typed: ""
peter@overcee[12:49pm]~-129> kdump -R
[...]
  1091 44sh 0.61 CALL  write(0x1,0x80c4000,0x10)
  1091 44sh 0.29 GIO   fd 1 wrote 16 bytes
   "Type something: "
  1091 44sh 0.000198 RET   write 16/0x10
  1091 44sh 0.000187 CALL  read(0,0xbfbff2f3,0x1)
  1091 44sh 3.054434 RET   read -1 errno 4 Interrupted system call
  1091 44sh 0.000695 CALL  write(0x1,0x80c4000,0xe)
  1091 44sh 0.25 GIO   fd 1 wrote 14 bytes
   "You typed: ""
   "
  1091 44sh 0.000254 RET   write 14/0xe
[..]

The errno 4 - interrupted system call should not happen.  read returns
ERESTART internally on the signal catch, and the syscall() function in trap.c
is supposed to back up the eip which causes the syscall to be rerun.

I have not looked at the code yet.  This is responsible for things like
vipw failing after ^Z/fg (editor=vi), mergemaster failing on ^Z/fg etc.
(it was mergemaster that tipped me off on this.)

Applications that use interval timers would be suffering from this pretty
badly.

Cheers,
-Peter
--
Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



status of KSE merge

2002-07-04 Thread Julian Elischer


*phew* (wipes sweat from brow)

Ok After a hectic couple of days it looks like the stability of -current
is back where it should be. Multiple buildworlds are completing 
with no discernable degradation.

At this time I have no information on any apps that fail to work (that did
work before KSE).

The signal flakiness is still present but at least people can get work
done. I will work on this next (though signal experts are welcome to
try their hand as well.. (in fact any beginners who want to jump inat the 
deep end of the pool can guarantee a near-drowning-experience by trying
to understand signals).

Performance seems pretty much equivalent to pre_KSE.

Many thanks to the many people who sent test results and patch
suggestions, especialy David Xu who I forgot to acknolegde on the
appropriate checkin.





To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message