Page: 1, 2  Next

smxi hangs "Calculating latest debian kernel version&qu
vortis
Status: Curious
Joined: 10 Jul 2011
Posts: 7
Location: New Zealand
Reply Quote
Running smxi -G as root in konsole terminal.
It does an apt-get update, then says:
:: Code ::
Calculating latest Debian kernel version...
and hangs after that. Gave it several minutes then aborted.
Log file uploaded at paste.debian.net/122499

inxi output:
:: Code ::
# inxi -bx
System:    Host: alcatraz Kernel: 2.6.32-5-amd64 x86_64 (64 bit, gcc: 4.3.5) Desktop N/A Distro: Debian GNU/Linux 6.0
Machine:   Mobo: ASUSTeK model: P7P55D-E LX version: Rev 1.xx serial: MT700AK03201674
           Bios: American Megatrends version: 1301 date: 08/27/2010
CPU:       Quad core Intel Core i7 CPU 870 (-HT-MCP-) clocked at 1200.00 MHz
Graphics:  Card: nVidia Device 0de1 bus-ID: 01:00.0 X.org: 1.7.7 driver: nvidia tty size: 144x44 Advanced Data: N/A for root
Network:   Card: Realtek RTL8111/8168B PCI Express Gigabit Ethernet controller
           driver: r8169 ver: 2.3LK-NAPI port: d800 bus-ID: 03:00.0
Drives:    HDD Total Size: 2000.4GB (62.2% used)
Info:      Processes: 272 Uptime: 15:56 Memory: 807.9/8003.3MB Runlevel: 2 Gcc sys: 4.4.5 Client: Shell inxi: 1.7.15

Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4127
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
The logs show smxi stopping after the kernel version is calculated, so that's not actually where it is stopped, I tested it a few times and everything seems normal.

This type of hang might be a networking issue, or it could be some error in the smxi code that is only triggering on your system, the usual cause of a total hang is forgetting to give grep something to parse, then it just sits there, but usually I'd see that.

The actual halt is here:
:: Code ::
Function: print_install_information - Primary: Start


And specifically, in terms of logic, here's the only place I can see any possible hang:

:: Code ::
df -h -T | grep -E '(/|/boot|/var|/home)$'  | S=${S} C=${C} awk '{print $NF, ENVIRON["S"]" - ", "Type:"ENVIRON["C"], $(NF-5), ENVIRON["S"]"Size:"ENVIRON["C"], $(NF-4), ENVIRON["S"]"Used:"ENVIRON["C"], $(NF-3), ENVIRON["S"]"("ENVIRON["C"], $(NF-1), ENVIRON["S"]")", "Free:"ENVIRON["C"], $(NF-2)}'


but that would be weird, I've never seen that hang.

Since I'm not seeing obvious places, take a look in dmesg for kernel oops or something like that, look in df -hT

After that there's not a lot to look for.
Back to top
vortis
Status: Curious
Joined: 10 Jul 2011
Posts: 7
Location: New Zealand
Reply Quote
:: techAdmin wrote ::
...
And specifically, in terms of logic, here's the only place I can see any possible hang:

:: Code ::
df -h -T | grep -E '(/|/boot|/var|/home)$'  | S=${S} C=${C} awk '{print $NF, ENVIRON["S"]" - ", "Type:"ENVIRON["C"], $(NF-5), ENVIRON["S"]"Size:"ENVIRON["C"], $(NF-4), ENVIRON["S"]"Used:"ENVIRON["C"], $(NF-3), ENVIRON["S"]"("ENVIRON["C"], $(NF-1), ENVIRON["S"]")", "Free:"ENVIRON["C"], $(NF-2)}'


but that would be weird, I've never seen that hang.


As you mentioned network issues, I checked that NFS mounts and such like were all in place, and tried again. It got a little further, i.e. an error message instead of a hang:
:: Code ::

Hit ftp://ftp.nz.debian.org squeeze/non-free amd64 Packages
Reading package lists... Done

Calculating latest Debian kernel version...
awk: (FILENAME=- FNR=4) fatal: attempt to access field -4
------------------------------------------------------------------
Checking for new script engine...


So maybe the 'weird' place, which involves awk, is it.
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4127
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
df -h -T | grep -E '(/|/boot|/var|/home)$' | S=${S} C=${C} awk '{print $NF, ENVIRON["S"]" - ", "Type:"ENVIRON["C"], $(NF-5), ENVIRON["S"]"Size:"ENVIRON["C"], $(NF-4), ENVIRON["S"]"Used:"ENVIRON["C"], $(NF-3), ENVIRON["S"]"("ENVIRON["C"], $(NF-1), ENVIRON["S"]")", "Free:"ENVIRON["C"], $(NF-2)}'

the idea is that you copy that and run it to see if it manifests an error.

If so, that would be a first, although I can think of a case where it might.

Also show plain: df -hT

none of this logic has changed at all for years now, the code hasn't either.

Take a look at the log each time you see an error, and paste in here the last 10 lines or so of it, that's all I actually need to see.
Back to top
vortis
Status: Curious
Joined: 10 Jul 2011
Posts: 7
Location: New Zealand
Reply Quote
:: techAdmin wrote ::
df -h -T | grep -E '(/|/boot|/var|/home)$' | S=${S} C=${C} awk '{print $NF, ENVIRON["S"]" - ", "Type:"ENVIRON["C"], $(NF-5), ENVIRON["S"]"Size:"ENVIRON["C"], $(NF-4), ENVIRON["S"]"Used:"ENVIRON["C"], $(NF-3), ENVIRON["S"]"("ENVIRON["C"], $(NF-1), ENVIRON["S"]")", "Free:"ENVIRON["C"], $(NF-2)}'

the idea is that you copy that and run it to see if it manifests an error.

If so, that would be a first, although I can think of a case where it might.


Well, it's a first! ;-)

df outputs long filesystem names on a line by themselves. I have several CIFS and NFS mounts, and they tend to have much longer than average names, e.g. "abcdefgh:/media/dvdram". That of course upsets awk.

Possible fixes: df option -P forces output on a single line; I don't know how portable that flag is. Or of course the awk script could take account of it, though that could make it rather cumbersome.

So the original "hang" that I reported was probably due to waiting for a CIFS or NFS device to come online. The real error was the awk barf.

Thanks for the help; I can at least run smxi now I know what to watch for.
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4127
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
I'm not going to ask this again:

Please post the data I requested.

df -hT

If you don't post this data, I'm ending this support now.

Nothing is a bigger waste of time than you posting describing data that you are not pasting here for debugging.

Run the command: df -hT
or better yet, so I get the true structure, run this command:
cd && df -hT > dfht.txt
then use paste.debian.net to upload that exact file, using the file upload option, from your user home directory.

We can either solve this problem, or not, but talking about something that requires hard data is not solving it.

So please do not respond to this again until you have provided the data required.

I'm familiar with wrapping df output lines, but I refuse to waste my time inventing such output when you could simply provide it in a few seconds of your time. So read what I write and do as requested, or just leave me alone. Sorry to be brusk, but I clearly asked you to post this data, which is required to fix the problem, and you have now ignored that request totally, as if I hadn't even said it, which makes me unwilling to waste more of my time on this.

With that data, I can inject it directly into my local smxi, debug the problem, and be on my way within a few minutes. Without it, we're just wasting time, not fixing the issue for everyone else, and engaging in totally non productive effort. What's wrong with that picture?
Back to top
vortis
Status: Curious
Joined: 10 Jul 2011
Posts: 7
Location: New Zealand
Reply Quote
:: techAdmin wrote ::
I'm not going to ask this again:
Please post the data I requested.
<snip>

Wow! It must have taken you ages to type all that! ;-)
But anyway, here is the df -hT output you asked for:
:: Code ::
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda2     ext2    313M  275M   22M  93% /
tmpfs        tmpfs    4.0G     0  4.0G   0% /lib/init/rw
udev         tmpfs    4.0G  228K  4.0G   1% /dev
tmpfs        tmpfs    4.0G  768K  4.0G   1% /dev/shm
/dev/sda7     ext4    1.8T  1.2T  545G  69% /home
/dev/sda6     ext4    370M   11M  341M   3% /tmp
/dev/sda3     ext4    8.3G  6.1G  1.8G  78% /usr
/dev/sda4     ext4    2.8G  865M  1.8G  33% /var
//abcdefg_xyzxyz/users/
              cifs    288G  200G   88G  70% /mnt/je/users
//abcdefg_xyzxyz/d/
              cifs    932G  615G  317G  67% /mnt/je/d
abcdefgh:/mnt/winC
               nfs     18G   17G  1.2G  94% /mnt/ca/c
abcdefgh:/mnt/winD
               nfs    5.0G  4.1G  966M  82% /mnt/ca/d
abcdefgh:/home nfs    1.2G  1.1G   20M  99% /mnt/ca/home
abcdefgh:/var  nfs    2.0G  1.8G  101M  95% /mnt/ca/var
abcdefgh:/media/floppy
               nfs    942M  152M  743M  17% /mnt/ca/floppy

The problem happens when the CIFS mounts are (a) long and (b) end in a / character, which they all do.

One fix (that works on my system) is to use 'df -hTP'. Another is to ignore the lines with the filesystem names on, since they are of no interest anyway:
:: Code ::
df -h -T | S=${S} C=${C} awk 'NF>1 && /\/(|boot|var|home)$/{print $NF, ENVIRON["S"]" - ", "Type:"ENVIRON["C"], $(NF-5), ENVIRON["S"]"Size:"ENVIRON["C"], $(NF-4), ENVIRON["S"]"Used:"ENVIRON["C"], $(NF-3), ENVIRON["S"]"("ENVIRON["C"], $(NF-1), ENVIRON["S"]")", "Free:"ENVIRON["C"], $(NF-2)}'

But of course you may have other considerations of which I know nothing.
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4127
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
that's better, the second option looks best to me, thanks.
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4127
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
This is now corrected, I still cannot understand why the script hangs there for you however, awk should just give an error and go on, but it is what it is, maybe a new awk behavior has crept in?

Here's the patched, more robust, solution:

:: Code ::
df -h -T | S=${S} C=${C} awk  '
   (NF > 4) && ($NF ~ /^(\/|\/boot|\/var|\/home)$/ ) {
      print $NF, ENVIRON["S"]" - ", "Type:"ENVIRON["C"], $(NF-5), ENVIRON["S"]"Size:"ENVIRON["C"], $(NF-4), ENVIRON["S"]"Used:"ENVIRON["C"], $(NF-3), ENVIRON["S"]"("ENVIRON["C"], $(NF-1), ENVIRON["S"]")", "Free:"ENVIRON["C"], $(NF-2)
   }'

Back to top
vortis
Status: Curious
Joined: 10 Jul 2011
Posts: 7
Location: New Zealand
Reply Quote
:: techAdmin wrote ::
I still cannot understand why the script hangs there for you ...

I've noticed the system hanging on occasion when it's wanting to access an NFS or CIFS mount whose server is not yet ready. There is a -l flag for df which limits the output to local filesystems; that might be appropriate here.
Back to top
Display posts from previous:   
Page: 1, 2  Next
All times are GMT - 8 Hours