linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: Kernel deadlock using nbd over acenic driver.
@ 2002-05-14 17:42 chen, xiangping
  0 siblings, 0 replies; 53+ messages in thread
From: chen, xiangping @ 2002-05-14 17:42 UTC (permalink / raw)
  To: 'Steve Whitehouse'; +Cc: jes, linux-kernel

Yes. I am testing a single nbd device, thus single socket in this case.
There is no other heavy networking tasks on the testing machine.


-----Original Message-----
From: Steven Whitehouse [mailto:steve@gw.chygwyn.com]
Sent: Tuesday, May 14, 2002 12:32 PM
To: chen, xiangping
Cc: jes@wildopensource.com; linux-kernel@vger.kernel.org
Subject: Re: Kernel deadlock using nbd over acenic driver.


Hi,

The TCP stack should auto-tune the amount of memory that it uses, so that
SO_SNDBUF, cat >/proc/sys/net/core/[rw]mem_default etc. is not required. The
important settings for TCP sockets are only /proc/sys/net/ipv4/tcp_[rw]mem
and tcp_mem I think (at least if I've understood the code correctly).

Since I think we are talking about only a single nbd device, there should
only be a single socket thats doing lots of I/O in this case, or is this
machine doing other heavy network tasks ?
> 
> But how to avoid system hangs due to running out of memory?
> Is there a safe guide line? Generally slow is tolerable, but
> crash is not.
> 
I agree. I also think your earlier comments about the buffer flushing are
correct as being the most likely cause.

I don't think the system has "run out" exactly, more just got itself into
a state where the code path writing out dirty blocks has been blocked
due to lack of freeable memory at that moment and where the process
freeing up memory has blocked waiting for the nbd device. It may well
be that there is freeable memory, just that for whatever reason no
process is trying to free it.

The LVM team has had a similar problem in dealing with I/O which needs
extra memory in order to complete, so I'll ask them for some ideas. Also
I'm going to try and come up with some patches to eliminate some of the
possible theories so that we can narrow down the options,

Steve

^ permalink raw reply	[flat|nested] 53+ messages in thread
* Re: Kernel deadlock using nbd over acenic driver
@ 2002-05-16 22:54 Peter T. Breuer
  2002-05-17  8:44 ` Steven Whitehouse
  0 siblings, 1 reply; 53+ messages in thread
From: Peter T. Breuer @ 2002-05-16 22:54 UTC (permalink / raw)
  To: linux kernel; +Cc: Steve Whitehouse, alan, chen_xiangping

Sorry I didn't pick this up earlier ..

"Steven Whitehouse wrote:"
> we don't want to alter that. The "priority inversion" that I mentioned occurs
> when you get processes without PF_MEMALLOC set calling nbd_send_req() as when

There aren't any processes that call nbd_send_req except the unique
nbd client process stuck in the protocol loop in the kernel ioctl
that it entered at startup.

> they call through to page_alloc.c:__alloc_pages() they won't use any memory
> once the free pages hits the min mark even though there is memory available
> (see the code just before and after the rebalance label).

So I think the exact inversion you envisage cannot happen, but ...

I think that the problem is that the nbd-client process doesn't have
high memory priority, and high priority processes can scream and holler
all they like and will claim more memory, but won't make anythung better
because the nbd process can't run (can't get tcp buffers), and so
can't release the memory pressure.

So I think that your PF_MEMALLOC idea does revert the inversion.

Would it also be good to prevent other processes running? or is it too
late. Yes, I think it is too late to do any good, by the time we feel
this pressure.

Peter

^ permalink raw reply	[flat|nested] 53+ messages in thread
[parent not found: <3CE40A77.22C74DC1@zip.com.au>]
* RE: Kernel deadlock using nbd over acenic driver.
@ 2002-05-16 13:18 chen, xiangping
  0 siblings, 0 replies; 53+ messages in thread
From: chen, xiangping @ 2002-05-16 13:18 UTC (permalink / raw)
  To: 'Oliver Xymoron'
  Cc: 'Jes Sorensen', 'Steve Whitehouse',
	linux-kernel, 'Alan Cox'

I can imagine iSCSI projects to have similar problems. But how to
let NBD reserve memory for packets, cause sk_buff is allocated in
the network layer. How can NBD pass reserved memory to the network
layer? Unless there are some kind zero copying networking scheme 
allowing data in buffer cache being directly used in network buffer,
probably the network layer relieves its pain in allocating big sk_buff.

xiangping

-----Original Message-----
From: Oliver Xymoron [mailto:oxymoron@waste.org]
Sent: Wednesday, May 15, 2002 6:32 PM
To: chen, xiangping
Cc: 'Jes Sorensen'; 'Steve Whitehouse'; linux-kernel@vger.kernel.org
Subject: RE: Kernel deadlock using nbd over acenic driver.


On Tue, 14 May 2002, chen, xiangping wrote:

> But how to avoid system hangs due to running out of memory?
> Is there a safe guide line? Generally slow is tolerable, but
> crash is not.

If the system runs out of memory, it may try to flush pages that are
queued to your NBD device. That will try to allocate more memory for
sending packets, which will fail, meaning the VM can never make progress
freeing pages. Now your box is dead.

The only way to deal with this is to have a scheme for per-socket memory
reservations in the network layer and have NBD reserve memory for sending
and acknowledging packets. NFS and iSCSI also need this, though it's a
bit harder to tickle for NFS. SCSI has DMA reserved memory for analogous
reasons.

-- 
 "Love the dolphins," she advised him. "Write by W.A.S.T.E.."

^ permalink raw reply	[flat|nested] 53+ messages in thread
* Re: Kernel deadlock using nbd over acenic driver
@ 2002-05-15 21:43 Peter T. Breuer
  2002-05-16  8:33 ` Steven Whitehouse
  0 siblings, 1 reply; 53+ messages in thread
From: Peter T. Breuer @ 2002-05-15 21:43 UTC (permalink / raw)
  To: steve; +Cc: alan, chen_xiangping, kumbera, linux kernel

(Addresses got munged locally, but as I'm postmaster, I get the mail
after 26 bounces, so no hassle ...)

Let's see if I follow ...

> thanks for the info. I'm starting to form some ideas of what the problem
> with nbd might be. Here is my initial idea of what might be going on:
> 
>  1. Something happens which starts lots of I/O (e.g. the ext3/xfs journal
>     flush that Xiangping says usually triggers the problem)

Is this any kind of i/o? Such as swapping? You mean something which
takes the i/o lock, or which generally exercises the i/o system .. And
are there any particular characteristics to the "a lot" that you have
in mind, such as maybe running us out of requests on that device (no), or 
running us low on available free buffers (yes?).

>  2. One of the threads doing the writes blocks running the device I/O

If a thread blocks running its own device i/o queue, that would be 
a fatal error for most of the kernel. The i/o lock is held. And -
correct me on this - interrupts are disabled?

So I assume you are talking about "a bug in something, somewhere".


>     queue and causing nbd_send_req(), nbd_xmit() to block in the 
>     sendmsg() call (trying to allocate memory GFP_NOIO). I think we

Well,  I do the networking in userspace in ENBD, but it is still
going to cause a sendmsg() to happen. If that sendmsg is blocked, then
the client daemon is blocked, and the kernel will time out the daemon,
and rollback the requests in let it have .. and that IS what is
observed.

Yes - a blocked userspace daemon is what I believe to be observed.
Blocked in networking matches what I have heard.

>     only need to have each memory zones free pages just below pages_min
>     at the right time to trigger this.

I don't understand the specific allusion, but I gather you are talking
about low free pages. Yes, being run out of memory matches the reports.
Particularly the people who are swapping over nbd under memory pressure
are in that situation.

So - is that situation handled differently in the old VM?

>  3. Since bdflush will most likely be running it waits for the dirty
>     blocks its submitted to finish being written back to the
>     nbd device to finish.

Umm ... well, that's bdflush for you! As far as I recall bdflush
tries various different kinds of hard to get rid of dirty stuff?
Let's suppose its in sync mode, and see where we get ..

> So something to try is this, in nbd_send_req() add the lines:
> 
> 	if (current->flags & PF_MEMALLOC == 0) {
> 		current->flags |= PF_MEMALLOC;
> 		we_set_memalloc = 1;
> 	}

Uh, I can't try that directly, because my networking is done from
userspace in ENBD.  But I abstract from that that you want us to
notice that PF_MEMALLOC is not set, and set it, and remember when
we set it. Kernel nbd does this in the context of the process that is
stuck in kernel forever, but I can do it whenever the process
enters the kernel to pick up a request.

> before the first nbd_xmit() call and
> 
> 	if (we_set_memalloc)
> 		current->flags &= ~PF_MEMALLOC;
> 
> at the end just before the return; rememebring to declare the variable:

You want to invert the change after having sent the networking data out.

Well, I think this raises the priority for getting memory of the process
doing the networking. Yep. I can do that. It's a real userspace process
for me, but it's in a tight loop doing the protocol, and nothing else.

> int we_set_memalloc = 0;

Why don't we do it always? Surely what you are saying is that a process
doing networking needs priority for memory? If so, the right place to
do this is in send_msg, not in nbd, as it's a generic problem, just
one that happens to be exposed by nbd.

> at the top of the function. We know that since the box stays responsive to
> pings that there must be some free memory, so I suspect some kind of
> "priority inversion" is at work here.

OK ... that is a high priority process waiting on a low priority
process, and thereby keeping it locked out.

> Another interesting idea... if we changed the icmp receive function so that
> it leaked all echo request packets rather than recycling them we could
> measure the free memory after the box has hung by seeing how many times
> we can ping it before it stops replying. An interesting way to
> measure free memory, but probably quite effective :-)

That is not a bad test. I've asked if anybody can get mem stats out via
magic key combos, but never had any comeback on that.

> It looks like adding the line:
> 
> 	if (icmph->type == ICMP_ECHO) return;
> 
> just after (icmp_pointers[icmph->type].handler)(skb); in icmp.c:icmp_rcv()
> should do the trick in this case.

I think it would be easier to get stats out in a sysreq sort of way!

> Those are my current thoughts. Let me know if you are sure that some of
> what I've said is right/wrong, otherwise I'll have a go tomorrow at

Back in 2.2 times, there was a network memory priority problem "solved"
in 2.2.17. I was never convinced by the solution. It addressed the
network competing for memory against other claimants, and arranged that
the network won. But I did not see that that stopped one running out
of memory, and then the network blocking against _nothing_.

The only strategy that will work is to reserve some memory for the net,
and this processes networking in particular! How much? Well, as big
as a max_sectors for the device, at any rate.


> trying to prove some of it on my test system here,

Peter

^ permalink raw reply	[flat|nested] 53+ messages in thread
* Re: Kernel deadlock using nbd over acenic driver
@ 2002-05-15 17:43 Peter T. Breuer
  2002-05-15 19:43 ` Steven Whitehouse
  0 siblings, 1 reply; 53+ messages in thread
From: Peter T. Breuer @ 2002-05-15 17:43 UTC (permalink / raw)
  To: steve, alan, chen_xiangping, kumbera
  Cc: linux kernel, steve, alan, chen_xiangping, kumbera

"A month of sundays ago ptb wrote:"
> There are also several studies being made from collaborators in
> Heidelberg which show qualitative differences between new VM and old VM
> behaviour on the _server_ side.  Basically, put an old VM on the server,
> and push data to it with VM, and you get something like a steady
> 16.5MB/s.  Put a new VM in and you get pulsed behaviour.  Maybe 18.5MB/s
> tops, dropping to nothing, then picking up again, at maybe 7s intervals.

I'll just let you know (in secret) one of the graphs that Arne sent me
today ...

  http://web.kip.uni-heidelberg.de/~wiebalck/results/plots/disk_net_GbE.pdf

I don't know the details of this experiment, but it's a push of data
over the Giga-net through ENBD to a server with a modern VM. I think
the timing on the server graph is slightly shifted .. I believe it's
been shown in other experiments that the server disk i/o blocks first,
and then the network backs up afterwards.



Peter

^ permalink raw reply	[flat|nested] 53+ messages in thread
* RE: Kernel deadlock using nbd over acenic driver
@ 2002-05-15 16:01 Peter T. Breuer
  0 siblings, 0 replies; 53+ messages in thread
From: Peter T. Breuer @ 2002-05-15 16:01 UTC (permalink / raw)
  To: linux kernel; +Cc: steve, alan, chen_xiangping, kumbera


Steven Whitehouse wrote:
> I don't think the system has "run out" exactly, more just got itself into
> a state where the code path writing out dirty blocks has been blocked
> due to lack of freeable memory at that moment and where the process
> freeing up memory has blocked waiting for the nbd device. It may well
> be that there is freeable memory, just that for whatever reason no
> process is trying to free it.

I'll provide some datapoints vis-a-vis the "Enhanced" NBD (ENBD, see
freshmeat). There have been sporadic reports of lock up with ENBD
too. Lately I have had a good report in which the reporter was
swapping over ENBD (it _is_ possible) and where the kernel locked
almost immediately under kernel 2.4.18, and the thing ran perfectly
under kernel 2.4.9. That coincides with my general feeling that a
lockup of VM against tcp is possible with the current VM.


The precise report is:

(Michael Kumbera)
) I'm trying to get swap working with nbd on a 2.4.18
) kernel (redhat 7.3) and my machine hangs when I start
) to swap.
) 
) This works great if a boot to a 2.4.9 kernel so I 
) assume it's an interaction with the "new" VM system. 
) Does anyone know if I can tune /proc/sys/vm/* to make
) it more stable?
) 
) I have tried to set the bdflush_nfract_sync to 100%
) and the bdflush_nfract to 0% and still hang almost
) instantly.
) 
) Any ideas? Does anyone have nbd swap working on a
) 2.4.10 (or greater) kernel?

and

) > You ARE using "-s", yes?
) 
) Yes, I'm using the "-s" options.  I just tried the -s -a and no change.
) As soon as the machine starts to really swap it hangs.
) The system uses the network heavily for about 3-5 seconds and then
) nothing.

and

) My client machien is a Dual CPU Athlon 1.6GHz and I'm
) running on a 100M connection to a P4 server. 

His test is:

) > The program malloc's out 1G of memory 64M at a time.  After each
) > malloc
) > I memset the allocated block to zero. I picked 1G since that is my
) > physical memory size. (I create a 512M swap partition with enbd)

Now, the primary difference (in this area) between ENBD and NBD is that
ENBD does its networking in userspace, so that it can use other
transport media, and do more sophisticated reconnections.  The client
daemons call mlockall() to lock themselves in memory when the -s flag is
given.  They transfer data to and from the kernel via ioctls on the nbd
device. When -a is given, they "trust the net" and ack the kernel
before getting an ack back from the net, so a kernel request may
be released before the corresponding network packets have been made,
sent out, and recieved back, which avoids one potential deadlock if
tcp can deadlock.

The report says that neither of these strategies (together) is
effective in kernel 2.4.18, and it works fine in kernel 2.4.9.

I have also found that many potential problems in 2.4.18 are solved if
one lowers the VM async buffers trigger point so that buffers start to
go to the net immediately, and if one increases the VM sync buffer point
so that the system never goes synchronous.  I guess that when the kernel
hits the sync point, that all buffer i/o goes synchronous, and we cannot
use the net to send out the requests and get back the ack that would
free the nbd requests that are creating the pressure.  Anecdotal
evidence suggests that if you supply more real ram, this kind of
deadlock ceases to be even a possibililty.

Can one change the VM parameters on a per-device basis? Or at least
monitor them?

There are also several studies being made from collaborators in
Heidelberg which show qualitative differences between new VM and old VM
behaviour on the _server_ side.  Basically, put an old VM on the server,
and push data to it with VM, and you get something like a steady
16.5MB/s.  Put a new VM in and you get pulsed behaviour.  Maybe 18.5MB/s
tops, dropping to nothing, then picking up again, at maybe 7s intervals.

To my control-theoretic trained eyes, that looks like two control
systems locked together, one of them at least doing stop-start control,
with hysteresis.  The old VM, by contrast, looks as though it's using
predictive control (i.e.  the equations contain a differential term,
which would be "acceleration" in this setting) and thus damping the
resonance.  The new VMs look to be resonating when linked by nbd.

I suspect that the new VM has got rid of some slow-throttling mechanisms
that previously avoided the possibility of deadlocking against tcp.
But I'm at a loss to explain why swap is showing up as being
particularly sensitive. Maybe it's simply treated differently by the
new VM.

Anyway, if you have any comments, please let me see them!

Should Andrea or Rik be in on this?





Peter


^ permalink raw reply	[flat|nested] 53+ messages in thread
* RE: Kernel deadlock using nbd over acenic driver.
@ 2002-05-14 17:36 chen, xiangping
  2002-05-14 18:02 ` Alan Cox
  0 siblings, 1 reply; 53+ messages in thread
From: chen, xiangping @ 2002-05-14 17:36 UTC (permalink / raw)
  To: 'Alan Cox'; +Cc: jes, Steve, linux-kernel

But ... It seems that there is no direct way to adjust the tcp max 
window size in Linux kernel.

-----Original Message-----
From: Alan Cox [mailto:alan@lxorguk.ukuu.org.uk]
Sent: Tuesday, May 14, 2002 12:48 PM
To: chen, xiangping
Cc: jes@wildopensource.com; Steve@ChyGwyn.com;
linux-kernel@vger.kernel.org
Subject: Re: Kernel deadlock using nbd over acenic driver.


> Xiangping> So for gigabit Ethernet driver, what is the optimal mem
> Xiangping> configuration for performance and reliability?
> 
> It depends on your application, number of streams, general usage of
> the connection etc. There's no perfect-for-all magic number.

The primary constraints are

	TCP max window size
	TCP congestion window size (cwnd)
	Latency

Most of the good discussion on this matter can be found in the ietf
archives from the window scaling options work, and in part in the RFC's
that led to

^ permalink raw reply	[flat|nested] 53+ messages in thread
* RE: Kernel deadlock using nbd over acenic driver.
@ 2002-05-14 16:07 chen, xiangping
  2002-05-14 16:32 ` Steven Whitehouse
                   ` (2 more replies)
  0 siblings, 3 replies; 53+ messages in thread
From: chen, xiangping @ 2002-05-14 16:07 UTC (permalink / raw)
  To: 'Jes Sorensen'; +Cc: 'Steve Whitehouse', linux-kernel

But how to avoid system hangs due to running out of memory?
Is there a safe guide line? Generally slow is tolerable, but
crash is not.

Thanks,

Xiangping

-----Original Message-----
From: Jes Sorensen [mailto:jes@wildopensource.com]
Sent: Tuesday, May 14, 2002 11:11 AM
To: chen, xiangping
Cc: 'Steve Whitehouse'; linux-kernel@vger.kernel.org
Subject: Re: Kernel deadlock using nbd over acenic driver.


>>>>> "Xiangping" == chen, xiangping <chen_xiangping@emc.com> writes:

Xiangping> But the acenic driver author suggested that sndbuf should
Xiangping> be at least 262144, and the sndbuf can not exceed
Xiangping> r/wmem_default. Is that correct?

Ehm, the acenic author is me ;-)

The default value is what all sockets are assigned on open, you can
adjust this using SO_SNDBUF and SO_RCVBUF, however the values you set
cannot exceed the [rw]mem_max values. Basically if you set the default
to 4MB, your telnet sockets will have a 4MB default limit as well
which may not be what you want (not saying it will use 4MB).

Thus, set the _max values and use SO_SNDBUF and SO_RCVBUF to set the
per process values. But leave the _default values to their original
setting.

Xiangping> So for gigabit Ethernet driver, what is the optimal mem
Xiangping> configuration for performance and reliability?

It depends on your application, number of streams, general usage of
the connection etc. There's no perfect-for-all magic number.

Jes

^ permalink raw reply	[flat|nested] 53+ messages in thread
* RE: Kernel deadlock using nbd over acenic driver.
@ 2002-05-14 15:05 chen, xiangping
  2002-05-14 15:11 ` Jes Sorensen
  0 siblings, 1 reply; 53+ messages in thread
From: chen, xiangping @ 2002-05-14 15:05 UTC (permalink / raw)
  To: 'Jes Sorensen'; +Cc: 'Steve Whitehouse', linux-kernel

But the acenic driver author suggested that sndbuf should be at least
262144, and the sndbuf can not exceed r/wmem_default. Is that correct?

So for gigabit Ethernet driver, what is the optimal mem configuration
for performance and reliability?

Thanks,

Xiangping

-----Original Message-----
From: Jes Sorensen [mailto:jes@wildopensource.com]
Sent: Tuesday, May 14, 2002 10:59 AM
To: chen, xiangping
Cc: 'Steve Whitehouse'; linux-kernel@vger.kernel.org
Subject: Re: Kernel deadlock using nbd over acenic driver.


>>>>> "xiangping" == chen, xiangping <chen_xiangping@emc.com> writes:

xiangping> Hi, When the system stucks, I could not get any response
xiangping> from the console or terminal.  But basically the only
xiangping> network connections on both machine are the nbd connection
xiangping> and a couple of telnet sessions. That is what shows on
xiangping> "netstat -t".

xiangping> /proc/sys/net/ipv4/tcp_[rw]mem are "4096 262144 4096000",
xiangping> /proc/sys/net/core/*mem_default are 4096000,
xiangping> /proc/sys/net/core/*mem_max are 8192000, I did not change
xiangping> /proc/sys/net/ipv4/tcp_mem.

Don't do this, setting the [rw]mem_default values to that is just
insane. Do it in the applications that needs it and nowhere else.

xiangping> The system was low in memory, I started up 20 to 40 thread
xiangping> to do block write simultaneously.

If you have a lot of outstanding connections and active threads, it's
not unlikely you run out of memory if each socket eats 4MB.

Jes

^ permalink raw reply	[flat|nested] 53+ messages in thread
* RE: Kernel deadlock using nbd over acenic driver.
@ 2002-05-10 15:39 chen, xiangping
  0 siblings, 0 replies; 53+ messages in thread
From: chen, xiangping @ 2002-05-10 15:39 UTC (permalink / raw)
  To: 'Steve Whitehouse'; +Cc: linux-kernel

The hang happens quickly after I start the test if using EXT3 or XFS,
it rarely happens when I use EXT2 filesystem. So I guess the behavior
is related to the file system buffer flush pattern.


xiangping

-----Original Message-----
From: Steven Whitehouse [mailto:steve@gw.chygwyn.com]
Sent: Friday, May 10, 2002 11:11 AM
To: chen, xiangping
Cc: linux-kernel@vger.kernel.org
Subject: Re: Kernel deadlock using nbd over acenic driver.


Hi,

> 
> Hi,
> 
[deadlock conditions snipped]
> 
> The nbd_client get stuck in sock_recvmsg, and one other process stucks
> in do_nbd_request (sock_sendmsg). I will try to use kdb to give you
> more foot print.
> 
Anything extra you can send me like that will be very helpful.

> The system was low in memory, I started up 20 to 40 thread to do block
> write simultaneously.
> 
Ok. I'll have to try and set something similar up because I've not seen
any hangs with the latest nbd in 2.4 at all. Do you find that the hangs
happen relatively quickly after you start the I/O or is it something
which takes some time ?

Steve.

^ permalink raw reply	[flat|nested] 53+ messages in thread
* RE: Kernel deadlock using nbd over acenic driver.
@ 2002-05-10 15:02 chen, xiangping
  2002-05-10 15:11 ` Steven Whitehouse
  2002-05-14 14:58 ` Jes Sorensen
  0 siblings, 2 replies; 53+ messages in thread
From: chen, xiangping @ 2002-05-10 15:02 UTC (permalink / raw)
  To: 'Steve Whitehouse'; +Cc: linux-kernel

Hi,

When the system stucks, I could not get any response from the console or
terminal.
But basically the only network connections on both machine are the nbd
connection
and a couple of telnet sessions. That is what shows on "netstat -t".

/proc/sys/net/ipv4/tcp_[rw]mem are "4096  262144 4096000",
/proc/sys/net/core/*mem_default are 4096000, 
/proc/sys/net/core/*mem_max   are 8192000,
I did not change /proc/sys/net/ipv4/tcp_mem.

The nbd_client get stuck in sock_recvmsg, and one other process stucks
in do_nbd_request (sock_sendmsg). I will try to use kdb to give you
more foot print.

The system was low in memory, I started up 20 to 40 thread to do block
write simultaneously.

The nbd device was not used as swap device.

Thanks,

Xiangping

-----Original Message-----
From: Steven Whitehouse [mailto:steve@gw.chygwyn.com]
Sent: Tuesday, May 07, 2002 4:16 AM
To: chen, xiangping
Cc: linux-kernel@vger.kernel.org
Subject: Re: Kernel deadlock using nbd over acenic driver.


Hi,

I suggest trying 2.4.19-pre8 first. This has the fix for the deadlock that
I'm
aware of in it. If that still doesn't work, then try and send me as much
information as the system will let you extract. What I'm most interested
in is:

 o State of the sockets (netstat -t on both client and server)
 o Values of /proc/sys/net/ipv4/tcp_[rw]mem and tcp_mem
 o Does the nbd client get stuck in the D state before or after any other
   processes doing I/O through nbd? This is useful as it tells me whether
   the problem is on a transmit or receive.
 o Was your system low on memory at the time ?
 o Were you trying to use nbd as a swap device ?

Steve.
 
> 
> Hi,
> 
> I am using 2.4.16 with xfs patch from SGI. It may not be the acenic
> driver problem, I can reproduce the deadlock in a 100 base-T network
> using eepro100 driver. Closing the server did not release the deadlock.
> What else can I try?
> 
> 
[original messages cut here]

^ permalink raw reply	[flat|nested] 53+ messages in thread
* RE: Kernel deadlock using nbd over acenic driver.
@ 2002-05-06 15:05 chen, xiangping
  2002-05-07  8:15 ` Steven Whitehouse
  0 siblings, 1 reply; 53+ messages in thread
From: chen, xiangping @ 2002-05-06 15:05 UTC (permalink / raw)
  To: 'Steve Whitehouse'; +Cc: linux-kernel

Hi,

I am using 2.4.16 with xfs patch from SGI. It may not be the acenic
driver problem, I can reproduce the deadlock in a 100 base-T network
using eepro100 driver. Closing the server did not release the deadlock.
What else can I try?


-----Original Message-----
From: Steven Whitehouse [mailto:steve@gw.chygwyn.com]
Sent: Monday, May 06, 2002 4:46 AM
To: chen, xiangping
Cc: linux-kernel@vger.kernel.org
Subject: Re: Kernel deadlock using nbd over acenic driver.


Hi,

What kernel version are you using ? I suspect that its not the ethernet
driver causing this deadlock. Am I right in thinking that if you kill the
nbd server process that the hanging process is released ?

Steve.

> 
> Hi,
> 
> I encounter a deadlock situation when using nbd device over gigabit
> ethernet. The network card is 3c 985 giga card using acenic driver. When
the
> network has some significant back ground traffic, even making a ext2 file
> system can not succeed. When the deadlock happens, the nbd client daemon
> just stuck in tcp_recvmsg() without receiving any data, and the sender
> threads continue to send out requests until the whole system hangs. Even I
> set the nbd client daemon SNDTIMEO, the nbd client daemon could not exit
> from tcp_recvmsg(). 
> 
> Is there any known problem with the acenic driver? How can I identify it
is
> a problem of the NIC driver, or somewhere else?
> 
> Thanks for help!
> 
> 
> Xiangping Chen 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

^ permalink raw reply	[flat|nested] 53+ messages in thread
* Kernel deadlock using nbd over acenic driver.
@ 2002-05-06  2:26 chen, xiangping
  2002-05-06  8:45 ` Steven Whitehouse
  0 siblings, 1 reply; 53+ messages in thread
From: chen, xiangping @ 2002-05-06  2:26 UTC (permalink / raw)
  To: 'linux-kernel@vger.kernel.org'

Hi,

I encounter a deadlock situation when using nbd device over gigabit
ethernet. The network card is 3c 985 giga card using acenic driver. When the
network has some significant back ground traffic, even making a ext2 file
system can not succeed. When the deadlock happens, the nbd client daemon
just stuck in tcp_recvmsg() without receiving any data, and the sender
threads continue to send out requests until the whole system hangs. Even I
set the nbd client daemon SNDTIMEO, the nbd client daemon could not exit
from tcp_recvmsg(). 

Is there any known problem with the acenic driver? How can I identify it is
a problem of the NIC driver, or somewhere else?

Thanks for help!


Xiangping Chen 

^ permalink raw reply	[flat|nested] 53+ messages in thread

end of thread, other threads:[~2002-06-06 18:28 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-14 17:42 Kernel deadlock using nbd over acenic driver chen, xiangping
  -- strict thread matches above, loose matches on Subject: below --
2002-05-16 22:54 Peter T. Breuer
2002-05-17  8:44 ` Steven Whitehouse
2002-05-23 13:21   ` Peter T. Breuer
2002-05-24 10:11     ` Steven Whitehouse
2002-05-24 11:43       ` Peter T. Breuer
2002-05-24 13:28         ` Steven Whitehouse
2002-05-24 15:54           ` Peter T. Breuer
2002-05-27 13:04             ` Steven Whitehouse
2002-05-27 19:51               ` Peter T. Breuer
2002-05-27 13:44         ` Pavel Machek
2002-05-29 10:51           ` Peter T. Breuer
2002-05-29 11:21             ` Pavel Machek
2002-05-29 12:10               ` Peter T. Breuer
2002-05-29 13:24                 ` Jens Axboe
2002-06-01 21:13       ` Peter T. Breuer
2002-06-05  8:48         ` Steven Whitehouse
2002-06-02  6:39           ` Pavel Machek
     [not found] <3CE40A77.22C74DC1@zip.com.au>
2002-05-16 20:28 ` Peter T. Breuer
2002-05-16 13:18 chen, xiangping
2002-05-15 21:43 Peter T. Breuer
2002-05-16  8:33 ` Steven Whitehouse
2002-05-15 17:43 Peter T. Breuer
2002-05-15 19:43 ` Steven Whitehouse
2002-05-16  5:15   ` Peter T. Breuer
2002-05-16  8:04     ` Steven Whitehouse
2002-05-16  8:49       ` Peter T. Breuer
2002-05-15 16:01 Peter T. Breuer
2002-05-14 17:36 chen, xiangping
2002-05-14 18:02 ` Alan Cox
2002-05-14 16:07 chen, xiangping
2002-05-14 16:32 ` Steven Whitehouse
2002-05-14 16:48 ` Alan Cox
2002-05-15 22:31 ` Oliver Xymoron
2002-05-16  5:10   ` Peter T. Breuer
2002-05-16  5:19     ` Peter T. Breuer
2002-05-16 14:29       ` Oliver Xymoron
2002-05-16 15:35         ` Peter T. Breuer
2002-05-16 16:22           ` Oliver Xymoron
2002-05-16 16:45             ` Peter T. Breuer
2002-05-16 16:35               ` Steven Whitehouse
2002-05-17  7:01                 ` Peter T. Breuer
2002-05-17  9:26                   ` Steven Whitehouse
2002-05-14 15:05 chen, xiangping
2002-05-14 15:11 ` Jes Sorensen
2002-05-10 15:39 chen, xiangping
2002-05-10 15:02 chen, xiangping
2002-05-10 15:11 ` Steven Whitehouse
2002-05-14 14:58 ` Jes Sorensen
2002-05-06 15:05 chen, xiangping
2002-05-07  8:15 ` Steven Whitehouse
2002-05-06  2:26 chen, xiangping
2002-05-06  8:45 ` Steven Whitehouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).