# CS 1.6 server segmentation fault



## Vovas (Dec 9, 2016)

Hi, folks!

My counter-strike 1.6 server crashed after start.
Machine details:

```
s@beast:~ % uname -srm
FreeBSD 10.3-RELEASE-p12 amd64
```
Linux options:

```
s@beast:~ % sysctl -a | grep compat.linux
hw.snd.compat_linux_mmap: 0
compat.linux32.maxvmem: 0
compat.linux32.maxssiz: 67108864
compat.linux32.maxdsiz: 536870912
compat.linux.oss_version: 198144
compat.linux.osrelease: 2.6.39
compat.linux.osname: Linux
```
Centos 7 package:

```
s@beast:~ % pkg info | grep linux
linux_base-c7-7.2.1511_3
```
Boot loader, rc.conf and syctl(8) options:

```
s@beast:~ % cat /boot/loader.conf
linux_load="yes"
linprocfs_load="yes"
s@beast:~ % cat /etc/rc.conf | grep linux
linux_enable="YES"
s@beast:~ % cat /etc/sysctl.conf
compat.linux.osrelease=2.6.32
kern.fallback_elf_brand=3
kern.ipc.maxsockbuf=524288
```
/etc/fstab:

```
s@beast:~ % cat /etc/fstab | grep lin
linprocfs   /compat/linux/proc  linprocfs       rw      0       0
tmpfs    /compat/linux/dev/shm  tmpfs   rw,mode=1777    0       0
```
kldstat:

```
s@beast:~ % kldstat | grep lin
 2    1 0xffffffff819bd000 11a90    linprocfs.ko
3    3 0xffffffff819cf000 c128     linux_common.ko
4    1 0xffffffff819dc000 9af18    linux.ko
```
So, I've installed steamcmd linux tool. Download counter-strike server dist. After that, I've started ther server:

```
s@beast:~/hlds % ./hlds_run -game cstrike
Auto-restarting the server on crash
Unable to open tty(/dev/tty) for output

Console initialized.
Using breakpad crash handler
Setting breakpad minidump AppID = 10
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
Exe build: 13:12:29 Aug 29 2013 (6153)
STEAM Auth Server
Server IP address
couldn't exec listip.cfg
couldn't exec banned.cfg
```
Everything normal, as you see. But, if I try to connect, I see this:

```
Segmentation fault (core dumped)

warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration
of GDB.  Attempting to continue with the default i386 settings.

"/usr/home/s/hlds/./hlds_linux.core" is not a core dump: File format is ambiguous
No stack.
debug.cmds:2: Error in sourced command file:
No frame selected.
email debug.log to linux@valvesoftware.com
воскресенье,  4 декабря 2016 г. 20:32:45 (MSK): Server restart in 10 seconds
```
Tried with gdb:

```
s@beast:~/hlds % gdb
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd".
(gdb) set gnutarget i386-marcel-freebsd
(gdb) file hlds_linux
warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration
of GDB.  Attempting to continue with the default i386 settings.

Reading symbols from hlds_linux...done.
(gdb) core hlds_linux.core
Core was generated by `hlds_linux'.
Program terminated with signal 11, Segmentation fault.
#0  0x28436ae8 in ?? ()
(gdb) bt full
#0  0x28436ae8 in ?? ()
No symbol table info available.
```
What is it? Somebody know, how to solve this issue?
Thanks!
P.S. Sorry for bad English!


----------



## FryOnTV (Dec 19, 2016)

I'm no expert on the subject, how ever, there are a few things I see that may affect your SRCDS.
Are you running *STEAMCMD*?
The *hldsupdate tool* has been deprecated.

It looks like you are running FreeBSD 64bit and don't have the Linux 64 compat   option enabled.

Try:

```
#kldload linux64
```
to load kernel module

and this will enable on boot:

```
#echo 'linux64_enable="YES"' >> /etc/rc.conf
```

Hope this helps!


----------



## Vovas (Jan 28, 2017)

Changed kernel module linux64 and unloaded linux

```
% ./hlds_linux -game cstrike
ELF binary type "0" not known.
```
Another error


----------



## SirDice (Jan 30, 2017)

If I recall correctly the 64 bit Linux emulation only works on 11.0-RELEASE and higher.


----------



## Vovas (Feb 10, 2017)

Need to upgrade to 11.0-RELEASE version 
Ok, I'll try.
Thanks for help


----------

