Skip to contentSkip to conversation

QLogic Fibre Channel HBA Support

DISCUSSION Steve Traugott 3 participants 7 messages Jul 6, 2004 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 7 lines · Brian Wolfe

Well, after having to restart another of the domains on that xen server I discovered that the last in the list is the one that would lock up once every 24 hours. (not certain fo the exact timeframe since it locks during the night.)

I've disabled the cron entries that generate high workload to eliminate that as a possible cause.

This may do it -- once I told my beta users that high workloads and/or lots of entropy use could cause hangs, they started nice'ing and --bwlimit'ing their ssh rsyncs, and there hasn't been a hang for a few weeks. No proof whether I was hitting another entropy bug or just workload. (Reminder to lurkers -- I'm running 1.2 with /dev/random major,minor set to 1,9 -- same as /dev/urandom.)

Quoted 3 lines

Next is to try running the virtual server on another xen host that is running an older version of xen and xenolinux, see if that still hangs it.

I think it should get worse if it changes at all. Your /dev/random is 1,8, right?

Quoted 6 lines

I'll report more as I find it. However, I'm still swamped with house repairs. 8-( a 10' section of wall that's destroyed by termites, a bad kithen remodeling that has gone rotten (literally), and a bathroom shower install where they "forgot" to add the drain part that mates the drain hole to the drain pipe. I may have to post a pic of the shower issue to show how stupid it is. ;-P

I feel your pain. ;-) Building a home server closet here (this is silly valley; it'll probably even increase the house value). It's been an 18-month project so far, 80 amp subpanel, dedicated air conditioner in the closet, that sort of thing. Lots of conduit, wiring, structural, attic, and drywall work. Gotta deal with the fiberglass insulation this week -- my wife says I keep putting that part off, I keep telling her she has no idea how itchy that stuff is... :-} The good news is, when it's finally done it'll be able to serve as a minimal disaster recovery site for the Xen infrastructure we're building at our shop. Woo hoo.

Steve

Signature · 11 lines
Stephen G. Traugott  (KG6HDQ)
UNIX/Linux Infrastructure Architect, TerraLuna LLC
[email protected] 
http://www.stevegt.com -- http://Infrastructures.Org 


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
#2 lore raw
Quoted 16 lines · Brian Wolfe
Quoted 7 lines

Well, after having to restart another of the domains on that xen server I discovered that the last in the list is the one that would lock up once every 24 hours. (not certain fo the exact timeframe since it locks during the night.)

I've disabled the cron entries that generate high workload to eliminate that as a possible cause.

This may do it -- once I told my beta users that high workloads and/or lots of entropy use could cause hangs, they started nice'ing and --bwlimit'ing their ssh rsyncs, and there hasn't been a hang for a few weeks. No proof whether I was hitting another entropy bug or just workload. (Reminder to lurkers -- I'm running 1.2 with /dev/random major,minor set to 1,9 -- same as /dev/urandom.)

Quoted 6 lines
Quoted 3 lines

Next is to try running the virtual server on another xen host that is running an older version of xen and xenolinux, see if that still hangs it.

I think it should get worse if it changes at all. Your /dev/random is 1,8, right?

If you use /dev/urandom (1,9) then you will never block while reading entropy. The /only/ time anything can block while extracting entropy is when a user application reads from /dev/random (1,8).

If you've linked /dev/random -> /dev/urandom then any lockups must be due to bugs elsewhere.

Compare:
while [ true ] ; do dd if=/dev/urandom of=/dev/null bs=512 count=1024 2>/dev/null && echo -n "." ; done while [ true ] ; do dd if=/dev/random of=/dev/null bs=512 count=1024 2>/dev/null && echo -n "." ; done

-- Keir

-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com

#3 lore raw
In reply to Steve Traugott
Quoted 4 lines

No proof whether I was hitting another entropy bug or just
workload. (Reminder to lurkers -- I'm running 1.2 with /dev/random major,minor set to 1,9 -- same as /dev/urandom.)

If you temporarily run out of entropy, it should only ever be the particular user-space process that's reading from /dev/random that blocks. Everything else should carry on fine in the meantime.

In the unstable tree, AFAIK all interrupt sources are correctly adding entropy to the kernel's entropy pool -- there are just fewer bits of entropy generated per second in a VM.

If people are still finding that some heavy users of /dev/random are blocking unexpectedly (e.g. apache during startup) then we'll need to think what to do. One grim hack would be to modify the guest kernel to make it less conservative about its estimate of entropy generated. An alternative would be to have Xen handle entropy generation centrally (from all physical interrupt sources) and then have a special random driver in each guest.

Ian

-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com

#4 lore raw
Quoted 8 lines · Ian Pratt
Quoted 4 lines

No proof whether I was hitting another entropy bug or just
workload. (Reminder to lurkers -- I'm running 1.2 with /dev/random major,minor set to 1,9 -- same as /dev/urandom.)

If you temporarily run out of entropy, it should only ever be the particular user-space process that's reading from /dev/random that blocks. Everything else should carry on fine in the meantime.

A little hard to tell -- in our case, hangs happen days after startup, are pingable, but can't ssh in, don't respond to http requests, don't show new syslog entries, etc. Some of these (maybe not syslog) might be explained by named hanging, for instance, since it uses /dev/random (but I haven't looked to see what named does with it -- maybe only sortlist randomization). That plus a dose of not knowing what to look for at the time could have made them look like a total inability to execute userspace code and/or write to the root filesystem.

Are these symptoms consistent with what you know about the NFS bug?

I now have users executing a simple controller script themselves via ssh to reboot machines when they hang -- it might make sense to start adding diagnostic data collection to that. Right now it only makes a short log entry -- and what I said a couple of days ago about "no hangs in a month" was wrong. There are recent log entries; people have just been rebooting their own hangs and have stopped telling me.

Quoted 11 lines

In the unstable tree, AFAIK all interrupt sources are correctly adding entropy to the kernel's entropy pool -- there are just fewer bits of entropy generated per second in a VM.

If people are still finding that some heavy users of /dev/random are blocking unexpectedly (e.g. apache during startup) then we'll need to think what to do. One grim hack would be to modify the guest kernel to make it less conservative about its estimate of entropy generated. An alternative would be to have Xen handle entropy generation centrally (from all physical interrupt sources) and then have a special random driver in each guest.

The only thing that bothers me about the latter is the special driver needed in the guests. On the upside, I bet you could generate plenty of entropy if it were done centrally. If so, I'm wondering if it would be mathematically safe to include non-interrupt activities of other guests in the pool as well.

Steve

Signature · 11 lines
Stephen G. Traugott  (KG6HDQ)
UNIX/Linux Infrastructure Architect, TerraLuna LLC
[email protected] 
http://www.stevegt.com -- http://Infrastructures.Org 


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
#5 lore raw
Quoted 5 lines
Quoted 4 lines

If you temporarily run out of entropy, it should only ever be the particular user-space process that's reading from /dev/random that blocks. Everything else should carry on fine in the meantime.

Quoted 8 lines

A little hard to tell -- in our case, hangs happen days after startup, are pingable, but can't ssh in, don't respond to http requests, don't show new syslog entries, etc. Some of these (maybe not syslog) might be explained by named hanging, for instance, since it uses /dev/random (but I haven't looked to see what named does with it -- maybe only sortlist randomization). That plus a dose of not knowing what to look for at the time could have made them look like a total inability to execute userspace code and/or write to the root filesystem.

If you've got a console connection it should be pretty easy to tell whether its just one process blocked on /dev/random or the whole of the kernel sick due to an NFS deadlock.

I believe the former to be most likely solved, which does suggest the latter. Once you have iSCSI or the SAN set up I'd hope the hangs disappear.

Ian

-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com

#6 lore raw
Quoted 3 lines · Ian Pratt

If you've got a console connection it should be pretty easy to tell whether its just one process blocked on /dev/random or the whole of the kernel sick due to an NFS deadlock.

What would we be looking at? 'q' output?

Quoted 3 lines

I believe the former to be most likely solved, which does suggest the latter. Once you have iSCSI or the SAN set up I'd hope the hangs disappear.

I'm betting that's the case -- otherwise I'm going to have a small surplus of fibre channel gear. ;-)

It's going to be at least a week before the equipment arrives, another week for me to get a chance to build and evaluate unstable on it. I'll keep the list posted.

Steve

Signature · 11 lines
Stephen G. Traugott  (KG6HDQ)
UNIX/Linux Infrastructure Architect, TerraLuna LLC
[email protected] 
http://www.stevegt.com -- http://Infrastructures.Org 


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
#7 lore raw
Quoted 6 lines · Ian Pratt
Quoted 3 lines

If you've got a console connection it should be pretty easy to tell whether its just one process blocked on /dev/random or the whole of the kernel sick due to an NFS deadlock.

What would we be looking at? 'q' output?

I was referring to the domain's console rather than the serial console.

In the unstable tree, if you're running a 'getty' on the domain's tty0 you should be able to log in and poke around even if the domain's networking or sshd is screwed. The domain's console will be presented as a TCP socket on domain0 (e.g. "xencons localhost 9601" )

For domain0, you should be able to login over the serial line with a getty on ttyS0.

Ian

-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com