OpenVZ Forum


Home » General » Support » *SOLVED* Seg fault with quotaugidlimit
*SOLVED* Seg fault with quotaugidlimit [message #14151] Fri, 15 June 2007 13:23 Go to next message
MaFL is currently offline  MaFL
Messages: 14
Registered: November 2006
Location: Germany
Junior Member

Hi,

I´m getting seg faults during vps start if I activate the internal quota.
Not 100% sure when it started, but it was not with the development kernels of 2.6.18.

Tested on 2 different hosts.
Filesystem is Reiser.

Vps starts and the quota inside seems to work also.

vzctl start 10

Starting VE ...
Running: /usr/sbin/vzquota show 10 
Running: /usr/sbin/vzquota on 10 -r 0 -b 10240100 -B 11264100 -i 100100 -I 110100 -e 604800 -n 604800 -s 1 -u 200 
Mounting root: /data1/vz/root/10 /data1/vz/private/10
VE is mounted
Set iptables mask 0x000017bf
Set features mask 0000000000000000/0000000000000000
Adding IP address(es): ...
Running: /usr/lib/vzctl/scripts/vps-net_add 
Running VE script: /etc/vz/dists/scripts/debian-add_ip.sh
Setting CPU units: 20000
Configure meminfo: 256000
Set hostname: ...
Running VE script: /etc/vz/dists/scripts/debian-set_hostname.sh
Running VE script: /etc/vz/dists/scripts/set_dns.sh
File resolv.conf was modified
Setting quota ugidlimit: 200
Running VE script: /etc/vz/dists/scripts/set_ugid_quota.sh
Running: /usr/sbin/vzquota stat 10 -f 
Running: /usr/sbin/vzquota stat 10 -f -t 
Segmentation fault


"vzquota stat 10 -f -t" from the commandline works.

Any ideas?

Tnx
Matt

[Updated on: Wed, 27 June 2007 17:28] by Moderator

Report message to a moderator

Re: Seg fault with quotaugidlimit [message #14158 is a reply to message #14151] Sat, 16 June 2007 00:56 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
Hi, I was using reiser+openvz last year, as I know its a superior filesystem from personal experience. But, I ran into problems like this which were unsupported by openvz since it pushes ext3. Since switching to ext3, I haven't had any quota or filesystem problems.

So, I would say either move to ext3 or start a filesystem revolution and get openvz moving in the direction that will support it.

Rick


-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: Seg fault with quotaugidlimit [message #14161 is a reply to message #14151] Sat, 16 June 2007 06:37 Go to previous messageGo to next message
nksupport is currently offline  nksupport
Messages: 16
Registered: June 2007
Junior Member
Do /proc/user_beancounters look OK for that VE?

"It's the power cord", I say
Re: Seg fault with quotaugidlimit [message #14166 is a reply to message #14158] Sat, 16 June 2007 17:38 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

Rick, we do not officially support reiserfs for the only reason - stability/maintaiablity.
However, vzquota should work fine with reiser and AFAIR we were fixing all the bugs people reported.


http://static.openvz.org/userbars/openvz-developer.png
Re: Seg fault with quotaugidlimit [message #14167 is a reply to message #14151] Sat, 16 June 2007 17:40 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

can you please do the following and report the result:

start your VE and do the following:

# strace -f -o out /usr/sbin/vzquota stat 10 -f -t
# dmesg >> out

and show me the out file plz



http://static.openvz.org/userbars/openvz-developer.png
Re: Seg fault with quotaugidlimit [message #14170 is a reply to message #14167] Sat, 16 June 2007 19:09 Go to previous messageGo to next message
MaFL is currently offline  MaFL
Messages: 14
Registered: November 2006
Location: Germany
Junior Member

UBCs are fine.
It´s not vps specific.

 strace -f -o out /usr/sbin/vzquota stat 10 -f -t 
   resource          usage       softlimit      hardlimit    grace
  1k-blocks         839273        10240100       11264100         
     inodes          39257          100100         110100         
User/group quota: -,active
Ugids: loaded 30, total 30, limit 200
Ugid limit was exceeded: no

User/group grace times and quotafile flags:
 type block_exp_time inode_exp_time  dqi_flags
 user                                       0h
group                                       0h

User/group objects:
ID           type  resource       usage   softlimit   hardlimit    grace status
0            user 1k-blocks      766109           0           0          loaded
0            user    inodes       36114           0           0          loaded
0           group 1k-blocks      748558           0           0          loaded
0           group    inodes       34784           0           0          loaded
1            user 1k-blocks           5           0           0          loaded
1            user    inodes           3           0           0          loaded
1           group 1k-blocks           5           0           0          loaded
1           group    inodes           3           0           0          loaded
2            user 1k-blocks        1733           0           0          loaded
2            user    inodes          45           0           0          loaded
2           group 1k-blocks        2539           0           0          loaded
2           group    inodes          56           0           0          loaded
4           group 1k-blocks         982           0           0          loaded
4           group    inodes           4           0           0          loaded
5           group 1k-blocks          21           0           0          loaded
5           group    inodes          34           0           0          loaded
6            user 1k-blocks         608           0           0          loaded
6            user    inodes          28           0           0          loaded
8            user 1k-blocks          50           0           0          loaded
8            user    inodes          15           0           0          loaded
8           group 1k-blocks          62           0           0          loaded
8           group    inodes          14           0           0          loaded
9            user 1k-blocks           1           0           0          loaded
9            user    inodes           1           0           0          loaded
9           group 1k-blocks           1           0           0          loaded
9           group    inodes           4           0           0          loaded
40          group 1k-blocks         123           0           0          loaded
40          group    inodes          36           0           0          loaded
42          group 1k-blocks          73           0           0          loaded
42          group    inodes           6           0           0          loaded
43          group 1k-blocks         401           0           0          loaded
43          group    inodes           4           0           0          loaded
50          group 1k-blocks       23373           0           0          loaded
50          group    inodes        1902           0           0          loaded
100         group 1k-blocks       20026           0           0          loaded
100         group    inodes        1542           0           0          loaded
101         group 1k-blocks          33           0           0          loaded
101         group    inodes           3           0           0          loaded
103          user 1k-blocks       20026           0           0          loaded
103          user    inodes        1542           0           0          loaded
103         group 1k-blocks        9907           0           0          loaded
103         group    inodes           6           0           0          loaded
104          user 1k-blocks        7591           0           0          loaded
104          user    inodes         596           0           0          loaded
104         group 1k-blocks        3432           0           0          loaded
104         group    inodes         483           0           0          loaded
105         group 1k-blocks       29666           0           0          loaded
105         group    inodes         363           0           0          loaded
106         group 1k-blocks           1           0           0          loaded
106         group    inodes           1           0           0          loaded
500          user 1k-blocks          81           0           0          loaded
500          user    inodes          12           0           0          loaded
500         group 1k-blocks          81           0           0          loaded
500         group    inodes          12           0           0          loaded
1000         user 1k-blocks        9847           0           0          loaded
1000         user    inodes           5           0           0          loaded
1001         user 1k-blocks        3623           0           0          loaded
1001         user    inodes         517           0           0          loaded
1002         user 1k-blocks       29604           0           0          loaded
1002         user    inodes         379           0           0          loaded


dmesg has no failure
Linux version 2.6.18-028stab035.1-ovz-smp (tsd@debian.systs.org) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 SMP Wed Jun 13 22:08:06 CEST 2007
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009f400 (usable)
 BIOS-e820: 000000000009f400 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000007fff0000 (usable)
 BIOS-e820: 000000007fff0000 - 000000007ffff000 (ACPI data)
 BIOS-e820: 000000007ffff000 - 0000000080000000 (ACPI NVS)
 BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
 BIOS-e820: 00000000ffb00000 - 0000000100000000 (reserved)
1151MB HIGHMEM available.
896MB LOWMEM available.
found SMP MP-table at 000ff780
On node 0 totalpages: 524272
  DMA zone: 4096 pages, LIFO batch:0
  Normal zone: 225280 pages, LIFO batch:31
  HighMem zone: 294896 pages, LIFO batch:31
DMI 2.3 present.
ACPI: RSDP (v000 ACPIAM                                ) @ 0x000f87e0
ACPI: RSDT (v001 A M I  OEMRSDT  0x01000626 MSFT 0x00000097) @ 0x7fff0000
ACPI: FADT (v002 A M I  OEMFACP  0x01000626 MSFT 0x00000097) @ 0x7fff0200
ACPI: MADT (v001 A M I  OEMAPIC  0x01000626 MSFT 0x00000097) @ 0x7fff0390
ACPI: OEMB (v001 A M I  AMI_OEM  0x01000626 MSFT 0x00000097) @ 0x7ffff040
ACPI: DSDT (v001  STP1A STP1A042 0x00000042 INTL 0x02002026) @ 0x00000000
ACPI: PM-Timer IO Port: 0x808
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
Processor #0 15:2 APIC version 20
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
Processor #1 15:2 APIC version 20
ACPI: LAPIC_NMI (acpi_id[0x01] dfl dfl lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x02] dfl dfl lint[0x1])
ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-23
ACPI: IOAPIC (id[0x03] address[0xfec10000] gsi_base[24])
IOAPIC[1]: apic_id 3, version 32, address 0xfec10000, GSI 24-47
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ10 used by override.
Enabling APIC mode:  Flat.  Using 2 I/O APICs
Using ACPI (MADT) for SMP configuration information
Allocating PCI resources starting at 88000000 (gap: 80000000:7ee00000)
Detected 2793.182 MHz processor.
Built 1 zonelists.  Total pages: 524272
Kernel command line: root=/dev/md0 ro 
mapped APIC to ffffd000 (fee00000)
mapped IOAPIC to ffffc000 (fec00000)
mapped IOAPIC to ffffb000 (fec10000)
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
CPU 0 irqstacks, hard=c05f3000 soft=c05eb000
PID hash table entries: 4096 (order: 12, 16384 bytes)
Console: colour VGA+ 80x25
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 2067524k/2097088k available (3604k kernel code, 28164k reserved, 1088k data, 296k init, 1179584k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay using timer specific routine.. 5588.38 BogoMIPS (lpj=2794191)
Mount-cache hash table entries: 512
CPU: After generic identify, caps: bfebfbff 00000000 00000000 00000000 00004400 00000000 00000000
CPU: After vendor identify, caps: bfebfbff 00000000 00000000 00000000 00004400 00000000 00000000
CPU: Trace cache: 12K uops, L1 D cache: 8K
CPU: L2 cache: 512K
CPU: Physical Processor ID: 0
CPU: After all inits, caps: bfebfbff 00000000 00000000 00000080 00004400 00000000 00000000
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU0: Intel P4/Xeon Extended MCE MSRs (12) available
CPU0: Thermal monitoring enabled
Compat vDSO mapped to ffffe000.
Checking 'hlt' instruction... OK.
Freeing SMP alternatives: 20k freed
ACPI: Core revision 20060707
Page beancounter hash is 131072 entries.
CPU0: Intel(R) Pentium(R) 4 CPU 2.80GHz stepping 05
Booting processor 1/1 eip 2000
CPU 1 irqstacks, hard=c05f4000 soft=c05ec000
Initializing CPU#1
Calibrating delay using timer specific routine.. 5585.25 BogoMIPS (lpj=2792628)
CPU: After generic identify, caps: bfebfbff 00000000 00000000 00000000 00004400 00000000 00000000
CPU: After vendor identify, caps: bfebfbff 00000000 00000000 00000000 00004400 0000
...

Re: Seg fault with quotaugidlimit [message #14179 is a reply to message #14151] Mon, 18 June 2007 08:54 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

Can you please apply the following patch:
--- ./arch/i386/mm/fault.c.ve5555       2007-06-08 17:29:35.000000000 +0400
+++ ./arch/i386/mm/fault.c      2007-06-18 12:53:50.000000000 +0400
@@ -475,6 +475,10 @@ bad_area_nosemaphore:
                if (is_prefetch(regs, address, error_code))
                        return;

+               printk( "%s[%d]: segfault at %08lx rip %08lx rsp %08lx error %lx\n",
+                                       tsk->comm, tsk->pid, address, regs->eip,
+                                       regs->esp, error_code);
+
                tsk->thread.cr2 = address;
                /* Kernel addresses are always protection faults */
                tsk->thread.error_code = error_code | (address >= TASK_SIZE);

to your kernel, recompile it and report the output after Segmentation fault. My guess is that it is not vzquota tool at all Smile Anyway, we need an address where it (or something else crashes)


http://static.openvz.org/userbars/openvz-developer.png
Re: Seg fault with quotaugidlimit [message #14267 is a reply to message #14179] Wed, 20 June 2007 23:04 Go to previous messageGo to next message
MaFL is currently offline  MaFL
Messages: 14
Registered: November 2006
Location: Germany
Junior Member

Tnx for your effort!

vzctl[10838]: segfault at 000000a8 rip b7f1525c rsp bfa5f63c error 4
Re: Seg fault with quotaugidlimit [message #14270 is a reply to message #14267] Thu, 21 June 2007 06:29 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

ok. so now we know that it was vzctl actually, not vzquota.

We need to find out what ip address b7f1525c corresponds to.
1. is printed address always the same?
2. what vzctl version do you use? compiled yourself or from openvz.org?
3. I need all vzctl binaries Smile


http://static.openvz.org/userbars/openvz-developer.png
Re: Seg fault with quotaugidlimit [message #14342 is a reply to message #14151] Sun, 24 June 2007 11:18 Go to previous messageGo to next message
falcon is currently offline  falcon
Messages: 4
Registered: May 2007
Junior Member
Hi,

I've the same problem with Second-Level quota:

Starting VE ...
VE is mounted
Setting CPU units: 1000
Set hostname: test
Setting quota ugidlimit: 500
Segmentation fault

I am using Gentoo. Kernel is from sys-kernel/openvz-sources testing (2.6.18-028stab035). vzctl is 3.0.16, also from gentoo portage, filesystem is ext3. Quotas don't work inside the VE, but since this is the first time I am using second-level quotas, I don't know if this is my fault:

test:/# quotacheck -fvagum
quotacheck: Scanning /dev/simfs [/] done
quotacheck: Checked 824 directories and 7538 files
quotacheck: Cannot turn user quotas off on /dev/simfs: Invalid argument
Kernel won't know about changes quotacheck did.
quotacheck: Cannot turn group quotas off on /dev/simfs: Invalid argument
Kernel won't know about changes quotacheck did.
test:/# exit

Perhaps I will apply your patch, migrate the running VEs and tell you the adresses in the dmesg tomorrow, but I don't know wheter I will have enough time. Sad

Which binaries do you exactly need? I attached a list with the files (and directories) the sys-cluster/vzctl ebuild installed.
I can also create a tarball ("binary package") which includes all files of this ebuild.

Thanks,
falcon
  • Attachment: files
    (Size: 3.92KB, Downloaded 368 times)
Re: Seg fault with quotaugidlimit [message #14343 is a reply to message #14270] Sun, 24 June 2007 18:31 Go to previous messageGo to next message
MaFL is currently offline  MaFL
Messages: 14
Registered: November 2006
Location: Germany
Junior Member

Quote:

We need to find out what ip address b7f1525c corresponds to.
1. is printed address always the same?
2. what vzctl version do you use? compiled yourself or from openvz.org?
3. I need all vzctl binaries


1. yes
2. vzctl version 3.0.16-5dso1 from debian.systs.org
3. attached vzctl and libs
  • Attachment: vzctl.tar.gz
    (Size: 76.04KB, Downloaded 352 times)
Re: Seg fault with quotaugidlimit [message #14369 is a reply to message #14343] Tue, 26 June 2007 12:53 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

argh... vzctl libraries are stipped :/

1. is it possible to get an access to the node to try out debugging with gdb?
2. if not, can you please run vzctl command under gdb as:
# ./gdb --args vzctl start 10
then, gdb should catch vzctl when it receives SIGSEGV
and type in gdb then:
disassemble $eip

Thanks in advance!


http://static.openvz.org/userbars/openvz-developer.png
Re: Seg fault with quotaugidlimit [message #14377 is a reply to message #14369] Tue, 26 June 2007 18:26 Go to previous messageGo to next message
MaFL is currently offline  MaFL
Messages: 14
Registered: November 2006
Location: Germany
Junior Member

...
File resolv.conf was modified
Setting quota ugidlimit: 200
Running VE script: /etc/vz/dists/scripts/set_ugid_quota.sh
Running: /usr/sbin/vzquota stat 10 -f 
Running: /usr/sbin/vzquota stat 10 -f -t 

Program received signal SIGSEGV, Segmentation fault.
0xb7f0425c in quota_set@plt () from /usr/lib/libvzctl-0.0.2.so
(gdb) disassemble $eip
Dump of assembler code for function quota_set@plt:
0xb7f0425c <quota_set@plt+0>:   jmp    *0xa8(%ebx)
0xb7f04262 <quota_set@plt+6>:   push   $0x138
0xb7f04267 <quota_set@plt+11>:  jmp    0xb7f03fdc <_init+24>
End of assembler dump.


If you still need access I have to check how can I realize it...
Re: Seg fault with quotaugidlimit [message #14384 is a reply to message #14377] Wed, 27 June 2007 07:52 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

this looks damn strange :/ since SIGSEGV happens at plt@ relocation, which should not happen normally at all...

1. do you use vzctl 3.0.16-5dso1 from debian.systs.org as well?
2. does the same bug happens if vzctl 3.0.17 from git.openvz.org or .src.tgz from download.openvz.org is compiled and installed?
3. yes, looks like I need an access :/


http://static.openvz.org/userbars/openvz-developer.png
Re: Seg fault with quotaugidlimit [message #14413 is a reply to message #14384] Wed, 27 June 2007 14:29 Go to previous messageGo to next message
MaFL is currently offline  MaFL
Messages: 14
Registered: November 2006
Location: Germany
Junior Member

1. yes.. I´m running vzutils from debian.systs.org on 2 boxes, both have the problem (falcon has the segfault with gentoo)

2. vzctl 3.0.17 from gid
Program received signal SIGSEGV, Segmentation fault.
0xb7f2325c in quota_set@plt () from /usr/local/lib/libvzctl-0.0.2.so
(gdb) disassemble $eip
Dump of assembler code for function quota_set@plt:
0xb7f2325c <quota_set@plt+0>:   jmp    *0xa8(%ebx)
0xb7f23262 <quota_set@plt+6>:   push   $0x138
0xb7f23267 <quota_set@plt+11>:  jmp    0xb7f22fdc <_init+24>
End of assembler dump.
(gdb)


@falcon: Is your machine productive?
Re: Seg fault with quotaugidlimit [message #14414 is a reply to message #14413] Wed, 27 June 2007 14:31 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

ok. let's dump in gdb the following:

type:
1. bt
2. info registers


http://static.openvz.org/userbars/openvz-developer.png
Re: Seg fault with quotaugidlimit [message #14416 is a reply to message #14151] Wed, 27 June 2007 15:47 Go to previous messageGo to next message
falcon is currently offline  falcon
Messages: 4
Registered: May 2007
Junior Member
@MaFL, yes, it is, but I think I can temporarily move all VMs to other HNs.
Re: Seg fault with quotaugidlimit [message #14420 is a reply to message #14416] Wed, 27 June 2007 15:53 Go to previous messageGo to next message
MaFL is currently offline  MaFL
Messages: 14
Registered: November 2006
Location: Germany
Junior Member

i think it´s not needed anymore.

I just found an empty to play with.
Re: Seg fault with quotaugidlimit [message #14421 is a reply to message #14420] Wed, 27 June 2007 15:55 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

Which I'm thankfull for very much! investigating right now.


http://static.openvz.org/userbars/openvz-developer.png
Re: Seg fault with quotaugidlimit [message #14431 is a reply to message #14420] Wed, 27 June 2007 17:26 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

Fixed it. Patch can be found at:
http://bugzilla.openvz.org/show_bug.cgi?id=635


http://static.openvz.org/userbars/openvz-developer.png
Re: Seg fault with quotaugidlimit [message #14432 is a reply to message #14342] Wed, 27 June 2007 17:27 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

Fixed it. Patch can be found at:
http://bugzilla.openvz.org/show_bug.cgi?id=635


http://static.openvz.org/userbars/openvz-developer.png
Re: Seg fault with quotaugidlimit [message #14437 is a reply to message #14431] Wed, 27 June 2007 18:24 Go to previous messageGo to next message
MaFL is currently offline  MaFL
Messages: 14
Registered: November 2006
Location: Germany
Junior Member

Tnx!! Very Happy
Re: *SOLVED* Seg fault with quotaugidlimit [message #14526 is a reply to message #14151] Sat, 30 June 2007 16:17 Go to previous messageGo to next message
falcon is currently offline  falcon
Messages: 4
Registered: May 2007
Junior Member
Thank you very much! Smile

Will you release a new vzctl or will I have to patch it myself?
Re: *SOLVED* Seg fault with quotaugidlimit [message #14546 is a reply to message #14526] Mon, 02 July 2007 07:11 Go to previous message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

Sure we will release the fix in next version, but since Kir is at Linux Syposium it will take some time :/


http://static.openvz.org/userbars/openvz-developer.png
Previous Topic: *SOLVED* iptables state in VE broken
Next Topic: *SOLVED* Install OpenVZ on Fedora 7?
Goto Forum:
  


Current Time: Sat Nov 09 16:31:23 GMT 2024

Total time taken to generate the page: 0.03348 seconds