SEGFAULTs when running most tools

Bug #87075 reported by Peter Sabaini
6
Affects Status Importance Assigned to Milestone
util-vserver (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: util-vserver

vserver-info, chcontext and showattr (and others) are SEGFAULTing on me
# vserver-info - SYSINFO
zsh: segmentation fault (core dumped) vserver-info - SYSINFO

versions:
* util-vserver 0.30.212-1
* kernel 2.6.20 with vs2.3.0.10
* arch=x86_64

i've taken this up on irc://irc.oftc.net/vserver and according to the devs there gcc-4.1 is to blame because it doesn't honor the stack-protector disable flag

installing gcc-3.3 and recompiling fixed the problem

Revision history for this message
Izak Burger (isburger) wrote :

I can confirm this problem (vs 2.2.0) and kernel 2.6.19. It goes away if you use gcc-3.4, but it does not go away if you add -fno-stack-protector to CFLAGS.

Revision history for this message
András Korn (kornandras) wrote :

For what it's worth, binary packages from Debian work fine.

Just rebuilding the source on Ubuntu results in a broken package.

And yes, it is due to the stack-protector issue, we checked using gdb:

0x080485ca <processFile+4>: push %ebx
0x080485cb <processFile+5>: sub $0x64,%esp
0x080485ce <processFile+8>: mov %gs:0x14,%eax

It segfaults at the last line. I'm told this code is only generated with stack-protector enabled.

Compiling with gcc-4.0 also works, like this:

debian/rules binary CC='diet -Os gcc-4.0'

Andras

Revision history for this message
rooijan (rrossouw) wrote :

FYI more info on this ...
I have segmentation errors on one machine and not the other. Both running Ubuntu 7.04 server installs. Both custom kernels and tools make installed. No packages at this point.

Machine 1:
root@bermuda:~# aptitude show gcc-4.1 | grep Version
Version: 4.1.2-0ubuntu4
root@bermuda:~# uname -r
2.6.17.13-vs2.0.2.1
Production machine and runs two vservers fine.

Machine 2(segmentaion errors):
root@fiji1:/usr/src# aptitude show gcc-4.1 | grep Version
Version: 4.1.2-0ubuntu4
root@fiji1:/usr/src# uname -r
2.6.20.11-vs2.2.0
1. testme and testfs does not work with packages. If compiled then testme and testfs runs fine but vserver-info segfaults.
2. Machine 1 kernel on Machine 2 breaks the same way.

If anyone wants more info let me know.
-Riaan

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.