Re: About that Alpha kernel bug mentioned in beta3 errata

2004-04-09 Thread Herbert Xu
tags 237884 pending
quit

On Mon, Apr 05, 2004 at 06:41:07PM +0200, Bjoern Brill wrote:
 
 Result: CD drive is properly detected, symlink in /dev/cdroms looks alright.
 (Should it matter: this is on a EV5 machine.)

Thank you very much.

The following patch from glibc should fix the problem.
-- 
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmVHI~} [EMAIL PROTECTED]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Index: arch/alpha/lib/stxncpy.S
===
RCS file: 
/home/gondolin/herbert/src/CVS/debian/kernel-source-2.4/arch/alpha/lib/stxncpy.S,v
retrieving revision 1.4
diff -u -r1.4 stxncpy.S
--- a/arch/alpha/lib/stxncpy.S  3 Sep 2003 10:26:49 -   1.4
+++ b/arch/alpha/lib/stxncpy.S  9 Apr 2004 10:23:30 -
@@ -313,9 +313,9 @@
lda t2, -1  # e0: for creating masks later
beq t12, $u_head# .. e1 :
 
-   extql   t2, a1, t2  # e0:
+   mskqh   t2, t5, t2  # e0: begin src validity mask
cmpbge  zero, t1, t8# .. e1 : is there a zero?
-   andnot  t2, t6, t12 # e0: dest mask for a single word copy
+   extql   t2, a1, t2  # e0:
or  t8, t10, t5 # .. e1 : test for end-of-count too
cmpbge  zero, t2, t3# e0:
cmoveq  a2, t5, t8  # .. e1 :
@@ -330,14 +330,14 @@
ldq_u   t0, 0(a0)   # e0:
negqt8, t6  # .. e1 : build bitmask of bytes = zero
mskqh   t1, t4, t1  # e0:
-   and t6, t8, t2  # .. e1 :
-   subqt2, 1, t6   # e0:
-   or  t6, t2, t8  # e1:
+   and t6, t8, t12 # .. e1 :
+   subqt12, 1, t6  # e0:
+   or  t6, t12, t8 # e1:
 
-   zapnot  t12, t8, t12# e0: prepare source word; mirror changes
+   zapnot  t2, t8, t2  # e0: prepare source word; mirror changes
zapnot  t1, t8, t1  # .. e1 : to source validity mask
 
-   andnot  t0, t12, t0 # e0: zero place for source to reside
+   andnot  t0, t2, t0  # e0: zero place for source to reside
or  t0, t1, t0  # e1: and put it there
stq_u   t0, 0(a0)   # e0:
ret (t9)# .. e1 :


Re: About that Alpha kernel bug mentioned in beta3 errata

2004-04-05 Thread Bjoern Brill

On Sun, 4 Apr 2004, Herbert Xu wrote:

 Bjoern Brill [EMAIL PROTECTED] wrote:
 
  The symlink gets created in drivers/cdrom/cdrom.c:register_cdrom():
 
 if (pos = 0) {
 char vname[16];
 sprintf (vname, cdrom%d, cdi-number);
 strncpy (rname + pos, ../, 3);
 devfs_mk_symlink (devfs_handle, vname,
   DEVFS_FL_DEFAULT,
   rname + pos, slave, NULL);
 devfs_auto_unregister (cdi-de, slave);
 }
 
  That piece of code is shared by all kinds of cdroms, and all
  architectures... so how can it be broken on alpha and not on x86,
  and with SCSI but not IDE? I think the strncpy (rname + pos, ../, 3);
  call fails, and strncpy is arch specific. This would mean that, in the
  end, alpha stxncpy.S is broken again. I don't know enough alpha assembly

 Good catch.

 Can you either build a new kernel with stxncpy.S disabled, or try
 the image from

 http://gondor.apana.org.au/~herbert/debian/kernel/binary/2.4.25/alpha-generic/

 and see if the problem goes away?

 If it does, then I'll turn stxncpy off until it's fixed.


Bingo.

I've put your test kernel and the initrd.gz from the same installer
CD as before (sarge-alpha-businesscard.iso, Mar 31 daily build) somewhere
in my /boot partition and pointed aboot to them, together with the
installer's default boot arguments (ramdisk_size=16384 root=/dev/ram
devfs=mount,dall), while having the installer CD in the drive. This
should ensure nothing has changed except replacing the 2.4.25-1-generic
kernel with your test kernel.

Result: CD drive is properly detected, symlink in /dev/cdroms looks alright.
(Should it matter: this is on a EV5 machine.)


Regards,

Bjoern
--
Bjorn Brill [EMAIL PROTECTED]
Frankfurt am Main, Germany


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: About that Alpha kernel bug mentioned in beta3 errata

2004-04-04 Thread Herbert Xu
Bjoern Brill [EMAIL PROTECTED] wrote:
 
 The symlink gets created in drivers/cdrom/cdrom.c:register_cdrom():
 
if (pos = 0) {
char vname[16];
sprintf (vname, cdrom%d, cdi-number);
strncpy (rname + pos, ../, 3);
devfs_mk_symlink (devfs_handle, vname,
  DEVFS_FL_DEFAULT,
  rname + pos, slave, NULL);
devfs_auto_unregister (cdi-de, slave);
}
 
 That piece of code is shared by all kinds of cdroms, and all
 architectures... so how can it be broken on alpha and not on x86,
 and with SCSI but not IDE? I think the strncpy (rname + pos, ../, 3);
 call fails, and strncpy is arch specific. This would mean that, in the
 end, alpha stxncpy.S is broken again. I don't know enough alpha assembly

Good catch.

Can you either build a new kernel with stxncpy.S disabled, or try
the image from

http://gondor.apana.org.au/~herbert/debian/kernel/binary/2.4.25/alpha-generic/

and see if the problem goes away?

If it does, then I'll turn stxncpy off until it's fixed.

Cheers,
-- 
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmVHI~} [EMAIL PROTECTED]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: About that Alpha kernel bug mentioned in beta3 errata

2004-04-01 Thread Bjoern Brill

On Wed, 31 Mar 2004, Steve Langasek wrote:

 Hi Bjoern,

 On Tue, Mar 30, 2004 at 12:44:48AM +0200, Bjoern Brill wrote:
  if that bug (alpha cannot install from SCSI cdrom) is the one mentioned in
  http://lists.debian.org/debian-boot/2004/debian-boot-200401/msg00374.html,
  then I've run into it as well with a daily build shortly before d-i beta3.
  Is this fixed now? If not here is some additional info:

[...]


 Yes, this is the same bug.  The beta3 on alpha released with a 2.4.24
 kernel.  Could I ask you to test out a more recent daily snapshot, to
 confirm for me whether this bug still exists in the 2.4.25-based images?
 Since I have no SCSI cdrom's at hand, I can't exactly test for this,
 though I'm happy to work on debugging the code if that's where the
 problem lies.

I'm just trying the latest daily build (dated Mar 31 23:03) of
sarge-alpha-businesscard.iso:
~ # uname -a
Linux kruemel 2.4.25-1-generic #1 Tue Feb 24 08:10:58 EST 2004 alpha unknown

The bug is still there. I can work around it as previously described.
(Not that this would buy me much, installation did and still does fail later
on due to broken packages and other stuff. This time we fail to install
libc6.1_2.3.2.ds1-11 because it tries to overwrite /etc/default/devpts which
is also in package initscripts. Last time the netinst iso had no network
driver modules. Before that aboot was uninstallable because aboot-base was
missing. Isn't there a way I can _declare_ a step has completed
successfully and clean up the breakage myself? Hrrm well.)

 If it turns out to be a gcc optimization problem, I'm afraid I'm out of
 my depth where debugging kernels is concerned.

So am I. But I think compiler problems are usually cared for not that
different from bugs: since one can't do much about the actual problem unless
the compiler gets fixed (which can take quite some time), one works around
it by slightly restating or reordering the code and hoping a different
optimization case kicks in and the error goes away.


Regards,

Bjoern
--
Bjorn Brill [EMAIL PROTECTED]
Frankfurt am Main, Germany


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: About that Alpha kernel bug mentioned in beta3 errata

2004-03-31 Thread Steve Langasek
Hi Bjoern,

On Tue, Mar 30, 2004 at 12:44:48AM +0200, Bjoern Brill wrote:
 if that bug (alpha cannot install from SCSI cdrom) is the one mentioned in
 http://lists.debian.org/debian-boot/2004/debian-boot-200401/msg00374.html,
 then I've run into it as well with a daily build shortly before d-i beta3.
 Is this fixed now? If not here is some additional info:
 On my system (an AS 2100A Lynx btw, cool these are supported now):

 # cd /dev/cdroms
 # ls -l
 lr-xr-xr-x 1 root root 34 Jan 1 1970 cdrom0 - 
 yyyscsi/host0/bus0/target6/lun0/cd
 [actually, the 'y's are y with dieresis, 0xff in ISO-8859-1]

Yes, this is the same bug.  The beta3 on alpha released with a 2.4.24
kernel.  Could I ask you to test out a more recent daily snapshot, to
confirm for me whether this bug still exists in the 2.4.25-based images?
Since I have no SCSI cdrom's at hand, I can't exactly test for this,
though I'm happy to work on debugging the code if that's where the
problem lies.

If it turns out to be a gcc optimization problem, I'm afraid I'm out of
my depth where debugging kernels is concerned.

Thanks,
-- 
Steve Langasek
postmodern programmer


signature.asc
Description: Digital signature