Gentoo Archives: gentoo-hardened

From: John Schember <j5483@×××××.com>
To: gentoo-hardened@l.g.o
Subject: Re: [gentoo-hardened] teamspeak2-server-bin segfaulting
Date: Mon, 08 Jan 2007 01:12:31
Message-Id: 1168218524.7253.5.camel@localhost
In Reply to: [gentoo-hardened] teamspeak2-server-bin segfaulting by Shawn Haggett
1 You don't need to open a bug report for this. It is unique to your
2 setup. You are no doubt using PAX in your kernel. There are known issues
3 with Team Speak and PAX. Simply use the chpax utility on the app to
4 allow it some leeway. Searched http://forum.goteamspeak.com/ for PAX a
5 number of people have run into this problem and there are solutions. I'm
6 pointing you there because I can't comment on which is the best.
7
8 John Schember
9
10
11 On Mon, 2007-01-08 at 11:17 +1030, Shawn Haggett wrote:
12 > I've recently tried to install teamspeak2-server-bin onto my hardened
13 > gentoo server. However everytime I attempt to start it, the process dies
14 > with a segfault.
15 >
16 > I thought I would post here first, to see if anyone has any ideas,
17 > before I go opening a bug.
18 >
19 > emerge --info output:
20 >
21 > Portage 2.1.1-r2 (hardened/x86/2.6, gcc-3.4.6, glibc-2.3.6-r5,
22 > 2.6.17-hardened-r1 i686)
23 > =================================================================
24 > System uname: 2.6.17-hardened-r1 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz
25 > Gentoo Base System version 1.12.6
26 > Last Sync: Sun, 07 Jan 2007 16:30:01 +0000
27 > app-admin/eselect-compiler: [Not Present]
28 > dev-java/java-config: 1.3.7, 2.0.31
29 > dev-lang/python: 2.4.3-r4
30 > dev-python/pycrypto: 2.0.1-r5
31 > dev-util/ccache: [Not Present]
32 > dev-util/confcache: [Not Present]
33 > sys-apps/sandbox: 1.2.17
34 > sys-devel/autoconf: 2.13, 2.61
35 > sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
36 > sys-devel/binutils: 2.16.1-r3
37 > sys-devel/gcc-config: 1.3.14
38 > sys-devel/libtool: 1.5.22
39 > virtual/os-headers: 2.6.17-r2
40 > ACCEPT_KEYWORDS="x86"
41 > AUTOCLEAN="yes"
42 > CBUILD="i686-pc-linux-gnu"
43 > CFLAGS="-march=pentium4 -O2 -pipe"
44 > CHOST="i686-pc-linux-gnu"
45 > CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/bind"
46 > CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf
47 > /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
48 > CXXFLAGS="-march=pentium4 -O2 -pipe"
49 > DISTDIR="/usr/portage/distfiles"
50 > FEATURES="autoconfig distlocks fixpackages metadata-transfer
51 > parallel-fetch sandbox sfperms strict userpriv"
52 > GENTOO_MIRRORS="ftp://mirror.internode.on.net/pub/gentoo
53 > http://distfiles.gentoo.org
54 > http://www.ibiblio.org/pub/Linux/distributions/gentoo"
55 > MAKEOPTS="-j4"
56 > PKGDIR="/usr/portage/packages"
57 > PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times
58 > --compress --force --whole-file --delete --delete-after --stats
59 > --timeout=180 --exclude='/distfiles' --exclude='/local'
60 > --exclude='/packages'"
61 > PORTAGE_TMPDIR="/var/tmp"
62 > PORTDIR="/usr/portage"
63 > PORTDIR_OVERLAY="/usr/local/portage"
64 > SYNC="rsync://speedy.podgeweb.com/gentoo-portage"
65 > USE="X acpi alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw
66 > alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix
67 > alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty
68 > alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks
69 > alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa
70 > alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter
71 > alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null
72 > alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route
73 > alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol
74 > apache2 async authdaemond authfile automount bash-completion berkdb
75 > big-tables bitmap-fonts bzip2 chroot cli courier crypt curl dba
76 > discard-path dlloader elibc_glibc enscript exif expat extraengine fam
77 > fix-connected-rt force-cgi-redirect ftp gd gdbm gif gmp hardened idn
78 > imap innodb input_devices_keyboard input_devices_mouse java jce jpeg
79 > kernel_linux lcms maildir mhash mime mmap mmx mpm-worker mysql mysqli
80 > nagios-dns nagios-ntp nagios-ssh ncurses nptl nptlonly offensive pam
81 > pcre pdf perl php pic png postfix python readline reflection samba sasl
82 > sensord session sockets spell spl sse sse2 ssl symlink sysfs syslog
83 > tcltk tcpd test tetex threads tiff tokenizer toolbar truetype
84 > userland_GNU userlocales vhosts vim-with-x x86 xinerama xml xorg xpm zip
85 > zlib"
86 > Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL,
87 > LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
88 >
89 >
90 > After checking the init script for teamspeak, I ran it with the
91 > following command line:
92 > strace -oteamspeak-trace.txt /opt/teamspeak2-server/server_linux \
93 > -db=/var/lib/teamspeak2-server/server.dbs \
94 > -ini=/var/lib/teamspeak2-server/server.ini \
95 > -log=/var/log/teamspeak2-server/server.log \
96 > -pid=/var/run/teamspeak2-server/server.pid \
97 > -sql=/opt/teamspeak2-server/sql/ \
98 > -tcpquerydocs=/opt/teamspeak2-server/tcpquerydocs \
99 > -httpdocs=/opt/teamspeak2-server/http/
100 >
101 > The trace file is attached. It's rather short. My guess is that the
102 > mmap2 call on the second to last line, which returns 0, is to blame.
103 > However if anyone can shed some light on why this is happening and how
104 > to work around it, that would be great.
105 >
106 > Shawn
107 > plain text document attachment (teamspeak-trace.txt)
108 > execve("/opt/teamspeak2-server/server_linux", ["/opt/teamspeak2-server/server_li"..., "-db=/var/lib/teamspeak2-server/s"..., "-ini=/var/lib/teamspeak2-server/"..., "-log=/var/log/teamspeak2-server/"..., "-pid=/var/run/teamspeak2-server/"..., "-sql=/opt/teamspeak2-server/sql/"..., "-tcpquerydocs=/opt/teamspeak2-se"..., "-httpdocs=/opt/teamspeak2-server"...], [/* 44 vars */]) = 0
109 > uname({sys="Linux", node="speedy", ...}) = 0
110 > brk(0) = 0x823783c
111 > access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
112 > open("/etc/ld.so.cache", O_RDONLY) = 3
113 > fstat64(3, {st_mode=S_IFREG|0644, st_size=63665, ...}) = 0
114 > mmap2(NULL, 63665, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4e63b000
115 > close(3) = 0
116 > open("/lib/libpthread.so.0", O_RDONLY) = 3
117 > read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\334H\0"..., 512) = 512
118 > fstat64(3, {st_mode=S_IFREG|0755, st_size=104800, ...}) = 0
119 > mmap2(NULL, 69848, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x4e629000
120 > madvise(0x4e629000, 69848, MADV_SEQUENTIAL|0x1) = 0
121 > mmap2(0x4e637000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd) = 0x4e637000
122 > mmap2(0x4e639000, 4312, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4e639000
123 > close(3) = 0
124 > open("/lib/libdl.so.2", O_RDONLY) = 3
125 > read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\v\0"..., 512) = 512
126 > fstat64(3, {st_mode=S_IFREG|0755, st_size=10512, ...}) = 0
127 > mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4e628000
128 > mmap2(NULL, 12332, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x4e624000
129 > madvise(0x4e624000, 12332, MADV_SEQUENTIAL|0x1) = 0
130 > mmap2(0x4e626000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0x4e626000
131 > close(3) = 0
132 > open("/lib/libc.so.6", O_RDONLY) = 3
133 > read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\326O\1"..., 512) = 512
134 > fstat64(3, {st_mode=S_IFREG|0755, st_size=1220520, ...}) = 0
135 > mmap2(NULL, 1150108, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x4e50b000
136 > madvise(0x4e50b000, 1150108, MADV_SEQUENTIAL|0x1) = 0
137 > mmap2(0x4e61e000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x113) = 0x4e61e000
138 > mmap2(0x4e622000, 7324, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4e622000
139 > close(3) = 0
140 > mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4e50a000
141 > mprotect(0x4e61e000, 4096, PROT_READ) = 0
142 > mprotect(0x4e626000, 4096, PROT_READ) = 0
143 > mprotect(0x4e637000, 4096, PROT_READ) = 0
144 > mprotect(0x4e661000, 4096, PROT_READ) = 0
145 > set_thread_area({entry_number:-1 -> 6, base_addr:0x4e50a6b0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
146 > munmap(0x4e63b000, 63665) = 0
147 > set_tid_address(0x4e50a6f8) = 21183
148 > rt_sigaction(SIGRTMIN, {0x4e62d424, [], SA_RESTORER|SA_SIGINFO, 0x4e634490}, NULL, 8) = 0
149 > rt_sigaction(SIGRT_1, {0x4e62d498, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x4e634490}, NULL, 8) = 0
150 > rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
151 > getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
152 > _sysctl({{CTL_KERN, KERN_VERSION}, 2, 0x5c311f6c, 35, (nil), 0}) = 0
153 > open("/dev/urandom", O_RDONLY) = 3
154 > read(3, "\4\344\344\205", 4) = 4
155 > close(3) = 0
156 > futex(0x4e627028, FUTEX_WAKE, 2147483647) = 0
157 > brk(0) = 0x823783c
158 > brk(0x825883c) = 0x825883c
159 > brk(0x8259000) = 0x8259000
160 > open("/opt/teamspeak2-server/server_linux", O_RDONLY) = 3
161 > read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\f\0\2\0\3\0\1\0\0\0\0206\5"..., 512) = 512
162 > fstat64(3, {st_mode=S_IFREG|0755, st_size=945552, ...}) = 0
163 > close(3) = 0
164 > open("/opt/teamspeak2-server/server_linux", O_RDONLY) = 3
165 > read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\f\0\2\0\3\0\1\0\0\0\0206\5"..., 512) = 512
166 > fstat64(3, {st_mode=S_IFREG|0755, st_size=945552, ...}) = 0
167 > close(3) = 0
168 > futex(0x822f45c, FUTEX_WAKE, 2147483647) = 0
169 > dup(1) = 3
170 > fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR)
171 > fstat64(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
172 > mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4e64a000
173 > _llseek(3, 0, 0x5c311e58, SEEK_CUR) = -1 ESPIPE (Illegal seek)
174 > mmap2(NULL, 65535, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, 0, 0) = 0
175 > readlink("/proc/self/exe", "/opt/teamspeak2-server/server_linux", 4096) = 35
176 > --- SIGSEGV (Segmentation fault) @ 0 (0) ---
177 > +++ killed by SIGSEGV +++
178
179 --
180 gentoo-hardened@g.o mailing list

Replies

Subject Author
Re: [gentoo-hardened] teamspeak2-server-bin segfaulting Shawn Haggett <podge@××××××××.com>
Re: [gentoo-hardened] teamspeak2-server-bin segfaulting Shawn Haggett <podge@××××××××.com>