Kernel panic... (was Re: Netatalk broken in current? Lock order reversal?)

2002-01-16 Thread Emiel Kollof

* Emiel Kollof ([EMAIL PROTECTED]) wrote:
   exclusive (sleep mutex) Giant (0xc0462c00) locked @
   /usr/src/sys/i386/i386/trap.c:1102
   panic: system call pwrite returning with mutex(s) held
  
  Hmm, erm, go kick Alfred really hard. :)  This function locks Giant and then
  doesn't ever unlock it.  This looks to be breakage from his fget() changes
  perhaps.

Alfred? Are you listening? Are you tending to this already? It's not
only Samba that makes my machine panic. Also icecast does (when you
start to stream to it). 

Oh, has anyone else seen these panics as well? Just wondering...

Cheers,
Emiel
-- 
Never let your schooling interfere with your education.

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



Re: Kernel panic... (was Re: Netatalk broken in current? Lock order reversal?)

2002-01-16 Thread Alfred Perlstein

* Emiel Kollof [EMAIL PROTECTED] [020116 13:29] wrote:
 * Emiel Kollof ([EMAIL PROTECTED]) wrote:
exclusive (sleep mutex) Giant (0xc0462c00) locked @
/usr/src/sys/i386/i386/trap.c:1102
panic: system call pwrite returning with mutex(s) held
   
   Hmm, erm, go kick Alfred really hard. :)  This function locks Giant and then
   doesn't ever unlock it.  This looks to be breakage from his fget() changes
   perhaps.
 
 Alfred? Are you listening? Are you tending to this already? It's not
 only Samba that makes my machine panic. Also icecast does (when you
 start to stream to it). 
 
 Oh, has anyone else seen these panics as well? Just wondering...

It would help if someone cc'd me on these. :P

-- 
-Alfred Perlstein [[EMAIL PROTECTED]]
'Instead of asking why a piece of software is using 1970s technology,
 start asking why software is ignoring 30 years of accumulated wisdom.'
Tax deductable donations for FreeBSD: http://www.freebsdfoundation.org/

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



Re: Kernel panic... (was Re: Netatalk broken in current? Lock order reversal?)

2002-01-16 Thread Alfred Perlstein

* Alfred Perlstein [EMAIL PROTECTED] [020116 13:30] wrote:
 * Emiel Kollof [EMAIL PROTECTED] [020116 13:29] wrote:
  * Emiel Kollof ([EMAIL PROTECTED]) wrote:
 exclusive (sleep mutex) Giant (0xc0462c00) locked @
 /usr/src/sys/i386/i386/trap.c:1102
 panic: system call pwrite returning with mutex(s) held

Hmm, erm, go kick Alfred really hard. :)  This function locks Giant and then
doesn't ever unlock it.  This looks to be breakage from his fget() changes
perhaps.
  
  Alfred? Are you listening? Are you tending to this already? It's not
  only Samba that makes my machine panic. Also icecast does (when you
  start to stream to it). 
  
  Oh, has anyone else seen these panics as well? Just wondering...
 
 It would help if someone cc'd me on these. :P

Fix should be in now.

-- 
-Alfred Perlstein [[EMAIL PROTECTED]]
'Instead of asking why a piece of software is using 1970s technology,
 start asking why software is ignoring 30 years of accumulated wisdom.'
Tax deductable donations for FreeBSD: http://www.freebsdfoundation.org/

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



Re: Kernel panic... (was Re: Netatalk broken in current? Lock order reversal?)

2002-01-16 Thread Emiel Kollof

* Alfred Perlstein ([EMAIL PROTECTED]) wrote:
  It would help if someone cc'd me on these. :P
 
 Fix should be in now.

Great! Thanks! Remind me to buy you a beer if I ever get to meet you in
real life :-)

Right.. cvsup it is...

Cheers,
Emiel
-- 
If you can survive death, you can probably survive anything.

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



Netatalk broken in current? Lock order reversal?

2002-01-15 Thread Emiel Kollof

My kernel compile from fresh CURRENT sources bombed today with this:

linking kernel.debug ddp_input.o: In function `atintr':
/usr/src/sys/netatalk/ddp_input.c:51: multiple definition of `atintrq1_present' 
intrq.o(.data+0x0):/usr/src/sys/net/intrq.c: first defined here
ddp_input.o: In function `atintr': /usr/src/sys/netatalk/ddp_input.c:51: multiple 
definition of `atintrq2_present' intrq.o(.data+0x4):/usr/src/sys/net/intrq.c: first 
defined here
*** Error code 1

So that leaves Appletalk right out (which I use. I do own macs...). It
compiles fine if I leave options NETATALK out of my config

I also had some strange panics and these messages appear once in a while:

lock order reversal 1st 0xc185e934 filedesc structure @ 
/usr/src/sys/kern/kern_descrip.c:925
2nd 0xc0419b00 Giant @ /usr/src/sys/kern/kern_descrip.c:959
  
The panics moan about a kernel trap and some mutex stuff involving
Giant. It only happens when I start Samba.

Any leads?

Cheers,
Emiel
-- 
Demographic polls show that you have lost credibility across the
board.  Especially with  those 14 year-old Valley girls.

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



RE: Netatalk broken in current? Lock order reversal?

2002-01-15 Thread John Baldwin


On 15-Jan-02 Emiel Kollof wrote:
 My kernel compile from fresh CURRENT sources bombed today with this:
 
 linking kernel.debug ddp_input.o: In function `atintr':
 /usr/src/sys/netatalk/ddp_input.c:51: multiple definition of
 `atintrq1_present' intrq.o(.data+0x0):/usr/src/sys/net/intrq.c: first defined
 here
 ddp_input.o: In function `atintr': /usr/src/sys/netatalk/ddp_input.c:51:
 multiple definition of `atintrq2_present'
 intrq.o(.data+0x4):/usr/src/sys/net/intrq.c: first defined here
 *** Error code 1
 
 So that leaves Appletalk right out (which I use. I do own macs...). It
 compiles fine if I leave options NETATALK out of my config
 
 I also had some strange panics and these messages appear once in a while:
 
 lock order reversal 1st 0xc185e934 filedesc structure @
 /usr/src/sys/kern/kern_descrip.c:925
 2nd 0xc0419b00 Giant @ /usr/src/sys/kern/kern_descrip.c:959

This one is due to not releasing the filedesc lock when grabbing Giant to free
oldofile in fdalloc().

 The panics moan about a kernel trap and some mutex stuff involving
 Giant. It only happens when I start Samba.

Having the actual panic messages would be very helpful here.

-- 

John Baldwin [EMAIL PROTECTED]http://www.FreeBSD.org/~jhb/
Power Users Use the Power to Serve!  -  http://www.FreeBSD.org/

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



Re: Netatalk broken in current? Lock order reversal?

2002-01-15 Thread Emiel Kollof

* John Baldwin ([EMAIL PROTECTED]) wrote:
 
  The panics moan about a kernel trap and some mutex stuff involving
  Giant. It only happens when I start Samba.
 
 Having the actual panic messages would be very helpful here.

Hmm, I will proceed to crash my machine again and have a go in hand
copying them... I'll be back in a flash :-)

Cheers,
Emiel
-- 
Anyone who uses the phrase easy as taking candy from a baby has never
tried taking candy from a baby.
-- Robin Hood

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



Re: Netatalk broken in current? Lock order reversal?

2002-01-15 Thread Emiel Kollof

* John Baldwin ([EMAIL PROTECTED]) wrote:
 
  lock order reversal 1st 0xc185e934 filedesc structure @
  /usr/src/sys/kern/kern_descrip.c:925
  2nd 0xc0419b00 Giant @ /usr/src/sys/kern/kern_descrip.c:959
 
 This one is due to not releasing the filedesc lock when grabbing Giant to free
 oldofile in fdalloc().

Is that going to cause data loss? I also saw messages like these:

/var: lost blocks 62 files 8

  The panics moan about a kernel trap and some mutex stuff involving
  Giant. It only happens when I start Samba.
 
 Having the actual panic messages would be very helpful here.

It crashed very reproducable with this panic (hand copied):

exclusive (sleep mutex) Giant (0xc0462c00) locked @ /usr/src/sys/i386/i386/trap.c:1102
panic: system call pwrite returning with mutex(s) held

Debugger(panic)
panic: kernel trap doesn't have ucred

Cheers,
Emiel
-- 
So far as I can remember, there is not one word in the Gospels in
praise of intelligence.
-- Bertrand Russell

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



Re: Netatalk broken in current? Lock order reversal?

2002-01-15 Thread John Baldwin


On 16-Jan-02 Emiel Kollof wrote:
 * John Baldwin ([EMAIL PROTECTED]) wrote:
 
  lock order reversal 1st 0xc185e934 filedesc structure @
  /usr/src/sys/kern/kern_descrip.c:925
  2nd 0xc0419b00 Giant @ /usr/src/sys/kern/kern_descrip.c:959
 
 This one is due to not releasing the filedesc lock when grabbing Giant to
 free
 oldofile in fdalloc().
 
 Is that going to cause data loss? I also saw messages like these:
 
 /var: lost blocks 62 files 8

No, that's softupdates stuff.  I think releasing filedesc is ok this case,
but usually I would recode it to move malloc's and free's around to avoid
having to drop and reacquire locks.

 Having the actual panic messages would be very helpful here.
 
 It crashed very reproducable with this panic (hand copied):
 
 exclusive (sleep mutex) Giant (0xc0462c00) locked @
 /usr/src/sys/i386/i386/trap.c:1102
 panic: system call pwrite returning with mutex(s) held

Hmm, erm, go kick Alfred really hard. :)  This function locks Giant and then
doesn't ever unlock it.  This looks to be breakage from his fget() changes
perhaps.

-- 

John Baldwin [EMAIL PROTECTED]http://www.FreeBSD.org/~jhb/
Power Users Use the Power to Serve!  -  http://www.FreeBSD.org/

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



Re: Netatalk broken in current? Lock order reversal?

2002-01-15 Thread Emiel Kollof

* John Baldwin ([EMAIL PROTECTED]) wrote:
  /var: lost blocks 62 files 8
 
 No, that's softupdates stuff.  I think releasing filedesc is ok this case,
 but usually I would recode it to move malloc's and free's around to avoid
 having to drop and reacquire locks.

Ah right... Good to know...

  exclusive (sleep mutex) Giant (0xc0462c00) locked @
  /usr/src/sys/i386/i386/trap.c:1102
  panic: system call pwrite returning with mutex(s) held
 
 Hmm, erm, go kick Alfred really hard. :)  This function locks Giant and then
 doesn't ever unlock it.  This looks to be breakage from his fget() changes
 perhaps.

Ah... Alfred? You will be let off easy this one time.  Next time I'll send the 
Beastie after you. Right after you finish cramping that box of CAT5 cable 
over there in 30 cm long pieces, oh and you have to repeat I will never leave 
my locks on Giant unfreed too every time you finish one. 

Right. got that? Good. 

;-)

Oh, on another note, is someone working at that netatalk breakage? Who
do I have to discipline for that? :-)

Cheers,
Emiel
-- 
Too much of a good thing is WONDERFUL.
-- Mae West

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



Re: Netatalk broken in current? Lock order reversal?

2002-01-15 Thread Ian Dowse

In message [EMAIL PROTECTED], Emiel Kollof writes:

Oh, on another note, is someone working at that netatalk breakage? Who
do I have to discipline for that? :-)

Could you try the following patch in src/sys/netatalk? The problem
was caused by the -fno-common compiler option that was added to
the kernel build flags recently.

This compiles for me, but I haven't checked that it actually works.

Ian

Index: ddp_input.c
===
RCS file: /dump/FreeBSD-CVS/src/sys/netatalk/ddp_input.c,v
retrieving revision 1.12
diff -u -r1.12 ddp_input.c
--- ddp_input.c 13 Feb 2000 03:31:58 -  1.12
+++ ddp_input.c 16 Jan 2002 01:30:50 -
@@ -27,8 +27,6 @@
 static struct ddpstat  ddpstat;
 static struct routeforwro;
 
-const int atintrq1_present = 1, atintrq2_present = 1;
-
 static void ddp_input(struct mbuf *, struct ifnet *, struct elaphdr *, int);
 
 /*
Index: ddp_usrreq.c
===
RCS file: /dump/FreeBSD-CVS/src/sys/netatalk/ddp_usrreq.c,v
retrieving revision 1.22
diff -u -r1.22 ddp_usrreq.c
--- ddp_usrreq.c17 Nov 2001 03:07:08 -  1.22
+++ ddp_usrreq.c16 Jan 2002 01:32:34 -
@@ -14,6 +14,7 @@
 #include sys/protosw.h
 #include net/if.h
 #include net/route.h
+#include net/intrq.h
 
 #include netatalk/at.h
 #include netatalk/at_var.h
@@ -547,6 +548,8 @@
 {
 atintrq1.ifq_maxlen = IFQ_MAXLEN;
 atintrq2.ifq_maxlen = IFQ_MAXLEN;
+atintrq1_present = 1;
+atintrq2_present = 1;
 mtx_init(atintrq1.ifq_mtx, at1_inq, MTX_DEF);
 mtx_init(atintrq2.ifq_mtx, at2_inq, MTX_DEF);
 }

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



Re: Netatalk broken in current? Lock order reversal?

2002-01-15 Thread Emiel Kollof

* Ian Dowse ([EMAIL PROTECTED]) wrote:
 Oh, on another note, is someone working at that netatalk breakage? Who
 do I have to discipline for that? :-)
 
 Could you try the following patch in src/sys/netatalk? The problem
 was caused by the -fno-common compiler option that was added to
 the kernel build flags recently.

Right... Applied it. Building as I mail this.

 This compiles for me, but I haven't checked that it actually works.

I will test it. (run netatalk and transfer some files to and fro)

Cheers,
Emiel
-- 
Gee, Toto, I don't think we are in Kansas anymore.

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



Re: Netatalk broken in current? Lock order reversal?

2002-01-15 Thread Emiel Kollof

* Emiel Kollof ([EMAIL PROTECTED]) wrote:
  This compiles for me, but I haven't checked that it actually works.
 
 I will test it. (run netatalk and transfer some files to and fro)

It compiled, and after making a connection with Appletalk with one of my
macs, file transfers went off without a hitch. I copied some big files
(several MB's) from my CURRENT machine and my mac, and after checking
with cmp(1) the files seemed to have no corruption. So basically, it
does work.

Hope that helped a bit... Now let's hope Alfred will fix my kernel trap
when I run Samba... I tend to need it around here :-(

Cheers,
Emiel
-- 
SCORPIO (Oct 23 - Nov 21)
You are shrewd in business and cannot be trusted.  You will
achieve the pinnacle of success because of your total lack of
ethics.  Most Scorpio people are murdered.

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